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 = [
./hardware-configuration.nix
./modules.nix
./options.nix
./settings.nix
];
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.options
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
@@ -52,7 +52,7 @@
};
}
self.nixosModules.nixos
self.nixosModules.options
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
@@ -69,7 +69,7 @@
};
}
self.nixosModules.nixos
self.nixosModules.options
self.nixosModules.settings
self.nixosModules.server
inputs.agenix.nixosModules.default
];
@@ -86,7 +86,7 @@
};
}
self.nixosModules.nixos
self.nixosModules.options
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];

View File

@@ -33,7 +33,7 @@ in {
imports = [
./hardware-configuration.nix
./modules.nix
./options.nix
./settings.nix
];
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 = [
./hardware-configuration.nix
./modules.nix
./options.nix
./settings.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 = [
./hardware-configuration.nix
./modules.nix
./options.nix
./settings.nix
];
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
];
};
options = {
settings = {
imports = [
./options/accounts
./options/monitors
./options/theme
./settings/accounts
./settings/monitors
./settings/theme
];
};
};

View File

@@ -15,8 +15,8 @@ in {
home.packages = [pkgs.gh];
programs.git = {
enable = true;
userName = osConfig.accounts.username;
userEmail = osConfig.accounts.mail;
userName = osConfig.settings.accounts.username;
userEmail = osConfig.settings.accounts.mail;
delta = {
enable = true;
options.dark = true;
@@ -54,7 +54,7 @@ in {
];
};
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 = [
{
monitor = "";
path = osConfig.theme.background.lockscreen;
path = osConfig.settings.theme.background.lockscreen;
}
];
input-field = [

View File

@@ -43,12 +43,12 @@ in {
wallpaper = [
# kima
"DP-3,${osConfig.theme.background.desktop}"
"HDMI-A-1,${osConfig.theme.background.lockscreen}"
"DP-3,${osConfig.settings.theme.background.desktop}"
"HDMI-A-1,${osConfig.settings.theme.background.lockscreen}"
# bunk
"eDP-1,${osConfig.theme.background.desktop}"
"eDP-1,${osConfig.settings.theme.background.desktop}"
# 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"
}"
)
config.monitors;
config.settings.monitors;
workspace = map (
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 = [
"size 843 650, initialTitle:^(floatcal)$"

View File

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

View File

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

View File

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