Moved modules into appropriate folders
This commit is contained in:
parent
48dcf38304
commit
3760c929fe
9 changed files with 18 additions and 8 deletions
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.mainUser;
|
||||
in
|
||||
{
|
||||
options.mainUser = {
|
||||
enable = lib.mkEnableOption "Enable user module";
|
||||
|
||||
userName = lib.mkOption {
|
||||
default = "pazpi";
|
||||
type = lib.types.str;
|
||||
description = config.users.users."<name>".userName.description;
|
||||
};
|
||||
|
||||
description = lib.mkOption {
|
||||
default = "Davide Pasetto";
|
||||
type = lib.types.str;
|
||||
description = config.users.users."<name>".description;
|
||||
};
|
||||
|
||||
hashedPassword = lib.mkOption {
|
||||
default = "";
|
||||
type = lib.types.str;
|
||||
description = config.users.users."<name>".initialHashedPassword.description;
|
||||
};
|
||||
|
||||
flatpak = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable the flatpak engine for the user
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.${cfg.userName} = {
|
||||
description = cfg.description;
|
||||
extraGroups = [
|
||||
"users"
|
||||
"wheel"
|
||||
];
|
||||
initialHashedPassword = cfg.hashedPassword;
|
||||
isNormalUser = true;
|
||||
isSystemUser = false;
|
||||
shell = pkgs.zsh;
|
||||
uid = 1000;
|
||||
|
||||
packages =
|
||||
with pkgs;
|
||||
lib.mkIf cfg.flatpak [
|
||||
flatpak
|
||||
gnome.gnome-software
|
||||
];
|
||||
};
|
||||
|
||||
console.keyMap = "it";
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue