options to settings

This commit is contained in:
2025-07-19 12:25:07 +02:00
parent b92c4dc53f
commit 323dfcbc82
21 changed files with 147 additions and 147 deletions

View File

@@ -33,7 +33,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules.nix ./modules.nix
./options.nix ./settings.nix
]; ];
networking.hostName = "bunk"; networking.hostName = "bunk";

View File

@@ -1,41 +0,0 @@
{
accounts = {
username = "cnst";
mail = "adam@cnst.dev";
sshUser = "bunk";
};
monitors = [
{
name = "DP-3";
width = 2560;
height = 1440;
refreshRate = 240;
position = "0x0";
transform = 0;
bitDepth = 10;
workspace = "1";
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
refreshRate = 60;
position = "2560x0";
# transform = 3;
workspace = "5";
}
{
name = "eDP-1";
width = 1920;
height = 1200;
refreshRate = 60;
workspace = "1";
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
}

43
hosts/bunk/settings.nix Normal file
View File

@@ -0,0 +1,43 @@
{
settings = {
accounts = {
username = "cnst";
mail = "adam@cnst.dev";
sshUser = "bunk";
};
monitors = [
{
name = "DP-3";
width = 2560;
height = 1440;
refreshRate = 240;
position = "0x0";
transform = 0;
bitDepth = 10;
workspace = "1";
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
refreshRate = 60;
position = "2560x0";
# transform = 3;
workspace = "5";
}
{
name = "eDP-1";
width = 1920;
height = 1200;
refreshRate = 60;
workspace = "1";
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
};
}

View File

@@ -35,7 +35,7 @@
}; };
} }
self.nixosModules.nixos self.nixosModules.nixos
self.nixosModules.options self.nixosModules.settings
inputs.chaotic.nixosModules.default inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
]; ];
@@ -52,7 +52,7 @@
}; };
} }
self.nixosModules.nixos self.nixosModules.nixos
self.nixosModules.options self.nixosModules.settings
inputs.chaotic.nixosModules.default inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
]; ];
@@ -69,7 +69,7 @@
}; };
} }
self.nixosModules.nixos self.nixosModules.nixos
self.nixosModules.options self.nixosModules.settings
self.nixosModules.server self.nixosModules.server
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
]; ];
@@ -86,7 +86,7 @@
}; };
} }
self.nixosModules.nixos self.nixosModules.nixos
self.nixosModules.options self.nixosModules.settings
inputs.chaotic.nixosModules.default inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
]; ];

View File

@@ -33,7 +33,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules.nix ./modules.nix
./options.nix ./settings.nix
]; ];
time.hardwareClockInLocalTime = true; time.hardwareClockInLocalTime = true;

View File

@@ -1,41 +0,0 @@
{
accounts = {
username = "cnst";
mail = "adam@cnst.dev";
sshUser = "kima";
};
monitors = [
{
name = "DP-3";
width = 2560;
height = 1440;
refreshRate = 240;
position = "0x0";
transform = 0;
bitDepth = 10;
workspace = "1";
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
refreshRate = 60;
position = "2560x0";
# transform = 3;
workspace = "5";
}
{
name = "eDP-1";
width = 1920;
height = 1200;
refreshRate = 60;
workspace = "1";
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
}

43
hosts/kima/settings.nix Normal file
View File

@@ -0,0 +1,43 @@
{
settings = {
accounts = {
username = "cnst";
mail = "adam@cnst.dev";
sshUser = "kima";
};
monitors = [
{
name = "DP-3";
width = 2560;
height = 1440;
refreshRate = 240;
position = "0x0";
transform = 0;
bitDepth = 10;
workspace = "1";
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
refreshRate = 60;
position = "2560x0";
# transform = 3;
workspace = "5";
}
{
name = "eDP-1";
width = 1920;
height = 1200;
refreshRate = 60;
workspace = "1";
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
};
}

View File

@@ -35,7 +35,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules.nix ./modules.nix
./options.nix ./settings.nix
./server.nix ./server.nix
]; ];

View File

@@ -1,7 +0,0 @@
{
accounts = {
username = "cnst";
mail = "adam@cnst.dev";
sshUser = "sobotka";
};
}

View File

@@ -0,0 +1,9 @@
{
settings = {
accounts = {
username = "cnst";
mail = "adam@cnst.dev";
sshUser = "sobotka";
};
};
}

View File

@@ -33,7 +33,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules.nix ./modules.nix
./options.nix ./settings.nix
]; ];
networking.hostName = "toothpc"; networking.hostName = "toothpc";

View File

