home-manager kat user refactor

This commit is contained in:
kat witch 2021-08-05 21:47:54 +01:00
parent b1f27aa74d
commit 1230ff387b
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
13 changed files with 34 additions and 82 deletions

View file

@ -1,11 +1,20 @@
rec {
base = ./base.nix;
gui = ./gui.nix;
sway = ./sway.nix;
dev = ./dev.nix;
media = ./media.nix;
personal = ./personal.nix;
let katUser = { lib }: let
userImport = profile: { config, ... }: {
config.home-manager.users.kat = {
imports = [
(./. + "/${profile}")
];
};
}; profileNames = [
"gui"
"sway"
"dev"
"media"
"personal"
]; userProfiles = with userProfiles;
lib.genAttrs profileNames userImport // {
base = { imports = [ ./nixos.nix (userImport "base") ]; };
server = { imports = [ personal ]; };
guiFull = { imports = [ gui sway dev media personal ]; };
}
}; in userProfiles;
in { __functor = self: katUser; isModule = false; }