This commit is contained in:
William 2026-02-12 18:50:38 -03:00
parent 7309074f25
commit 8f98f7d420
45 changed files with 932 additions and 723 deletions

View file

@ -1,12 +1,14 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.ai = { inputs, pkgs, ... }: { flake.modules.nixos.ai =
environment.systemPackages = { inputs, pkgs, ... }:
(with pkgs; [claude-desktop]) ++ {
(with inputs.nix-ai-tools.packages.${pkgs.system}; [ environment.systemPackages =
claude-code (with pkgs; [ claude-desktop ])
claudebox ++ (with inputs.nix-ai-tools.packages.${pkgs.system}; [
opencode claude-code
]); claudebox
}; opencode
]);
};
} }

View file

@ -1,6 +1,13 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.bluetooth = { config, lib, pkgs, ... }: { flake.modules.nixos.bluetooth =
hardware.bluetooth.enable = true; {
}; config,
lib,
pkgs,
...
}:
{
hardware.bluetooth.enable = true;
};
} }

View file

@ -1,13 +1,20 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-btop = { config, lib, pkgs, ... }: { flake.modules.homeManager.cli-btop =
programs.btop = { {
enable = true; config,
settings = { lib,
theme_background = false; pkgs,
proc_sorting = "cpu direct"; ...
update_ms = 500; }:
{
programs.btop = {
enable = true;
settings = {
theme_background = false;
proc_sorting = "cpu direct";
update_ms = 500;
};
}; };
}; };
};
} }

View file

@ -1,8 +1,16 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-comma = { config, lib, pkgs, inputs, ... }: { flake.modules.homeManager.cli-comma =
imports = [ inputs.nix-index-database.homeModules.nix-index ]; {
config,
lib,
pkgs,
inputs,
...
}:
{
imports = [ inputs.nix-index-database.homeModules.nix-index ];
programs.nix-index-database.comma.enable = true; programs.nix-index-database.comma.enable = true;
}; };
} }

View file

@ -1,9 +1,16 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-direnv = { config, lib, pkgs, ... }: { flake.modules.homeManager.cli-direnv =
programs.direnv = { {
enable = true; config,
nix-direnv.enable = true; lib,
pkgs,
...
}:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}; };
};
} }

View file

@ -1,50 +1,57 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-helix = { config, lib, pkgs, ... }: { flake.modules.homeManager.cli-helix =
home.sessionVariables = { {
EDITOR = "hx"; config,
}; lib,
pkgs,
...
}:
{
home.sessionVariables = {
EDITOR = "hx";
};
programs.helix = { programs.helix = {
enable = true; enable = true;
settings = { settings = {
editor = { editor = {
file-picker.hidden = false; file-picker.hidden = false;
idle-timeout = 0; idle-timeout = 0;
line-number = "relative"; line-number = "relative";
cursor-shape = { cursor-shape = {
normal = "underline"; normal = "underline";
insert = "bar"; insert = "bar";
select = "underline"; select = "underline";
};
soft-wrap.enable = true;
auto-format = true;
indent-guides.render = true;
}; };
soft-wrap.enable = true; keys.normal = {
auto-format = true; space = {
indent-guides.render = true; o = "file_picker_in_current_buffer_directory";
}; esc = [
keys.normal = { "collapse_selection"
space = { "keep_primary_selection"
o = "file_picker_in_current_buffer_directory"; ];
esc = [ };
"collapse_selection"
"keep_primary_selection"
];
}; };
}; };
}; languages = {
languages = { language = [
language = [ {
{ name = "nix";
name = "nix"; auto-format = true;
auto-format = true; formatter.command = "nixfmt";
formatter.command = "nixfmt"; }
} {
{ name = "typst";
name = "typst"; auto-format = true;
auto-format = true; formatter.command = "typstyle -c 1000 -i";
formatter.command = "typstyle -c 1000 -i"; }
} ];
]; };
}; };
}; };
};
} }

View file

@ -1,11 +1,18 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-base = { config, lib, pkgs, ... }: { flake.modules.homeManager.cli-base =
home = { {
packages = with pkgs; [ hm-cli ]; config,
sessionVariables = { lib,
HM_PATH = "/etc/nixos"; pkgs,
...
}:
{
home = {
packages = with pkgs; [ hm-cli ];
sessionVariables = {
HM_PATH = "/etc/nixos";
};
}; };
}; };
};
} }

View file

@ -1,41 +1,48 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-starship = { config, lib, pkgs, ... }: { flake.modules.homeManager.cli-starship =
programs.starship = { {
enable = true; config,
enableBashIntegration = true; lib,
enableFishIntegration = true; pkgs,
settings = { ...
add_newline = false; }:
format = '' {
$hostname$directory$git_branch$git_status$nix_shell programs.starship = {
[ ](bold green) enable = true;
''; enableBashIntegration = true;
right_format = "$cmd_duration$character"; enableFishIntegration = true;
hostname = { settings = {
ssh_symbol = "󰖟 "; add_newline = false;
}; format = ''
character = { $hostname$directory$git_branch$git_status$nix_shell
error_symbol = "[](red)"; [ ](bold green)
success_symbol = "[󱐋](green)"; '';
}; right_format = "$cmd_duration$character";
cmd_duration = { hostname = {
format = "[󰄉 $duration ]($style)"; ssh_symbol = "󰖟 ";
style = "yellow"; };
min_time = 500; character = {
}; error_symbol = "[](red)";
git_branch = { success_symbol = "[󱐋](green)";
symbol = " "; };
style = "purple"; cmd_duration = {
}; format = "[󰄉 $duration ]($style)";
git_status.style = "red"; style = "yellow";
nix_shell = { min_time = 500;
format = "via [$symbol$state]($style)"; };
heuristic = true; git_branch = {
style = "blue"; symbol = " ";
symbol = "󱄅 "; style = "purple";
};
git_status.style = "red";
nix_shell = {
format = "via [$symbol$state]($style)";
heuristic = true;
style = "blue";
symbol = "󱄅 ";
};
}; };
}; };
}; };
};
} }

View file

