summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-03-23 20:45:38 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-03-23 20:45:38 +0100
commit739de7a8fa0ca6c990fd9e7608f69c809cd6f352 (patch)
tree3929a429e74e8e9d83aee6ce7414049b25953251
parent6273649dbd2402bdbe6a465ee5056408adc41924 (diff)
downloadnixos-739de7a8fa0ca6c990fd9e7608f69c809cd6f352.tar
nixos-739de7a8fa0ca6c990fd9e7608f69c809cd6f352.tar.gz
nixos-739de7a8fa0ca6c990fd9e7608f69c809cd6f352.tar.bz2
nixos-739de7a8fa0ca6c990fd9e7608f69c809cd6f352.tar.xz
nixos-739de7a8fa0ca6c990fd9e7608f69c809cd6f352.zip
...
-rw-r--r--flake.lock20
-rw-r--r--flake.nix10
-rw-r--r--system-profiles/core.nix13
3 files changed, 38 insertions, 5 deletions
diff --git a/flake.lock b/flake.lock
index 15e8a7b7..7bdd2a6b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -42,6 +42,23 @@
42 "flake-compat_2": { 42 "flake-compat_2": {
43 "flake": false, 43 "flake": false,
44 "locked": { 44 "locked": {
45 "lastModified": 1641205782,
46 "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
47 "owner": "edolstra",
48 "repo": "flake-compat",
49 "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
50 "type": "github"
51 },
52 "original": {
53 "owner": "edolstra",
54 "ref": "master",
55 "repo": "flake-compat",
56 "type": "github"
57 }
58 },
59 "flake-compat_3": {
60 "flake": false,
61 "locked": {
45 "lastModified": 1627913399, 62 "lastModified": 1627913399,
46 "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", 63 "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
47 "owner": "edolstra", 64 "owner": "edolstra",
@@ -109,7 +126,7 @@
109 }, 126 },
110 "nvfetcher": { 127 "nvfetcher": {
111 "inputs": { 128 "inputs": {
112 "flake-compat": "flake-compat_2", 129 "flake-compat": "flake-compat_3",
113 "flake-utils": "flake-utils", 130 "flake-utils": "flake-utils",
114 "nixpkgs": [ 131 "nixpkgs": [
115 "nixpkgs" 132 "nixpkgs"
@@ -133,6 +150,7 @@
133 "root": { 150 "root": {
134 "inputs": { 151 "inputs": {
135 "deploy-rs": "deploy-rs", 152 "deploy-rs": "deploy-rs",
153 "flake-compat": "flake-compat_2",
136 "home-manager": "home-manager", 154 "home-manager": "home-manager",
137 "nixpkgs": "nixpkgs", 155 "nixpkgs": "nixpkgs",
138 "nvfetcher": "nvfetcher", 156 "nvfetcher": "nvfetcher",
diff --git a/flake.nix b/flake.nix
index a218d2fe..bf412444 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,6 +36,13 @@
36 ref = "master"; 36 ref = "master";
37 inputs.nixpkgs.follows = "nixpkgs"; 37 inputs.nixpkgs.follows = "nixpkgs";
38 }; 38 };
39 flake-compat = {
40 type = "github";
41 owner = "edolstra";
42 repo = "flake-compat";
43 ref = "master";
44 flake = false;
45 };
39 }; 46 };
40 47
41 outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, ... }@inputs: 48 outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, ... }@inputs:
@@ -166,9 +173,6 @@
166 homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); 173 homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations));
167 174
168 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; 175 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths;
169 overlays-path = forAllSystems (system: systemPkgs: systemPkgs.writeText "overlays.nix" ''
170 map import (builtins.attrValues (builtins.fromJSON ${escapeNixString (toJSON overlayPaths)}))
171 '');
172 176
173 packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages; 177 packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages;
174 packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages; 178 packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages;
diff --git a/system-profiles/core.nix b/system-profiles/core.nix
index 92e068b4..8c4325e2 100644
--- a/system-profiles/core.nix
+++ b/system-profiles/core.nix
@@ -53,7 +53,18 @@ in {
53 ''; 53 '';
54 nixPath = [ 54 nixPath = [
55 "nixpkgs=${flakeInputs.nixpkgs.legacyPackages.${config.nixpkgs.system}.path}" 55 "nixpkgs=${flakeInputs.nixpkgs.legacyPackages.${config.nixpkgs.system}.path}"
56 # "nixpkgs-overlays=${flake.overlays-path.${config.nixpkgs.system}}" 56 "nixpkgs-overlays=${pkgs.writeText "overlays.nix" ''
57 attrValues (import
58 (
59 let lock = builtins.fromJSON (builtins.readFile ${toString ../flake.lock}); in
60 fetchTarball {
61 url = "https://github.com/edolstra/flake-compat/archive/''${lock.nodes.flake-compat.locked.rev}.tar.gz";
62 sha256 = lock.nodes.flake-compat.locked.narHash;
63 }
64 )
65 { src = ${toString ../.}; }
66 ).defaultNix.overlays
67 ''}"
57 ]; 68 ];
58 registry = 69 registry =
59 let override = { self = "nixos"; }; 70 let override = { self = "nixos"; };