Update to (somewhat?) dendritic pattern
Heavily inspired by https://github.com/Doc-Steve/dendritic-design-with-flake-parts. > Atomic commits? Never heard of them!
This commit is contained in:
30
modules/factory/user.nix
Normal file
30
modules/factory/user.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ self, ... }: {
|
||||
config.flake.factory.user = username: isAdmin: {
|
||||
nixos."${username}" =
|
||||
{ lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
users.users."${username}" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${username}";
|
||||
extraGroups = lib.optionals isAdmin [ "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
# required for zsh completion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
home-manager.users."${username}" = {
|
||||
imports = [
|
||||
self.modules.homeManager."${username}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeManager."${username}" = {
|
||||
home.username = "${username}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user