hm: handle absent osConfig

This commit is contained in:
Aly Raffauf 2024-12-13 20:45:52 -05:00
parent 008d46e505
commit 70c5676e59
2 changed files with 6 additions and 6 deletions

View file

@ -49,7 +49,7 @@
"file://${config.home.homeDirectory}/src" "file://${config.home.homeDirectory}/src"
] ]
++ lib.optional ( ++ lib.optional (
osConfig.ar.users.aly.syncthing.enable (osConfig.ar.users.aly.syncthing.enable or false)
&& (config.home.username == "aly") && (config.home.username == "aly")
) "file://${config.home.homeDirectory}/sync"; ) "file://${config.home.homeDirectory}/sync";

View file

@ -96,20 +96,20 @@ in {
desktop = { desktop = {
autoSuspend = lib.mkOption { autoSuspend = lib.mkOption {
description = "Whether to autosuspend on idle."; description = "Whether to autosuspend on idle.";
default = cfg.desktop.hyprland.enable; default = cfg.desktop.hyprland.enable or false;
type = lib.types.bool; type = lib.types.bool;
}; };
gnome.enable = lib.mkOption { gnome.enable = lib.mkOption {
description = "GNOME with sane defaults."; description = "GNOME with sane defaults.";
default = osConfig.ar.desktop.gnome.enable; default = osConfig.ar.desktop.gnome.enable or false;
type = lib.types.bool; type = lib.types.bool;
}; };
hyprland = { hyprland = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Hyprland with full desktop session components."; description = "Hyprland with full desktop session components.";
default = osConfig.ar.desktop.hyprland.enable; default = osConfig.ar.desktop.hyprland.enable or false;
type = lib.types.bool; type = lib.types.bool;
}; };
@ -138,7 +138,7 @@ in {
kde.enable = lib.mkOption { kde.enable = lib.mkOption {
description = "KDE Plasma with sane defaults."; description = "KDE Plasma with sane defaults.";
default = osConfig.ar.desktop.kde.enable; default = osConfig.ar.desktop.kde.enable or false;
type = lib.types.bool; type = lib.types.bool;
}; };
@ -162,7 +162,7 @@ in {
laptopMode = lib.mkOption { laptopMode = lib.mkOption {
description = "Enable laptop configuration."; description = "Enable laptop configuration.";
default = osConfig.ar.laptopMode; default = osConfig.ar.laptopMode or false;
type = lib.types.bool; type = lib.types.bool;
}; };