refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
cursor = {
|
cursor = {
|
||||||
name = "phinger-cursors-light";
|
name = "phinger-cursors-light";
|
||||||
packagePath = [ "phinger-cursors" ];
|
packageName = "phinger-cursors";
|
||||||
size = 24;
|
size = 24;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ inputs, config, ... }:
|
{ inputs, config, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
|
||||||
hmModules = config.flake.modules.homeManager;
|
hmModules = config.flake.modules.homeManager;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -18,12 +17,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.homeManager.ai =
|
flake.modules.homeManager.ai =
|
||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
programs.mcp = {
|
programs.mcp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -36,32 +30,5 @@ in
|
|||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.llm-agents.codex
|
pkgs.llm-agents.codex
|
||||||
];
|
];
|
||||||
|
|
||||||
# programs.codex = {
|
|
||||||
# enable = true;
|
|
||||||
# package = pkgs.llm-agents.codex;
|
|
||||||
# enableMcpIntegration = true;
|
|
||||||
# settings = {
|
|
||||||
# model = "gpt-5.5";
|
|
||||||
# model_reasoning_effort = "high";
|
|
||||||
# plan_mode_reasoning_effort = "high";
|
|
||||||
# tui.status_line = [
|
|
||||||
# "model-with-reasoning"
|
|
||||||
# "current-dir"
|
|
||||||
# "git-branch"
|
|
||||||
# "context-remaining"
|
|
||||||
# "five-hour-limit"
|
|
||||||
# ];
|
|
||||||
# projects.${account.nixosConfigurationPath}.trust_level = "trusted";
|
|
||||||
# projects."${config.home.homeDirectory}/work/repos/yookr-data-science".trust_level = "trusted";
|
|
||||||
# sandbox_mode = "workspace-write";
|
|
||||||
# personality = "pragmatic";
|
|
||||||
# features.undo = true;
|
|
||||||
# mcp_servers.nixos = config.programs.mcp.servers.nixos // {
|
|
||||||
# enabled = true;
|
|
||||||
# default_tools_approval_mode = "approve";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +1,40 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
homeModules = config.flake.modules.homeManager;
|
homeModules = config.flake.modules.homeManager;
|
||||||
vivaldiPackage = pkgs: pkgs.vivaldi;
|
|
||||||
nautilusPackage = pkgs: pkgs.nautilus;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.browser-vivaldi =
|
flake.modules.homeManager.browser-vivaldi =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ (vivaldiPackage pkgs) ];
|
home.packages = [ pkgs.vivaldi ];
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.homeManager.primary-browser-vivaldi =
|
flake.modules.homeManager.primary-browser-vivaldi =
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
browser = pkgs.vivaldi;
|
||||||
|
browserCommand = lib.getExe browser;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ homeModules.browser-vivaldi ];
|
imports = [ homeModules.browser-vivaldi ];
|
||||||
|
|
||||||
facts.desktop.browserCommand = lib.getExe (vivaldiPackage pkgs);
|
facts.desktop.browserCommand = browserCommand;
|
||||||
home.sessionVariables.BROWSER = lib.getExe (vivaldiPackage pkgs);
|
home.sessionVariables.BROWSER = browserCommand;
|
||||||
xdg.mimeApps.defaultApplicationPackages = [ (vivaldiPackage pkgs) ];
|
xdg.mimeApps.defaultApplicationPackages = [ browser ];
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.homeManager.file-manager-nautilus =
|
flake.modules.homeManager.file-manager-nautilus =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ (nautilusPackage pkgs) ];
|
home.packages = [ pkgs.nautilus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.homeManager.primary-file-manager-nautilus =
|
flake.modules.homeManager.primary-file-manager-nautilus =
|
||||||
{ lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [ homeModules.file-manager-nautilus ];
|
imports = [ homeModules.file-manager-nautilus ];
|
||||||
|
|
||||||
xdg.mimeApps.defaultApplicationPackages = [ (nautilusPackage pkgs) ];
|
xdg.mimeApps.defaultApplicationPackages = [ pkgs.nautilus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.homeManager.image-viewer-imv = {
|
flake.modules.homeManager.image-viewer-imv = {
|
||||||
|
|||||||
@@ -13,12 +13,6 @@
|
|||||||
inputs.devenv.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.devenv.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
];
|
];
|
||||||
|
|
||||||
# programs.direnv = {
|
|
||||||
# enable = true;
|
|
||||||
# enableZshIntegration = true;
|
|
||||||
# nix-direnv.enable = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
programs.zsh.initContent = ''
|
programs.zsh.initContent = ''
|
||||||
eval "$(devenv hook zsh)"
|
eval "$(devenv hook zsh)"
|
||||||
'';
|
'';
|
||||||
@@ -32,6 +26,5 @@
|
|||||||
programs.jq.enable = true;
|
programs.jq.enable = true;
|
||||||
programs.bun.enable = true;
|
programs.bun.enable = true;
|
||||||
programs.ripgrep.enable = true;
|
programs.ripgrep.enable = true;
|
||||||
#programs.uv.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.git =
|
flake.modules.homeManager.git =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
osConfig,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
machine = osConfig.facts.machine;
|
machine = config.facts.machine;
|
||||||
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
|
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
|
||||||
|
|
||||||
mkScope =
|
mkScope =
|
||||||
scope:
|
scope:
|
||||||
let
|
let
|
||||||
email = account.emails.${scope}.address;
|
email = account.emails.${scope}.address;
|
||||||
key = lib.attrByPath [ scope ] null machine.sshKeys;
|
key = machine.sshKeys.${scope} or null;
|
||||||
hasSigningKey = key != null;
|
hasSigningKey = key != null;
|
||||||
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
|
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
palette = config.repo.theme.kanagawa.palette;
|
palette = config.facts.theme.kanagawa.palette;
|
||||||
hex = lib.removePrefix "#";
|
hex = lib.removePrefix "#";
|
||||||
terminalPalette = palette.terminal;
|
terminalPalette = palette.terminal;
|
||||||
mkPalette = colors: lib.concatStringsSep ";" (map hex colors);
|
mkPalette = colors: lib.concatStringsSep ";" (map hex colors);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||||
LC_NAME = "nl_NL.UTF-8";
|
LC_NAME = "nl_NL.UTF-8";
|
||||||
|
|
||||||
# Use '.' as decimal point and ',' as thouands separator
|
# Use '.' as decimal point and ',' as thousands separator
|
||||||
LC_NUMERIC = "en_IE.UTF-8";
|
LC_NUMERIC = "en_IE.UTF-8";
|
||||||
LC_MONETARY = "en_IE.UTF-8";
|
LC_MONETARY = "en_IE.UTF-8";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
repoTheme = config.repo.theme.kanagawa;
|
theme = config.facts.theme.kanagawa;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.default-editor-neovim =
|
flake.modules.homeManager.default-editor-neovim =
|
||||||
@@ -34,19 +34,14 @@ in
|
|||||||
wrappers.neovim = {
|
wrappers.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# 1. Point to your existing Lua config directory
|
|
||||||
settings.config_directory = ./lua-config;
|
settings.config_directory = ./lua-config;
|
||||||
|
|
||||||
# 2. Runtime Dependencies (from lspsAndRuntimeDeps)
|
|
||||||
# These are added to the PATH of the wrapper
|
|
||||||
runtimePkgs = with pkgs; [
|
runtimePkgs = with pkgs; [
|
||||||
# Tools
|
|
||||||
universal-ctags
|
universal-ctags
|
||||||
ripgrep
|
ripgrep
|
||||||
fd
|
fd
|
||||||
tree-sitter
|
tree-sitter
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
# LSPs & Formatters
|
|
||||||
stylua
|
stylua
|
||||||
taplo
|
taplo
|
||||||
yamlfmt
|
yamlfmt
|
||||||
@@ -64,15 +59,10 @@ in
|
|||||||
tinymist
|
tinymist
|
||||||
typstyle
|
typstyle
|
||||||
websocat
|
websocat
|
||||||
|
|
||||||
# ty
|
|
||||||
# basedpyright
|
|
||||||
ty
|
ty
|
||||||
ruff
|
ruff
|
||||||
];
|
];
|
||||||
|
|
||||||
# 3. Plugins
|
|
||||||
# Nix provisions plugins; lz.n controls when lazy specs are packadd'd.
|
|
||||||
specs = {
|
specs = {
|
||||||
lz-n = {
|
lz-n = {
|
||||||
data = pkgs.vimPlugins.lz-n;
|
data = pkgs.vimPlugins.lz-n;
|
||||||
@@ -153,9 +143,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# 4. Values exposed to Lua through require("nix-info").settings.
|
|
||||||
settings = {
|
settings = {
|
||||||
# Hostname/ConfigDir needed for nixd
|
|
||||||
nixdExtras = {
|
nixdExtras = {
|
||||||
nixpkgs = "import ${pkgs.path} {}";
|
nixpkgs = "import ${pkgs.path} {}";
|
||||||
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options'';
|
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options'';
|
||||||
@@ -163,22 +151,17 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
themeSetup = import ./_kanagawa-theme.nix {
|
themeSetup = import ./_kanagawa-theme.nix {
|
||||||
themeName = repoTheme.name;
|
themeName = theme.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
typstPreviewDependencies = {
|
typstPreviewDependencies = {
|
||||||
tinymist = "${pkgs.tinymist}/bin/tinymist";
|
tinymist = "${pkgs.tinymist}/bin/tinymist";
|
||||||
websocat = "${pkgs.websocat}/bin/websocat";
|
websocat = "${pkgs.websocat}/bin/websocat";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# 5. Wrapper Configuration
|
|
||||||
# Enable Python/Node providers
|
|
||||||
hosts.python3.nvim-host.enable = true;
|
hosts.python3.nvim-host.enable = true;
|
||||||
hosts.node.nvim-host.enable = true;
|
hosts.node.nvim-host.enable = true;
|
||||||
|
|
||||||
# Ensure the bin name matches what you expect
|
|
||||||
binName = "nvim";
|
binName = "nvim";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
facts,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
repo,
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
nixosConfigDir = repo.account.nixosConfigurationPath;
|
nixosConfigDir = facts.account.nixosConfigurationPath;
|
||||||
mkTerminalScript =
|
mkTerminalScript =
|
||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
facts = config.facts;
|
||||||
hmModules = config.flake.modules.homeManager;
|
hmModules = config.flake.modules.homeManager;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -37,21 +37,20 @@ in
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
borderPalette = repo.theme.kanagawa.palette.niri.border;
|
borderPalette = facts.theme.kanagawa.palette.niri.border;
|
||||||
shortcuts = import ./_shortcuts.nix {
|
shortcuts = import ./_shortcuts.nix {
|
||||||
inherit
|
inherit
|
||||||
config
|
config
|
||||||
|
facts
|
||||||
lib
|
lib
|
||||||
pkgs
|
pkgs
|
||||||
repo
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
machine = osConfig.facts.machine;
|
machine = config.facts.machine;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
@@ -71,12 +70,6 @@ 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 = {
|
||||||
x = display.x or 0;
|
x = display.x or 0;
|
||||||
@@ -86,19 +79,19 @@ in
|
|||||||
// lib.optionalAttrs (display.primary or false) {
|
// lib.optionalAttrs (display.primary or false) {
|
||||||
"focus-at-startup" = true;
|
"focus-at-startup" = true;
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (scale != null) {
|
// lib.optionalAttrs (display ? scale) {
|
||||||
inherit scale;
|
inherit (display) scale;
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (width != null && height != null && refresh != null) {
|
// lib.optionalAttrs (display ? width && display ? height && display ? refresh) {
|
||||||
mode = {
|
mode = {
|
||||||
inherit
|
inherit (display)
|
||||||
width
|
|
||||||
height
|
height
|
||||||
refresh
|
refresh
|
||||||
|
width
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) (machine.displays or { });
|
) machine.displays;
|
||||||
|
|
||||||
environment.DISPLAY = ":0";
|
environment.DISPLAY = ":0";
|
||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ inputs, config, ... }:
|
{ inputs, config, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.nix =
|
flake.modules.nixos.nix =
|
||||||
|
|||||||
@@ -1,19 +1,31 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.noctalia =
|
flake.modules.homeManager.noctalia =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
homeDir = config.home.homeDirectory;
|
homeDir = config.home.homeDirectory;
|
||||||
|
wallpaper = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
||||||
|
loginBox = output: {
|
||||||
|
box_height = 70.0;
|
||||||
|
box_width = 400.0;
|
||||||
|
cx = 1280.0;
|
||||||
|
cy = 1317.0;
|
||||||
|
inherit output;
|
||||||
|
rotation = 0.0;
|
||||||
|
type = "login_box";
|
||||||
|
settings = {
|
||||||
|
background_color = "surface_variant";
|
||||||
|
background_opacity = 0.88;
|
||||||
|
background_radius = 12.0;
|
||||||
|
input_opacity = 1.0;
|
||||||
|
input_radius = 6.0;
|
||||||
|
show_login_button = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.noctalia.homeModules.default ];
|
imports = [ inputs.noctalia.homeModules.default ];
|
||||||
@@ -27,25 +39,19 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
bar.default = {
|
bar.default = {
|
||||||
end =
|
end = [
|
||||||
if osConfig.facts.machine.portable then
|
"tray"
|
||||||
[
|
"bluetooth"
|
||||||
"tray"
|
"volume"
|
||||||
"bluetooth"
|
]
|
||||||
"volume"
|
++ lib.optionals config.facts.machine.portable [
|
||||||
"network"
|
"network"
|
||||||
"battery"
|
"battery"
|
||||||
"clipboard"
|
]
|
||||||
"control-center"
|
++ [
|
||||||
]
|
"clipboard"
|
||||||
else
|
"control-center"
|
||||||
[
|
];
|
||||||
"tray"
|
|
||||||
"bluetooth"
|
|
||||||
"volume"
|
|
||||||
"clipboard"
|
|
||||||
"control-center"
|
|
||||||
];
|
|
||||||
font_weight = 400;
|
font_weight = 400;
|
||||||
start = [ "workspaces" ];
|
start = [ "workspaces" ];
|
||||||
thickness = 30;
|
thickness = 30;
|
||||||
@@ -56,9 +62,9 @@
|
|||||||
account.radicale = {
|
account.radicale = {
|
||||||
name = "Personal";
|
name = "Personal";
|
||||||
provider = "custom";
|
provider = "custom";
|
||||||
server_url = "https://radicale.jelles.net/";
|
server_url = config.facts.services.radicale.url;
|
||||||
type = "caldav";
|
type = "caldav";
|
||||||
username = "kiri";
|
username = config.facts.account.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -96,40 +102,8 @@
|
|||||||
visible = true;
|
visible = true;
|
||||||
};
|
};
|
||||||
widget = {
|
widget = {
|
||||||
"lockscreen-login-box@DP-2" = {
|
"lockscreen-login-box@DP-2" = loginBox "DP-2";
|
||||||
box_height = 70.0;
|
"lockscreen-login-box@DP-3" = loginBox "DP-3";
|
||||||
box_width = 400.0;
|
|
||||||
cx = 1280.0;
|
|
||||||
cy = 1317.0;
|
|
||||||
output = "DP-2";
|
|
||||||
rotation = 0.0;
|
|
||||||
type = "login_box";
|
|
||||||
settings = {
|
|
||||||
background_color = "surface_variant";
|
|
||||||
background_opacity = 0.88;
|
|
||||||
background_radius = 12.0;
|
|
||||||
input_opacity = 1.0;
|
|
||||||
input_radius = 6.0;
|
|
||||||
show_login_button = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"lockscreen-login-box@DP-3" = {
|
|
||||||
box_height = 70.0;
|
|
||||||
box_width = 400.0;
|
|
||||||
cx = 1280.0;
|
|
||||||
cy = 1317.0;
|
|
||||||
output = "DP-3";
|
|
||||||
rotation = 0.0;
|
|
||||||
type = "login_box";
|
|
||||||
settings = {
|
|
||||||
background_color = "surface_variant";
|
|
||||||
background_opacity = 0.88;
|
|
||||||
background_radius = 12.0;
|
|
||||||
input_opacity = 1.0;
|
|
||||||
input_radius = 6.0;
|
|
||||||
show_login_button = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,11 +158,11 @@
|
|||||||
|
|
||||||
wallpaper = {
|
wallpaper = {
|
||||||
directory = "${homeDir}/media/images/wallpapers";
|
directory = "${homeDir}/media/images/wallpapers";
|
||||||
default.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
default.path = wallpaper;
|
||||||
last.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
last.path = wallpaper;
|
||||||
monitors = {
|
monitors = {
|
||||||
DP-2.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
DP-2.path = wallpaper;
|
||||||
DP-3.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
DP-3.path = wallpaper;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
{
|
|
||||||
homeDirectory,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
audio = {
|
|
||||||
enable_sounds = true;
|
|
||||||
sound_volume = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
bar.default = {
|
|
||||||
end = [
|
|
||||||
"tray"
|
|
||||||
"bluetooth"
|
|
||||||
"volume"
|
|
||||||
"clipboard"
|
|
||||||
"control-center"
|
|
||||||
];
|
|
||||||
font_weight = 400;
|
|
||||||
start = [ "workspaces" ];
|
|
||||||
thickness = 30;
|
|
||||||
};
|
|
||||||
|
|
||||||
calendar = {
|
|
||||||
enabled = true;
|
|
||||||
account.radicale = {
|
|
||||||
name = "Personal";
|
|
||||||
provider = "custom";
|
|
||||||
server_url = "https://radicale.jelles.net/";
|
|
||||||
type = "caldav";
|
|
||||||
username = "kiri";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
desktop_widgets = {
|
|
||||||
enabled = false;
|
|
||||||
schema_version = 2;
|
|
||||||
widget_order = [ ];
|
|
||||||
grid = {
|
|
||||||
cell_size = 16;
|
|
||||||
major_interval = 4;
|
|
||||||
visible = true;
|
|
||||||
};
|
|
||||||
widget = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
location.address = "Meterik, The Netherlands";
|
|
||||||
|
|
||||||
lockscreen = {
|
|
||||||
blur_intensity = 0.8;
|
|
||||||
blurred_desktop = true;
|
|
||||||
fingerprint = false;
|
|
||||||
tint_intensity = 0.5;
|
|
||||||
};
|
|
||||||
|
|
||||||
lockscreen_widgets = {
|
|
||||||
enabled = true;
|
|
||||||
schema_version = 2;
|
|
||||||
widget_order = [
|
|
||||||
"lockscreen-login-box@DP-2"
|
|
||||||
"lockscreen-login-box@DP-3"
|
|
||||||
];
|
|
||||||
grid = {
|
|
||||||
cell_size = 16;
|
|
||||||
major_interval = 4;
|
|
||||||
visible = true;
|
|
||||||
};
|
|
||||||
widget = {
|
|
||||||
"lockscreen-login-box@DP-2" = {
|
|
||||||
box_height = 70.0;
|
|
||||||
box_width = 400.0;
|
|
||||||
cx = 1280.0;
|
|
||||||
cy = 1317.0;
|
|
||||||
output = "DP-2";
|
|
||||||
rotation = 0.0;
|
|
||||||
type = "login_box";
|
|
||||||
settings = {
|
|
||||||
background_color = "surface_variant";
|
|
||||||
background_opacity = 0.88;
|
|
||||||
background_radius = 12.0;
|
|
||||||
input_opacity = 1.0;
|
|
||||||
input_radius = 6.0;
|
|
||||||
show_login_button = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"lockscreen-login-box@DP-3" = {
|
|
||||||
box_height = 70.0;
|
|
||||||
box_width = 400.0;
|
|
||||||
cx = 1280.0;
|
|
||||||
cy = 1317.0;
|
|
||||||
output = "DP-3";
|
|
||||||
rotation = 0.0;
|
|
||||||
type = "login_box";
|
|
||||||
settings = {
|
|
||||||
background_color = "surface_variant";
|
|
||||||
background_opacity = 0.88;
|
|
||||||
background_radius = 12.0;
|
|
||||||
input_opacity = 1.0;
|
|
||||||
input_radius = 6.0;
|
|
||||||
show_login_button = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nightlight = {
|
|
||||||
enabled = true;
|
|
||||||
temperature_night = 3000;
|
|
||||||
};
|
|
||||||
|
|
||||||
notification = {
|
|
||||||
layer = "overlay";
|
|
||||||
position = "bottom_right";
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins = {
|
|
||||||
enabled = [ ];
|
|
||||||
source = [
|
|
||||||
{
|
|
||||||
kind = "git";
|
|
||||||
location = "https://github.com/noctalia-dev/official-plugins";
|
|
||||||
name = "official";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
kind = "git";
|
|
||||||
location = "https://github.com/noctalia-dev/community-plugins";
|
|
||||||
name = "community";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
shell = {
|
|
||||||
font_family = "Lexend";
|
|
||||||
screen_time_enabled = true;
|
|
||||||
settings_show_advanced = true;
|
|
||||||
ui_scale = 1.1;
|
|
||||||
animation.speed = 1.5;
|
|
||||||
screen_corners = {
|
|
||||||
enabled = true;
|
|
||||||
size = 50;
|
|
||||||
};
|
|
||||||
screenshot.directory = "${homeDirectory}/media/images/screenshots";
|
|
||||||
};
|
|
||||||
|
|
||||||
theme = {
|
|
||||||
builtin = "Kanagawa";
|
|
||||||
community_palette = "Kanagawa Paper";
|
|
||||||
wallpaper_scheme = "m3-content";
|
|
||||||
templates = {
|
|
||||||
enable_builtin_templates = false;
|
|
||||||
enable_community_templates = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
wallpaper = {
|
|
||||||
directory = "${homeDirectory}/media/images/wallpapers";
|
|
||||||
default.path = "${homeDirectory}/media/images/wallpapers/green-leaves.png";
|
|
||||||
last.path = "${homeDirectory}/media/images/wallpapers/green-leaves.png";
|
|
||||||
monitors = {
|
|
||||||
DP-2.path = "${homeDirectory}/media/images/wallpapers/green-leaves.png";
|
|
||||||
DP-3.path = "${homeDirectory}/media/images/wallpapers/green-leaves.png";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
weather.refresh_minutes = 15;
|
|
||||||
|
|
||||||
widget = {
|
|
||||||
bluetooth.hide_when_no_connected_device = true;
|
|
||||||
cat = {
|
|
||||||
audio_spectrum = true;
|
|
||||||
type = "noctalia/bongocat:cat";
|
|
||||||
};
|
|
||||||
clock.format = "{:%b %d | %H:%M}";
|
|
||||||
media = {
|
|
||||||
art_size = 90.0;
|
|
||||||
max_length = 800;
|
|
||||||
};
|
|
||||||
tray.drawer = true;
|
|
||||||
volume.show_label = false;
|
|
||||||
workspaces.display = "none";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
facts = config.facts;
|
||||||
account = repo.account;
|
account = facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.passwords =
|
flake.modules.homeManager.passwords =
|
||||||
@@ -19,7 +19,7 @@ in
|
|||||||
programs.rbw = {
|
programs.rbw = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
base_url = repo.services.vaultwarden.url;
|
base_url = facts.services.vaultwarden.url;
|
||||||
email = account.primaryEmail.address;
|
email = account.primaryEmail.address;
|
||||||
pinentry = pinentryPackage;
|
pinentry = pinentryPackage;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
facts = config.facts;
|
||||||
account = repo.account;
|
account = facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.email =
|
flake.modules.homeManager.email =
|
||||||
@@ -138,7 +138,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
remote = {
|
remote = {
|
||||||
url = repo.services.radicale.url;
|
url = facts.services.radicale.url;
|
||||||
type = "caldav";
|
type = "caldav";
|
||||||
userName = config.home.username;
|
userName = config.home.username;
|
||||||
passwordCommand = [
|
passwordCommand = [
|
||||||
|
|||||||
@@ -1,36 +1,19 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
service = config.facts.services.actual;
|
||||||
repoHelpers = repo.helpers;
|
|
||||||
service = repo.services.actual;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.services.actual = {
|
flake.modules.nixos.actual = {
|
||||||
domain = "finance.jelles.net";
|
services.actual = {
|
||||||
host = "127.0.0.1";
|
enable = true;
|
||||||
port = 3000;
|
openFirewall = false;
|
||||||
url = "https://finance.jelles.net";
|
settings = {
|
||||||
|
inherit (service) port;
|
||||||
|
hostname = service.host;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.caddy.virtualHosts.${service.domain}.extraConfig =
|
||||||
|
"reverse_proxy :${toString service.port}";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.nixos.actual =
|
|
||||||
{ lib, ... }:
|
|
||||||
lib.mkMerge [
|
|
||||||
{
|
|
||||||
services.actual = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = false;
|
|
||||||
settings = {
|
|
||||||
inherit (service) port;
|
|
||||||
hostname = service.host;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(repoHelpers.mkCaddyReverseProxy {
|
|
||||||
inherit (service)
|
|
||||||
domain
|
|
||||||
port
|
|
||||||
;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
facts = config.facts;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.caddy = {
|
flake.modules.nixos.caddy = {
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = repo.account.primaryEmail.address;
|
email = facts.account.primaryEmail.address;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.deluge =
|
flake.modules.nixos.deluge =
|
||||||
|
|||||||
@@ -1,49 +1,30 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
service = config.facts.services.gitea;
|
||||||
repoHelpers = repo.helpers;
|
|
||||||
service = repo.services.gitea;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.services.gitea = {
|
flake.modules.nixos.gitea = {
|
||||||
domain = "git.jelles.net";
|
services.gitea = {
|
||||||
host = "127.0.0.1";
|
enable = true;
|
||||||
port = 3001;
|
|
||||||
url = "https://git.jelles.net/";
|
|
||||||
};
|
|
||||||
|
|
||||||
flake.modules.nixos.gitea =
|
settings = {
|
||||||
{ lib, ... }:
|
server = {
|
||||||
lib.mkMerge [
|
DOMAIN = service.domain;
|
||||||
{
|
ROOT_URL = service.url;
|
||||||
services.gitea = {
|
HTTP_PORT = service.port;
|
||||||
enable = true;
|
HTTP_ADDR = service.host;
|
||||||
|
|
||||||
settings = {
|
START_SSH_SERVER = false;
|
||||||
server = {
|
SSH_PORT = 22;
|
||||||
DOMAIN = service.domain;
|
|
||||||
ROOT_URL = service.url;
|
|
||||||
HTTP_PORT = service.port;
|
|
||||||
HTTP_ADDR = service.host;
|
|
||||||
|
|
||||||
START_SSH_SERVER = false;
|
|
||||||
SSH_PORT = 22;
|
|
||||||
};
|
|
||||||
|
|
||||||
service.DISABLE_REGISTRATION = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
{
|
service.DISABLE_REGISTRATION = true;
|
||||||
services.openssh.settings.AllowUsers = [ "gitea" ];
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
(repoHelpers.mkCaddyReverseProxy {
|
services.openssh.settings.AllowUsers = [ "gitea" ];
|
||||||
inherit (service)
|
|
||||||
domain
|
services.caddy.virtualHosts.${service.domain}.extraConfig =
|
||||||
port
|
"reverse_proxy :${toString service.port}";
|
||||||
;
|
};
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
personalPublicKeys =
|
personalPublicKeys =
|
||||||
machines:
|
machines:
|
||||||
map (machine: (machine.sshKeys or { }).personal.publicKey) (
|
map (machine: (machine.sshKeys or { }).personal.publicKey) (
|
||||||
@@ -29,6 +29,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys config.repo.machines;
|
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys config.facts.machines;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,56 +1,30 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
service = config.facts.services.radicale;
|
||||||
repoHelpers = repo.helpers;
|
|
||||||
service = repo.services.radicale;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.services.radicale = {
|
flake.modules.nixos.radicale = {
|
||||||
domain = "radicale.jelles.net";
|
services.radicale = {
|
||||||
host = "127.0.0.1";
|
enable = true;
|
||||||
port = 5232;
|
settings = {
|
||||||
url = "https://radicale.jelles.net/";
|
server.hosts = [ "${service.host}:${toString service.port}" ];
|
||||||
};
|
|
||||||
|
|
||||||
flake.modules.nixos.radicale =
|
auth = {
|
||||||
{ lib, ... }:
|
type = "htpasswd";
|
||||||
lib.mkMerge [
|
htpasswd_filename = "/var/lib/radicale/users";
|
||||||
{
|
htpasswd_encryption = "bcrypt";
|
||||||
services.radicale = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
server.hosts = [ "${service.host}:${toString service.port}" ];
|
|
||||||
|
|
||||||
auth = {
|
|
||||||
type = "htpasswd";
|
|
||||||
htpasswd_filename = "/var/lib/radicale/users";
|
|
||||||
htpasswd_encryption = "bcrypt";
|
|
||||||
};
|
|
||||||
|
|
||||||
storage.filesystem_folder = "/var/lib/radicale/collections";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
(repoHelpers.mkCaddyReverseProxy {
|
storage.filesystem_folder = "/var/lib/radicale/collections";
|
||||||
inherit (service)
|
};
|
||||||
domain
|
};
|
||||||
port
|
|
||||||
;
|
services.caddy.virtualHosts.${service.domain}.extraConfig = ''
|
||||||
extraHeaders = [
|
reverse_proxy :${toString service.port} {
|
||||||
{
|
header_up X-Script-Name /
|
||||||
name = "X-Script-Name";
|
header_up X-Forwarded-For {remote}
|
||||||
value = "/";
|
header_up X-Remote-User {http.auth.user.id}
|
||||||
}
|
}
|
||||||
{
|
'';
|
||||||
name = "X-Forwarded-For";
|
};
|
||||||
value = "{remote}";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "X-Remote-User";
|
|
||||||
value = "{http.auth.user.id}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
account = config.repo.account;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
flake.modules.nixos.transmission =
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.transmission = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.transmission_4;
|
|
||||||
openPeerPorts = true;
|
|
||||||
downloadDirPermissions = "775";
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
download-dir = "${account.homeDirectory}/torrents";
|
|
||||||
incomplete-dir = "${account.homeDirectory}/torrents/.incomplete";
|
|
||||||
peer-port = 43864;
|
|
||||||
umask = "002";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# NOTE: Upstream bug?
|
|
||||||
systemd.services.transmission-setup.requiredBy = [ "transmission.service" ];
|
|
||||||
|
|
||||||
users.users.${account.name}.extraGroups = [ config.services.transmission.group ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,38 +1,21 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
service = config.facts.services.vaultwarden;
|
||||||
repoHelpers = repo.helpers;
|
|
||||||
service = repo.services.vaultwarden;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.services.vaultwarden = {
|
flake.modules.nixos.vaultwarden = {
|
||||||
domain = "vault.jelles.net";
|
services.vaultwarden = {
|
||||||
host = "127.0.0.1";
|
enable = true;
|
||||||
port = 8100;
|
backupDir = "/var/backup/vaultwarden";
|
||||||
url = "https://vault.jelles.net";
|
config = {
|
||||||
|
DOMAIN = service.url;
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
ROCKET_PORT = service.port;
|
||||||
|
ROCKET_LOG = "critical";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.caddy.virtualHosts.${service.domain}.extraConfig =
|
||||||
|
"reverse_proxy :${toString service.port}";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.nixos.vaultwarden =
|
|
||||||
{ lib, ... }:
|
|
||||||
lib.mkMerge [
|
|
||||||
{
|
|
||||||
services.vaultwarden = {
|
|
||||||
enable = true;
|
|
||||||
backupDir = "/var/backup/vaultwarden";
|
|
||||||
config = {
|
|
||||||
DOMAIN = service.url;
|
|
||||||
SIGNUPS_ALLOWED = false;
|
|
||||||
ROCKET_PORT = service.port;
|
|
||||||
ROCKET_LOG = "critical";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(repoHelpers.mkCaddyReverseProxy {
|
|
||||||
inherit (service)
|
|
||||||
domain
|
|
||||||
port
|
|
||||||
;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,28 +4,17 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
syncMachines = lib.listToAttrs (
|
account = config.facts.account;
|
||||||
lib.concatLists (
|
syncMachines = lib.mapAttrs' (
|
||||||
lib.mapAttrsToList (
|
machineName: machine:
|
||||||
machineName: machine:
|
let
|
||||||
let
|
name = "${account.name}@${machineName}";
|
||||||
syncthingId = machine.syncthingId or null;
|
in
|
||||||
in
|
lib.nameValuePair name {
|
||||||
lib.optional (syncthingId != null) (
|
inherit name;
|
||||||
let
|
id = machine.syncthingId;
|
||||||
name = "${config.repo.account.name}@${machineName}";
|
}
|
||||||
in
|
) (lib.filterAttrs (_: machine: (machine.syncthingId or null) != null) config.facts.machines);
|
||||||
{
|
|
||||||
inherit name;
|
|
||||||
value = {
|
|
||||||
inherit name;
|
|
||||||
id = syncthingId;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
) config.repo.machines
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
syncPhones = {
|
syncPhones = {
|
||||||
"pixel-10" = {
|
"pixel-10" = {
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.systemd-boot =
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
consoleMode = "auto";
|
|
||||||
configurationLimit = 5;
|
|
||||||
extraInstallCommands = ''
|
|
||||||
ENTRIES="${config.boot.loader.efi.efiSysMountPoint}/loader/entries"
|
|
||||||
PROFILES="/nix/var/nix/profiles"
|
|
||||||
|
|
||||||
for file in "$ENTRIES"/nixos-generation-*.conf; do
|
|
||||||
generation=$(${pkgs.coreutils}/bin/basename "$file" | ${pkgs.gnugrep}/bin/grep -o -E '[0-9]+')
|
|
||||||
timestamp=$(${pkgs.coreutils}/bin/stat -c %y "$PROFILES/system-$generation-link" 2>/dev/null | ${pkgs.coreutils}/bin/cut -d. -f1)
|
|
||||||
|
|
||||||
if [ -z "$timestamp" ]; then
|
|
||||||
timestamp="Unknown Date"
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.gnused}/bin/sed -i "s/^version .*/version Generation $generation - $timestamp/" "$file"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
tmp.cleanOnBoot = true;
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
facts = config.facts;
|
||||||
|
|
||||||
kittySingleInstance =
|
kittySingleInstance =
|
||||||
pkgs:
|
pkgs:
|
||||||
@@ -10,10 +10,7 @@ let
|
|||||||
meta = pkgs.kitty.meta;
|
meta = pkgs.kitty.meta;
|
||||||
buildInputs = [ pkgs.makeWrapper ];
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
# Wrap the binary to always launch as a single instance
|
|
||||||
wrapProgram $out/bin/kitty --add-flags "-1"
|
wrapProgram $out/bin/kitty --add-flags "-1"
|
||||||
|
|
||||||
# Patch the .desktop file for strict app launchers like Vicinae
|
|
||||||
rm $out/share/applications/kitty.desktop
|
rm $out/share/applications/kitty.desktop
|
||||||
sed 's/Exec=kitty/Exec=kitty -1/g' ${pkgs.kitty}/share/applications/kitty.desktop > $out/share/applications/kitty.desktop
|
sed 's/Exec=kitty/Exec=kitty -1/g' ${pkgs.kitty}/share/applications/kitty.desktop > $out/share/applications/kitty.desktop
|
||||||
'';
|
'';
|
||||||
@@ -28,8 +25,7 @@ in
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repoTheme = repo.theme.kanagawa;
|
palette = facts.theme.kanagawa.palette;
|
||||||
palette = repoTheme.palette;
|
|
||||||
hex = lib.removePrefix "#";
|
hex = lib.removePrefix "#";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -44,8 +40,6 @@ in
|
|||||||
font-bold-italic = "JetBrains Mono:style=Bold Italic:size=11:fontfeatures=-liga:fontfeatures=-calt";
|
font-bold-italic = "JetBrains Mono:style=Bold Italic:size=11:fontfeatures=-liga:fontfeatures=-calt";
|
||||||
gamma-correct-blending = "yes";
|
gamma-correct-blending = "yes";
|
||||||
pad = "3x3";
|
pad = "3x3";
|
||||||
# vertical-letter-offset = -1;
|
|
||||||
# letter-spacing = -0.2;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tweak.box-drawing-base-thickness = 0.1;
|
tweak.box-drawing-base-thickness = 0.1;
|
||||||
@@ -92,13 +86,14 @@ in
|
|||||||
flake.modules.homeManager.terminal-kitty =
|
flake.modules.homeManager.terminal-kitty =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
repoTheme = repo.theme.kanagawa;
|
theme = facts.theme.kanagawa;
|
||||||
palette = repoTheme.palette;
|
palette = theme.palette;
|
||||||
|
kitty = kittySingleInstance pkgs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = kittySingleInstance pkgs;
|
package = kitty;
|
||||||
font = {
|
font = {
|
||||||
name = "JetBrains Mono";
|
name = "JetBrains Mono";
|
||||||
size = 11;
|
size = 11;
|
||||||
@@ -116,7 +111,7 @@ in
|
|||||||
# Nerd Fonts v3.4.0
|
# Nerd Fonts v3.4.0
|
||||||
symbol_map U+e000-U+e00a,U+e0a0-U+e0a2,U+e0a3,U+e0b0-U+e0b3,U+e0b4-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b7,U+e700-U+e8ef,U+ea60-U+ec1e,U+ed00-U+efce,U+f000-U+f2ff,U+f300-U+f381,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono
|
symbol_map U+e000-U+e00a,U+e0a0-U+e0a2,U+e0a3,U+e0b0-U+e0b3,U+e0b4-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b7,U+e700-U+e8ef,U+ea60-U+ec1e,U+ed00-U+efce,U+f000-U+f2ff,U+f300-U+f381,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono
|
||||||
|
|
||||||
## name: ${repoTheme.displayName}
|
## name: ${theme.displayName}
|
||||||
## license: MIT
|
## license: MIT
|
||||||
## author: Tommaso Laurenzi
|
## author: Tommaso Laurenzi
|
||||||
## upstream: https://github.com/rebelot/kanagawa.nvim/
|
## upstream: https://github.com/rebelot/kanagawa.nvim/
|
||||||
@@ -165,9 +160,7 @@ in
|
|||||||
WantedBy = [ "graphical-session.target" ];
|
WantedBy = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
# Use the wrapped package (which already includes -1)
|
ExecStart = "${lib.getExe kitty} --start-as=hidden ${pkgs.coreutils}/bin/tail -f /dev/null";
|
||||||
# Start it hidden and run an infinite dummy process so the instance stays alive
|
|
||||||
ExecStart = "${lib.getExe (kittySingleInstance pkgs)} --start-as=hidden ${pkgs.coreutils}/bin/tail -f /dev/null";
|
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -188,10 +181,13 @@ in
|
|||||||
|
|
||||||
flake.modules.homeManager.primary-terminal-kitty =
|
flake.modules.homeManager.primary-terminal-kitty =
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
kitty = kittySingleInstance pkgs;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ config.flake.modules.homeManager.terminal-kitty ];
|
imports = [ config.flake.modules.homeManager.terminal-kitty ];
|
||||||
|
|
||||||
facts.desktop.terminalCommand = lib.getExe (kittySingleInstance pkgs);
|
facts.desktop.terminalCommand = lib.getExe kitty;
|
||||||
|
|
||||||
xdg.terminal-exec = {
|
xdg.terminal-exec = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -3,26 +3,23 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repo = config.repo;
|
facts = config.facts;
|
||||||
repoHelpers = repo.helpers;
|
|
||||||
hmModules = config.flake.modules.homeManager;
|
hmModules = config.flake.modules.homeManager;
|
||||||
|
mkCursorTheme =
|
||||||
|
pkgs:
|
||||||
|
facts.theme.cursor
|
||||||
|
// {
|
||||||
|
package = pkgs.${facts.theme.cursor.packageName};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.theme = import ./_theme.nix;
|
|
||||||
|
|
||||||
flake.modules.nixos.theme =
|
flake.modules.nixos.theme =
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repoTheme = repo.theme;
|
cursorTheme = mkCursorTheme pkgs;
|
||||||
cursorTheme = repoTheme.cursor // {
|
|
||||||
package = repoHelpers.resolvePackagePath {
|
|
||||||
inherit pkgs;
|
|
||||||
path = repoTheme.cursor.packagePath;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.sharedModules = [ hmModules.theme ];
|
home-manager.sharedModules = [ hmModules.theme ];
|
||||||
@@ -40,16 +37,11 @@ in
|
|||||||
flake.modules.homeManager.theme =
|
flake.modules.homeManager.theme =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
repoTheme = repo.theme;
|
theme = facts.theme;
|
||||||
cursorTheme = repoTheme.cursor // {
|
cursorTheme = mkCursorTheme pkgs;
|
||||||
package = repoHelpers.resolvePackagePath {
|
|
||||||
inherit pkgs;
|
|
||||||
path = repoTheme.cursor.packagePath;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
kanagawaThemeSrc = pkgs.fetchFromGitHub {
|
kanagawaThemeSrc = pkgs.fetchFromGitHub {
|
||||||
inherit (repoTheme.kanagawa)
|
inherit (theme.kanagawa)
|
||||||
hash
|
hash
|
||||||
owner
|
owner
|
||||||
repo
|
repo
|
||||||
@@ -58,7 +50,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
kanagawaOverride = {
|
kanagawaOverride = {
|
||||||
version = repoTheme.kanagawa.version;
|
version = theme.kanagawa.version;
|
||||||
src = kanagawaThemeSrc;
|
src = kanagawaThemeSrc;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
@@ -79,12 +71,12 @@ in
|
|||||||
"sftp://orion Orion VPS"
|
"sftp://orion Orion VPS"
|
||||||
];
|
];
|
||||||
theme = {
|
theme = {
|
||||||
name = repoTheme.kanagawa.gtkThemeName;
|
name = theme.kanagawa.gtkThemeName;
|
||||||
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
|
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
|
||||||
};
|
};
|
||||||
gtk4.theme = null;
|
gtk4.theme = null;
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = repoTheme.kanagawa.iconThemeName;
|
name = theme.kanagawa.iconThemeName;
|
||||||
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
|
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
repo = config.repo;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
flake.modules.homeManager.vicinae =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
repoTheme = repo.theme.kanagawa;
|
|
||||||
palette = repoTheme.palette;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.vicinae = {
|
|
||||||
enable = true;
|
|
||||||
systemd.enable = true;
|
|
||||||
|
|
||||||
themes.${repoTheme.name} = {
|
|
||||||
meta = {
|
|
||||||
version = 1;
|
|
||||||
name = repoTheme.displayName;
|
|
||||||
description = "A dark theme inspired by the colors of the famous painting by Katsushika Hokusai.";
|
|
||||||
variant = "dark";
|
|
||||||
inherits = "vicinae-dark";
|
|
||||||
};
|
|
||||||
colors = {
|
|
||||||
core = {
|
|
||||||
background = palette.background;
|
|
||||||
foreground = palette.foreground;
|
|
||||||
secondary_background = palette.secondaryBackground;
|
|
||||||
border = palette.border;
|
|
||||||
accent = palette.accents.blue;
|
|
||||||
};
|
|
||||||
accents = {
|
|
||||||
inherit (palette.accents)
|
|
||||||
blue
|
|
||||||
cyan
|
|
||||||
green
|
|
||||||
magenta
|
|
||||||
orange
|
|
||||||
purple
|
|
||||||
red
|
|
||||||
yellow
|
|
||||||
;
|
|
||||||
};
|
|
||||||
input.border_focus = "colors.core.accent";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
settings.theme = {
|
|
||||||
light.name = repoTheme.name;
|
|
||||||
dark.name = repoTheme.name;
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions = with inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system}; [
|
|
||||||
agenda
|
|
||||||
brotab
|
|
||||||
fuzzy-files
|
|
||||||
github
|
|
||||||
it-tools
|
|
||||||
niri
|
|
||||||
nix
|
|
||||||
podman
|
|
||||||
process-manager
|
|
||||||
pulseaudio
|
|
||||||
simple-bookmarks
|
|
||||||
ssh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
facts.desktop.launcherCommand = lib.getExe config.programs.vicinae.package;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
repo = {
|
|
||||||
account = rec {
|
|
||||||
name = "kiri";
|
|
||||||
realName = "Jelle Spreeuwenberg";
|
|
||||||
homeDirectory = "/home/${name}";
|
|
||||||
nixosConfigurationPath = "${homeDirectory}/.config/nixos";
|
|
||||||
|
|
||||||
emails = {
|
|
||||||
personal = {
|
|
||||||
address = "mail@jelles.net";
|
|
||||||
primary = true;
|
|
||||||
type = "mxrouting";
|
|
||||||
};
|
|
||||||
old = {
|
|
||||||
address = "mail@jellespreeuwenberg.nl";
|
|
||||||
type = "mxrouting";
|
|
||||||
};
|
|
||||||
uni = {
|
|
||||||
address = "j.spreeuwenberg@student.tue.nl";
|
|
||||||
type = "office365";
|
|
||||||
};
|
|
||||||
work = {
|
|
||||||
address = "jelle.spreeuwenberg@yookr.org";
|
|
||||||
type = "office365";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
primaryEmail = emails.personal;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
factsOption = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
freeformType = lib.types.attrsOf lib.types.anything;
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.facts = factsOption;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
facts = {
|
||||||
|
account = rec {
|
||||||
|
name = "kiri";
|
||||||
|
realName = "Jelle Spreeuwenberg";
|
||||||
|
homeDirectory = "/home/${name}";
|
||||||
|
nixosConfigurationPath = "${homeDirectory}/.config/nixos";
|
||||||
|
|
||||||
|
emails = {
|
||||||
|
personal = {
|
||||||
|
address = "mail@jelles.net";
|
||||||
|
primary = true;
|
||||||
|
type = "mxrouting";
|
||||||
|
};
|
||||||
|
old = {
|
||||||
|
address = "mail@jellespreeuwenberg.nl";
|
||||||
|
type = "mxrouting";
|
||||||
|
};
|
||||||
|
uni = {
|
||||||
|
address = "j.spreeuwenberg@student.tue.nl";
|
||||||
|
type = "office365";
|
||||||
|
};
|
||||||
|
work = {
|
||||||
|
address = "jelle.spreeuwenberg@yookr.org";
|
||||||
|
type = "office365";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
primaryEmail = emails.personal;
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = import ./capabilities/_theme.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.modules.nixos.facts = { lib, ... }: {
|
||||||
|
options.facts = factsOption;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.modules.homeManager.facts =
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig ? { },
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options.facts = factsOption;
|
||||||
|
|
||||||
|
config.facts = lib.optionalAttrs (osConfig ? facts) {
|
||||||
|
inherit (osConfig.facts)
|
||||||
|
account
|
||||||
|
machine
|
||||||
|
machines
|
||||||
|
services
|
||||||
|
theme
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
+58
-3
@@ -3,10 +3,65 @@
|
|||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
mkHost =
|
||||||
|
name: machine:
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
account = config.facts.account;
|
||||||
|
hmStateVersion = machine.hmStateVersion or machine.stateVersion;
|
||||||
|
machineFacts = {
|
||||||
|
displays = { };
|
||||||
|
portable = false;
|
||||||
|
sshKeys = { };
|
||||||
|
syncthingId = null;
|
||||||
|
}
|
||||||
|
// machine
|
||||||
|
// {
|
||||||
|
inherit name hmStateVersion;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
config.flake.modules.nixos.${name}
|
||||||
|
];
|
||||||
|
|
||||||
|
facts = {
|
||||||
|
inherit (config.facts)
|
||||||
|
account
|
||||||
|
machines
|
||||||
|
services
|
||||||
|
theme
|
||||||
|
;
|
||||||
|
machine = machineFacts;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = name;
|
||||||
|
system.stateVersion = machine.stateVersion;
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
users.users.${account.name} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
home = account.homeDirectory;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${account.name}.home = {
|
||||||
|
username = account.name;
|
||||||
|
homeDirectory = account.homeDirectory;
|
||||||
|
stateVersion = hmStateVersion;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.flake-parts.flakeModules.modules
|
inputs.flake-parts.flakeModules.modules
|
||||||
./data.nix
|
./facts.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
@@ -15,9 +70,9 @@
|
|||||||
name: machine:
|
name: machine:
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [ (config.repo.helpers.mkHost name machine) ];
|
modules = [ (mkHost name machine) ];
|
||||||
}
|
}
|
||||||
) config.repo.machines;
|
) config.facts.machines;
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
{
|
{ config, ... }:
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
nixosModules = config.flake.modules.nixos;
|
nixosModules = config.flake.modules.nixos;
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.machines.orion = {
|
facts.machines.orion = {
|
||||||
syncthingId = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI";
|
syncthingId = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI";
|
||||||
|
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ let
|
|||||||
nixosModules = config.flake.modules.nixos;
|
nixosModules = config.flake.modules.nixos;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.machines.polaris = {
|
facts.machines.polaris = {
|
||||||
sshKeys = {
|
sshKeys = {
|
||||||
personal.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVORk45HKkX7gaGGp90KsVyUy6t+fKhbWN/grjkf3cQ kiri@polaris";
|
personal.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVORk45HKkX7gaGGp90KsVyUy6t+fKhbWN/grjkf3cQ kiri@polaris";
|
||||||
work.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM5DMV6EQzsscgEOE0912mNglUHTEl+LPnaWYjj0y57B kiri@polaris#work";
|
work.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM5DMV6EQzsscgEOE0912mNglUHTEl+LPnaWYjj0y57B kiri@polaris#work";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ let
|
|||||||
nixosModules = config.flake.modules.nixos;
|
nixosModules = config.flake.modules.nixos;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
repo.machines.zenith = {
|
facts.machines.zenith = {
|
||||||
portable = true;
|
portable = true;
|
||||||
|
|
||||||
sshKeys = {
|
sshKeys = {
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
{ lib, config, ... }:
|
|
||||||
let
|
|
||||||
nixosModules = config.flake.modules.nixos;
|
|
||||||
|
|
||||||
resolvePackagePath =
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
path,
|
|
||||||
}:
|
|
||||||
lib.attrByPath path null pkgs;
|
|
||||||
|
|
||||||
mkCaddyReverseProxy =
|
|
||||||
{
|
|
||||||
domain,
|
|
||||||
port,
|
|
||||||
extraHeaders ? [ ],
|
|
||||||
extraConfigText ? "",
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
headerLines = map (header: " header_up ${header.name} ${header.value}") extraHeaders;
|
|
||||||
extraConfigLines = map (line: " ${line}") (
|
|
||||||
lib.filter (line: line != "") (lib.splitString "\n" extraConfigText)
|
|
||||||
);
|
|
||||||
bodyLines = headerLines ++ extraConfigLines;
|
|
||||||
body = lib.concatStringsSep "\n" bodyLines;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.caddy.virtualHosts.${domain}.extraConfig =
|
|
||||||
if body == "" then
|
|
||||||
"reverse_proxy :${toString port}"
|
|
||||||
else
|
|
||||||
''
|
|
||||||
reverse_proxy :${toString port} {
|
|
||||||
${body}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
mkHost =
|
|
||||||
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.${name}
|
|
||||||
];
|
|
||||||
|
|
||||||
facts.machine = normalizedMachine;
|
|
||||||
|
|
||||||
networking.hostName = name;
|
|
||||||
system.stateVersion = machine.stateVersion;
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
users.users.${account.name} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
home = accountHome;
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${account.name} = {
|
|
||||||
home = {
|
|
||||||
username = account.name;
|
|
||||||
homeDirectory = accountHome;
|
|
||||||
stateVersion = normalizedMachine.hmStateVersion;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config.repo.helpers = {
|
|
||||||
inherit
|
|
||||||
mkCaddyReverseProxy
|
|
||||||
mkHost
|
|
||||||
resolvePackagePath
|
|
||||||
;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.repo = lib.mkOption {
|
|
||||||
type = lib.types.submodule {
|
|
||||||
freeformType = lib.types.attrsOf lib.types.anything;
|
|
||||||
|
|
||||||
options.helpers = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.raw;
|
|
||||||
default = { };
|
|
||||||
internal = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
config.flake.modules.nixos.facts =
|
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.facts.machine = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.anything;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.flake.modules.homeManager.facts =
|
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.facts.desktop = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.anything;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
let
|
let
|
||||||
nixosModules = config.flake.modules.nixos;
|
nixosModules = config.flake.modules.nixos;
|
||||||
homeModules = config.flake.modules.homeManager;
|
homeModules = config.flake.modules.homeManager;
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.workstation-base = {
|
flake.modules.nixos.workstation-base = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
account = config.repo.account;
|
account = config.facts.account;
|
||||||
nixosModules = config.flake.modules.nixos;
|
nixosModules = config.flake.modules.nixos;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user