From 0eeca7d8a45249dac0057d3cec0b3559e83d08cf Mon Sep 17 00:00:00 2001 From: cnst Date: Wed, 31 Jul 2024 18:37:22 +0200 Subject: [PATCH] yahoo --- nixos/core/system/cnix-nh.nix | 11 +++++++++++ nixos/core/system/default.nix | 1 - nixos/core/system/nh.nix | 13 ------------- nixos/core/system/toothpc-nh.nix | 11 +++++++++++ nixos/default.nix | 16 +++++++++++++--- nixos/hosts/default.nix | 6 +++--- nixos/services/xserver/cnix.nix | 6 ++---- 7 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 nixos/core/system/cnix-nh.nix delete mode 100644 nixos/core/system/nh.nix create mode 100644 nixos/core/system/toothpc-nh.nix diff --git a/nixos/core/system/cnix-nh.nix b/nixos/core/system/cnix-nh.nix new file mode 100644 index 00000000..3c09398a --- /dev/null +++ b/nixos/core/system/cnix-nh.nix @@ -0,0 +1,11 @@ +{ + environment.variables.FLAKE = "/home/cnst/.nix-config"; + programs = { + nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/cnst/.nix-config"; + }; + }; +} diff --git a/nixos/core/system/default.nix b/nixos/core/system/default.nix index 2a858f65..29869517 100644 --- a/nixos/core/system/default.nix +++ b/nixos/core/system/default.nix @@ -6,7 +6,6 @@ ... }: { imports = [ - ./nh.nix ./substituters.nix ./nixpkgs.nix ]; diff --git a/nixos/core/system/nh.nix b/nixos/core/system/nh.nix deleted file mode 100644 index 5ac2e179..00000000 --- a/nixos/core/system/nh.nix +++ /dev/null @@ -1,13 +0,0 @@ -let - homeDir = builtins.getEnv "HOME"; -in { - environment.variables.FLAKE = "${homeDir}/.nix-config"; - programs = { - nh = { - enable = true; - clean.enable = true; - clean.extraArgs = "--keep-since 4d --keep 3"; - flake = "${homeDir}/.nix-config"; - }; - }; -} diff --git a/nixos/core/system/toothpc-nh.nix b/nixos/core/system/toothpc-nh.nix new file mode 100644 index 00000000..f843c30c --- /dev/null +++ b/nixos/core/system/toothpc-nh.nix @@ -0,0 +1,11 @@ +{ + environment.variables.FLAKE = "/home/toothpick/.nix-config"; + programs = { + nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/toothpick/.nix-config"; + }; + }; +} diff --git a/nixos/default.nix b/nixos/default.nix index ab297f6b..86ed510f 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,5 +1,5 @@ let - desktop = [ + shared = [ ./core ./locale @@ -17,10 +17,20 @@ let ]; laptop = - desktop + shared ++ [ ./services/fwupd ]; + cnix = + shared + ++ [ + ./core/system/cnix-nh.nix + ]; + toothpc = + shared + ++ [ + ./core/system/toothpc-nh.nix + ]; in { - inherit desktop laptop; + inherit shared laptop cnix toothpc; } diff --git a/nixos/hosts/default.nix b/nixos/hosts/default.nix index 9b036e4b..a21567ed 100644 --- a/nixos/hosts/default.nix +++ b/nixos/hosts/default.nix @@ -10,7 +10,7 @@ mod = "${self}/nixos"; # get the basic config to build on top of - inherit (import "${self}/nixos") desktop laptop; + inherit (import "${self}/nixos") laptop cnix toothpc; # get these into the module system specialArgs = {inherit inputs self;}; @@ -18,7 +18,7 @@ cnix = nixosSystem { inherit specialArgs; modules = - desktop + cnix ++ [ ./cnix "${mod}/core/lanzaboote.nix" @@ -46,7 +46,7 @@ toothpc = nixosSystem { inherit specialArgs; modules = - desktop + toothpc ++ [ ./toothpc "${mod}/core" diff --git a/nixos/services/xserver/cnix.nix b/nixos/services/xserver/cnix.nix index 91515b65..fb7c9eb0 100644 --- a/nixos/services/xserver/cnix.nix +++ b/nixos/services/xserver/cnix.nix @@ -1,6 +1,4 @@ -let - homeDir = builtins.getEnv "HOME"; -in { +{config, ...}: { services.xserver = { enable = true; videoDrivers = ["amdgpu"]; @@ -8,7 +6,7 @@ in { extraLayouts.hhkbse = { description = "HHKBse by cnst"; languages = ["se"]; - symbolsFile = "${homeDir}/.nix-config/nixos/hosts/cnix/xkb/symbols/hhkbse"; + symbolsFile = /home/cnst/.nix-config/nixos/hosts/cnix/xkb/symbols/hhkbse; }; layout = "hhkbse"; # dir = "/home/cnst/.nix-config/nixos/xkb";