This commit is contained in:
2025-08-04 17:50:57 +03:00
parent 889df388f8
commit aac4567c02
3 changed files with 67 additions and 38 deletions
+22 -22
View File
@@ -7,33 +7,33 @@
{ {
imports = with inputs; [ imports = with inputs; [
./essentials ./essentials
./users.nix
(import ./options.nix { inherit lib inputs; }) # Options (import ./options.nix { inherit lib inputs; }) # Options
# Flake modules
home-manager.nixosModules.home-manager # home-manager module home-manager.nixosModules.home-manager # home-manager module
nix-index-database.nixosModules.nix-index # nix-index module nix-index-database.nixosModules.nix-index # nix-index module
]; ];
# defines global user # defines global user
config.users = { # config.users = {
users = { # users = {
"${config.device.username}" = { # "${config.xlib.device.username}" = {
isNormalUser = true; # isNormalUser = true;
description = "Jor Oqyude"; # description = "Jor Oqyude";
initialPassword = "1234"; # initialPassword = "1234";
extraGroups = [ # extraGroups = [
"beets" # "beets"
"audio" # "audio"
"disk" # "disk"
"gamemode" # "gamemode"
"libvirtd" # "libvirtd"
"networkmanager" # "networkmanager"
"pipewire" # "pipewire"
"qemu-libvirtd" # "qemu-libvirtd"
"wheel" # "wheel"
"immich" # "immich"
]; # ];
}; # };
}; # };
}; # };
} }
+18 -16
View File
@@ -5,22 +5,24 @@
}: }:
{ {
options = { options = {
device = { xlib = {
type = lib.mkOption { device = {
type = lib.types.enum [ type = lib.mkOption {
"minimal" type = lib.types.enum [
"primary" "minimal"
"server" "primary"
"vds" "server"
"wsl" "vds"
]; "wsl"
default = "minimal"; ];
description = "Type of device for this host."; default = "minimal";
}; description = "Type of device for this host.";
username = lib.mkOption { };
type = lib.types.str; username = lib.mkOption {
default = "${inputs.zeroq.devices.admin}"; type = lib.types.str;
description = "Username for host."; default = "${inputs.zeroq.devices.admin}";
description = "Username for host.";
};
}; };
}; };
}; };
+27
View File
@@ -0,0 +1,27 @@
{
config,
...
}:
{
config.users = {
users = {
"${config.xlib.device.username}" = {
isNormalUser = true;
description = "Jor Oqyude";
initialPassword = "1234";
extraGroups = [
"beets"
"audio"
"disk"
"gamemode"
"libvirtd"
"networkmanager"
"pipewire"
"qemu-libvirtd"
"wheel"
"immich"
];
};
};
};
}