Compare commits
4 Commits
be1a9b7852
...
4b6e05212c
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b6e05212c | |||
| c01c13aa50 | |||
| e33602e879 | |||
| d6878abc61 |
@@ -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,6 +1,7 @@
|
||||
{ inputs, config, ... }:
|
||||
let
|
||||
account = config.repo.account;
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
|
||||
sharedContext = ''
|
||||
# Global Agent Context
|
||||
@@ -21,6 +22,8 @@ let
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.ai = {
|
||||
home-manager.sharedModules = [ hmModules.ai ];
|
||||
|
||||
nixpkgs.overlays = [ inputs.llm-agents.overlays.default ];
|
||||
|
||||
nix.settings = {
|
||||
|
||||
@@ -1,48 +1,68 @@
|
||||
{ ... }:
|
||||
{ config, ... }:
|
||||
let
|
||||
mkPrimaryDesktopApplication =
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
vivaldiPackage = pkgs: pkgs.vivaldi;
|
||||
nautilusPackage = pkgs: pkgs.nautilus;
|
||||
in
|
||||
{
|
||||
name,
|
||||
package,
|
||||
desktopEntryName,
|
||||
}:
|
||||
flake.modules.homeManager.browser-vivaldi =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
meta.desktop.${name} = {
|
||||
inherit desktopEntryName;
|
||||
package = package pkgs;
|
||||
home.packages = [ (vivaldiPackage pkgs) ];
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
flake.modules.homeManager.primary-browser-vivaldi =
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
flake.modules.homeManager.primary-browser-vivaldi = mkPrimaryDesktopApplication {
|
||||
name = "browser";
|
||||
package = pkgs: pkgs.vivaldi;
|
||||
desktopEntryName = "vivaldi-stable";
|
||||
imports = [ homeModules.browser-vivaldi ];
|
||||
|
||||
facts.desktop.browserCommand = lib.getExe (vivaldiPackage pkgs);
|
||||
home.sessionVariables.BROWSER = lib.getExe (vivaldiPackage pkgs);
|
||||
xdg.mimeApps.defaultApplicationPackages = [ (vivaldiPackage pkgs) ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.primary-file-manager-nautilus = mkPrimaryDesktopApplication {
|
||||
name = "fileManager";
|
||||
package = pkgs: pkgs.nautilus;
|
||||
desktopEntryName = "org.gnome.Nautilus";
|
||||
};
|
||||
|
||||
flake.modules.homeManager.desktop-defaults =
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
browser = config.meta.desktop.browser;
|
||||
fileManager = config.meta.desktop.fileManager;
|
||||
homeDir = config.home.homeDirectory;
|
||||
localDir = "${homeDir}/.local";
|
||||
mediaDir = "${homeDir}/media";
|
||||
in
|
||||
flake.modules.homeManager.file-manager-nautilus =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.preferXdgDirectories = true;
|
||||
home.sessionVariables.BROWSER = browser.command;
|
||||
home.packages = [ (nautilusPackage pkgs) ];
|
||||
};
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
flake.modules.homeManager.primary-file-manager-nautilus =
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ homeModules.file-manager-nautilus ];
|
||||
|
||||
xdg.mimeApps.defaultApplicationPackages = [ (nautilusPackage pkgs) ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.image-viewer-imv = {
|
||||
programs.imv.enable = true;
|
||||
};
|
||||
|
||||
flake.modules.homeManager.default-image-viewer-imv =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ homeModules.image-viewer-imv ];
|
||||
|
||||
xdg.mimeApps.defaultApplicationPackages = [ pkgs.imv ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.document-viewer-sioyek = {
|
||||
programs.sioyek.enable = true;
|
||||
};
|
||||
|
||||
flake.modules.homeManager.default-document-viewer-sioyek =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ homeModules.document-viewer-sioyek ];
|
||||
|
||||
xdg.mimeApps.defaultApplicationPackages = [ pkgs.sioyek ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.workstation-apps =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
postman
|
||||
spotify
|
||||
calcure
|
||||
@@ -50,14 +70,18 @@ in
|
||||
unzip
|
||||
gimp
|
||||
dbeaver-bin
|
||||
]
|
||||
++ [
|
||||
browser.package
|
||||
fileManager.package
|
||||
];
|
||||
};
|
||||
|
||||
programs.imv.enable = true;
|
||||
programs.sioyek.enable = true;
|
||||
flake.modules.homeManager.xdg =
|
||||
{ config, ... }:
|
||||
let
|
||||
homeDir = config.home.homeDirectory;
|
||||
localDir = "${homeDir}/.local";
|
||||
mediaDir = "${homeDir}/media";
|
||||
in
|
||||
{
|
||||
home.preferXdgDirectories = true;
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
@@ -85,17 +109,6 @@ in
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplicationPackages =
|
||||
with pkgs;
|
||||
[
|
||||
sioyek
|
||||
imv
|
||||
neovim
|
||||
]
|
||||
++ [
|
||||
fileManager.package
|
||||
browser.package
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ in
|
||||
...
|
||||
}:
|
||||
let
|
||||
machine = osConfig.meta.machine;
|
||||
machine = osConfig.facts.machine;
|
||||
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
|
||||
|
||||
mkScope =
|
||||
@@ -19,6 +19,7 @@ in
|
||||
email = account.emails.${scope}.address;
|
||||
key = lib.attrByPath [ scope ] null machine.sshKeys;
|
||||
hasSigningKey = key != null;
|
||||
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
|
||||
in
|
||||
{
|
||||
allowedSigners = lib.optional hasSigningKey "${email} ${key.publicKey}";
|
||||
@@ -28,7 +29,7 @@ in
|
||||
inherit email;
|
||||
}
|
||||
// lib.optionalAttrs hasSigningKey {
|
||||
signingKey = "${key.privateKeyPath}.pub";
|
||||
signingKey = "${privateKeyPath}.pub";
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs hasSigningKey {
|
||||
|
||||
@@ -4,6 +4,12 @@ let
|
||||
repoTheme = config.repo.theme.kanagawa;
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.default-editor-neovim =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.mimeApps.defaultApplicationPackages = [ pkgs.neovim ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.neovim =
|
||||
{
|
||||
pkgs,
|
||||
@@ -154,8 +160,8 @@ in
|
||||
# Hostname/ConfigDir needed for nixd
|
||||
nixdExtras = {
|
||||
nixpkgs = "import ${pkgs.path} {}";
|
||||
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.meta.machine.name}.options'';
|
||||
home_manager_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.meta.machine.name}.options.home-manager.users.type.getSubOptions []'';
|
||||
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options'';
|
||||
home_manager_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options.home-manager.users.type.getSubOptions []'';
|
||||
};
|
||||
|
||||
themeSetup = import ./_kanagawa-theme.nix {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
browserCommand,
|
||||
launcherCommands,
|
||||
launcherCommand,
|
||||
shortcutCommands,
|
||||
terminalCommand,
|
||||
}:
|
||||
@@ -16,7 +16,7 @@
|
||||
};
|
||||
"Mod+Space" = {
|
||||
repeat = false;
|
||||
action.spawn = launcherCommands.open;
|
||||
action.spawn = launcherCommand;
|
||||
hotkey-overlay.title = "App Launcher";
|
||||
};
|
||||
"Mod+E" = {
|
||||
@@ -39,16 +39,6 @@
|
||||
action.spawn = shortcutCommands.editSecrets;
|
||||
hotkey-overlay.title = "Edit Secrets";
|
||||
};
|
||||
"Mod+Ctrl+F" = {
|
||||
repeat = false;
|
||||
action.spawn = launcherCommands.files;
|
||||
hotkey-overlay.title = "Find Files";
|
||||
};
|
||||
"Mod+V" = {
|
||||
repeat = false;
|
||||
action.spawn = shortcutCommands.clipboardHistory;
|
||||
hotkey-overlay.title = "Clipboard History";
|
||||
};
|
||||
"Mod+Ctrl+C" = {
|
||||
repeat = false;
|
||||
action.spawn = shortcutCommands.pickColor;
|
||||
|
||||
@@ -6,72 +6,40 @@
|
||||
}:
|
||||
let
|
||||
nixosConfigDir = repo.account.nixosConfigurationPath;
|
||||
launcherDmenuCommand =
|
||||
lib.concatMapStringsSep " " lib.escapeShellArg
|
||||
config.meta.desktop.launcher.commands.dmenu;
|
||||
mkTerminalScript =
|
||||
{
|
||||
name,
|
||||
title,
|
||||
appId ? "niri-shortcut-terminal",
|
||||
workdir ? nixosConfigDir,
|
||||
command ? null,
|
||||
runtimeInputs ? [ ],
|
||||
}:
|
||||
let
|
||||
args =
|
||||
(
|
||||
if config.meta.desktop.terminal.desktopEntryName == "kitty" then
|
||||
[
|
||||
"--class"
|
||||
appId
|
||||
"--title"
|
||||
title
|
||||
"--directory"
|
||||
workdir
|
||||
]
|
||||
else if config.meta.desktop.terminal.desktopEntryName == "foot" then
|
||||
[
|
||||
"--app-id"
|
||||
appId
|
||||
"--title"
|
||||
title
|
||||
"--working-directory"
|
||||
workdir
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
++ lib.optionals (command != null) [
|
||||
args = lib.optionals (command != null) [
|
||||
"--"
|
||||
"${pkgs.bash}/bin/bash"
|
||||
"-lc"
|
||||
command
|
||||
];
|
||||
argString = lib.concatMapStringsSep " " lib.escapeShellArg args;
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
inherit name runtimeInputs;
|
||||
checkPhase = "";
|
||||
text = ''
|
||||
# shellcheck disable=SC2016
|
||||
cd ${lib.escapeShellArg workdir}
|
||||
exec ${lib.escapeShellArg config.meta.desktop.terminal.command} ${
|
||||
lib.concatMapStringsSep " " lib.escapeShellArg args
|
||||
}
|
||||
'';
|
||||
text = lib.concatStringsSep "\n" [
|
||||
"# shellcheck disable=SC2016"
|
||||
"cd ${lib.escapeShellArg workdir}"
|
||||
"exec ${lib.escapeShellArg config.facts.desktop.terminalCommand} ${argString}"
|
||||
];
|
||||
};
|
||||
in
|
||||
rec {
|
||||
scripts = {
|
||||
nixosTerminal = mkTerminalScript {
|
||||
name = "niri-shortcut-nixos-terminal";
|
||||
title = "NixOS Config";
|
||||
};
|
||||
|
||||
nixosSwitch = mkTerminalScript {
|
||||
name = "niri-shortcut-nixos-switch";
|
||||
title = "NixOS Switch";
|
||||
appId = "niri-shortcut-float";
|
||||
runtimeInputs = [
|
||||
pkgs.coreutils
|
||||
pkgs.nh
|
||||
@@ -109,8 +77,6 @@ rec {
|
||||
|
||||
editSecrets = mkTerminalScript {
|
||||
name = "niri-shortcut-edit-secrets";
|
||||
title = "Edit Secrets";
|
||||
appId = "niri-shortcut-float";
|
||||
runtimeInputs = [ pkgs.sops ];
|
||||
command = ''
|
||||
sops edit ${lib.escapeShellArg "${nixosConfigDir}/modules/secrets/secrets.yaml"}
|
||||
@@ -119,29 +85,11 @@ rec {
|
||||
|
||||
neovimProjects = mkTerminalScript {
|
||||
name = "niri-shortcut-neovim-projects";
|
||||
title = "Neovim Projects";
|
||||
command = ''
|
||||
nvim -c 'Telescope projects'
|
||||
'';
|
||||
};
|
||||
|
||||
clipboardHistory = pkgs.writeShellApplication {
|
||||
name = "niri-shortcut-clipboard-history";
|
||||
runtimeInputs = [
|
||||
pkgs.cliphist
|
||||
config.meta.desktop.launcher.package
|
||||
pkgs.wl-clipboard
|
||||
];
|
||||
text = ''
|
||||
selection="$(cliphist list | ${launcherDmenuCommand})"
|
||||
if [ -z "$selection" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf '%s' "$selection" | cliphist decode | wl-copy
|
||||
'';
|
||||
};
|
||||
|
||||
pickColor = pkgs.writeShellApplication {
|
||||
name = "niri-shortcut-pick-color";
|
||||
runtimeInputs = [
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
}:
|
||||
let
|
||||
repo = config.repo;
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.niri =
|
||||
@@ -12,6 +13,8 @@ in
|
||||
{
|
||||
imports = [ inputs.niri.nixosModules.niri ];
|
||||
|
||||
home-manager.sharedModules = [ hmModules.niri ];
|
||||
|
||||
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
||||
|
||||
programs = {
|
||||
@@ -48,6 +51,7 @@ in
|
||||
repo
|
||||
;
|
||||
};
|
||||
machine = osConfig.facts.machine;
|
||||
in
|
||||
{
|
||||
home = {
|
||||
@@ -59,9 +63,6 @@ in
|
||||
brightnessctl
|
||||
xwayland-satellite
|
||||
]
|
||||
++ [
|
||||
config.meta.desktop.fileManager.package
|
||||
]
|
||||
++ lib.attrValues shortcuts.scripts;
|
||||
};
|
||||
|
||||
@@ -70,27 +71,34 @@ in
|
||||
programs.niri.settings = {
|
||||
outputs = lib.mapAttrs (
|
||||
_: display:
|
||||
let
|
||||
scale = display.scale or null;
|
||||
width = display.width or null;
|
||||
height = display.height or null;
|
||||
refresh = display.refresh or null;
|
||||
in
|
||||
{
|
||||
position = {
|
||||
inherit (display) x y;
|
||||
x = display.x or 0;
|
||||
y = display.y or 0;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (display.primary or false) {
|
||||
"focus-at-startup" = true;
|
||||
}
|
||||
// lib.optionalAttrs (display.scale != null) {
|
||||
inherit (display) scale;
|
||||
// lib.optionalAttrs (scale != null) {
|
||||
inherit scale;
|
||||
}
|
||||
// lib.optionalAttrs (display.width != null && display.height != null && display.refresh != null) {
|
||||
// lib.optionalAttrs (width != null && height != null && refresh != null) {
|
||||
mode = {
|
||||
inherit (display)
|
||||
inherit
|
||||
width
|
||||
height
|
||||
refresh
|
||||
;
|
||||
};
|
||||
}
|
||||
) osConfig.meta.machine.displays;
|
||||
) (machine.displays or { });
|
||||
|
||||
environment.DISPLAY = ":0";
|
||||
spawn-at-startup = [
|
||||
@@ -139,13 +147,6 @@ in
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "^niri-shortcut-float$"; }
|
||||
];
|
||||
open-floating = true;
|
||||
open-focused = true;
|
||||
}
|
||||
];
|
||||
|
||||
debug.honor-xdg-activation-with-invalid-serial = true;
|
||||
@@ -163,9 +164,9 @@ in
|
||||
};
|
||||
|
||||
binds = import ./_bindings.nix {
|
||||
browserCommand = config.meta.desktop.browser.command;
|
||||
launcherCommands = config.meta.desktop.launcher.commands;
|
||||
terminalCommand = config.meta.desktop.terminal.command;
|
||||
browserCommand = config.facts.desktop.browserCommand;
|
||||
launcherCommand = config.facts.desktop.launcherCommand;
|
||||
terminalCommand = config.facts.desktop.terminalCommand;
|
||||
shortcutCommands = shortcuts.commands;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ in
|
||||
terminalCommand = lib.getExe pkgs.xdg-terminal-exec;
|
||||
};
|
||||
settings =
|
||||
if baseSettings == { } || !osConfig.meta.machine.portable then
|
||||
if baseSettings == { } || !(osConfig.facts.machine.portable or false) then
|
||||
baseSettings
|
||||
else
|
||||
mkPortableSettings baseSettings;
|
||||
|
||||
@@ -5,31 +5,23 @@
|
||||
let
|
||||
repo = config.repo;
|
||||
account = repo.account;
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.pinentry =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
meta.pinentry.package = pkgs.pinentry-gnome3;
|
||||
};
|
||||
|
||||
flake.modules.homeManager.passwords =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
homeModules.pinentry
|
||||
];
|
||||
|
||||
programs.rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base_url = repo.services.vaultwarden.url;
|
||||
email = account.primaryEmail.address;
|
||||
pinentry = config.meta.pinentry.package;
|
||||
pinentry = pinentryPackage;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ in
|
||||
mkOffice365Account =
|
||||
{
|
||||
address,
|
||||
primary,
|
||||
primary ? false,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -37,7 +37,7 @@ in
|
||||
mkMxrouteAccount =
|
||||
{
|
||||
address,
|
||||
primary,
|
||||
primary ? false,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.qbittorrent-client = {
|
||||
home-manager.sharedModules = [ hmModules.qbittorrent-client ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 43864 ];
|
||||
allowedUDPPorts = [ 43864 ];
|
||||
|
||||
@@ -5,6 +5,13 @@ let
|
||||
service = repo.services.actual;
|
||||
in
|
||||
{
|
||||
repo.services.actual = {
|
||||
domain = "finance.jelles.net";
|
||||
host = "127.0.0.1";
|
||||
port = 3000;
|
||||
url = "https://finance.jelles.net";
|
||||
};
|
||||
|
||||
flake.modules.nixos.actual =
|
||||
{ lib, ... }:
|
||||
lib.mkMerge [
|
||||
|
||||
@@ -5,6 +5,13 @@ let
|
||||
service = repo.services.gitea;
|
||||
in
|
||||
{
|
||||
repo.services.gitea = {
|
||||
domain = "git.jelles.net";
|
||||
host = "127.0.0.1";
|
||||
port = 3001;
|
||||
url = "https://git.jelles.net/";
|
||||
};
|
||||
|
||||
flake.modules.nixos.gitea =
|
||||
{ lib, ... }:
|
||||
lib.mkMerge [
|
||||
|
||||
@@ -3,8 +3,8 @@ let
|
||||
account = config.repo.account;
|
||||
personalPublicKeys =
|
||||
machines:
|
||||
map (machine: machine.sshKeys.personal.publicKey) (
|
||||
lib.filter (machine: machine.sshKeys ? personal) (builtins.attrValues machines)
|
||||
map (machine: (machine.sshKeys or { }).personal.publicKey) (
|
||||
lib.filter (machine: (machine.sshKeys or { }) ? personal) (builtins.attrValues machines)
|
||||
);
|
||||
in
|
||||
{
|
||||
|
||||
@@ -5,6 +5,13 @@ let
|
||||
service = repo.services.radicale;
|
||||
in
|
||||
{
|
||||
repo.services.radicale = {
|
||||
domain = "radicale.jelles.net";
|
||||
host = "127.0.0.1";
|
||||
port = 5232;
|
||||
url = "https://radicale.jelles.net/";
|
||||
};
|
||||
|
||||
flake.modules.nixos.radicale =
|
||||
{ lib, ... }:
|
||||
lib.mkMerge [
|
||||
|
||||
@@ -5,6 +5,13 @@ let
|
||||
service = repo.services.vaultwarden;
|
||||
in
|
||||
{
|
||||
repo.services.vaultwarden = {
|
||||
domain = "vault.jelles.net";
|
||||
host = "127.0.0.1";
|
||||
port = 8100;
|
||||
url = "https://vault.jelles.net";
|
||||
};
|
||||
|
||||
flake.modules.nixos.vaultwarden =
|
||||
{ lib, ... }:
|
||||
lib.mkMerge [
|
||||
|
||||
@@ -5,21 +5,26 @@
|
||||
}:
|
||||
let
|
||||
syncMachines = lib.listToAttrs (
|
||||
lib.concatMap (
|
||||
machine:
|
||||
lib.optional (machine.syncthingId != null) (
|
||||
lib.concatLists (
|
||||
lib.mapAttrsToList (
|
||||
machineName: machine:
|
||||
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
|
||||
{
|
||||
inherit name;
|
||||
value = {
|
||||
inherit name;
|
||||
id = machine.syncthingId;
|
||||
id = syncthingId;
|
||||
};
|
||||
}
|
||||
)
|
||||
) (builtins.attrValues config.repo.machines)
|
||||
) config.repo.machines
|
||||
)
|
||||
);
|
||||
|
||||
syncPhones = {
|
||||
|
||||
@@ -19,30 +19,6 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
mkTerminal =
|
||||
{
|
||||
desktopEntryName,
|
||||
packageFor,
|
||||
terminalModule,
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
package = packageFor pkgs;
|
||||
in
|
||||
{
|
||||
imports = [ terminalModule ];
|
||||
|
||||
config = {
|
||||
meta.desktop.terminal = {
|
||||
inherit desktopEntryName package;
|
||||
};
|
||||
|
||||
xdg.terminal-exec = {
|
||||
enable = true;
|
||||
settings.default = [ config.meta.desktop.terminal.desktopId ];
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.terminal-foot =
|
||||
@@ -194,15 +170,29 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.homeManager.primary-terminal-foot = mkTerminal {
|
||||
desktopEntryName = "foot";
|
||||
packageFor = pkgs: pkgs.foot;
|
||||
terminalModule = config.flake.modules.homeManager.terminal-foot;
|
||||
flake.modules.homeManager.primary-terminal-foot =
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ config.flake.modules.homeManager.terminal-foot ];
|
||||
|
||||
facts.desktop.terminalCommand = lib.getExe pkgs.foot;
|
||||
|
||||
xdg.terminal-exec = {
|
||||
enable = true;
|
||||
settings.default = [ "foot.desktop" ];
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.homeManager.primary-terminal-kitty = mkTerminal {
|
||||
desktopEntryName = "kitty";
|
||||
packageFor = pkgs: kittySingleInstance pkgs;
|
||||
terminalModule = config.flake.modules.homeManager.terminal-kitty;
|
||||
flake.modules.homeManager.primary-terminal-kitty =
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ config.flake.modules.homeManager.terminal-kitty ];
|
||||
|
||||
facts.desktop.terminalCommand = lib.getExe (kittySingleInstance pkgs);
|
||||
|
||||
xdg.terminal-exec = {
|
||||
enable = true;
|
||||
settings.default = [ "kitty.desktop" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
let
|
||||
repo = config.repo;
|
||||
repoHelpers = repo.helpers;
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
repo.theme = import ./_theme.nix;
|
||||
|
||||
flake.modules.nixos.theme =
|
||||
{
|
||||
pkgs,
|
||||
@@ -22,6 +25,8 @@ in
|
||||
};
|
||||
in
|
||||
{
|
||||
home-manager.sharedModules = [ hmModules.theme ];
|
||||
|
||||
environment.systemPackages = [ cursorTheme.package ];
|
||||
|
||||
services.displayManager.sddm.settings = {
|
||||
|
||||
@@ -14,7 +14,6 @@ in
|
||||
let
|
||||
repoTheme = repo.theme.kanagawa;
|
||||
palette = repoTheme.palette;
|
||||
launcherCommand = lib.getExe config.programs.vicinae.package;
|
||||
in
|
||||
{
|
||||
programs.vicinae = {
|
||||
@@ -74,28 +73,6 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
meta.desktop.launcher = {
|
||||
package = config.programs.vicinae.package;
|
||||
commands = {
|
||||
open = [
|
||||
launcherCommand
|
||||
"toggle"
|
||||
];
|
||||
files = [
|
||||
launcherCommand
|
||||
"deeplink"
|
||||
"vicinae://extensions/sameoldlab/fuzzy-files/find"
|
||||
];
|
||||
dmenu = [
|
||||
launcherCommand
|
||||
"dmenu"
|
||||
"--navigation-title"
|
||||
"Clipboard"
|
||||
"--placeholder"
|
||||
"Search clipboard"
|
||||
"--no-metadata"
|
||||
];
|
||||
};
|
||||
};
|
||||
facts.desktop.launcherCommand = lib.getExe config.programs.vicinae.package;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
{ inputs, ... }:
|
||||
{ config, inputs, ... }:
|
||||
let
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.walker =
|
||||
flake.modules.nixos.walker-cache = {
|
||||
nix.settings = {
|
||||
extra-substituters = [
|
||||
"https://walker.cachix.org"
|
||||
"https://walker-git.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"walker.cachix.org-1:fG8q+uAaMqhsMxWjwvk0IMb4mFPFLqHjuvfwQxE4oJM="
|
||||
"walker-git.cachix.org-1:vmC0ocfPWh0S/vRAQGtChuiZBTAe4wiKDeyyXM0/7pM="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.homeManager.walker-base =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
launcherCommand = lib.getExe config.programs.walker.package;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.walker.homeManagerModules.default ];
|
||||
|
||||
@@ -16,25 +28,13 @@
|
||||
enable = true;
|
||||
runAsService = true;
|
||||
};
|
||||
};
|
||||
|
||||
meta.desktop.launcher = {
|
||||
package = config.programs.walker.package;
|
||||
commands = {
|
||||
open = [ launcherCommand ];
|
||||
files = [
|
||||
launcherCommand
|
||||
"--query"
|
||||
"/"
|
||||
"--placeholder"
|
||||
"Find files"
|
||||
];
|
||||
dmenu = [
|
||||
launcherCommand
|
||||
"--dmenu"
|
||||
"--placeholder"
|
||||
"Search clipboard"
|
||||
];
|
||||
};
|
||||
};
|
||||
flake.modules.homeManager.primary-launcher-walker =
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ homeModules.walker-base ];
|
||||
|
||||
facts.desktop.launcherCommand = lib.getExe config.programs.walker.package;
|
||||
};
|
||||
}
|
||||
|
||||
+5
-100
@@ -1,8 +1,11 @@
|
||||
{
|
||||
repo = {
|
||||
account = {
|
||||
account = rec {
|
||||
name = "kiri";
|
||||
realName = "Jelle Spreeuwenberg";
|
||||
homeDirectory = "/home/${name}";
|
||||
nixosConfigurationPath = "${homeDirectory}/.config/nixos";
|
||||
|
||||
emails = {
|
||||
personal = {
|
||||
address = "mail@jelles.net";
|
||||
@@ -22,106 +25,8 @@
|
||||
type = "office365";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
primaryEmail = emails.personal;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
flake.nixosConfigurations = builtins.mapAttrs (
|
||||
_: machine:
|
||||
name: machine:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ (config.repo.helpers.mkHost machine) ];
|
||||
modules = [ (config.repo.helpers.mkHost name machine) ];
|
||||
}
|
||||
) config.repo.machines;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ in
|
||||
syncthingId = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI";
|
||||
|
||||
stateVersion = "24.05";
|
||||
hmStateVersion = "24.05";
|
||||
};
|
||||
|
||||
flake.modules.nixos.orion =
|
||||
|
||||
@@ -16,7 +16,6 @@ in
|
||||
syncthingId = "6HBAKXB-DB3B4H2-BODCAXF-KD23H5W-6X5LGLC-ZJHZHLG-7U7YMGO-BB6IXQ3";
|
||||
|
||||
stateVersion = "24.05";
|
||||
hmStateVersion = "24.05";
|
||||
|
||||
displays = {
|
||||
"LG Electronics LG ULTRAGEAR 103NTYT8R290" = {
|
||||
|
||||
@@ -28,7 +28,6 @@ in
|
||||
};
|
||||
|
||||
stateVersion = "24.05";
|
||||
hmStateVersion = "24.05";
|
||||
};
|
||||
|
||||
flake.modules.nixos.zenith =
|
||||
|
||||
+16
-13
@@ -37,26 +37,35 @@ let
|
||||
};
|
||||
|
||||
mkHost =
|
||||
machine:
|
||||
name: machine:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
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
|
||||
{
|
||||
imports = [
|
||||
nixosModules.${machine.name}
|
||||
nixosModules.${name}
|
||||
];
|
||||
|
||||
meta.machine = machine;
|
||||
facts.machine = normalizedMachine;
|
||||
|
||||
networking.hostName = machine.name;
|
||||
networking.hostName = name;
|
||||
system.stateVersion = machine.stateVersion;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.${account.name} = {
|
||||
isNormalUser = true;
|
||||
home = account.homeDirectory;
|
||||
home = accountHome;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
@@ -67,19 +76,13 @@ let
|
||||
home-manager.users.${account.name} = {
|
||||
home = {
|
||||
username = account.name;
|
||||
homeDirectory = account.homeDirectory;
|
||||
stateVersion = machine.hmStateVersion;
|
||||
homeDirectory = accountHome;
|
||||
stateVersion = normalizedMachine.hmStateVersion;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.repo.helpers = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.raw;
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
config.repo.helpers = {
|
||||
inherit
|
||||
mkCaddyReverseProxy
|
||||
|
||||
+16
-262
@@ -1,279 +1,33 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
emailProviderType = lib.types.enum [
|
||||
"mxrouting"
|
||||
"office365"
|
||||
];
|
||||
|
||||
emailType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options = {
|
||||
address = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
options.repo = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
freeformType = lib.types.attrsOf lib.types.anything;
|
||||
|
||||
primary = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
type = lib.mkOption {
|
||||
type = emailProviderType;
|
||||
options.helpers = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.raw;
|
||||
default = { };
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
desktopApplicationType = lib.types.submodule (
|
||||
{ config, ... }:
|
||||
config.flake.modules.nixos.facts =
|
||||
{ lib, ... }:
|
||||
{
|
||||
options = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
};
|
||||
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = lib.getExe config.package;
|
||||
defaultText = lib.literalExpression "lib.getExe config.package";
|
||||
};
|
||||
|
||||
desktopEntryName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
desktopId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${config.desktopEntryName}.desktop";
|
||||
defaultText = lib.literalExpression ''"${config.desktopEntryName}.desktop"'';
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
launcherType = lib.types.submodule (
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
};
|
||||
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = lib.getExe config.package;
|
||||
defaultText = lib.literalExpression "lib.getExe config.package";
|
||||
};
|
||||
|
||||
commands = {
|
||||
open = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
files = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
dmenu = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
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 = {
|
||||
account = lib.mkOption {
|
||||
type = accountType;
|
||||
};
|
||||
|
||||
machines = lib.mkOption {
|
||||
type = lib.types.attrsOf machineType;
|
||||
default = { };
|
||||
};
|
||||
|
||||
services = lib.mkOption {
|
||||
type = lib.types.raw;
|
||||
default = { };
|
||||
};
|
||||
|
||||
theme = lib.mkOption {
|
||||
type = lib.types.raw;
|
||||
options.facts.machine = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config.flake.modules.nixos.meta =
|
||||
{ ... }:
|
||||
config.flake.modules.homeManager.facts =
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.meta.machine = lib.mkOption {
|
||||
type = machineType;
|
||||
options.facts.desktop = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config.flake.modules.homeManager.meta =
|
||||
{ ... }:
|
||||
{
|
||||
options.meta.desktop.browser = lib.mkOption {
|
||||
type = desktopApplicationType;
|
||||
};
|
||||
|
||||
options.meta.desktop.fileManager = lib.mkOption {
|
||||
type = desktopApplicationType;
|
||||
};
|
||||
|
||||
options.meta.desktop.terminal = lib.mkOption {
|
||||
type = desktopApplicationType;
|
||||
};
|
||||
|
||||
options.meta.desktop.launcher = lib.mkOption {
|
||||
type = launcherType;
|
||||
};
|
||||
|
||||
options.meta.pinentry.package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ in
|
||||
{
|
||||
flake.modules.nixos.host-base = {
|
||||
imports = [
|
||||
nixosModules.meta
|
||||
nixosModules.facts
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
nixosModules.nix
|
||||
nixosModules.locale-nl
|
||||
@@ -22,7 +22,7 @@ in
|
||||
backupFileExtension = "bak";
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
sharedModules = [
|
||||
hmModules.meta
|
||||
hmModules.facts
|
||||
hmModules.syncthing
|
||||
hmModules.shell
|
||||
hmModules.neovim
|
||||
|
||||
@@ -24,6 +24,7 @@ in
|
||||
nixosModules.theme
|
||||
nixosModules.ai
|
||||
nixosModules.hidraw-access
|
||||
nixosModules.walker-cache
|
||||
];
|
||||
|
||||
services.dbus.implementation = "broker";
|
||||
@@ -38,27 +39,26 @@ in
|
||||
|
||||
flake.modules.homeManager.workstation-base = {
|
||||
imports = [
|
||||
homeModules.ai
|
||||
homeModules.passwords
|
||||
homeModules.clipboard
|
||||
homeModules.dev-tools
|
||||
homeModules.xdg
|
||||
homeModules.workstation-apps
|
||||
homeModules.primary-browser-vivaldi
|
||||
homeModules.primary-file-manager-nautilus
|
||||
homeModules.desktop-defaults
|
||||
homeModules.primary-launcher-walker
|
||||
homeModules.default-image-viewer-imv
|
||||
homeModules.default-document-viewer-sioyek
|
||||
homeModules.default-editor-neovim
|
||||
homeModules.email
|
||||
homeModules.mpv
|
||||
homeModules.niri
|
||||
homeModules.nix
|
||||
homeModules.calendar-tasks
|
||||
homeModules.podman
|
||||
homeModules.qbittorrent-client
|
||||
homeModules.sops
|
||||
homeModules.git
|
||||
homeModules.ssh-client
|
||||
homeModules.primary-terminal-kitty
|
||||
homeModules.terminal-foot
|
||||
homeModules.theme
|
||||
homeModules.walker
|
||||
homeModules.noctalia
|
||||
{
|
||||
programs.discord = {
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
account = config.repo.account;
|
||||
nixosModules = config.flake.modules.nixos;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.sops-password =
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [ nixosModules.sops ];
|
||||
|
||||
sops.secrets.hashed-password.neededForUsers = true;
|
||||
|
||||
users.users.${account.name}.hashedPasswordFile = config.sops.secrets.hashed-password.path;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
}:
|
||||
let
|
||||
nixosModules = config.flake.modules.nixos;
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
sopsAdminKeyPath = "/var/lib/sops/keys.txt";
|
||||
in
|
||||
{
|
||||
@@ -22,6 +23,8 @@ in
|
||||
{
|
||||
imports = [ nixosModules.sops ];
|
||||
|
||||
home-manager.sharedModules = [ hmModules.sops ];
|
||||
|
||||
sops.age.keyFile = sopsAdminKeyPath;
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
|
||||
Reference in New Issue
Block a user