diff --git a/flake.nix b/flake.nix index a09389d..257a740 100644 --- a/flake.nix +++ b/flake.nix @@ -77,29 +77,31 @@ }: { formatter = pkgs.alejandra; - packages = (pkgs.callPackage ./pkgs {}) // { - default = pkgs.writeScriptBin "activate" '' - echo ========= System ========= - ${pkgs.lib.getExe self'.packages.system} switch - echo - echo ========= Home ========= - ${pkgs.lib.getExe self'.packages.home} switch - ''; - - home = pkgs.writeScriptBin "activate-home" '' - ${pkgs.lib.getExe inputs'.home-manager.packages.default} --flake "${self}" "$@" - ''; + packages = + (pkgs.callPackage ./pkgs {}) + // { + default = pkgs.writeScriptBin "activate" '' + echo ========= System ========= + ${pkgs.lib.getExe self'.packages.system} switch + echo + echo ========= Home ========= + ${pkgs.lib.getExe self'.packages.home} switch + ''; - system = let - builder = - if pkgs.stdenv.isDarwin - then pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild" - else pkgs.lib.getExe pkgs.nixos-rebuid; - in - pkgs.writeScriptBin "activate-system" '' - ${builder} --flake "${self}" "$@" + home = pkgs.writeScriptBin "activate-home" '' + ${pkgs.lib.getExe inputs'.home-manager.packages.default} --flake "${self}" "$@" ''; - }; + + system = let + builder = + if pkgs.stdenv.isDarwin + then pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild" + else pkgs.lib.getExe pkgs.nixos-rebuid; + in + pkgs.writeScriptBin "activate-system" '' + ${builder} --flake "${self}" "$@" + ''; + }; devShells = let globalShells = pkgs.callPackage ./dev_shells.nix { diff --git a/hosts/niuniobook.nix b/hosts/niuniobook.nix index 1c8797b..a0a86ca 100644 --- a/hosts/niuniobook.nix +++ b/hosts/niuniobook.nix @@ -1,7 +1,4 @@ -{ - inputs, - ... -}: { +{inputs, ...}: { type = "darwin"; hostname = "NiunioBook"; diff --git a/modules/git.nix b/modules/git.nix index a553ef1..1a21d60 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -38,7 +38,7 @@ cargoHash = "sha256-Qw7ZHLWPgIKqCmjhHwJ4QEz/WQMxrR8eG3tAgAKN7v0="; buildNoDefaultFeatures = true; - buildFeatures = [ "github" ]; + buildFeatures = ["github"]; # attempts to run the program on .git in src which is not deterministic doCheck = false; diff --git a/modules/pijul.nix b/modules/pijul.nix index fb240c7..5bcbbd1 100644 --- a/modules/pijul.nix +++ b/modules/pijul.nix @@ -1,3 +1,3 @@ -{ pkgs, ... }: { - home.packages = [ pkgs.pijul ]; +{pkgs, ...}: { + home.packages = [pkgs.pijul]; } diff --git a/modules/swiftbar.nix b/modules/swiftbar.nix index dc8a014..280404e 100644 --- a/modules/swiftbar.nix +++ b/modules/swiftbar.nix @@ -1,4 +1,8 @@ -{pkgs, lib, ...}: { +{ + pkgs, + lib, + ... +}: { # WIP options.swiftbar = let inherit (lib) mkOption types; @@ -15,7 +19,7 @@ type = types.string; example = "1m"; description = '' - How often should SwiftBar run script in the background. + How often should SwiftBar run script in the background. ''; }; @@ -37,4 +41,4 @@ }; }; }; - } +} diff --git a/modules/tools.nix b/modules/tools.nix index 3c9deab..568be4e 100644 --- a/modules/tools.nix +++ b/modules/tools.nix @@ -1,4 +1,9 @@ -{pkgs, inputs, config, ...}: let +{ + pkgs, + inputs, + config, + ... +}: let pkgs-self = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}; in { home.packages = with pkgs; [ diff --git a/pkgs/default.nix b/pkgs/default.nix index 330f732..a0d4729 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,4 +1,9 @@ -{callPackage, entr, ripgrep, writeShellApplication}: { +{ + callPackage, + entr, + ripgrep, + writeShellApplication, +}: { prr = callPackage ./prr.nix {}; imbox = callPackage ./imbox.nix {}; ubin-client = callPackage ./ubin-client.nix {}; diff --git a/pkgs/imbox.nix b/pkgs/imbox.nix index fcdb3b0..3e92393 100644 --- a/pkgs/imbox.nix +++ b/pkgs/imbox.nix @@ -1,14 +1,21 @@ -{ libressl, stdenv, fetchgit, lib, pkg-config }: stdenv.mkDerivation (self: { - pname = "imbox"; - version = "1.4"; +{ + libressl, + stdenv, + fetchgit, + lib, + pkg-config, +}: +stdenv.mkDerivation (self: { + pname = "imbox"; + version = "1.4"; - src = fetchgit { + src = fetchgit { url = "https://git.causal.agency/imbox"; rev = self.version; hash = "sha256-y5GCH3miimOWSCvS+Kh/nOpNrIEpcoc9p8jlQqYuh7Q="; - }; + }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [pkg-config]; - buildInputs = [ libressl ]; - }) + buildInputs = [libressl]; +}) diff --git a/pkgs/prr.nix b/pkgs/prr.nix index 2d70033..305be02 100644 --- a/pkgs/prr.nix +++ b/pkgs/prr.nix @@ -1,35 +1,42 @@ -{ stdenv, rustPlatform, openssl, darwin, fetchFromGitHub, lib, pkg-config }: - +{ + stdenv, + rustPlatform, + openssl, + darwin, + fetchFromGitHub, + lib, + pkg-config, +}: rustPlatform.buildRustPackage rec { - pname = "prr"; - version = "0.16.0"; + pname = "prr"; + version = "0.16.0"; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ + pkg-config + ]; - buildInputs = - [ - openssl - ] - ++ lib.optional stdenv.isDarwin (with darwin.apple_sdk; [ - frameworks.Security - frameworks.SystemConfiguration - ]); + buildInputs = + [ + openssl + ] + ++ lib.optional stdenv.isDarwin (with darwin.apple_sdk; [ + frameworks.Security + frameworks.SystemConfiguration + ]); - src = fetchFromGitHub { - owner = "danobi"; - repo = pname; - rev = "v${version}"; - hash = lib.fakeHash; - }; + src = fetchFromGitHub { + owner = "danobi"; + repo = pname; + rev = "v${version}"; + hash = lib.fakeHash; + }; - cargoHash = lib.fakeHash; + cargoHash = lib.fakeHash; - meta = with lib; { - description = "Mailing list style code reviews for GitHub"; - homepage = "https://github.com/danobi/prr"; - license = licenses.gpl2; - maintainers = []; - }; - } + meta = with lib; { + description = "Mailing list style code reviews for GitHub"; + homepage = "https://github.com/danobi/prr"; + license = licenses.gpl2; + maintainers = []; + }; +} diff --git a/pkgs/ubin-client.nix b/pkgs/ubin-client.nix index 479cd28..9a79dae 100644 --- a/pkgs/ubin-client.nix +++ b/pkgs/ubin-client.nix @@ -1,4 +1,8 @@ -{writeShellApplication, curl}: writeShellApplication { +{ + writeShellApplication, + curl, +}: +writeShellApplication { name = "ubin"; runtimeInputs = [curl]; diff --git a/users/hauleth.nix b/users/hauleth.nix index bd9f4b9..75a263d 100644 --- a/users/hauleth.nix +++ b/users/hauleth.nix @@ -1,7 +1,4 @@ -{ - inputs, - ... -}: { +{inputs, ...}: { username = "hauleth"; home = inputs.home-manager.lib.homeManagerConfiguration {