refactor: schema

This commit is contained in:
2026-05-06 21:57:58 +02:00
parent c01c13aa50
commit 4b6e05212c
27 changed files with 198 additions and 377 deletions
+69
View File
@@ -0,0 +1,69 @@
{
cursor = {
name = "phinger-cursors-light";
packagePath = [ "phinger-cursors" ];
size = 24;
};
kanagawa = {
displayName = "Kanagawa Wave";
name = "kanagawa-wave";
gtkThemeName = "Kanagawa-BL-LB";
iconThemeName = "Kanagawa";
owner = "Fausto-Korpsvart";
repo = "Kanagawa-GKT-Theme";
rev = "55ca4ba249eba21f861b9866b71ab41bb8930318";
hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E=";
version = "unstable-2025-10-23";
palette = {
background = "#1F1F28";
foreground = "#DCD7BA";
secondaryBackground = "#16161D";
border = "#2A2A37";
selectionBackground = "#2D4F67";
selectionForeground = "#C8C093";
url = "#72A7BC";
cursor = "#C8C093";
muted = "#727169";
accents = {
blue = "#7E9CD8";
green = "#98BB6C";
magenta = "#D27E99";
orange = "#FFA066";
purple = "#957FB8";
red = "#E82424";
yellow = "#E6C384";
cyan = "#7AA89F";
};
niri.border = {
active = "#7E9CD8";
inactive = "#54546D";
urgent = "#E82424";
};
terminal = {
color0 = "#16161D";
color1 = "#C34043";
color2 = "#76946A";
color3 = "#C0A36E";
color4 = "#7E9CD8";
color5 = "#957FB8";
color6 = "#6A9589";
color7 = "#C8C093";
color8 = "#727169";
color9 = "#E82424";
color10 = "#98BB6C";
color11 = "#E6C384";
color12 = "#7FB4CA";
color13 = "#938AA9";
color14 = "#7AA89F";
color15 = "#DCD7BA";
color16 = "#FFA066";
color17 = "#FF5D62";
};
};
};
}
+1 -2
View File
@@ -16,7 +16,7 @@ in
{ {
imports = [ homeModules.browser-vivaldi ]; imports = [ homeModules.browser-vivaldi ];
meta.desktop.browserCommand = lib.getExe (vivaldiPackage pkgs); facts.desktop.browserCommand = lib.getExe (vivaldiPackage pkgs);
home.sessionVariables.BROWSER = lib.getExe (vivaldiPackage pkgs); home.sessionVariables.BROWSER = lib.getExe (vivaldiPackage pkgs);
xdg.mimeApps.defaultApplicationPackages = [ (vivaldiPackage pkgs) ]; xdg.mimeApps.defaultApplicationPackages = [ (vivaldiPackage pkgs) ];
}; };
@@ -32,7 +32,6 @@ in
{ {
imports = [ homeModules.file-manager-nautilus ]; imports = [ homeModules.file-manager-nautilus ];
meta.desktop.fileManagerCommand = lib.getExe (nautilusPackage pkgs);
xdg.mimeApps.defaultApplicationPackages = [ (nautilusPackage pkgs) ]; xdg.mimeApps.defaultApplicationPackages = [ (nautilusPackage pkgs) ];
}; };
+3 -2
View File
@@ -10,7 +10,7 @@ in
... ...
}: }:
let let
machine = osConfig.meta.machine; machine = osConfig.facts.machine;
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers"; allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
mkScope = mkScope =
@@ -19,6 +19,7 @@ in
email = account.emails.${scope}.address; email = account.emails.${scope}.address;
key = lib.attrByPath [ scope ] null machine.sshKeys; key = lib.attrByPath [ scope ] null machine.sshKeys;
hasSigningKey = key != null; hasSigningKey = key != null;
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
in in
{ {
allowedSigners = lib.optional hasSigningKey "${email} ${key.publicKey}"; allowedSigners = lib.optional hasSigningKey "${email} ${key.publicKey}";
@@ -28,7 +29,7 @@ in
inherit email; inherit email;
} }
// lib.optionalAttrs hasSigningKey { // lib.optionalAttrs hasSigningKey {
signingKey = "${key.privateKeyPath}.pub"; signingKey = "${privateKeyPath}.pub";
}; };
} }
// lib.optionalAttrs hasSigningKey { // lib.optionalAttrs hasSigningKey {
+2 -2
View File
@@ -160,8 +160,8 @@ in
# Hostname/ConfigDir needed for nixd # Hostname/ConfigDir needed for nixd
nixdExtras = { nixdExtras = {
nixpkgs = "import ${pkgs.path} {}"; nixpkgs = "import ${pkgs.path} {}";
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.meta.machine.name}.options''; nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options'';
home_manager_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.meta.machine.name}.options.home-manager.users.type.getSubOptions []''; home_manager_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options.home-manager.users.type.getSubOptions []'';
}; };
themeSetup = import ./_kanagawa-theme.nix { themeSetup = import ./_kanagawa-theme.nix {
+1 -1
View File
@@ -28,7 +28,7 @@ let
text = lib.concatStringsSep "\n" [ text = lib.concatStringsSep "\n" [
"# shellcheck disable=SC2016" "# shellcheck disable=SC2016"
"cd ${lib.escapeShellArg workdir}" "cd ${lib.escapeShellArg workdir}"
"exec ${lib.escapeShellArg config.meta.desktop.terminalCommand} ${argString}" "exec ${lib.escapeShellArg config.facts.desktop.terminalCommand} ${argString}"
]; ];
}; };
in in
+17 -9
View File
@@ -51,6 +51,7 @@ in
repo repo
; ;
}; };
machine = osConfig.facts.machine;
in in
{ {
home = { home = {
@@ -70,27 +71,34 @@ in
programs.niri.settings = { programs.niri.settings = {
outputs = lib.mapAttrs ( outputs = lib.mapAttrs (
_: display: _: display:
let
scale = display.scale or null;
width = display.width or null;
height = display.height or null;
refresh = display.refresh or null;
in
{ {
position = { position = {
inherit (display) x y; x = display.x or 0;
y = display.y or 0;
}; };
} }
// lib.optionalAttrs (display.primary or false) { // lib.optionalAttrs (display.primary or false) {
"focus-at-startup" = true; "focus-at-startup" = true;
} }
// lib.optionalAttrs (display.scale != null) { // lib.optionalAttrs (scale != null) {
inherit (display) scale; inherit scale;
} }
// lib.optionalAttrs (display.width != null && display.height != null && display.refresh != null) { // lib.optionalAttrs (width != null && height != null && refresh != null) {
mode = { mode = {
inherit (display) inherit
width width
height height
refresh refresh
; ;
}; };
} }
) osConfig.meta.machine.displays; ) (machine.displays or { });
environment.DISPLAY = ":0"; environment.DISPLAY = ":0";
spawn-at-startup = [ spawn-at-startup = [
@@ -156,9 +164,9 @@ in
}; };
binds = import ./_bindings.nix { binds = import ./_bindings.nix {
browserCommand = config.meta.desktop.browserCommand; browserCommand = config.facts.desktop.browserCommand;
launcherCommand = config.meta.desktop.launcherCommand; launcherCommand = config.facts.desktop.launcherCommand;
terminalCommand = config.meta.desktop.terminalCommand; terminalCommand = config.facts.desktop.terminalCommand;
shortcutCommands = shortcuts.commands; shortcutCommands = shortcuts.commands;
}; };
}; };
+1 -1
View File
@@ -71,7 +71,7 @@ in
terminalCommand = lib.getExe pkgs.xdg-terminal-exec; terminalCommand = lib.getExe pkgs.xdg-terminal-exec;
}; };
settings = settings =
if baseSettings == { } || !osConfig.meta.machine.portable then if baseSettings == { } || !(osConfig.facts.machine.portable or false) then
baseSettings baseSettings
else else
mkPortableSettings baseSettings; mkPortableSettings baseSettings;
+5 -13
View File
@@ -5,31 +5,23 @@
let let
repo = config.repo; repo = config.repo;
account = repo.account; account = repo.account;
homeModules = config.flake.modules.homeManager;
in in
{ {
flake.modules.homeManager.pinentry =
{ pkgs, ... }:
{
meta.pinentry.package = pkgs.pinentry-gnome3;
};
flake.modules.homeManager.passwords = flake.modules.homeManager.passwords =
{ {
config, pkgs,
... ...
}: }:
let
pinentryPackage = pkgs.pinentry-gnome3;
in
{ {
imports = [
homeModules.pinentry
];
programs.rbw = { programs.rbw = {
enable = true; enable = true;
settings = { settings = {
base_url = repo.services.vaultwarden.url; base_url = repo.services.vaultwarden.url;
email = account.primaryEmail.address; email = account.primaryEmail.address;
pinentry = config.meta.pinentry.package; pinentry = pinentryPackage;
}; };
}; };
}; };
+2 -2
View File
@@ -17,7 +17,7 @@ in
mkOffice365Account = mkOffice365Account =
{ {
address, address,
primary, primary ? false,
... ...
}: }:
{ {
@@ -37,7 +37,7 @@ in
mkMxrouteAccount = mkMxrouteAccount =
{ {
address, address,
primary, primary ? false,
... ...
}: }:
{ {
+7
View File
@@ -5,6 +5,13 @@ let
service = repo.services.actual; service = repo.services.actual;
in in
{ {
repo.services.actual = {
domain = "finance.jelles.net";
host = "127.0.0.1";
port = 3000;
url = "https://finance.jelles.net";
};
flake.modules.nixos.actual = flake.modules.nixos.actual =
{ lib, ... }: { lib, ... }:
lib.mkMerge [ lib.mkMerge [
+7
View File
@@ -5,6 +5,13 @@ let
service = repo.services.gitea; service = repo.services.gitea;
in in
{ {
repo.services.gitea = {
domain = "git.jelles.net";
host = "127.0.0.1";
port = 3001;
url = "https://git.jelles.net/";
};
flake.modules.nixos.gitea = flake.modules.nixos.gitea =
{ lib, ... }: { lib, ... }:
lib.mkMerge [ lib.mkMerge [
+2 -2
View File
@@ -3,8 +3,8 @@ let
account = config.repo.account; account = config.repo.account;
personalPublicKeys = personalPublicKeys =
machines: machines:
map (machine: machine.sshKeys.personal.publicKey) ( map (machine: (machine.sshKeys or { }).personal.publicKey) (
lib.filter (machine: machine.sshKeys ? personal) (builtins.attrValues machines) lib.filter (machine: (machine.sshKeys or { }) ? personal) (builtins.attrValues machines)
); );
in in
{ {
@@ -5,6 +5,13 @@ let
service = repo.services.radicale; service = repo.services.radicale;
in in
{ {
repo.services.radicale = {
domain = "radicale.jelles.net";
host = "127.0.0.1";
port = 5232;
url = "https://radicale.jelles.net/";
};
flake.modules.nixos.radicale = flake.modules.nixos.radicale =
{ lib, ... }: { lib, ... }:
lib.mkMerge [ lib.mkMerge [
@@ -5,6 +5,13 @@ let
service = repo.services.vaultwarden; service = repo.services.vaultwarden;
in in
{ {
repo.services.vaultwarden = {
domain = "vault.jelles.net";
host = "127.0.0.1";
port = 8100;
url = "https://vault.jelles.net";
};
flake.modules.nixos.vaultwarden = flake.modules.nixos.vaultwarden =
{ lib, ... }: { lib, ... }:
lib.mkMerge [ lib.mkMerge [
+11 -6
View File
@@ -5,21 +5,26 @@
}: }:
let let
syncMachines = lib.listToAttrs ( syncMachines = lib.listToAttrs (
lib.concatMap ( lib.concatLists (
machine: lib.mapAttrsToList (
lib.optional (machine.syncthingId != null) ( machineName: machine:
let let
name = "${config.repo.account.name}@${machine.name}"; syncthingId = machine.syncthingId or null;
in
lib.optional (syncthingId != null) (
let
name = "${config.repo.account.name}@${machineName}";
in in
{ {
inherit name; inherit name;
value = { value = {
inherit name; inherit name;
id = machine.syncthingId; id = syncthingId;
}; };
} }
) )
) (builtins.attrValues config.repo.machines) ) config.repo.machines
)
); );
syncPhones = { syncPhones = {
+2 -2
View File
@@ -175,7 +175,7 @@ in
{ {
imports = [ config.flake.modules.homeManager.terminal-foot ]; imports = [ config.flake.modules.homeManager.terminal-foot ];
meta.desktop.terminalCommand = lib.getExe pkgs.foot; facts.desktop.terminalCommand = lib.getExe pkgs.foot;
xdg.terminal-exec = { xdg.terminal-exec = {
enable = true; enable = true;
@@ -188,7 +188,7 @@ in
{ {
imports = [ config.flake.modules.homeManager.terminal-kitty ]; imports = [ config.flake.modules.homeManager.terminal-kitty ];
meta.desktop.terminalCommand = lib.getExe (kittySingleInstance pkgs); facts.desktop.terminalCommand = lib.getExe (kittySingleInstance pkgs);
xdg.terminal-exec = { xdg.terminal-exec = {
enable = true; enable = true;
+2
View File
@@ -8,6 +8,8 @@ let
hmModules = config.flake.modules.homeManager; hmModules = config.flake.modules.homeManager;
in in
{ {
repo.theme = import ./_theme.nix;
flake.modules.nixos.theme = flake.modules.nixos.theme =
{ {
pkgs, pkgs,
+1 -1
View File
@@ -73,6 +73,6 @@ in
]; ];
}; };
meta.desktop.launcherCommand = lib.getExe config.programs.vicinae.package; facts.desktop.launcherCommand = lib.getExe config.programs.vicinae.package;
}; };
} }
+1 -1
View File
@@ -35,6 +35,6 @@ in
{ {
imports = [ homeModules.walker-base ]; imports = [ homeModules.walker-base ];
meta.desktop.launcherCommand = lib.getExe config.programs.walker.package; facts.desktop.launcherCommand = lib.getExe config.programs.walker.package;
}; };
} }
+5 -100
View File
@@ -1,8 +1,11 @@
{ {
repo = { repo = {
account = { account = rec {
name = "kiri"; name = "kiri";
realName = "Jelle Spreeuwenberg"; realName = "Jelle Spreeuwenberg";
homeDirectory = "/home/${name}";
nixosConfigurationPath = "${homeDirectory}/.config/nixos";
emails = { emails = {
personal = { personal = {
address = "mail@jelles.net"; address = "mail@jelles.net";
@@ -22,106 +25,8 @@
type = "office365"; type = "office365";
}; };
}; };
};
services = { primaryEmail = emails.personal;
actual = {
domain = "finance.jelles.net";
host = "127.0.0.1";
port = 3000;
url = "https://finance.jelles.net";
};
gitea = {
domain = "git.jelles.net";
host = "127.0.0.1";
port = 3001;
url = "https://git.jelles.net/";
};
radicale = {
domain = "radicale.jelles.net";
host = "127.0.0.1";
port = 5232;
url = "https://radicale.jelles.net/";
};
vaultwarden = {
domain = "vault.jelles.net";
host = "127.0.0.1";
port = 8100;
url = "https://vault.jelles.net";
};
};
theme = {
cursor = {
name = "phinger-cursors-light";
packagePath = [ "phinger-cursors" ];
size = 24;
};
kanagawa = {
displayName = "Kanagawa Wave";
name = "kanagawa-wave";
gtkThemeName = "Kanagawa-BL-LB";
iconThemeName = "Kanagawa";
owner = "Fausto-Korpsvart";
repo = "Kanagawa-GKT-Theme";
rev = "55ca4ba249eba21f861b9866b71ab41bb8930318";
hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E=";
version = "unstable-2025-10-23";
palette = {
background = "#1F1F28";
foreground = "#DCD7BA";
secondaryBackground = "#16161D";
border = "#2A2A37";
selectionBackground = "#2D4F67";
selectionForeground = "#C8C093";
url = "#72A7BC";
cursor = "#C8C093";
muted = "#727169";
accents = {
blue = "#7E9CD8";
green = "#98BB6C";
magenta = "#D27E99";
orange = "#FFA066";
purple = "#957FB8";
red = "#E82424";
yellow = "#E6C384";
cyan = "#7AA89F";
};
niri.border = {
active = "#7E9CD8";
inactive = "#54546D";
urgent = "#E82424";
};
terminal = {
color0 = "#16161D";
color1 = "#C34043";
color2 = "#76946A";
color3 = "#C0A36E";
color4 = "#7E9CD8";
color5 = "#957FB8";
color6 = "#6A9589";
color7 = "#C8C093";
color8 = "#727169";
color9 = "#E82424";
color10 = "#98BB6C";
color11 = "#E6C384";
color12 = "#7FB4CA";
color13 = "#938AA9";
color14 = "#7AA89F";
color15 = "#DCD7BA";
color16 = "#FFA066";
color17 = "#FF5D62";
};
};
};
}; };
}; };
} }
+2 -2
View File
@@ -12,10 +12,10 @@
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
flake.nixosConfigurations = builtins.mapAttrs ( flake.nixosConfigurations = builtins.mapAttrs (
_: machine: name: machine:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ (config.repo.helpers.mkHost machine) ]; modules = [ (config.repo.helpers.mkHost name machine) ];
} }
) config.repo.machines; ) config.repo.machines;
-1
View File
@@ -12,7 +12,6 @@ in
syncthingId = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI"; syncthingId = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI";
stateVersion = "24.05"; stateVersion = "24.05";
hmStateVersion = "24.05";
}; };
flake.modules.nixos.orion = flake.modules.nixos.orion =
-1
View File
@@ -16,7 +16,6 @@ in
syncthingId = "6HBAKXB-DB3B4H2-BODCAXF-KD23H5W-6X5LGLC-ZJHZHLG-7U7YMGO-BB6IXQ3"; syncthingId = "6HBAKXB-DB3B4H2-BODCAXF-KD23H5W-6X5LGLC-ZJHZHLG-7U7YMGO-BB6IXQ3";
stateVersion = "24.05"; stateVersion = "24.05";
hmStateVersion = "24.05";
displays = { displays = {
"LG Electronics LG ULTRAGEAR 103NTYT8R290" = { "LG Electronics LG ULTRAGEAR 103NTYT8R290" = {
-1
View File
@@ -28,7 +28,6 @@ in
}; };
stateVersion = "24.05"; stateVersion = "24.05";
hmStateVersion = "24.05";
}; };
flake.modules.nixos.zenith = flake.modules.nixos.zenith =
+16 -13
View File
@@ -37,26 +37,35 @@ let
}; };
mkHost = mkHost =
machine: name: machine:
{ pkgs, ... }: { pkgs, ... }:
let let
account = config.repo.account; account = config.repo.account;
accountHome = account.homeDirectory or "/home/${account.name}";
normalizedMachine = machine // {
inherit name;
displays = machine.displays or { };
hmStateVersion = machine.hmStateVersion or machine.stateVersion;
portable = machine.portable or false;
sshKeys = machine.sshKeys or { };
syncthingId = machine.syncthingId or null;
};
in in
{ {
imports = [ imports = [
nixosModules.${machine.name} nixosModules.${name}
]; ];
meta.machine = machine; facts.machine = normalizedMachine;
networking.hostName = machine.name; networking.hostName = name;
system.stateVersion = machine.stateVersion; system.stateVersion = machine.stateVersion;
programs.zsh.enable = true; programs.zsh.enable = true;
users.users.${account.name} = { users.users.${account.name} = {
isNormalUser = true; isNormalUser = true;
home = account.homeDirectory; home = accountHome;
extraGroups = [ extraGroups = [
"wheel" "wheel"
"networkmanager" "networkmanager"
@@ -67,19 +76,13 @@ let
home-manager.users.${account.name} = { home-manager.users.${account.name} = {
home = { home = {
username = account.name; username = account.name;
homeDirectory = account.homeDirectory; homeDirectory = accountHome;
stateVersion = machine.hmStateVersion; stateVersion = normalizedMachine.hmStateVersion;
}; };
}; };
}; };
in in
{ {
options.repo.helpers = lib.mkOption {
type = lib.types.attrsOf lib.types.raw;
internal = true;
readOnly = true;
};
config.repo.helpers = { config.repo.helpers = {
inherit inherit
mkCaddyReverseProxy mkCaddyReverseProxy
+19 -207
View File
@@ -1,221 +1,33 @@
{ lib, ... }: { lib, ... }:
let
emailProviderType = lib.types.enum [
"mxrouting"
"office365"
];
emailType = lib.types.submodule (
{ ... }:
{
options = {
address = lib.mkOption {
type = lib.types.str;
};
primary = lib.mkOption {
type = lib.types.bool;
default = false;
};
type = lib.mkOption {
type = emailProviderType;
};
};
}
);
sshKeyType = lib.types.submodule (
{ name, ... }:
{
options = {
publicKey = lib.mkOption {
type = lib.types.str;
};
privateKeyPath = lib.mkOption {
type = lib.types.str;
default = "~/.ssh/id_${name}";
};
};
}
);
accountType = lib.types.submodule (
{ config, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.str;
};
realName = lib.mkOption {
type = lib.types.str;
};
homeDirectory = lib.mkOption {
type = lib.types.str;
default = "/home/${config.name}";
};
nixosConfigurationPath = lib.mkOption {
type = lib.types.str;
default = "${config.homeDirectory}/.config/nixos";
};
emails = lib.mkOption {
type = lib.types.attrsOf emailType;
default = { };
};
primaryEmail = lib.mkOption {
type = lib.types.nullOr emailType;
description = "Derived primary email entry for this user.";
default =
let
emails = builtins.attrValues config.emails;
in
lib.findFirst (email: email.primary) null emails;
};
};
}
);
displayType = lib.types.submodule (
{ ... }:
{
options = {
primary = lib.mkOption {
type = lib.types.bool;
default = false;
};
x = lib.mkOption {
type = lib.types.int;
default = 0;
};
y = lib.mkOption {
type = lib.types.int;
default = 0;
};
scale = lib.mkOption {
type = lib.types.nullOr lib.types.float;
default = null;
};
width = lib.mkOption {
type = lib.types.nullOr lib.types.int;
default = null;
};
height = lib.mkOption {
type = lib.types.nullOr lib.types.int;
default = null;
};
refresh = lib.mkOption {
type = lib.types.nullOr lib.types.float;
default = null;
};
};
}
);
machineType = lib.types.submodule (
{ name, config, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.str;
default = name;
};
stateVersion = lib.mkOption {
type = lib.types.str;
};
hmStateVersion = lib.mkOption {
type = lib.types.str;
default = config.stateVersion;
};
displays = lib.mkOption {
type = lib.types.attrsOf displayType;
default = { };
};
sshKeys = lib.mkOption {
type = lib.types.attrsOf sshKeyType;
default = { };
};
syncthingId = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
};
portable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
}
);
in
{ {
options.repo = { options.repo = lib.mkOption {
account = lib.mkOption { type = lib.types.submodule {
type = accountType; freeformType = lib.types.attrsOf lib.types.anything;
};
machines = lib.mkOption { options.helpers = lib.mkOption {
type = lib.types.attrsOf machineType; type = lib.types.attrsOf lib.types.raw;
default = { };
internal = true;
};
};
default = { }; default = { };
}; };
services = lib.mkOption { config.flake.modules.nixos.facts =
type = lib.types.raw; { lib, ... }:
default = { };
};
theme = lib.mkOption {
type = lib.types.raw;
default = { };
};
};
config.flake.modules.nixos.meta =
{ ... }:
{ {
options.meta.machine = lib.mkOption { options.facts.machine = lib.mkOption {
type = machineType; type = lib.types.attrsOf lib.types.anything;
default = { };
}; };
}; };
config.flake.modules.homeManager.meta = config.flake.modules.homeManager.facts =
{ ... }: { lib, ... }:
{ {
options.meta.desktop.browserCommand = lib.mkOption { options.facts.desktop = lib.mkOption {
type = lib.types.str; type = lib.types.attrsOf lib.types.anything;
}; default = { };
options.meta.desktop.fileManagerCommand = lib.mkOption {
type = lib.types.str;
};
options.meta.desktop.terminalCommand = lib.mkOption {
type = lib.types.str;
};
options.meta.desktop.launcherCommand = lib.mkOption {
type = lib.types.str;
};
options.meta.pinentry.package = lib.mkOption {
type = lib.types.package;
}; };
}; };
} }
+2 -2
View File
@@ -10,7 +10,7 @@ in
{ {
flake.modules.nixos.host-base = { flake.modules.nixos.host-base = {
imports = [ imports = [
nixosModules.meta nixosModules.facts
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
nixosModules.nix nixosModules.nix
nixosModules.locale-nl nixosModules.locale-nl
@@ -22,7 +22,7 @@ in
backupFileExtension = "bak"; backupFileExtension = "bak";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
sharedModules = [ sharedModules = [
hmModules.meta hmModules.facts
hmModules.syncthing hmModules.syncthing
hmModules.shell hmModules.shell
hmModules.neovim hmModules.neovim