diff options
| author | Mel <einebeere@gmail.com> | 2024-09-13 20:06:49 +0000 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-09-13 20:06:49 +0000 |
| commit | 28589384164e0d43cd4567b4a5894ad1db9f316a (patch) | |
| tree | 489d70f81716f0234de40bd684fa8b83308f5299 | |
| parent | ed248959c1df59bf93edc755549a00c070525f7b (diff) | |
| download | rnrd-28589384164e0d43cd4567b4a5894ad1db9f316a.tar.zst rnrd-28589384164e0d43cd4567b4a5894ad1db9f316a.zip | |
Configure common server parameters from flake only
| -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)); - } |