@ -1,12 +1,19 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.cli-tmux = { config, lib, pkgs, ... }: { flake.modules.homeManager.cli-tmux =
programs.tmux = { {
enable = true; config,
clock24 = true; lib,
terminal = "xterm-256color"; pkgs,
mouse = true; ...
keyMode = "vi"; }:
{
programs.tmux = {
enable = true;
clock24 = true;
terminal = "xterm-256color";
mouse = true;
keyMode = "vi";
};
}; };
};
} }

View file

@ -1,21 +1,23 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-boot = { pkgs, ... }: { flake.modules.nixos.common-boot =
boot = { { pkgs, ... }:
loader = { {
timeout = 1; boot = {
efi.canTouchEfiVariables = true; loader = {
systemd-boot = { timeout = 1;
enable = true; efi.canTouchEfiVariables = true;
editor = false; systemd-boot = {
consoleMode = "max";
sortKey = "aa";
netbootxyz = {
enable = true; enable = true;
sortKey = "zz"; editor = false;
consoleMode = "max";
sortKey = "aa";
netbootxyz = {
enable = true;
sortKey = "zz";
};
}; };
}; };
}; };
}; };
};
} }

View file

@ -1,9 +1,11 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-console = { ... }: { flake.modules.nixos.common-console =
console = { { ... }:
useXkbConfig = true; {
earlySetup = true; console = {
useXkbConfig = true;
earlySetup = true;
};
}; };
};
} }

View file

@ -1,9 +1,11 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-firewall = { ... }: { flake.modules.nixos.common-firewall =
networking = { { ... }:
firewall.enable = true; {
nftables.enable = true; networking = {
firewall.enable = true;
nftables.enable = true;
};
}; };
};
} }

View file

@ -1,22 +1,24 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-locale = { ... }: { flake.modules.nixos.common-locale =
time.timeZone = "America/Bahia"; { ... }:
{
time.timeZone = "America/Bahia";
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
extraLocaleSettings = { extraLocaleSettings = {
LC_ADDRESS = "pt_BR.utf8"; LC_ADDRESS = "pt_BR.utf8";
LC_COLLATE = "pt_BR.utf8"; LC_COLLATE = "pt_BR.utf8";
LC_IDENTIFICATION = "pt_BR.utf8"; LC_IDENTIFICATION = "pt_BR.utf8";
LC_MEASUREMENT = "pt_BR.utf8"; LC_MEASUREMENT = "pt_BR.utf8";
LC_MONETARY = "pt_BR.utf8"; LC_MONETARY = "pt_BR.utf8";
LC_NAME = "pt_BR.utf8"; LC_NAME = "pt_BR.utf8";
LC_NUMERIC = "pt_BR.utf8"; LC_NUMERIC = "pt_BR.utf8";
LC_PAPER = "pt_BR.utf8"; LC_PAPER = "pt_BR.utf8";
LC_TELEPHONE = "pt_BR.utf8"; LC_TELEPHONE = "pt_BR.utf8";
LC_TIME = "en_IE.utf8"; LC_TIME = "en_IE.utf8";
};
}; };
}; };
};
} }

View file

@ -1,39 +1,41 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-nix = { inputs, ... }: { flake.modules.nixos.common-nix =
imports = [ inputs.nixos-cli.nixosModules.nixos-cli ]; { inputs, ... }:
{
imports = [ inputs.nixos-cli.nixosModules.nixos-cli ];
nix = { nix = {
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
connect-timeout = 10; connect-timeout = 10;
log-lines = 25; log-lines = 25;
min-free = 128000000; min-free = 128000000;
max-free = 1000000000; max-free = 1000000000;
trusted-users = [ "@wheel" ]; trusted-users = [ "@wheel" ];
};
extraOptions = "experimental-features = nix-command flakes";
gc = {
automatic = true;
options = "--delete-older-than 8d";
};
}; };
extraOptions = "experimental-features = nix-command flakes";
gc = { nixpkgs.config = {
automatic = true; allowUnfree = true;
options = "--delete-older-than 8d"; enableParallelBuilding = true;
buildManPages = false;
buildDocs = false;
}; };
};
nixpkgs.config = { services.nixos-cli = {
allowUnfree = true; enable = true;
enableParallelBuilding = true; config = {
buildManPages = false; use_nvd = true;
buildDocs = false; ignore_dirty_tree = true;
}; };
services.nixos-cli = {
enable = true;
config = {
use_nvd = true;
ignore_dirty_tree = true;
}; };
};
system.stateVersion = "22.11"; system.stateVersion = "22.11";
}; };
} }

View file

@ -1,12 +1,14 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-openssh = { ... }: { flake.modules.nixos.common-openssh =
services.openssh = { { ... }:
enable = true; {
settings.PermitRootLogin = "no"; services.openssh = {
extraConfig = '' enable = true;
PrintLastLog no settings.PermitRootLogin = "no";
''; extraConfig = ''
PrintLastLog no
'';
};
}; };
};
} }

View file

@ -1,10 +1,12 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-services = { ... }: { flake.modules.nixos.common-services =
services = { { ... }:
dbus.implementation = "broker"; {
irqbalance.enable = true; services = {
fstrim.enable = true; dbus.implementation = "broker";
irqbalance.enable = true;
fstrim.enable = true;
};
}; };
};
} }

View file

@ -1,9 +1,11 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.common-tailscale = { ... }: { flake.modules.nixos.common-tailscale =
services.tailscale = { { ... }:
enable = true; {
extraUpFlags = [ "--operator=user" ]; services.tailscale = {
enable = true;
extraUpFlags = [ "--operator=user" ];
};
}; };
};
} }

View file

