summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-03-10 23:33:18 -0600
committerAlejandro Soto <alejandro@34project.org>2022-03-10 23:40:01 -0600
commit1f0b119fac141d362094740328ce5f60dd47ad28 (patch)
treea4caa724a3924b246882d7cecfd6445f70995ee3 /flake.nix
parente287d00e96b5505da20399d073ae96458f841397 (diff)
Add sys and home platform dirs
Diffstat (limited to '')
-rw-r--r--flake.nix45
1 files changed, 27 insertions, 18 deletions
diff --git a/flake.nix b/flake.nix
index 660ee66..65941a9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,8 +11,9 @@
nur.url = "github:nix-community/NUR";
};
- outputs = { self, nixpkgs, home-manager, nur, ... }: let
+ outputs = { self, nixpkgs, home-manager, nur, ... }: with nixpkgs.lib; let
util = import ./util;
+ inherit (util nixpkgs.lib) importAll;
pkgSet = pkgs: import ./pkgs {
inherit pkgs;
@@ -26,30 +27,38 @@
};
nixosConfigurations = with nixpkgs.lib; let
- hostUtil = util nixpkgs.lib;
hostConfig = host: (makeOverridable nixosSystem) {
system = "x86_64-linux";
modules = [ (import ./sys self) host ];
};
- in mapAttrs (_: hostConfig) (hostUtil.importAll { root = ./platform; });
+ in mapAttrs (_: hostConfig) (importAll { root = ./sys/platform; });
- homeConfigurations."ale@p-user" = home-manager.lib.homeManagerConfiguration {
- system = "x86_64-linux";
- configuration = {
- imports = [ ./home ];
- nixpkgs.overlays = [ nur.overlay self.overlay ];
- };
+ homeConfigurations = let
+ home = platform: home-manager.lib.homeManagerConfiguration {
+ system = "x86_64-linux";
- username = "ale";
- homeDirectory = "/home/ale";
+ configuration = import ./home;
+ extraModules = [ platform ];
- # Update the state version as needed.
- # See the changelog here:
- # https://nix-community.github.io/home-manager/release-notes.html#sec-release-21.05
- stateVersion = "21.11";
+ username = "ale";
+ homeDirectory = "/home/ale";
- # Optionally use extraSpecialArgs
- # to pass through arguments to home.nix
- };
+ # Update the state version as needed.
+ # See the changelog here:
+ # https://nix-community.github.io/home-manager/release-notes.html#sec-release-21.05
+ stateVersion = "21.11";
+
+ # Optionally use extraSpecialArgs
+ # to pass through arguments to home.nix
+ extraSpecialArgs = {
+ inherit nur self;
+ };
+ };
+
+ homeConfig = id: platform: {
+ name = "ale@${id}";
+ value = home platform;
+ };
+ in mapAttrs' homeConfig (importAll { root = ./home/platform; });
};
}