move user home-manager declarations to nixosModules

This commit is contained in:
Aly Raffauf 2024-06-28 19:36:23 -04:00
parent 94d894f76e
commit e59d580d37
10 changed files with 49 additions and 21 deletions

View file

@ -5,8 +5,4 @@
pkgs,
...
}: {
home-manager = {
users.aly = import ../../homes/aly;
users.dustin = import ../../homes/dustin;
};
}

View file

@ -16,6 +16,5 @@
};
}
];
users.aly = import ../../homes/aly;
};
}

View file

@ -16,7 +16,5 @@
};
}
];
users.aly = import ../../homes/aly;
users.morgan = import ../../homes/morgan;
};
}

View file

@ -63,7 +63,7 @@
}
];
users.aly = {
users.aly = lib.mkForce {
imports = [../../homes/aly];
systemd.user = {
services = {
@ -141,6 +141,5 @@
};
};
};
users.dustin = import ../../homes/dustin;
};
}

View file

@ -16,6 +16,5 @@
'';
}
];
users.aly = import ../../homes/aly;
};
}

View file

@ -24,6 +24,5 @@
};
}
];
users.aly = import ../../homes/aly;
};
}

View file

@ -254,29 +254,53 @@
type = lib.types.bool;
};
size = lib.mkOption {
description = "Percent size of the zram swap relative to RAM.";
description = "zram swap size relative to RAM.";
default = 50;
type = lib.types.int;
};
};
};
users = {
aly = {
enable = lib.mkEnableOption "Aly's user.";
manageHome = lib.mkOption {
description = "Whether to enable aly's home directory.";
type = lib.types.bool;
default = config.ar.users.aly.enable;
};
password = lib.mkOption {
description = "Hashed password for aly.";
type = lib.types.str;
};
};
dustin = {
enable = lib.mkEnableOption "Dustin's user.";
manageHome = lib.mkOption {
description = "Whether to manage dustin's home directory.";
type = lib.types.bool;
default = config.ar.users.dustin.enable;
};
password = lib.mkOption {
description = "Hashed password for dustin.";
type = lib.types.str;
};
};
morgan = {
enable = lib.mkEnableOption "Morgan's user.";
manageHome = lib.mkOption {
description = "Whether to manage morgan's home directory.";
type = lib.types.bool;
default = config.ar.users.morgan.enable;
};
password = lib.mkOption {
description = "Hashed password for morgan.";
type = lib.types.str;

View file

@ -1,11 +1,15 @@
{
inputs,
pkgs,
lib,
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.users.aly.enable {
home-manager.users.aly =
if config.ar.users.aly.manageHome
then import ../../../homes/aly
else {};
users.users.aly = {
description = "Aly Raffauf";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];

View file

@ -1,15 +1,20 @@
{
inputs,
pkgs,
lib,
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.users.dustin.enable {
home-manager.users.dustin =
if config.ar.users.dustin.manageHome
then import ../../../homes/dustin
else {};
users.users.dustin = {
description = "Dustin Raffauf";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
hashedPassword = config.ar.users.dustin.password;
isNormalUser = true;
uid = 1001;
};

View file

@ -1,15 +1,20 @@
{
inputs,
pkgs,
lib,
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.users.morgan.enable {
home-manager.users.morgan =
if config.ar.users.morgan.manageHome
then import ../../../homes/morgan
else {};
users.users.morgan = {
description = "Morgan Tamayo";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
hashedPassword = config.ar.users.morgan.password;
isNormalUser = true;
uid = 1002;
};