@ -54,12 +54,15 @@ let
sharedData = import ../data/services.nix; sharedData = import ../data/services.nix;
# Enrich services with host IP information # Enrich services with host IP information
enrichServices = hosts: services: enrichServices =
map (svc: hosts: services:
map (
svc:
let let
hostInfo = hosts.${svc.host} or {}; hostInfo = hosts.${svc.host} or { };
in in
svc // { svc
// {
lanIP = hostInfo.lanIP or null; lanIP = hostInfo.lanIP or null;
tailscaleIP = hostInfo.tailscaleIP or null; tailscaleIP = hostInfo.tailscaleIP or null;
} }
@ -70,19 +73,19 @@ in
options.flake = { options.flake = {
hosts = lib.mkOption { hosts = lib.mkOption {
type = lib.types.attrsOf hostType; type = lib.types.attrsOf hostType;
default = {}; default = { };
description = "Host definitions with IP addresses"; description = "Host definitions with IP addresses";
}; };
services = lib.mkOption { services = lib.mkOption {
type = lib.types.listOf serviceType; type = lib.types.listOf serviceType;
default = []; default = [ ];
description = "Service definitions with enriched host information"; description = "Service definitions with enriched host information";
}; };
lib = lib.mkOption { lib = lib.mkOption {
type = lib.types.attrsOf lib.types.raw; type = lib.types.attrsOf lib.types.raw;
default = {}; default = { };
description = "Utility functions for flake configuration"; description = "Utility functions for flake configuration";
}; };
}; };
@ -94,9 +97,11 @@ in
lib = { lib = {
# Nginx virtual host utilities # Nginx virtual host utilities
mkNginxVHosts = { domains }: mkNginxVHosts =
{ domains }:
let let
mkVHostConfig = domain: vhostConfig: mkVHostConfig =
domain: vhostConfig:
lib.recursiveUpdate { lib.recursiveUpdate {
useACMEHost = domain; useACMEHost = domain;
forceSSL = true; forceSSL = true;
@ -107,7 +112,8 @@ in
# Split DNS utilities for unbound # Split DNS utilities for unbound
# Generates unbound view config from a list of DNS entries # Generates unbound view config from a list of DNS entries
mkSplitDNS = entries: mkSplitDNS =
entries:
let let
tailscaleData = map (e: ''"${e.domain}. IN A ${e.tailscaleIP}"'') entries; tailscaleData = map (e: ''"${e.domain}. IN A ${e.tailscaleIP}"'') entries;
lanData = map (e: ''"${e.domain}. IN A ${e.lanIP}"'') entries; lanData = map (e: ''"${e.domain}. IN A ${e.lanIP}"'') entries;

View file

@ -1,27 +1,34 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.desktop-boot = { config, lib, pkgs, ... }: { flake.modules.nixos.desktop-boot =
boot = { {
plymouth.enable = true; config,
initrd.systemd.enable = true; lib,
loader.efi.efiSysMountPoint = "/boot/efi"; pkgs,
kernelPackages = pkgs.linuxPackages_xanmod_latest; ...
extraModprobeConfig = '' }:
options bluetooth disable_ertm=1 {
''; boot = {
kernel.sysctl = { plymouth.enable = true;
"net.ipv4.tcp_mtu_probing" = 1; initrd.systemd.enable = true;
loader.efi.efiSysMountPoint = "/boot/efi";
kernelPackages = pkgs.linuxPackages_xanmod_latest;
extraModprobeConfig = ''
options bluetooth disable_ertm=1
'';
kernel.sysctl = {
"net.ipv4.tcp_mtu_probing" = 1;
};
kernelParams = [
"quiet"
"splash"
"i2c-dev"
"i2c-piix4"
"loglevel=3"
"udev.log_priority=3"
"rd.udev.log_level=3"
"rd.systemd.show_status=false"
];
}; };
kernelParams = [
"quiet"
"splash"
"i2c-dev"
"i2c-piix4"
"loglevel=3"
"udev.log_priority=3"
"rd.udev.log_level=3"
"rd.systemd.show_status=false"
];
}; };
};
} }

View file

@ -4,289 +4,304 @@
}: }:
{ {
flake.modules = { flake.modules = {
nixos.desktop-desktop = { config, lib, pkgs, ... }: { nixos.desktop-desktop =
imports = [ {
inputs.niri-flake.nixosModules.niri config,
inputs.nix-flatpak.nixosModules.nix-flatpak lib,
]; pkgs,
...
environment = { }:
sessionVariables = { {
KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir imports = [
NIXOS_OZONE_WL = "1"; # Forces chromium and most electron apps to run in wayland inputs.niri-flake.nixosModules.niri
}; inputs.nix-flatpak.nixosModules.nix-flatpak
systemPackages = with pkgs; [
### Web ###
bitwarden-desktop
fragments
nextcloud-client
tor-browser
vesktop
inputs.zen-browser.packages."${system}".default
### Office & Productivity ###
aspell
aspellDicts.de
aspellDicts.en
aspellDicts.en-computers
aspellDicts.pt_BR
papers
presenterm
rnote
### Graphics & Design ###
gimp
inkscape
plasticity
### System Utilities ###
adwaita-icon-theme
ghostty
gnome-disk-utility
junction
libfido2
mission-center
nautilus
p7zip
rclone
toggleaudiosink
unrar
### Media ###
decibels
loupe
obs-studio
showtime
]; ];
};
services = { environment = {
pipewire = { sessionVariables = {
enable = true; KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir
alsa.enable = true; NIXOS_OZONE_WL = "1"; # Forces chromium and most electron apps to run in wayland
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
greetd = {
enable = true;
settings = {
default_session = {
command = "${lib.getExe pkgs.tuigreet} --user-menu --time --remember --asterisks --cmd ${config.programs.niri.package}/bin/niri-session";
user = "greeter";
};
}
// lib.optionalAttrs (config.networking.hostName == "io") {
initial_session = {
command = "${config.programs.niri.package}/bin/niri-session";
user = "user";
};
}; };
}; systemPackages = with pkgs; [
flatpak = { ### Web ###
enable = true; bitwarden-desktop
packages = [ fragments
nextcloud-client
tor-browser
vesktop
inputs.zen-browser.packages."${system}".default
### Office & Productivity ### ### Office & Productivity ###
"com.collabora.Office" aspell
aspellDicts.de
aspellDicts.en
aspellDicts.en-computers
aspellDicts.pt_BR
papers
presenterm
rnote
### Graphics & Design ### ### Graphics & Design ###
"com.boxy_svg.BoxySVG" gimp
rec { inkscape
appId = "io.github.softfever.OrcaSlicer"; plasticity
sha256 = "0hdx5sg6fknj1pfnfxvlfwb5h6y1vjr6fyajbsnjph5gkp97c6p1";
bundle = "${pkgs.fetchurl {
url = "https://github.com/SoftFever/OrcaSlicer/releases/download/v2.3.0/OrcaSlicer-Linux-flatpak_V2.3.0_x86_64.flatpak";
inherit sha256;
}}";
}
### System Utilities ### ### System Utilities ###
"com.github.tchx84.Flatseal" adwaita-icon-theme
"com.rustdesk.RustDesk" ghostty
]; gnome-disk-utility
uninstallUnmanaged = true; junction
update.auto.enable = true; libfido2
}; mission-center
gvfs.enable = true; nautilus
}; p7zip
rclone
security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority toggleaudiosink
unrar
users = { ### Media ###
users.greeter = { decibels
isSystemUser = true; loupe
group = "greeter"; obs-studio
}; showtime
groups.greeter = { };
};
programs = {
niri = {
enable = true;
package = inputs.niri.packages.${pkgs.system}.niri;
};
kdeconnect = {
enable = true;
package = pkgs.valent;
};
dconf.enable = true;
appimage = {
enable = true;
binfmt = true;
};
};
niri-flake.cache.enable = false;
fonts = {
fontDir.enable = true;
packages = with pkgs; [
corefonts
inter
nerd-fonts.fira-code
noto-fonts-cjk-sans
noto-fonts-color-emoji
roboto
];
};
xdg.portal = {
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
config = {
common.default = "*";
niri.default = [
"gtk"
"gnome"
]; ];
}; };
};
};
homeManager.desktop-desktop = { config, lib, pkgs, inputs, ... }: { services = {
imports = [ inputs.vicinae.homeManagerModules.default ]; pipewire = {
enable = true;
fonts.fontconfig.enable = true; alsa.enable = true;
alsa.support32Bit = true;
home.packages = with pkgs; [ xwayland-satellite ]; pulse.enable = true;
jack.enable = true;
services.vicinae = { wireplumber.enable = true;
enable = true; };
systemd = { greetd = {
enable = true; enable = true;
autoStart = true; settings = {
default_session = {
command = "${lib.getExe pkgs.tuigreet} --user-menu --time --remember --asterisks --cmd ${config.programs.niri.package}/bin/niri-session";
user = "greeter";
};
}
// lib.optionalAttrs (config.networking.hostName == "io") {
initial_session = {
command = "${config.programs.niri.package}/bin/niri-session";
user = "user";
};
};
};
flatpak = {
enable = true;
packages = [
### Office & Productivity ###
"com.collabora.Office"
### Graphics & Design ###
"com.boxy_svg.BoxySVG"
rec {
appId = "io.github.softfever.OrcaSlicer";
sha256 = "0hdx5sg6fknj1pfnfxvlfwb5h6y1vjr6fyajbsnjph5gkp97c6p1";
bundle = "${pkgs.fetchurl {
url = "https://github.com/SoftFever/OrcaSlicer/releases/download/v2.3.0/OrcaSlicer-Linux-flatpak_V2.3.0_x86_64.flatpak";
inherit sha256;
}}";
}
### System Utilities ###
"com.github.tchx84.Flatseal"
"com.rustdesk.RustDesk"
];
uninstallUnmanaged = true;
update.auto.enable = true;
};
gvfs.enable = true;
}; };
};
programs = { security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority
ghostty = {
enable = true; users = {
settings = { users.greeter = {
cursor-style = "block"; isSystemUser = true;
shell-integration-features = "no-cursor"; group = "greeter";
cursor-style-blink = false; };
custom-shader = "${builtins.fetchurl { groups.greeter = { };
url = "https://raw.githubusercontent.com/hackr-sh/ghostty-shaders/cb6eb4b0d1a3101c869c62e458b25a826f9dcde3/cursor_blaze.glsl"; };
sha256 = "sha256:0g2lgqjdrn3c51glry7x2z30y7ml0y61arl5ykmf4yj0p85s5f41";
}}"; programs = {
bell-features = ""; niri = {
gtk-titlebar-style = "tabs"; enable = true;
keybind = [ "shift+enter=text:\\x1b\\r" ]; package = inputs.niri.packages.${pkgs.system}.niri;
};
kdeconnect = {
enable = true;
package = pkgs.valent;
};
dconf.enable = true;
appimage = {
enable = true;
binfmt = true;
}; };
}; };
password-store = { niri-flake.cache.enable = false;
enable = true;
package = pkgs.pass-wayland;
};
};
xdg = { fonts = {
enable = true; fontDir.enable = true;
userDirs.enable = true; packages = with pkgs; [
mimeApps = { corefonts
enable = true; inter
defaultApplications = { nerd-fonts.fira-code
"text/html" = [ noto-fonts-cjk-sans
"re.sonny.Junction.desktop" noto-fonts-color-emoji
"zen-browser.desktop" roboto
"torbrowser.desktop" ];
};
xdg.portal = {
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
config = {
common.default = "*";
niri.default = [
"gtk"
"gnome"
]; ];
"x-scheme-handler/http" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/https" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/about" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/unknown" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"image/jpeg" = "org.gnome.Loupe.desktop";
"image/png" = "org.gnome.Loupe.desktop";
"image/gif" = "org.gnome.Loupe.desktop";
"image/webp" = "org.gnome.Loupe.desktop";
"image/bmp" = "org.gnome.Loupe.desktop";
"image/svg+xml" = "org.gnome.Loupe.desktop";
"image/tiff" = "org.gnome.Loupe.desktop";
"video/mp4" = "io.bassi.Showtime.desktop";
"video/x-matroska" = "io.bassi.Showtime.desktop";
"video/webm" = "io.bassi.Showtime.desktop";
"video/mpeg" = "io.bassi.Showtime.desktop";
"video/x-msvideo" = "io.bassi.Showtime.desktop";
"video/quicktime" = "io.bassi.Showtime.desktop";
"video/x-flv" = "io.bassi.Showtime.desktop";
"audio/mpeg" = "io.bassi.Showtime.desktop";
"audio/flac" = "io.bassi.Showtime.desktop";
"audio/ogg" = "io.bassi.Showtime.desktop";
"audio/wav" = "io.bassi.Showtime.desktop";
"audio/mp4" = "io.bassi.Showtime.desktop";
"audio/x-opus+ogg" = "io.bassi.Showtime.desktop";
"application/pdf" = [
"org.gnome.Papers.desktop"
"zen-browser.desktop"
];
"text/plain" = "Helix.desktop";
"text/markdown" = "Helix.desktop";
"text/x-log" = "Helix.desktop";
"application/x-shellscript" = "Helix.desktop";
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
"com.collabora.Office.desktop"; # DOCX
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" =
"com.collabora.Office.desktop"; # XLSX
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =
"com.collabora.Office.desktop"; # PPTX
"application/vnd.oasis.opendocument.text" = "com.collabora.Office.desktop"; # ODT
"application/vnd.oasis.opendocument.spreadsheet" = "com.collabora.Office.desktop"; # ODS
"application/vnd.oasis.opendocument.presentation" = "com.collabora.Office.desktop"; # ODP
"application/msword" = "com.collabora.Office.desktop"; # DOC
"application/vnd.ms-excel" = "com.collabora.Office.desktop"; # XLS
"application/vnd.ms-powerpoint" = "com.collabora.Office.desktop"; # PPT
"application/zip" = "org.gnome.FileRoller.desktop";
"application/x-tar" = "org.gnome.FileRoller.desktop";
"application/x-compressed-tar" = "org.gnome.FileRoller.desktop";
"application/x-bzip-compressed-tar" = "org.gnome.FileRoller.desktop";
"application/x-xz-compressed-tar" = "org.gnome.FileRoller.desktop";
"application/x-7z-compressed" = "org.gnome.FileRoller.desktop";
"application/x-rar" = "org.gnome.FileRoller.desktop";
"application/gzip" = "org.gnome.FileRoller.desktop";
"application/x-bzip" = "org.gnome.FileRoller.desktop";
"inode/directory" = "org.gnome.Nautilus.desktop";
}; };
}; };
}; };
# Set Ghostty as default terminal homeManager.desktop-desktop =
home.sessionVariables = { {
TERMINAL = "ghostty"; config,
lib,
pkgs,
inputs,
...
}:
{
imports = [ inputs.vicinae.homeManagerModules.default ];
fonts.fontconfig.enable = true;
home.packages = with pkgs; [ xwayland-satellite ];
services.vicinae = {
enable = true;
systemd = {
enable = true;
autoStart = true;
};
};
programs = {
ghostty = {
enable = true;
settings = {
cursor-style = "block";
shell-integration-features = "no-cursor";
cursor-style-blink = false;
custom-shader = "${builtins.fetchurl {
url = "https://raw.githubusercontent.com/hackr-sh/ghostty-shaders/cb6eb4b0d1a3101c869c62e458b25a826f9dcde3/cursor_blaze.glsl";
sha256 = "sha256:0g2lgqjdrn3c51glry7x2z30y7ml0y61arl5ykmf4yj0p85s5f41";
}}";
bell-features = "";
gtk-titlebar-style = "tabs";
keybind = [ "shift+enter=text:\\x1b\\r" ];
};
};
password-store = {
enable = true;
package = pkgs.pass-wayland;
};
};
xdg = {
enable = true;
userDirs.enable = true;
mimeApps = {
enable = true;
defaultApplications = {
"text/html" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/http" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/https" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/about" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"x-scheme-handler/unknown" = [
"re.sonny.Junction.desktop"
"zen-browser.desktop"
"torbrowser.desktop"
];
"image/jpeg" = "org.gnome.Loupe.desktop";
"image/png" = "org.gnome.Loupe.desktop";
"image/gif" = "org.gnome.Loupe.desktop";
"image/webp" = "org.gnome.Loupe.desktop";
"image/bmp" = "org.gnome.Loupe.desktop";
"image/svg+xml" = "org.gnome.Loupe.desktop";
"image/tiff" = "org.gnome.Loupe.desktop";
"video/mp4" = "io.bassi.Showtime.desktop";
"video/x-matroska" = "io.bassi.Showtime.desktop";
"video/webm" = "io.bassi.Showtime.desktop";
"video/mpeg" = "io.bassi.Showtime.desktop";
"video/x-msvideo" = "io.bassi.Showtime.desktop";
"video/quicktime" = "io.bassi.Showtime.desktop";
"video/x-flv" = "io.bassi.Showtime.desktop";
"audio/mpeg" = "io.bassi.Showtime.desktop";
"audio/flac" = "io.bassi.Showtime.desktop";
"audio/ogg" = "io.bassi.Showtime.desktop";
"audio/wav" = "io.bassi.Showtime.desktop";
"audio/mp4" = "io.bassi.Showtime.desktop";
"audio/x-opus+ogg" = "io.bassi.Showtime.desktop";
"application/pdf" = [
"org.gnome.Papers.desktop"
"zen-browser.desktop"
];
"text/plain" = "Helix.desktop";
"text/markdown" = "Helix.desktop";
"text/x-log" = "Helix.desktop";
"application/x-shellscript" = "Helix.desktop";
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
"com.collabora.Office.desktop"; # DOCX
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" =
"com.collabora.Office.desktop"; # XLSX
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =
"com.collabora.Office.desktop"; # PPTX
"application/vnd.oasis.opendocument.text" = "com.collabora.Office.desktop"; # ODT
"application/vnd.oasis.opendocument.spreadsheet" = "com.collabora.Office.desktop"; # ODS
"application/vnd.oasis.opendocument.presentation" = "com.collabora.Office.desktop"; # ODP
"application/msword" = "com.collabora.Office.desktop"; # DOC
"application/vnd.ms-excel" = "com.collabora.Office.desktop"; # XLS
"application/vnd.ms-powerpoint" = "com.collabora.Office.desktop"; # PPT
"application/zip" = "org.gnome.FileRoller.desktop";
"application/x-tar" = "org.gnome.FileRoller.desktop";
"application/x-compressed-tar" = "org.gnome.FileRoller.desktop";
"application/x-bzip-compressed-tar" = "org.gnome.FileRoller.desktop";
"application/x-xz-compressed-tar" = "org.gnome.FileRoller.desktop";
"application/x-7z-compressed" = "org.gnome.FileRoller.desktop";
"application/x-rar" = "org.gnome.FileRoller.desktop";
"application/gzip" = "org.gnome.FileRoller.desktop";
"application/x-bzip" = "org.gnome.FileRoller.desktop";
"inode/directory" = "org.gnome.Nautilus.desktop";
};
};
};
# Set Ghostty as default terminal
home.sessionVariables = {
TERMINAL = "ghostty";
};
}; };
};
}; };
} }

View file

@ -1,6 +1,14 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.desktop-niri = { config, lib, pkgs, inputs, hostname ? null, ... }: flake.modules.homeManager.desktop-niri =
{
config,
lib,
pkgs,
inputs,
hostname ? null,
...
}:
let let
isRotterdam = hostname == "rotterdam"; isRotterdam = hostname == "rotterdam";
in in

View file

@ -1,14 +1,21 @@
{ inputs, ... }: { inputs, ... }:
{ {
flake.modules.nixos.desktop-nix = { config, lib, pkgs, ... }: { flake.modules.nixos.desktop-nix =
environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath; {
config,
lib,
pkgs,
...
}:
{
environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;
nix = { nix = {
registry.nixpkgs.flake = inputs.nixpkgs; registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [ nixPath = [
"nixpkgs=${inputs.nixpkgs}" "nixpkgs=${inputs.nixpkgs}"
"/nix/var/nix/profiles/per-user/root/channels" "/nix/var/nix/profiles/per-user/root/channels"
]; ];
};
}; };
};
} }

View file

@ -1,16 +1,23 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.desktop-services = { config, lib, pkgs, ... }: { flake.modules.nixos.desktop-services =
services = { {
printing.enable = true; config,
udev.packages = with pkgs; [ yubikey-personalization ]; lib,
keyd = { pkgs,
enable = true; ...
keyboards.all = { }:
ids = [ "*" ]; {
settings.main.capslock = "overload(meta, esc)"; services = {
printing.enable = true;
udev.packages = with pkgs; [ yubikey-personalization ];
keyd = {
enable = true;
keyboards.all = {
ids = [ "*" ];
settings.main.capslock = "overload(meta, esc)";
};
}; };
}; };
}; };
};
} }

