diff options
| Commit | 2dfa6f1eb76a54c277ca842e8d6d660268ce6949 (patch) | |
|---|---|---|
| Author | 2023-12-16 12:50:45 +0200 | |
| Committer | 2023-12-16 12:50:45 +0200 | |
| Files | d2db4636b25aa014a920f2a5c258617c35e85eab | |
| nix-2dfa6f1eb76a54c277ca842e8d6d660268ce6949.tar nix-2dfa6f1eb76a54c277ca842e8d6d660268ce6949.tar.gz nix-2dfa6f1eb76a54c277ca842e8d6d660268ce6949.zip | ||
| Parent | c8236039fa2e5635290da25f176d917d5dee768e (diff) | |
[flake,autoconfig] Reworked how package inputs are handled
4 files changed, 15 insertions, 23 deletions
| -rw-r--r-- | autoconfig.nix | 15 | ||||
| -rw-r--r-- | flake.lock | 19 | ||||
| -rw-r--r-- | flake.nix | 3 | ||||
| -rw-r--r-- | packages/default.nix | 1 |
diff --git a/autoconfig.nix b/autoconfig.nix index 95ffcc1..ee8b108 100644 --- a/autoconfig.nix +++ b/autoconfig.nix @@ -16,14 +16,25 @@ in { (name: _: (lib.hasInfix "_" name) -> (lib.hasPrefix (sysidentity.type + "_") name)) (import ./packages)); + + inputs-overlays = + lib.mapAttrs + (_: nixpkgs: + nixpkgs.legacyPackages.${sysidentity.arch}) + (lib.filterAttrs + (name: _: + lib.hasPrefix "nixpkgs-" name) + inputs); in lib.nixosSystem { system = sysidentity.arch; modules = [ ./machines/${dir}/hardware-configuration.nix ./configuration.nix - ({ ... }: { networking.hostName = sysidentity.name; }) - # ({ ... }: { environment.systemPackages = [ inputs.nixpkgs-firefox119.legacyPackages.x86_64-linux.firefox ]; }) + ({ ... }: { + networking.hostName = sysidentity.name; + nixpkgs.overlays = [ (_: _: inputs-overlays) ]; + }) ] ++ (if lib.pathIsRegularFile ./machines/${dir}/configuration.nix then [ ./machines/${dir}/configuration.nix ] @@ -16,26 +16,9 @@ "type": "github" } }, - "nixpkgs-firefox119": { - "locked": { - "lastModified": 1696748673, - "narHash": "sha256-UbPHrH4dKN/66EpfFpoG4St4XZYDX9YcMVRQGWzAUNA=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "9957cd48326fe8dbd52fdc50dd2502307f188b0d", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "9957cd48326fe8dbd52fdc50dd2502307f188b0d", - "type": "github" - } - }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "nixpkgs-firefox119": "nixpkgs-firefox119" + "nixpkgs": "nixpkgs" } } }, @@ -3,10 +3,9 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; - nixpkgs-firefox119.url = "github:nixos/nixpkgs/9957cd48326fe8dbd52fdc50dd2502307f188b0d"; }; - outputs = { self, nixpkgs, nixpkgs-firefox119, ... }@inputs: + outputs = inputs: let autoconfig = import ./autoconfig.nix { inherit inputs; }; in { diff --git a/packages/default.nix b/packages/default.nix index 060ac9e..cdd1407 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -61,7 +61,6 @@ peek gparted # Virtualization virt-manager libvirt qemu_kvm kvmtool qemu_full - firefox ]; programs.firefox.enable = true; |
