diff --git a/flake.lock b/flake.lock index eabf6ed..07c8c3f 100644 --- a/flake.lock +++ b/flake.lock @@ -234,11 +234,11 @@ "nix-secrets": { "flake": false, "locked": { - "lastModified": 1723838364, - "narHash": "sha256-L1KajQACN1256oVG//QPXWuVbuzxlSAlOjXT67i6c0Q=", + "lastModified": 1724432746, + "narHash": "sha256-s7XsY4ZsS9jyzZWpXOJNVzc03SNQbALM+S28QKXc8co=", "ref": "refs/heads/main", - "rev": "d57c296dab0ec1e7c6f28c7741d9a591b35117da", - "revCount": 59, + "rev": "56ccf5bf3f4d8687dc22c390cdafe20c08a7e549", + "revCount": 60, "type": "git", "url": "file:./nix-secrets" }, diff --git a/flake.nix b/flake.nix index 54f51bb..93e41a6 100644 --- a/flake.nix +++ b/flake.nix @@ -87,19 +87,11 @@ in { formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); + nixosConfigurations = { Dimaga = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - - # Add unstable repo - specialArgs = { - pkgs-unstable = import nixpkgs-unstable { - system = "x86_64-linux"; - config.allowUnfree = true; - }; - }; - modules = defaultModules ++ [ nixos-hardware.nixosModules.common-cpu-intel ./hosts/Dimaga diff --git a/modules/common.nix b/modules/common.nix index 53e0525..ae0a910 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,5 +1,10 @@ # Modules common to all systems -{ pkgs, config, ... }: +{ + pkgs, + config, + inputs, + ... +}: { config = { @@ -14,6 +19,16 @@ ]; }; + # Allow packages from the unstable repo by using 'pkgs.unstable' + nixpkgs.overlays = [ + (final: _prev: { + unstable = import inputs.nixpkgs-unstable { + system = final.system; + config.allowUnfree = true; + }; + }) + ]; + programs = { # Enable NH, an alternative nixos-rebuild frontend. nh = {