View file

@ -1,19 +1,26 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.dev = { config, lib, pkgs, ... }: { flake.modules.nixos.dev =
environment.systemPackages = with pkgs; [ {
android-tools config,
bat lib,
lazygit pkgs,
fd ...
fzf }:
glow {
nixfmt environment.systemPackages = with pkgs; [
nix-init android-tools
nix-output-monitor bat
ripgrep lazygit
]; fd
fzf
glow
nixfmt
nix-init
nix-output-monitor
ripgrep
];
users.users.user.extraGroups = [ "adbusers" ]; users.users.user.extraGroups = [ "adbusers" ];
}; };
} }

View file

@ -3,7 +3,8 @@
{ inputs, ... }: { inputs, ... }:
{ {
# Base module with options (for external flakes or direct use) # Base module with options (for external flakes or direct use)
flake.modules.nixos.ephemeral = { lib, config, ... }: flake.modules.nixos.ephemeral =
{ lib, config, ... }:
let let
cfg = config.ephemeral; cfg = config.ephemeral;
in in
@ -89,18 +90,19 @@
# Factory function that generates configured modules # Factory function that generates configured modules
flake.factory.ephemeral = flake.factory.ephemeral =
{ rootDevice {
, rootSubvolume ? "@root" rootDevice,
, retentionDays ? 30 rootSubvolume ? "@root",
, persistentStoragePath ? "/persistent" retentionDays ? 30,
, persistentFiles ? [ persistentStoragePath ? "/persistent",
persistentFiles ? [
"/etc/machine-id" "/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub" "/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key" "/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub" "/etc/ssh/ssh_host_rsa_key.pub"
] ],
, persistentDirectories ? [ persistentDirectories ? [
"/etc/NetworkManager/system-connections" "/etc/NetworkManager/system-connections"
"/etc/nixos" "/etc/nixos"
"/var/lib/bluetooth" "/var/lib/bluetooth"
@ -111,9 +113,10 @@
"/var/lib/systemd/timers" "/var/lib/systemd/timers"
"/var/lib/tailscale" "/var/lib/tailscale"
"/var/log" "/var/log"
] ],
}: }:
{ ... }: { { ... }:
{
imports = [ imports = [
inputs.impermanence.nixosModules.impermanence inputs.impermanence.nixosModules.impermanence
inputs.self.modules.nixos.ephemeral inputs.self.modules.nixos.ephemeral

View file

@ -1,6 +1,13 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.fwupd = { config, lib, pkgs, ... }: { flake.modules.nixos.fwupd =
services.fwupd.enable = true; {
}; config,
lib,
pkgs,
...
}:
{
services.fwupd.enable = true;
};
} }

View file

@ -1,23 +1,25 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.gaming-flatpak = { pkgs, ... }: { flake.modules.nixos.gaming-flatpak =
services.flatpak.packages = [ { pkgs, ... }:
"com.github.k4zmu2a.spacecadetpinball" {
"com.steamgriddb.SGDBoop" services.flatpak.packages = [
"io.github.Foldex.AdwSteamGtk" "com.github.k4zmu2a.spacecadetpinball"
"io.itch.itch" "com.steamgriddb.SGDBoop"
"io.mrarm.mcpelauncher" "io.github.Foldex.AdwSteamGtk"
"net.retrodeck.retrodeck" "io.itch.itch"
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08" "io.mrarm.mcpelauncher"
rec { "net.retrodeck.retrodeck"
appId = "com.hypixel.HytaleLauncher"; "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08"
sha256 = "01307s44bklc1ldcigcn9n4lm8hf8q793v9fv7w4w04xd5zyh4rv"; rec {
bundle = "${pkgs.fetchurl { appId = "com.hypixel.HytaleLauncher";
url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-latest.flatpak"; sha256 = "01307s44bklc1ldcigcn9n4lm8hf8q793v9fv7w4w04xd5zyh4rv";
inherit sha256; bundle = "${pkgs.fetchurl {
}}"; url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-latest.flatpak";
} inherit sha256;
]; }}";
}; }
];
};
} }

