diff --git a/flake.lock b/flake.lock index fe327f1..6de85a6 100644 --- a/flake.lock +++ b/flake.lock @@ -163,6 +163,26 @@ "type": "github" } }, + "nh": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712645404, + "narHash": "sha256-uEVd15WsX+Wti9PXW724puFcsFO72VTiJyBwW2WXT9M=", + "owner": "viperML", + "repo": "nh", + "rev": "fe4a96a0b0b0662dba7c186b4a1746c70bbcad03", + "type": "github" + }, + "original": { + "owner": "viperML", + "repo": "nh", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 867925a..127c42c 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nh = { + url = "github:viperML/nh"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hyprland.url = "github:hyprwm/Hyprland"; }; diff --git a/hosts/seb-desktop/default.nix b/hosts/seb-desktop/default.nix index d978062..dd89fa3 100644 --- a/hosts/seb-desktop/default.nix +++ b/hosts/seb-desktop/default.nix @@ -25,6 +25,7 @@ sops.enable = true; printing.enable = true; syncthing.enable = true; + nix-helper.enable = true; }; boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/hosts/seb-laptop/default.nix b/hosts/seb-laptop/default.nix index 374c5bc..f3ad6eb 100644 --- a/hosts/seb-laptop/default.nix +++ b/hosts/seb-laptop/default.nix @@ -29,6 +29,7 @@ sops.enable = true; printing.enable = true; syncthing.enable = true; + nix-helper.enable = true; }; boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/modules/system/default.nix b/modules/system/default.nix index 7512cd5..f567e58 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -15,5 +15,6 @@ ./boot-loader.nix ./printing.nix ./syncthing.nix + ./nix-helper.nix ]; } diff --git a/modules/system/nix-helper.nix b/modules/system/nix-helper.nix new file mode 100644 index 0000000..1f14215 --- /dev/null +++ b/modules/system/nix-helper.nix @@ -0,0 +1,12 @@ +{ + inputs, + config, + lib, + ... +}: { + imports = [inputs.nh.nixosModules.default]; + + options.myConfig.nix-helper.enable = lib.mkEnableOption ""; + + config.nh.enable = config.myConfig.nix-helper.enable; +}