diff options
| -rw-r--r-- | configuration.nix | 4 | ||||
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | me.nix | 3 | ||||
| -rw-r--r-- | util.nix | 7 |
4 files changed, 3 insertions, 13 deletions
diff --git a/configuration.nix b/configuration.nix index fafa7b5..6a00bf0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,9 +1,7 @@ -{ pkgs, lib, ... }: +{ me, pkgs, lib, ... }: let util = import ./util.nix { inherit lib; }; - - me = util.checkMe (import ./me.nix); security = import ./security.nix; in { diff --git a/flake.nix b/flake.nix index 4237c2b..a613be2 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ inherit system; specialArgs = { + me = { name = "lapin"; }; + unstable = import nixpkgs-unstable { inherit system; }; inherit inputs; }; diff --git a/me.nix b/me.nix deleted file mode 100644 index e4e8cfa..0000000 --- a/me.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - name = ""; # Enter machine name here -} diff --git a/util.nix b/util.nix index 1375ef5..e783f3b 100644 --- a/util.nix +++ b/util.nix @@ -1,14 +1,7 @@ { lib }: { - checkMe = { name ? "", ... }@me: - assert name != ""; - assert (builtins.pathExists ./machines/${name}.nix) - && (builtins.pathExists ./hardware/${name}.nix); - me; - titleCase = str: with lib.strings; let firstCharUpper = s: concatStrings [(toUpper (substring 0 1 s)) (substring 1 (stringLength s) s)]; in concatStringsSep " " (map firstCharUpper (splitString " " str)); - } |