View file

@ -1,11 +1,13 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.gaming-hardware = { ... }: { flake.modules.nixos.gaming-hardware =
hardware = { { ... }:
xpadneo.enable = true; {
steam-hardware.enable = true; # Allow steam client to manage controllers hardware = {
graphics.enable32Bit = true; # For OpenGL games xpadneo.enable = true;
steam-hardware.enable = true; # Allow steam client to manage controllers
graphics.enable32Bit = true; # For OpenGL games
};
}; };
};
} }

View file

@ -1,11 +1,13 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.gaming-launchers = { pkgs, ... }: { flake.modules.nixos.gaming-launchers =
environment.systemPackages = with pkgs; [ { pkgs, ... }:
clonehero {
heroic environment.systemPackages = with pkgs; [
prismlauncher clonehero
]; heroic
}; prismlauncher
];
};
} }

View file

@ -2,42 +2,46 @@
{ {
flake.modules = { flake.modules = {
nixos.gaming-mangohud = { pkgs, ... }: { nixos.gaming-mangohud =
environment.systemPackages = with pkgs; [ { pkgs, ... }:
mangohud {
]; environment.systemPackages = with pkgs; [
}; mangohud
];
};
homeManager.gaming-mangohud = { config, ... }: { homeManager.gaming-mangohud =
programs.mangohud = { { config, ... }:
enable = true; {
enableSessionWide = true; programs.mangohud = {
settings = { enable = true;
position = "top-left"; enableSessionWide = true;
fps = true; settings = {
frametime = false; position = "top-left";
frame_timing = false; fps = true;
gpu_stats = true; frametime = false;
gpu_temp = true; frame_timing = false;
gpu_power = true; gpu_stats = true;
cpu_stats = true; gpu_temp = true;
cpu_temp = true; gpu_power = true;
cpu_power = true; cpu_stats = true;
ram = true; cpu_temp = true;
vram = true; cpu_power = true;
gamemode = false; ram = true;
vkbasalt = false; vram = true;
version = false; gamemode = false;
engine_version = false; vkbasalt = false;
vulkan_driver = false; version = false;
wine = false; engine_version = false;
time = false; vulkan_driver = false;
fps_sampling_period = 500; wine = false;
toggle_hud = "Shift_L+F12"; time = false;
toggle_logging = "Ctrl_L+F2"; fps_sampling_period = 500;
output_folder = "${config.home.homeDirectory}/.local/share/mangohud"; toggle_hud = "Shift_L+F12";
toggle_logging = "Ctrl_L+F2";
output_folder = "${config.home.homeDirectory}/.local/share/mangohud";
};
}; };
}; };
};
}; };
} }

