fix: Make ugaif.forUser add to enabled users and set WSL settings
This commit is contained in:
172
hosts/boot.nix
172
hosts/boot.nix
@@ -78,104 +78,112 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# ========== Disk Partitioning (Disko) ==========
|
||||
disko.enableConfig = lib.mkDefault true;
|
||||
config = lib.mkMerge [
|
||||
# Enable forUser if specified
|
||||
(lib.mkIf (config.ugaif.forUser != null) {
|
||||
ugaif.users.${config.ugaif.forUser}.enable = true;
|
||||
})
|
||||
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
device = config.ugaif.host.filesystem.device;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
# EFI System Partition
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
label = "BOOT";
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
extraArgs = [
|
||||
"-n"
|
||||
"BOOT"
|
||||
];
|
||||
# Main configuration
|
||||
{
|
||||
# ========== Disk Partitioning (Disko) ==========
|
||||
disko.enableConfig = lib.mkDefault true;
|
||||
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
device = config.ugaif.host.filesystem.device;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
# EFI System Partition
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
label = "BOOT";
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
extraArgs = [
|
||||
"-n"
|
||||
"BOOT"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Swap Partition (size configurable per host)
|
||||
swap = {
|
||||
name = "swap";
|
||||
label = "swap";
|
||||
size = config.ugaif.host.filesystem.swapSize;
|
||||
content = {
|
||||
type = "swap";
|
||||
# Swap Partition (size configurable per host)
|
||||
swap = {
|
||||
name = "swap";
|
||||
label = "swap";
|
||||
size = config.ugaif.host.filesystem.swapSize;
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Root Partition (takes remaining space)
|
||||
root = {
|
||||
name = "root";
|
||||
label = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
extraArgs = [
|
||||
"-L"
|
||||
"ROOT"
|
||||
];
|
||||
# Root Partition (takes remaining space)
|
||||
root = {
|
||||
name = "root";
|
||||
label = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
extraArgs = [
|
||||
"-L"
|
||||
"ROOT"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Bootloader Configuration
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
plymouth.enable = true;
|
||||
# Bootloader Configuration
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
plymouth.enable = true;
|
||||
|
||||
# Enable "Silent boot"
|
||||
consoleLogLevel = 3;
|
||||
initrd.verbose = false;
|
||||
# Enable "Silent boot"
|
||||
consoleLogLevel = 3;
|
||||
initrd.verbose = false;
|
||||
|
||||
# Hide the OS choice for bootloaders.
|
||||
# It's still possible to open the bootloader list by pressing any key
|
||||
# It will just not appear on screen unless a key is pressed
|
||||
loader.timeout = lib.mkDefault 0;
|
||||
};
|
||||
# Hide the OS choice for bootloaders.
|
||||
# It's still possible to open the bootloader list by pressing any key
|
||||
# It will just not appear on screen unless a key is pressed
|
||||
loader.timeout = lib.mkDefault 0;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
SuspendState=freeze
|
||||
HibernateDelaySec=2h
|
||||
'';
|
||||
systemd.sleep.extraConfig = ''
|
||||
SuspendState=freeze
|
||||
HibernateDelaySec=2h
|
||||
'';
|
||||
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
};
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -107,11 +107,6 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
# Enable forUser if specified
|
||||
ugaif.users = lib.mkIf (config.ugaif.forUser != null) {
|
||||
${config.ugaif.forUser}.enable = true;
|
||||
};
|
||||
|
||||
# Generate NixOS users
|
||||
users.users =
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user