refactor: Tidy flake.nix and break it apart
This commit is contained in:
26
outputs/homeConfigurations.nix
Normal file
26
outputs/homeConfigurations.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ ... }@inputs:
|
||||
|
||||
let users = builtins.readDir ../users;
|
||||
mkUser = username: _: {
|
||||
imports = [
|
||||
(import ../users/${username}/default.nix).homeConfiguration
|
||||
|
||||
inputs.self.homeManagerModules.default
|
||||
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.impermanence.homeManagerModules.impermanence
|
||||
|
||||
# Directory name should always match username.
|
||||
({ ... }: { home.username = username; })
|
||||
|
||||
({ lib, ... }: {
|
||||
nix = {
|
||||
settings.experimental-features =
|
||||
lib.mkDefault
|
||||
[ "nix-command" "flakes" ];
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
in
|
||||
builtins.mapAttrs mkUser users
|
||||
Reference in New Issue
Block a user