View file

@ -1,17 +1,19 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.gaming-steam = { pkgs, ... }: { flake.modules.nixos.gaming-steam =
environment.systemPackages = with pkgs; [ { pkgs, ... }:
steam-run {
]; environment.systemPackages = with pkgs; [
steam-run
];
programs = { programs = {
steam = { steam = {
enable = true; enable = true;
extraCompatPackages = [ pkgs.proton-ge-bin ]; extraCompatPackages = [ pkgs.proton-ge-bin ];
};
gamemode.enable = true;
}; };
gamemode.enable = true;
}; };
};
} }

View file

@ -34,8 +34,7 @@ in
# LAN-only DNS records # LAN-only DNS records
local-zone = ''"baduhai.dev." transparent''; local-zone = ''"baduhai.dev." transparent'';
local-data = map (e: ''"${e.domain}. IN A ${e.lanIP}"'') local-data = map (e: ''"${e.domain}. IN A ${e.lanIP}"'') (lib.filter (e: e.lanIP != null) services);
(lib.filter (e: e.lanIP != null) services);
}; };
forward-zone = [ forward-zone = [

View file

@ -9,9 +9,7 @@ let
services = inputs.self.services; services = inputs.self.services;
# Get all unique domains from shared services on trantor (host = "trantor") # Get all unique domains from shared services on trantor (host = "trantor")
localDomains = lib.unique ( localDomains = lib.unique (map (s: s.domain) (lib.filter (s: s.host == "trantor") services));
map (s: s.domain) (lib.filter (s: s.host == "trantor") services)
);
# Generate ACME cert configs for all local domains # Generate ACME cert configs for all local domains
acmeCerts = lib.genAttrs localDomains (domain: { acmeCerts = lib.genAttrs localDomains (domain: {

View file

@ -1,4 +1,5 @@
{ inputs, self, ... }: { inputs, self, ... }:
{ {
flake.nixosConfigurations.alexandria = inputs.nixpkgs-stable.lib.nixosSystem { flake.nixosConfigurations.alexandria = inputs.nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";

View file

@ -1,18 +1,25 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.libvirtd = { config, lib, pkgs, ... }: { flake.modules.nixos.libvirtd =
virtualisation = { {
libvirtd.enable = true; config,
spiceUSBRedirection.enable = true; lib,
pkgs,
...
}:
{
virtualisation = {
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
};
programs.virt-manager.enable = true;
networking.firewall.trustedInterfaces = [ "virbr0" ];
users.users.user.extraGroups = [
"libvirt"
"libvirtd"
];
}; };
programs.virt-manager.enable = true;
networking.firewall.trustedInterfaces = [ "virbr0" ];
users.users.user.extraGroups = [
"libvirt"
"libvirtd"
];
};
} }

View file

@ -1,11 +1,18 @@
{ ... }: { ... }:
{ {
flake.modules.nixos.networkmanager = { config, lib, pkgs, ... }: { flake.modules.nixos.networkmanager =
networking.networkmanager = { {
enable = true; config,
wifi.backend = "iwd"; lib,
}; pkgs,
...
}:
{
networking.networkmanager = {
enable = true;
wifi.backend = "iwd";
};
users.users.user.extraGroups = [ "networkmanager" ]; users.users.user.extraGroups = [ "networkmanager" ];
}; };
} }

View file

@ -1,7 +1,14 @@
# aspects/server/boot.nix # aspects/server/boot.nix
{ ... }: { ... }:
{ {
flake.modules.nixos.server-boot = { config, lib, pkgs, ... }: { flake.modules.nixos.server-boot =
boot.kernelPackages = pkgs.linuxPackages_hardened; {
}; config,
lib,
pkgs,
...
}:
{
boot.kernelPackages = pkgs.linuxPackages_hardened;
};
} }

View file

@ -1,15 +1,22 @@
# aspects/server/nix.nix # aspects/server/nix.nix
{ inputs, ... }: { inputs, ... }:
{ {
flake.modules.nixos.server-nix = { config, lib, pkgs, ... }: { flake.modules.nixos.server-nix =
environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath; {
config,
lib,
pkgs,
...
}:
{
environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath;
nix = { nix = {
registry.nixpkgs.flake = inputs.nixpkgs-stable; registry.nixpkgs.flake = inputs.nixpkgs-stable;
nixPath = [ nixPath = [
"nixpkgs=/etc/channels/nixpkgs" "nixpkgs=/etc/channels/nixpkgs"
"/nix/var/nix/profiles/per-user/root/channels" "/nix/var/nix/profiles/per-user/root/channels"
]; ];
};
}; };
};
} }

View file

@ -1,15 +1,22 @@
# aspects/server/tailscale.nix # aspects/server/tailscale.nix
{ ... }: { ... }:
{ {
flake.modules.nixos.server-tailscale = { config, lib, pkgs, ... }: { flake.modules.nixos.server-tailscale =
services.tailscale = { {
extraSetFlags = [ "--advertise-exit-node" ]; config,
useRoutingFeatures = "server"; lib,
}; pkgs,
...
}:
{
services.tailscale = {
extraSetFlags = [ "--advertise-exit-node" ];
useRoutingFeatures = "server";
};
boot.kernel.sysctl = { boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1; "net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1; "net.ipv6.conf.all.forwarding" = 1;
};
}; };
};
} }

View file

@ -1,9 +1,16 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.shell-bash = { config, lib, pkgs, ... }: { flake.modules.homeManager.shell-bash =
programs.bash = { {
enable = true; config,
historyFile = "~/.cache/bash_history"; lib,
pkgs,
...
}:
{
programs.bash = {
enable = true;
historyFile = "~/.cache/bash_history";
};
}; };
};
} }

View file

@ -1,33 +1,40 @@
{ ... }: { ... }:
{ {
flake.modules.homeManager.shell-fish = { config, lib, pkgs, ... }: { flake.modules.homeManager.shell-fish =
programs.fish = { {
enable = true; config,
interactiveShellInit = '' lib,
set fish_greeting pkgs,
${lib.getExe pkgs.nix-your-shell} fish | source ...
''; }:
loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source"; {
plugins = [ programs.fish = {
{ enable = true;
name = "bang-bang"; interactiveShellInit = ''
src = pkgs.fetchFromGitHub { set fish_greeting
owner = "oh-my-fish"; ${lib.getExe pkgs.nix-your-shell} fish | source
repo = "plugin-bang-bang"; '';
rev = "f969c618301163273d0a03d002614d9a81952c1e"; loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source";
sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ="; plugins = [
}; {
} name = "bang-bang";
{ src = pkgs.fetchFromGitHub {
name = "z"; owner = "oh-my-fish";
src = pkgs.fetchFromGitHub { repo = "plugin-bang-bang";
owner = "jethrokuan"; rev = "f969c618301163273d0a03d002614d9a81952c1e";
repo = "z"; sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ=";
rev = "067e867debee59aee231e789fc4631f80fa5788e"; };
sha256 = "sha256-emmjTsqt8bdI5qpx1bAzhVACkg0MNB/uffaRjjeuFxU="; }
}; {
} name = "z";
]; src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "067e867debee59aee231e789fc4631f80fa5788e";
sha256 = "sha256-emmjTsqt8bdI5qpx1bAzhVACkg0MNB/uffaRjjeuFxU=";
};
}
];
};
}; };
};
} }

View file

@ -18,7 +18,8 @@
}; };
src = src =
srcs.${pkgs.stdenv.hostPlatform.system} or (throw "Unsupported system: ${pkgs.stdenv.hostPlatform.system}"); srcs.${pkgs.stdenv.hostPlatform.system}
or (throw "Unsupported system: ${pkgs.stdenv.hostPlatform.system}");
claudeNativeStub = '' claudeNativeStub = ''
// Stub implementation of claude-native using KeyboardKey enum values // Stub implementation of claude-native using KeyboardKey enum values