@@ -1,22 +0,0 @@
{
accounts = {
username = "toothpick";
mail = "place@holder";
sshUser = "toothpc";
};
monitors = [
{
name = "DVI-D-1";
width = 1920;
height = 1080;
refreshRate = 144;
workspace = "1";
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
}

View File

@@ -0,0 +1,24 @@
{
settings = {
accounts = {
username = "toothpick";
mail = "place@holder";
sshUser = "toothpc";
};
monitors = [
{
name = "DVI-D-1";
width = 1920;
height = 1080;
refreshRate = 144;
workspace = "1";
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
};
}

View File

@@ -126,11 +126,11 @@
./server/vaultwarden ./server/vaultwarden
]; ];
}; };
options = { settings = {
imports = [ imports = [
./options/accounts ./settings/accounts
./options/monitors ./settings/monitors
./options/theme ./settings/theme
]; ];
}; };
}; };

View File

@@ -15,8 +15,8 @@ in {
home.packages = [pkgs.gh]; home.packages = [pkgs.gh];
programs.git = { programs.git = {
enable = true; enable = true;
userName = osConfig.accounts.username; userName = osConfig.settings.accounts.username;
userEmail = osConfig.accounts.mail; userEmail = osConfig.settings.accounts.mail;
delta = { delta = {
enable = true; enable = true;
options.dark = true; options.dark = true;
@@ -54,7 +54,7 @@ in {
]; ];
}; };
xdg.configFile."git/allowed_signers".text = '' xdg.configFile."git/allowed_signers".text = ''
${osConfig.accounts.mail} namespaces="git" ${osConfig.accounts.sshKey} ${osConfig.settings.accounts.mail} namespaces="git" ${osConfig.settings.accounts.sshKey}
''; '';
}; };
} }

View File

@@ -31,7 +31,7 @@ in {
background = [ background = [
{ {
monitor = ""; monitor = "";
path = osConfig.theme.background.lockscreen; path = osConfig.settings.theme.background.lockscreen;
} }
]; ];
input-field = [ input-field = [

View File

@@ -43,12 +43,12 @@ in {
wallpaper = [ wallpaper = [
# kima # kima
"DP-3,${osConfig.theme.background.desktop}" "DP-3,${osConfig.settings.theme.background.desktop}"
"HDMI-A-1,${osConfig.theme.background.lockscreen}" "HDMI-A-1,${osConfig.settings.theme.background.lockscreen}"
# bunk # bunk
"eDP-1,${osConfig.theme.background.desktop}" "eDP-1,${osConfig.settings.theme.background.desktop}"
# toothpc # toothpc
"DVI-D-1,${osConfig.theme.background.desktop}" "DVI-D-1,${osConfig.settings.theme.background.desktop}"
]; ];
}; };
}; };

View File

@@ -39,11 +39,11 @@ in {
else "disable" else "disable"
}" }"
) )
config.monitors; config.settings.monitors;
workspace = map ( workspace = map (
m: "${m.workspace},monitor:${m.name}" m: "${m.workspace},monitor:${m.name}"
) (lib.filter (m: m.enabled && m.workspace != null) config.monitors); ) (lib.filter (m: m.enabled && m.workspace != null) config.settings.monitors);
windowrule = [ windowrule = [
"size 843 650, initialTitle:^(floatcal)$" "size 843 650, initialTitle:^(floatcal)$"

View File

@@ -12,7 +12,7 @@
toothpc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGu5vZbb5ExampleKeyHereGfDF9c5 toothpick@toothpc"; toothpc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGu5vZbb5ExampleKeyHereGfDF9c5 toothpick@toothpc";
}; };
keyName = config.accounts.sshUser or null; keyName = config.settings.accounts.sshUser or null;
selectedKey = selectedKey =
if keyName != null if keyName != null
@@ -23,7 +23,7 @@
sshKeys sshKeys
else builtins.abort "No accounts.sshUser provided, cannot select SSH key."; else builtins.abort "No accounts.sshUser provided, cannot select SSH key.";
in { in {
options.accounts = { options.settings.accounts = {
username = mkOption { username = mkOption {
type = types.str; type = types.str;
default = "cnst"; default = "cnst";

View File

@@ -1,12 +1,8 @@
# Yanked from Misterio77 # Yanked from Misterio77
{ {lib, ...}: let
lib,
config,
...
}: let
inherit (lib) mkOption types; inherit (lib) mkOption types;
in { in {
options.monitors = mkOption { options.settings.monitors = mkOption {
type = types.listOf ( type = types.listOf (
types.submodule { types.submodule {
options = { options = {

View File

@@ -1,8 +1,4 @@
{ {lib, ...}: let
lib,
config,
...
}: let
inherit (lib) mkOption types; inherit (lib) mkOption types;
bgs = { bgs = {
wallpaper_1 = "~/media/images/bg_1.jpg"; wallpaper_1 = "~/media/images/bg_1.jpg";
@@ -11,7 +7,7 @@
}; };
bgList = builtins.attrNames bgs; bgList = builtins.attrNames bgs;
in { in {
options.theme = { options.settings.theme = {
background = { background = {
lockscreen = mkOption { lockscreen = mkOption {
type = types.enum bgList; type = types.enum bgList;