options to settings
This commit is contained in:
@@ -126,11 +126,11 @@
|
||||
./server/vaultwarden
|
||||
];
|
||||
};
|
||||
options = {
|
||||
settings = {
|
||||
imports = [
|
||||
./options/accounts
|
||||
./options/monitors
|
||||
./options/theme
|
||||
./settings/accounts
|
||||
./settings/monitors
|
||||
./settings/theme
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ in {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = osConfig.theme.background.lockscreen;
|
||||
path = osConfig.settings.theme.background.lockscreen;
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
|
||||
@@ -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}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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)$"
|
||||
|
||||
@@ -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";
|
||||
@@ -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 = {
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user