View file

@ -4,19 +4,20 @@ let
packageDir = builtins.readDir ./.; packageDir = builtins.readDir ./.;
# Filter to .nix files, excluding overlays.nix # Filter to .nix files, excluding overlays.nix
isPackageFile = name: isPackageFile = name: name != "overlays.nix" && builtins.match ".*\\.nix$" name != null;
name != "overlays.nix" && builtins.match ".*\\.nix$" name != null;
# Extract package name from filename (e.g., "foo-bar.nix" -> "foo-bar") # Extract package name from filename (e.g., "foo-bar.nix" -> "foo-bar")
toPackageName = filename: toPackageName = filename: builtins.head (builtins.match "(.+)\\.nix$" filename);
builtins.head (builtins.match "(.+)\\.nix$" filename);
packageNames = map toPackageName (builtins.filter isPackageFile (builtins.attrNames packageDir)); packageNames = map toPackageName (builtins.filter isPackageFile (builtins.attrNames packageDir));
in in
{ {
flake.overlays.default = final: prev: flake.overlays.default =
builtins.listToAttrs (map (name: { final: prev:
inherit name; builtins.listToAttrs (
value = inputs.self.packages.${final.system}.${name}; map (name: {
}) packageNames); inherit name;
value = inputs.self.packages.${final.system}.${name};
}) packageNames
);
} }

View file

@ -8,9 +8,12 @@
terranix.terranixConfigurations.cloudflare-kernelpanicspace = { terranix.terranixConfigurations.cloudflare-kernelpanicspace = {
terraformWrapper.package = pkgs.opentofu; terraformWrapper.package = pkgs.opentofu;
modules = [ modules = [
({ config, ... }: { (
# Terraform config goes here { config, ... }:
}) {
# Terraform config goes here
}
)
]; ];
}; };
}; };

View file

@ -8,9 +8,12 @@
terranix.terranixConfigurations.oci-terminus = { terranix.terranixConfigurations.oci-terminus = {
terraformWrapper.package = pkgs.opentofu; terraformWrapper.package = pkgs.opentofu;
modules = [ modules = [
({ config, ... }: { (
# Terraform config goes here { config, ... }:
}) {
# Terraform config goes here
}
)
]; ];
}; };
}; };