From c8f6c4d81883378a7c2f2d15e51a8fb5158dbcd0 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 10:03:10 +0200 Subject: [PATCH 01/38] started migration to snowfall --- {hosts => _hosts}/aule/README.md | 0 {hosts => _hosts}/manwe/README.md | 0 {hosts => _hosts}/manwe/default.nix | 0 {hosts => _hosts}/manwe/hardware.nix | 0 .../manwe/users/chris/default.nix | 0 {hosts => _hosts}/orome/README.md | 0 {hosts => _hosts}/orome/default.nix | 0 {hosts => _hosts}/orome/hardware.nix | 0 .../orome/users/chris/default.nix | 0 {hosts => _hosts}/tulkas/README.md | 0 {hosts => _hosts}/tulkas/default.nix | 0 {hosts => _hosts}/tulkas/hardware.nix | 0 .../tulkas/users/chris/default.nix | 0 {hosts => _hosts}/ulmo/README.md | 0 {hosts => _hosts}/ulmo/default.nix | 0 {hosts => _hosts}/ulmo/hardware.nix | 0 {lib => _lib}/attrs.nix | 0 {lib => _lib}/default.nix | 0 {lib => _lib}/modules.nix | 0 {lib => _lib}/nixos.nix | 0 {lib => _lib}/options.nix | 0 {lib => _lib}/user.nix | 0 .../desktop/applications/communication.nix | 0 .../home/desktop/applications/email.nix | 0 .../home/desktop/applications/office.nix | 0 .../home/desktop/applications/passwords.nix | 0 .../home/desktop/applications/recording.nix | 0 .../home/desktop/applications/steam.nix | 0 .../home/desktop/applications/studio.nix | 0 .../home/desktop/browsers/chrome.nix | 0 .../home/desktop/browsers/default.nix | 0 .../home/desktop/browsers/firefox.nix | 0 .../home/desktop/browsers/ladybird.nix | 0 .../home/desktop/browsers/zen.nix | 0 .../home/desktop/default.nix | 0 .../home/desktop/editors/default.nix | 0 .../home/desktop/editors/kate.nix | 0 .../home/desktop/editors/nano.nix | 0 .../home/desktop/editors/nvim.nix | 0 .../home/desktop/editors/vscodium.nix | 0 .../home/desktop/editors/zed.nix | 0 .../home/desktop/games/default.nix | 0 .../home/desktop/games/minecraft.nix | 0 {modules => _modules}/home/desktop/plasma.nix | 0 .../home/desktop/terminal/alacritty.nix | 0 .../home/desktop/terminal/default.nix | 0 .../home/desktop/terminal/ghostty.nix | 0 .../home/develop/default.nix | 0 {modules => _modules}/home/develop/dotnet.nix | 0 {modules => _modules}/home/develop/js.nix | 0 {modules => _modules}/home/develop/rust.nix | 0 {modules => _modules}/home/shell/default.nix | 0 .../home/shell/toolset/bat.nix | 0 .../home/shell/toolset/btop.nix | 0 .../home/shell/toolset/eza.nix | 0 .../home/shell/toolset/fzf.nix | 0 .../home/shell/toolset/git.nix | 0 .../home/shell/toolset/gnupg.nix | 0 .../home/shell/toolset/starship.nix | 0 .../home/shell/toolset/tmux.nix | 0 .../home/shell/toolset/yazi.nix | 0 .../home/shell/toolset/zellij.nix | 0 .../home/shell/toolset/zoxide.nix | 0 {modules => _modules}/home/shell/zsh.nix | 0 .../home/themes/catppuccin-latte.jpg | Bin {modules => _modules}/home/themes/default.nix | 0 .../home/themes/everforest.jpg | Bin {modules => _modules}/home/user.nix | 0 {modules => _modules}/home/xgd.nix | 0 .../system/authentication/himmelblau.nix | 0 {modules => _modules}/system/boot.nix | 0 .../system/common/qbittorrent.nix | 0 .../system/desktop/editors/nvim.nix | 0 .../system/desktop/gaming.nix | 0 {modules => _modules}/system/desktop/wine.nix | 0 {modules => _modules}/system/graphics.nix | 0 .../system/networking/default.nix | 0 .../system/networking/nfs.nix | 0 .../system/networking/samba.nix | 0 .../system/networking/ssh.nix | 0 {modules => _modules}/system/options.nix | 0 {modules => _modules}/system/security.nix | 0 .../system/services/auth/authelia.nix | 0 .../system/services/auth/zitadel.nix | 0 .../system/services/default.nix | 0 .../system/services/games/minecraft.nix | 0 .../system/services/games/palworld.nix | 0 .../system/services/media.nix | 0 .../system/services/nextcloud.nix | 0 .../system/services/security.nix | 0 .../system/shell/default.nix | 0 {modules => _modules}/system/shell/zsh.nix | 0 {modules => _modules}/system/system/audio.nix | 0 .../system/system/bluetooth.nix | 0 {modules => _modules}/system/theming.nix | 0 .../system/virtualisation/default.nix | 0 .../system/virtualisation/podman.nix | 0 {modules => _modules}/system/zsa_voyager.nix | 0 {secrets => _secrets}/secrets.yaml | 0 flake.nix | 81 +++++++++++------- 100 files changed, 49 insertions(+), 32 deletions(-) rename {hosts => _hosts}/aule/README.md (100%) rename {hosts => _hosts}/manwe/README.md (100%) rename {hosts => _hosts}/manwe/default.nix (100%) rename {hosts => _hosts}/manwe/hardware.nix (100%) rename {hosts => _hosts}/manwe/users/chris/default.nix (100%) rename {hosts => _hosts}/orome/README.md (100%) rename {hosts => _hosts}/orome/default.nix (100%) rename {hosts => _hosts}/orome/hardware.nix (100%) rename {hosts => _hosts}/orome/users/chris/default.nix (100%) rename {hosts => _hosts}/tulkas/README.md (100%) rename {hosts => _hosts}/tulkas/default.nix (100%) rename {hosts => _hosts}/tulkas/hardware.nix (100%) rename {hosts => _hosts}/tulkas/users/chris/default.nix (100%) rename {hosts => _hosts}/ulmo/README.md (100%) rename {hosts => _hosts}/ulmo/default.nix (100%) rename {hosts => _hosts}/ulmo/hardware.nix (100%) rename {lib => _lib}/attrs.nix (100%) rename {lib => _lib}/default.nix (100%) rename {lib => _lib}/modules.nix (100%) rename {lib => _lib}/nixos.nix (100%) rename {lib => _lib}/options.nix (100%) rename {lib => _lib}/user.nix (100%) rename {modules => _modules}/home/desktop/applications/communication.nix (100%) rename {modules => _modules}/home/desktop/applications/email.nix (100%) rename {modules => _modules}/home/desktop/applications/office.nix (100%) rename {modules => _modules}/home/desktop/applications/passwords.nix (100%) rename {modules => _modules}/home/desktop/applications/recording.nix (100%) rename {modules => _modules}/home/desktop/applications/steam.nix (100%) rename {modules => _modules}/home/desktop/applications/studio.nix (100%) rename {modules => _modules}/home/desktop/browsers/chrome.nix (100%) rename {modules => _modules}/home/desktop/browsers/default.nix (100%) rename {modules => _modules}/home/desktop/browsers/firefox.nix (100%) rename {modules => _modules}/home/desktop/browsers/ladybird.nix (100%) rename {modules => _modules}/home/desktop/browsers/zen.nix (100%) rename {modules => _modules}/home/desktop/default.nix (100%) rename {modules => _modules}/home/desktop/editors/default.nix (100%) rename {modules => _modules}/home/desktop/editors/kate.nix (100%) rename {modules => _modules}/home/desktop/editors/nano.nix (100%) rename {modules => _modules}/home/desktop/editors/nvim.nix (100%) rename {modules => _modules}/home/desktop/editors/vscodium.nix (100%) rename {modules => _modules}/home/desktop/editors/zed.nix (100%) rename {modules => _modules}/home/desktop/games/default.nix (100%) rename {modules => _modules}/home/desktop/games/minecraft.nix (100%) rename {modules => _modules}/home/desktop/plasma.nix (100%) rename {modules => _modules}/home/desktop/terminal/alacritty.nix (100%) rename {modules => _modules}/home/desktop/terminal/default.nix (100%) rename {modules => _modules}/home/desktop/terminal/ghostty.nix (100%) rename {modules => _modules}/home/develop/default.nix (100%) rename {modules => _modules}/home/develop/dotnet.nix (100%) rename {modules => _modules}/home/develop/js.nix (100%) rename {modules => _modules}/home/develop/rust.nix (100%) rename {modules => _modules}/home/shell/default.nix (100%) rename {modules => _modules}/home/shell/toolset/bat.nix (100%) rename {modules => _modules}/home/shell/toolset/btop.nix (100%) rename {modules => _modules}/home/shell/toolset/eza.nix (100%) rename {modules => _modules}/home/shell/toolset/fzf.nix (100%) rename {modules => _modules}/home/shell/toolset/git.nix (100%) rename {modules => _modules}/home/shell/toolset/gnupg.nix (100%) rename {modules => _modules}/home/shell/toolset/starship.nix (100%) rename {modules => _modules}/home/shell/toolset/tmux.nix (100%) rename {modules => _modules}/home/shell/toolset/yazi.nix (100%) rename {modules => _modules}/home/shell/toolset/zellij.nix (100%) rename {modules => _modules}/home/shell/toolset/zoxide.nix (100%) rename {modules => _modules}/home/shell/zsh.nix (100%) rename {modules => _modules}/home/themes/catppuccin-latte.jpg (100%) rename {modules => _modules}/home/themes/default.nix (100%) rename {modules => _modules}/home/themes/everforest.jpg (100%) rename {modules => _modules}/home/user.nix (100%) rename {modules => _modules}/home/xgd.nix (100%) rename {modules => _modules}/system/authentication/himmelblau.nix (100%) rename {modules => _modules}/system/boot.nix (100%) rename {modules => _modules}/system/common/qbittorrent.nix (100%) rename {modules => _modules}/system/desktop/editors/nvim.nix (100%) rename {modules => _modules}/system/desktop/gaming.nix (100%) rename {modules => _modules}/system/desktop/wine.nix (100%) rename {modules => _modules}/system/graphics.nix (100%) rename {modules => _modules}/system/networking/default.nix (100%) rename {modules => _modules}/system/networking/nfs.nix (100%) rename {modules => _modules}/system/networking/samba.nix (100%) rename {modules => _modules}/system/networking/ssh.nix (100%) rename {modules => _modules}/system/options.nix (100%) rename {modules => _modules}/system/security.nix (100%) rename {modules => _modules}/system/services/auth/authelia.nix (100%) rename {modules => _modules}/system/services/auth/zitadel.nix (100%) rename {modules => _modules}/system/services/default.nix (100%) rename {modules => _modules}/system/services/games/minecraft.nix (100%) rename {modules => _modules}/system/services/games/palworld.nix (100%) rename {modules => _modules}/system/services/media.nix (100%) rename {modules => _modules}/system/services/nextcloud.nix (100%) rename {modules => _modules}/system/services/security.nix (100%) rename {modules => _modules}/system/shell/default.nix (100%) rename {modules => _modules}/system/shell/zsh.nix (100%) rename {modules => _modules}/system/system/audio.nix (100%) rename {modules => _modules}/system/system/bluetooth.nix (100%) rename {modules => _modules}/system/theming.nix (100%) rename {modules => _modules}/system/virtualisation/default.nix (100%) rename {modules => _modules}/system/virtualisation/podman.nix (100%) rename {modules => _modules}/system/zsa_voyager.nix (100%) rename {secrets => _secrets}/secrets.yaml (100%) diff --git a/hosts/aule/README.md b/_hosts/aule/README.md similarity index 100% rename from hosts/aule/README.md rename to _hosts/aule/README.md diff --git a/hosts/manwe/README.md b/_hosts/manwe/README.md similarity index 100% rename from hosts/manwe/README.md rename to _hosts/manwe/README.md diff --git a/hosts/manwe/default.nix b/_hosts/manwe/default.nix similarity index 100% rename from hosts/manwe/default.nix rename to _hosts/manwe/default.nix diff --git a/hosts/manwe/hardware.nix b/_hosts/manwe/hardware.nix similarity index 100% rename from hosts/manwe/hardware.nix rename to _hosts/manwe/hardware.nix diff --git a/hosts/manwe/users/chris/default.nix b/_hosts/manwe/users/chris/default.nix similarity index 100% rename from hosts/manwe/users/chris/default.nix rename to _hosts/manwe/users/chris/default.nix diff --git a/hosts/orome/README.md b/_hosts/orome/README.md similarity index 100% rename from hosts/orome/README.md rename to _hosts/orome/README.md diff --git a/hosts/orome/default.nix b/_hosts/orome/default.nix similarity index 100% rename from hosts/orome/default.nix rename to _hosts/orome/default.nix diff --git a/hosts/orome/hardware.nix b/_hosts/orome/hardware.nix similarity index 100% rename from hosts/orome/hardware.nix rename to _hosts/orome/hardware.nix diff --git a/hosts/orome/users/chris/default.nix b/_hosts/orome/users/chris/default.nix similarity index 100% rename from hosts/orome/users/chris/default.nix rename to _hosts/orome/users/chris/default.nix diff --git a/hosts/tulkas/README.md b/_hosts/tulkas/README.md similarity index 100% rename from hosts/tulkas/README.md rename to _hosts/tulkas/README.md diff --git a/hosts/tulkas/default.nix b/_hosts/tulkas/default.nix similarity index 100% rename from hosts/tulkas/default.nix rename to _hosts/tulkas/default.nix diff --git a/hosts/tulkas/hardware.nix b/_hosts/tulkas/hardware.nix similarity index 100% rename from hosts/tulkas/hardware.nix rename to _hosts/tulkas/hardware.nix diff --git a/hosts/tulkas/users/chris/default.nix b/_hosts/tulkas/users/chris/default.nix similarity index 100% rename from hosts/tulkas/users/chris/default.nix rename to _hosts/tulkas/users/chris/default.nix diff --git a/hosts/ulmo/README.md b/_hosts/ulmo/README.md similarity index 100% rename from hosts/ulmo/README.md rename to _hosts/ulmo/README.md diff --git a/hosts/ulmo/default.nix b/_hosts/ulmo/default.nix similarity index 100% rename from hosts/ulmo/default.nix rename to _hosts/ulmo/default.nix diff --git a/hosts/ulmo/hardware.nix b/_hosts/ulmo/hardware.nix similarity index 100% rename from hosts/ulmo/hardware.nix rename to _hosts/ulmo/hardware.nix diff --git a/lib/attrs.nix b/_lib/attrs.nix similarity index 100% rename from lib/attrs.nix rename to _lib/attrs.nix diff --git a/lib/default.nix b/_lib/default.nix similarity index 100% rename from lib/default.nix rename to _lib/default.nix diff --git a/lib/modules.nix b/_lib/modules.nix similarity index 100% rename from lib/modules.nix rename to _lib/modules.nix diff --git a/lib/nixos.nix b/_lib/nixos.nix similarity index 100% rename from lib/nixos.nix rename to _lib/nixos.nix diff --git a/lib/options.nix b/_lib/options.nix similarity index 100% rename from lib/options.nix rename to _lib/options.nix diff --git a/lib/user.nix b/_lib/user.nix similarity index 100% rename from lib/user.nix rename to _lib/user.nix diff --git a/modules/home/desktop/applications/communication.nix b/_modules/home/desktop/applications/communication.nix similarity index 100% rename from modules/home/desktop/applications/communication.nix rename to _modules/home/desktop/applications/communication.nix diff --git a/modules/home/desktop/applications/email.nix b/_modules/home/desktop/applications/email.nix similarity index 100% rename from modules/home/desktop/applications/email.nix rename to _modules/home/desktop/applications/email.nix diff --git a/modules/home/desktop/applications/office.nix b/_modules/home/desktop/applications/office.nix similarity index 100% rename from modules/home/desktop/applications/office.nix rename to _modules/home/desktop/applications/office.nix diff --git a/modules/home/desktop/applications/passwords.nix b/_modules/home/desktop/applications/passwords.nix similarity index 100% rename from modules/home/desktop/applications/passwords.nix rename to _modules/home/desktop/applications/passwords.nix diff --git a/modules/home/desktop/applications/recording.nix b/_modules/home/desktop/applications/recording.nix similarity index 100% rename from modules/home/desktop/applications/recording.nix rename to _modules/home/desktop/applications/recording.nix diff --git a/modules/home/desktop/applications/steam.nix b/_modules/home/desktop/applications/steam.nix similarity index 100% rename from modules/home/desktop/applications/steam.nix rename to _modules/home/desktop/applications/steam.nix diff --git a/modules/home/desktop/applications/studio.nix b/_modules/home/desktop/applications/studio.nix similarity index 100% rename from modules/home/desktop/applications/studio.nix rename to _modules/home/desktop/applications/studio.nix diff --git a/modules/home/desktop/browsers/chrome.nix b/_modules/home/desktop/browsers/chrome.nix similarity index 100% rename from modules/home/desktop/browsers/chrome.nix rename to _modules/home/desktop/browsers/chrome.nix diff --git a/modules/home/desktop/browsers/default.nix b/_modules/home/desktop/browsers/default.nix similarity index 100% rename from modules/home/desktop/browsers/default.nix rename to _modules/home/desktop/browsers/default.nix diff --git a/modules/home/desktop/browsers/firefox.nix b/_modules/home/desktop/browsers/firefox.nix similarity index 100% rename from modules/home/desktop/browsers/firefox.nix rename to _modules/home/desktop/browsers/firefox.nix diff --git a/modules/home/desktop/browsers/ladybird.nix b/_modules/home/desktop/browsers/ladybird.nix similarity index 100% rename from modules/home/desktop/browsers/ladybird.nix rename to _modules/home/desktop/browsers/ladybird.nix diff --git a/modules/home/desktop/browsers/zen.nix b/_modules/home/desktop/browsers/zen.nix similarity index 100% rename from modules/home/desktop/browsers/zen.nix rename to _modules/home/desktop/browsers/zen.nix diff --git a/modules/home/desktop/default.nix b/_modules/home/desktop/default.nix similarity index 100% rename from modules/home/desktop/default.nix rename to _modules/home/desktop/default.nix diff --git a/modules/home/desktop/editors/default.nix b/_modules/home/desktop/editors/default.nix similarity index 100% rename from modules/home/desktop/editors/default.nix rename to _modules/home/desktop/editors/default.nix diff --git a/modules/home/desktop/editors/kate.nix b/_modules/home/desktop/editors/kate.nix similarity index 100% rename from modules/home/desktop/editors/kate.nix rename to _modules/home/desktop/editors/kate.nix diff --git a/modules/home/desktop/editors/nano.nix b/_modules/home/desktop/editors/nano.nix similarity index 100% rename from modules/home/desktop/editors/nano.nix rename to _modules/home/desktop/editors/nano.nix diff --git a/modules/home/desktop/editors/nvim.nix b/_modules/home/desktop/editors/nvim.nix similarity index 100% rename from modules/home/desktop/editors/nvim.nix rename to _modules/home/desktop/editors/nvim.nix diff --git a/modules/home/desktop/editors/vscodium.nix b/_modules/home/desktop/editors/vscodium.nix similarity index 100% rename from modules/home/desktop/editors/vscodium.nix rename to _modules/home/desktop/editors/vscodium.nix diff --git a/modules/home/desktop/editors/zed.nix b/_modules/home/desktop/editors/zed.nix similarity index 100% rename from modules/home/desktop/editors/zed.nix rename to _modules/home/desktop/editors/zed.nix diff --git a/modules/home/desktop/games/default.nix b/_modules/home/desktop/games/default.nix similarity index 100% rename from modules/home/desktop/games/default.nix rename to _modules/home/desktop/games/default.nix diff --git a/modules/home/desktop/games/minecraft.nix b/_modules/home/desktop/games/minecraft.nix similarity index 100% rename from modules/home/desktop/games/minecraft.nix rename to _modules/home/desktop/games/minecraft.nix diff --git a/modules/home/desktop/plasma.nix b/_modules/home/desktop/plasma.nix similarity index 100% rename from modules/home/desktop/plasma.nix rename to _modules/home/desktop/plasma.nix diff --git a/modules/home/desktop/terminal/alacritty.nix b/_modules/home/desktop/terminal/alacritty.nix similarity index 100% rename from modules/home/desktop/terminal/alacritty.nix rename to _modules/home/desktop/terminal/alacritty.nix diff --git a/modules/home/desktop/terminal/default.nix b/_modules/home/desktop/terminal/default.nix similarity index 100% rename from modules/home/desktop/terminal/default.nix rename to _modules/home/desktop/terminal/default.nix diff --git a/modules/home/desktop/terminal/ghostty.nix b/_modules/home/desktop/terminal/ghostty.nix similarity index 100% rename from modules/home/desktop/terminal/ghostty.nix rename to _modules/home/desktop/terminal/ghostty.nix diff --git a/modules/home/develop/default.nix b/_modules/home/develop/default.nix similarity index 100% rename from modules/home/develop/default.nix rename to _modules/home/develop/default.nix diff --git a/modules/home/develop/dotnet.nix b/_modules/home/develop/dotnet.nix similarity index 100% rename from modules/home/develop/dotnet.nix rename to _modules/home/develop/dotnet.nix diff --git a/modules/home/develop/js.nix b/_modules/home/develop/js.nix similarity index 100% rename from modules/home/develop/js.nix rename to _modules/home/develop/js.nix diff --git a/modules/home/develop/rust.nix b/_modules/home/develop/rust.nix similarity index 100% rename from modules/home/develop/rust.nix rename to _modules/home/develop/rust.nix diff --git a/modules/home/shell/default.nix b/_modules/home/shell/default.nix similarity index 100% rename from modules/home/shell/default.nix rename to _modules/home/shell/default.nix diff --git a/modules/home/shell/toolset/bat.nix b/_modules/home/shell/toolset/bat.nix similarity index 100% rename from modules/home/shell/toolset/bat.nix rename to _modules/home/shell/toolset/bat.nix diff --git a/modules/home/shell/toolset/btop.nix b/_modules/home/shell/toolset/btop.nix similarity index 100% rename from modules/home/shell/toolset/btop.nix rename to _modules/home/shell/toolset/btop.nix diff --git a/modules/home/shell/toolset/eza.nix b/_modules/home/shell/toolset/eza.nix similarity index 100% rename from modules/home/shell/toolset/eza.nix rename to _modules/home/shell/toolset/eza.nix diff --git a/modules/home/shell/toolset/fzf.nix b/_modules/home/shell/toolset/fzf.nix similarity index 100% rename from modules/home/shell/toolset/fzf.nix rename to _modules/home/shell/toolset/fzf.nix diff --git a/modules/home/shell/toolset/git.nix b/_modules/home/shell/toolset/git.nix similarity index 100% rename from modules/home/shell/toolset/git.nix rename to _modules/home/shell/toolset/git.nix diff --git a/modules/home/shell/toolset/gnupg.nix b/_modules/home/shell/toolset/gnupg.nix similarity index 100% rename from modules/home/shell/toolset/gnupg.nix rename to _modules/home/shell/toolset/gnupg.nix diff --git a/modules/home/shell/toolset/starship.nix b/_modules/home/shell/toolset/starship.nix similarity index 100% rename from modules/home/shell/toolset/starship.nix rename to _modules/home/shell/toolset/starship.nix diff --git a/modules/home/shell/toolset/tmux.nix b/_modules/home/shell/toolset/tmux.nix similarity index 100% rename from modules/home/shell/toolset/tmux.nix rename to _modules/home/shell/toolset/tmux.nix diff --git a/modules/home/shell/toolset/yazi.nix b/_modules/home/shell/toolset/yazi.nix similarity index 100% rename from modules/home/shell/toolset/yazi.nix rename to _modules/home/shell/toolset/yazi.nix diff --git a/modules/home/shell/toolset/zellij.nix b/_modules/home/shell/toolset/zellij.nix similarity index 100% rename from modules/home/shell/toolset/zellij.nix rename to _modules/home/shell/toolset/zellij.nix diff --git a/modules/home/shell/toolset/zoxide.nix b/_modules/home/shell/toolset/zoxide.nix similarity index 100% rename from modules/home/shell/toolset/zoxide.nix rename to _modules/home/shell/toolset/zoxide.nix diff --git a/modules/home/shell/zsh.nix b/_modules/home/shell/zsh.nix similarity index 100% rename from modules/home/shell/zsh.nix rename to _modules/home/shell/zsh.nix diff --git a/modules/home/themes/catppuccin-latte.jpg b/_modules/home/themes/catppuccin-latte.jpg similarity index 100% rename from modules/home/themes/catppuccin-latte.jpg rename to _modules/home/themes/catppuccin-latte.jpg diff --git a/modules/home/themes/default.nix b/_modules/home/themes/default.nix similarity index 100% rename from modules/home/themes/default.nix rename to _modules/home/themes/default.nix diff --git a/modules/home/themes/everforest.jpg b/_modules/home/themes/everforest.jpg similarity index 100% rename from modules/home/themes/everforest.jpg rename to _modules/home/themes/everforest.jpg diff --git a/modules/home/user.nix b/_modules/home/user.nix similarity index 100% rename from modules/home/user.nix rename to _modules/home/user.nix diff --git a/modules/home/xgd.nix b/_modules/home/xgd.nix similarity index 100% rename from modules/home/xgd.nix rename to _modules/home/xgd.nix diff --git a/modules/system/authentication/himmelblau.nix b/_modules/system/authentication/himmelblau.nix similarity index 100% rename from modules/system/authentication/himmelblau.nix rename to _modules/system/authentication/himmelblau.nix diff --git a/modules/system/boot.nix b/_modules/system/boot.nix similarity index 100% rename from modules/system/boot.nix rename to _modules/system/boot.nix diff --git a/modules/system/common/qbittorrent.nix b/_modules/system/common/qbittorrent.nix similarity index 100% rename from modules/system/common/qbittorrent.nix rename to _modules/system/common/qbittorrent.nix diff --git a/modules/system/desktop/editors/nvim.nix b/_modules/system/desktop/editors/nvim.nix similarity index 100% rename from modules/system/desktop/editors/nvim.nix rename to _modules/system/desktop/editors/nvim.nix diff --git a/modules/system/desktop/gaming.nix b/_modules/system/desktop/gaming.nix similarity index 100% rename from modules/system/desktop/gaming.nix rename to _modules/system/desktop/gaming.nix diff --git a/modules/system/desktop/wine.nix b/_modules/system/desktop/wine.nix similarity index 100% rename from modules/system/desktop/wine.nix rename to _modules/system/desktop/wine.nix diff --git a/modules/system/graphics.nix b/_modules/system/graphics.nix similarity index 100% rename from modules/system/graphics.nix rename to _modules/system/graphics.nix diff --git a/modules/system/networking/default.nix b/_modules/system/networking/default.nix similarity index 100% rename from modules/system/networking/default.nix rename to _modules/system/networking/default.nix diff --git a/modules/system/networking/nfs.nix b/_modules/system/networking/nfs.nix similarity index 100% rename from modules/system/networking/nfs.nix rename to _modules/system/networking/nfs.nix diff --git a/modules/system/networking/samba.nix b/_modules/system/networking/samba.nix similarity index 100% rename from modules/system/networking/samba.nix rename to _modules/system/networking/samba.nix diff --git a/modules/system/networking/ssh.nix b/_modules/system/networking/ssh.nix similarity index 100% rename from modules/system/networking/ssh.nix rename to _modules/system/networking/ssh.nix diff --git a/modules/system/options.nix b/_modules/system/options.nix similarity index 100% rename from modules/system/options.nix rename to _modules/system/options.nix diff --git a/modules/system/security.nix b/_modules/system/security.nix similarity index 100% rename from modules/system/security.nix rename to _modules/system/security.nix diff --git a/modules/system/services/auth/authelia.nix b/_modules/system/services/auth/authelia.nix similarity index 100% rename from modules/system/services/auth/authelia.nix rename to _modules/system/services/auth/authelia.nix diff --git a/modules/system/services/auth/zitadel.nix b/_modules/system/services/auth/zitadel.nix similarity index 100% rename from modules/system/services/auth/zitadel.nix rename to _modules/system/services/auth/zitadel.nix diff --git a/modules/system/services/default.nix b/_modules/system/services/default.nix similarity index 100% rename from modules/system/services/default.nix rename to _modules/system/services/default.nix diff --git a/modules/system/services/games/minecraft.nix b/_modules/system/services/games/minecraft.nix similarity index 100% rename from modules/system/services/games/minecraft.nix rename to _modules/system/services/games/minecraft.nix diff --git a/modules/system/services/games/palworld.nix b/_modules/system/services/games/palworld.nix similarity index 100% rename from modules/system/services/games/palworld.nix rename to _modules/system/services/games/palworld.nix diff --git a/modules/system/services/media.nix b/_modules/system/services/media.nix similarity index 100% rename from modules/system/services/media.nix rename to _modules/system/services/media.nix diff --git a/modules/system/services/nextcloud.nix b/_modules/system/services/nextcloud.nix similarity index 100% rename from modules/system/services/nextcloud.nix rename to _modules/system/services/nextcloud.nix diff --git a/modules/system/services/security.nix b/_modules/system/services/security.nix similarity index 100% rename from modules/system/services/security.nix rename to _modules/system/services/security.nix diff --git a/modules/system/shell/default.nix b/_modules/system/shell/default.nix similarity index 100% rename from modules/system/shell/default.nix rename to _modules/system/shell/default.nix diff --git a/modules/system/shell/zsh.nix b/_modules/system/shell/zsh.nix similarity index 100% rename from modules/system/shell/zsh.nix rename to _modules/system/shell/zsh.nix diff --git a/modules/system/system/audio.nix b/_modules/system/system/audio.nix similarity index 100% rename from modules/system/system/audio.nix rename to _modules/system/system/audio.nix diff --git a/modules/system/system/bluetooth.nix b/_modules/system/system/bluetooth.nix similarity index 100% rename from modules/system/system/bluetooth.nix rename to _modules/system/system/bluetooth.nix diff --git a/modules/system/theming.nix b/_modules/system/theming.nix similarity index 100% rename from modules/system/theming.nix rename to _modules/system/theming.nix diff --git a/modules/system/virtualisation/default.nix b/_modules/system/virtualisation/default.nix similarity index 100% rename from modules/system/virtualisation/default.nix rename to _modules/system/virtualisation/default.nix diff --git a/modules/system/virtualisation/podman.nix b/_modules/system/virtualisation/podman.nix similarity index 100% rename from modules/system/virtualisation/podman.nix rename to _modules/system/virtualisation/podman.nix diff --git a/modules/system/zsa_voyager.nix b/_modules/system/zsa_voyager.nix similarity index 100% rename from modules/system/zsa_voyager.nix rename to _modules/system/zsa_voyager.nix diff --git a/secrets/secrets.yaml b/_secrets/secrets.yaml similarity index 100% rename from secrets/secrets.yaml rename to _secrets/secrets.yaml diff --git a/flake.nix b/flake.nix index 7275c42..872bf61 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,11 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + snowfall-lib = { + url = "github:snowfallorg/lib"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -49,40 +54,52 @@ }; }; - outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }: - let - inherit (lib.my) readNixosModules mapHosts; + outputs = inputs: inputs.snowfall-lib.mkFlake { + inherit inputs; + src = ./.; - system = "x86_64-linux"; + namespace = "sneeuwvlok"; - mkPkgs = pkgs: extraOverlays: - import pkgs { - inherit system; - config.allowUnfree = true; - overlays = extraOverlays ++ (lib.attrValues self.overlays); - }; - pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default]; - - lib = nixpkgs.lib.extend (final: prev: { - my = import ./lib { - inherit pkgs inputs; - - lib = final; - }; - }); - in - { - lib = lib.my; - - overlays = { - default = final: prev: { - my = self.packages.${system}; - }; + meta = { + name = "sneeuwvlok"; + title = "Sneeuwvlok"; }; - - packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; }); - - nixosModules = readNixosModules ./modules import; - nixosConfigurations = mapHosts ./hosts {}; }; + + # outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }: + # let + # inherit (lib.my) readNixosModules mapHosts; + + # system = "x86_64-linux"; + + # mkPkgs = pkgs: extraOverlays: + # import pkgs { + # inherit system; + # config.allowUnfree = true; + # overlays = extraOverlays ++ (lib.attrValues self.overlays); + # }; + # pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default]; + + # lib = nixpkgs.lib.extend (final: prev: { + # my = import ./lib { + # inherit pkgs inputs; + + # lib = final; + # }; + # }); + # in + # { + # lib = lib.my; + + # overlays = { + # default = final: prev: { + # my = self.packages.${system}; + # }; + # }; + + # packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; }); + + # nixosModules = readNixosModules ./modules import; + # nixosConfigurations = mapHosts ./hosts {}; + # }; } From 21f6f379112f5d5e8ddee2ffe6f5bd6f04456586 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 16:12:13 +0200 Subject: [PATCH 02/38] made some progress --- flake.lock | 95 ++++++++++- flake.nix | 59 ++----- homes/user-configurations/chris.nix | 6 + homes/x86_64-linux/chris@manwe/default.nix | 11 ++ modules/home/desktop/plasma/default.nix | 73 +++++++++ modules/home/desktop/plasma/panels.nix | 122 ++++++++++++++ modules/home/desktop/plasma/power.nix | 50 ++++++ modules/nixos/boot/default.nix | 81 ++++++++++ modules/nixos/default.nix | 42 +++++ modules/nixos/desktop/default.nix | 37 +++++ modules/nixos/desktop/gamescope/default.nix | 27 ++++ modules/nixos/desktop/gnome/default.nix | 14 ++ modules/nixos/desktop/plasma/default.nix | 30 ++++ modules/nixos/hardware/audio/default.nix | 30 ++++ modules/nixos/hardware/bluetooth/default.nix | 25 +++ modules/nixos/hardware/gpu/amd.nix | 29 ++++ modules/nixos/hardware/gpu/nvidia.nix | 31 ++++ modules/nixos/nix/default.nix | 42 +++++ modules/nixos/services/media/default.nix | 153 ++++++++++++++++++ .../x86_64-linux}/aule/README.md | 0 .../x86_64-linux}/manwe/README.md | 0 systems/x86_64-linux/manwe/default.nix | 20 +++ systems/x86_64-linux/manwe/disks.nix | 42 +++++ systems/x86_64-linux/manwe/hardware.nix | 18 +++ .../x86_64-linux}/orome/README.md | 0 systems/x86_64-linux/orome/default.nix | 17 ++ systems/x86_64-linux/orome/disks.nix | 23 +++ systems/x86_64-linux/orome/hardware.nix | 18 +++ .../x86_64-linux}/tulkas/README.md | 0 systems/x86_64-linux/tulkas/default.nix | 16 ++ systems/x86_64-linux/tulkas/disks.nix | 23 +++ systems/x86_64-linux/tulkas/hardware.nix | 18 +++ systems/x86_64-linux/ulmo/default.nix | 19 +++ systems/x86_64-linux/ulmo/disks.nix | 31 ++++ systems/x86_64-linux/ulmo/hardware.nix | 18 +++ 35 files changed, 1176 insertions(+), 44 deletions(-) create mode 100644 homes/user-configurations/chris.nix create mode 100644 homes/x86_64-linux/chris@manwe/default.nix create mode 100644 modules/home/desktop/plasma/default.nix create mode 100644 modules/home/desktop/plasma/panels.nix create mode 100644 modules/home/desktop/plasma/power.nix create mode 100644 modules/nixos/boot/default.nix create mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/desktop/default.nix create mode 100644 modules/nixos/desktop/gamescope/default.nix create mode 100644 modules/nixos/desktop/gnome/default.nix create mode 100644 modules/nixos/desktop/plasma/default.nix create mode 100644 modules/nixos/hardware/audio/default.nix create mode 100644 modules/nixos/hardware/bluetooth/default.nix create mode 100644 modules/nixos/hardware/gpu/amd.nix create mode 100644 modules/nixos/hardware/gpu/nvidia.nix create mode 100644 modules/nixos/nix/default.nix create mode 100644 modules/nixos/services/media/default.nix rename {_hosts => systems/x86_64-linux}/aule/README.md (100%) rename {_hosts => systems/x86_64-linux}/manwe/README.md (100%) create mode 100644 systems/x86_64-linux/manwe/default.nix create mode 100644 systems/x86_64-linux/manwe/disks.nix create mode 100644 systems/x86_64-linux/manwe/hardware.nix rename {_hosts => systems/x86_64-linux}/orome/README.md (100%) create mode 100644 systems/x86_64-linux/orome/default.nix create mode 100644 systems/x86_64-linux/orome/disks.nix create mode 100644 systems/x86_64-linux/orome/hardware.nix rename {_hosts => systems/x86_64-linux}/tulkas/README.md (100%) create mode 100644 systems/x86_64-linux/tulkas/default.nix create mode 100644 systems/x86_64-linux/tulkas/disks.nix create mode 100644 systems/x86_64-linux/tulkas/hardware.nix create mode 100644 systems/x86_64-linux/ulmo/default.nix create mode 100644 systems/x86_64-linux/ulmo/disks.nix create mode 100644 systems/x86_64-linux/ulmo/hardware.nix diff --git a/flake.lock b/flake.lock index 87de250..1c8b5cb 100644 --- a/flake.lock +++ b/flake.lock @@ -191,6 +191,22 @@ } }, "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { "locked": { "lastModified": 1747046372, "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", @@ -262,6 +278,25 @@ "type": "github" } }, + "flake-utils-plus": { + "inputs": { + "flake-utils": "flake-utils_5" + }, + "locked": { + "lastModified": 1715533576, + "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "type": "github" + }, + "original": { + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "type": "github" + } + }, "flake-utils_2": { "inputs": { "systems": "systems_2" @@ -316,6 +351,24 @@ "type": "github" } }, + "flake-utils_5": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flux": { "inputs": { "nixpkgs": "nixpkgs_3" @@ -871,6 +924,7 @@ "nixpkgs": "nixpkgs_5", "nvf": "nvf", "plasma-manager": "plasma-manager", + "snowfall-lib": "snowfall-lib", "sops-nix": "sops-nix", "stylix": "stylix", "zen-browser": "zen-browser" @@ -893,6 +947,28 @@ "type": "github" } }, + "snowfall-lib": { + "inputs": { + "flake-compat": "flake-compat_4", + "flake-utils-plus": "flake-utils-plus", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736130495, + "narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=", + "owner": "snowfallorg", + "repo": "lib", + "rev": "02d941739f98a09e81f3d2d9b3ab08918958beac", + "type": "github" + }, + "original": { + "owner": "snowfallorg", + "repo": "lib", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_7" @@ -918,14 +994,14 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_8", "nur": "nur", - "systems": "systems_6", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1036,6 +1112,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 872bf61..5abe818 100644 --- a/flake.nix +++ b/flake.nix @@ -58,48 +58,23 @@ inherit inputs; src = ./.; - namespace = "sneeuwvlok"; - - meta = { - name = "sneeuwvlok"; - title = "Sneeuwvlok"; + channels-config = { + allowUnfree = true; }; + + snowfall = { + namespace = "sneeuwvlok"; + + meta = { + name = "sneeuwvlok"; + title = "Sneeuwvlok"; + }; + }; + + overlays = with inputs; [ + fenix.overlays.default + nix-minecraft.overlay + flux.overlays.default + ]; }; - - # outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }: - # let - # inherit (lib.my) readNixosModules mapHosts; - - # system = "x86_64-linux"; - - # mkPkgs = pkgs: extraOverlays: - # import pkgs { - # inherit system; - # config.allowUnfree = true; - # overlays = extraOverlays ++ (lib.attrValues self.overlays); - # }; - # pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default]; - - # lib = nixpkgs.lib.extend (final: prev: { - # my = import ./lib { - # inherit pkgs inputs; - - # lib = final; - # }; - # }); - # in - # { - # lib = lib.my; - - # overlays = { - # default = final: prev: { - # my = self.packages.${system}; - # }; - # }; - - # packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; }); - - # nixosModules = readNixosModules ./modules import; - # nixosConfigurations = mapHosts ./hosts {}; - # }; } diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix new file mode 100644 index 0000000..bd48767 --- /dev/null +++ b/homes/user-configurations/chris.nix @@ -0,0 +1,6 @@ +{ + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; +} \ No newline at end of file diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix new file mode 100644 index 0000000..5acdd92 --- /dev/null +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: +let + inherit (lib); +in +{ + sneeuwvlok = { + series = { + media.enable = true; + }; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix new file mode 100644 index 0000000..7a03fe9 --- /dev/null +++ b/modules/home/desktop/plasma/default.nix @@ -0,0 +1,73 @@ +{ config, lib, namespace, osConfig ? {}, ... }: +let + cfg = config.${namespace}.desktop.plasma; + osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; +in +{ + options.${namespace}.desktop.plasma = { + + }; + + config = mkIf osCfg.enable { + programs.plasma = { + enable = true; + + immutableByDefault = true; + windows.allowWindowsToRememberPositions = true; + + session = { + general.askForConfirmationOnLogout = false; + sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; + }; + + workspace = { + clickItemTo = "select"; + colorScheme = "EverforestDark"; + wallpaper = config.stylix.image; + }; + + spectacle.shortcuts = { + captureRectangularRegion = "Meta+Shift+S"; + }; + + kscreenlocker = { + autoLock = false; + lockOnResume = false; + lockOnStartup = false; + + appearance = { + alwaysShowClock = true; + showMediaControls = true; + }; + }; + + configFile = { + baloofilerc."Basic Settings"."Indexing-Enabled" = false; + + kdeglobals = { + General = { + # enable font antialiasing + XftAntialias = true; + XftHintStyle = "hintslight"; + XftSubPixel = "rgb"; + }; + }; + + kwalletrc = { + Wallet.Enabled = false; + }; + + plasmarc = { + General = { + RaiseMaximumVolume = true; + VolumeStep = 2; + }; + }; + + kcminputrc = { + Keyboard.NumLock.value = 0; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix new file mode 100644 index 0000000..fa4de70 --- /dev/null +++ b/modules/home/desktop/plasma/panels.nix @@ -0,0 +1,122 @@ +{ config, lib, namespace, osConfig ? {}, ... }: +let + cfg = config.${namespace}.desktop.plasma; + osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; +in +{ + options.${namespace}.desktop.plasma = { + + }; + + config = mkIf osCfg.enable { + programs.plasma.panels = [ + { + location = "bottom"; + floating = true; + lengthMode = "fill"; + height = 42; + hiding = "none"; + screen = "all"; + widgets = [ + { + panelSpacer = { + expanding = true; + }; + } + { + kickoff = { + applicationsDisplayMode = "list"; + compactDisplayStyle = false; + favoritesDisplayMode = "grid"; + sortAlphabetically = true; + showButtonsFor = { + custom = [ + "shutdown" + "reboot" + "logout" + "lock-screen" + ]; + }; + showActionButtonCaptions = true; + }; + } + { + iconTasks = { + appearance = { + fill = false; + highlightWindows = true; + iconSpacing = "medium"; + indicateAudioStreams = true; + rows = { + multirowView = "never"; + maximum = null; + }; + showTooltips = true; + }; + behavior = { + grouping = { + clickAction = "showPresentWindowsEffect"; + method = "byProgramName"; + }; + minimizeActiveTaskOnClick = true; + newTasksAppearOn = "right"; + showTasks = { + onlyInCurrentActivity = true; + onlyInCurrentDesktop = true; + onlyMinimized = false; + onlyInCurrentScreen = false; + }; + sortingMethod = "manually"; + unhideOnAttentionNeeded = true; + wheel = { + ignoreMinimizedTasks = true; + switchBetweenTasks = true; + }; + }; + launchers = [ + "preferred://filemanager" + "preferred://browser" + "preferred://terminalemulator" + "preferred://email" + "applications:vesktop.desktop" + "applications:steam.desktop" + ]; + }; + } + { + panelSpacer = { + expanding = true; + }; + } + { + systemTray = { + icons = { + scaleToFit = true; + spacing = "small"; + }; + items = { + hidden = [ + "org.kde.plasma.brightness" + ]; + }; + pin = false; + }; + } + { + digitalClock = { + date = { + enable = true; + format = "shortDate"; + position = "belowTime"; + }; + time = { + format = "24h"; + showSeconds = "onlyInTooltip"; + }; + }; + } + ]; + } + ]; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix new file mode 100644 index 0000000..9d05dad --- /dev/null +++ b/modules/home/desktop/plasma/power.nix @@ -0,0 +1,50 @@ +{ config, lib, namespace, osConfig ? {}, ... }: +let + cfg = config.${namespace}.desktop.plasma; + osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; +in +{ + options.${namespace}.desktop.plasma = { + + }; + + config = mkIf osCfg.enable { + programs.plasma.powerdevil = { + AC = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + + battery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + + lowBattery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix new file mode 100644 index 0000000..8037621 --- /dev/null +++ b/modules/nixos/boot/default.nix @@ -0,0 +1,81 @@ +{ lib, namespace, config, ... }: +let + inherit (lib) mkIf mkMerge mkDefault mkEnableOption; + inherit (lib.types) enum; + + cfg = config.${namespace}.boot; +in +{ + config.${namespace}.boot = { + type = mkOption { + type = enum [ "bios" "uefi" ]; + default = "uefi"; + }; + + quiet = mkOption { + type = bool; + default = false; + }; + + animated = mkOption { + type = bool; + default = false; + }; + }; + + config = mkMerge [ + ({ + boot.loader.grub.enable = mkDefault true; + }) + + (mkIf cfg.type == "bios" { + boot.loader.grub.efiSupport = false; + }) + + (mkIf cfg.type == "uefi" { + boot.loader = { + efi.canTouchEfiVariables = true; + grub = { + efiSupport = true; + efiInstallAsRemovable = mkDefault false; + device = "nodev"; # INFO: https://discourse.nixos.org/t/question-about-grub-and-nodev + }; + }; + }) + + (mkIf cfg.quiet { + boot = { + consoleLogLevel = 0; + + initrd = { + systemd.enable = true; + verbose = false; + }; + + kernelParams = [ + "quiet" + "loglevel=3" + "systemd.show_status=auto" + "udev.log_level=3" + "rd.udev.log_level=3" + "vt.global_cursor_default=0" + ]; + + loader.timeout = mkDefault 0; + }; + }) + + (mkIf cfg.animated { + boot.plymouth = { + enable = true; + + theme = mkDefault "pixels"; + themePackages = with pkgs; [ + (adi1090x-plymouth-themes.override { + selected_themes = [ "pixels" ]; + }) + ]; + }; + }) + ]; +} \ No newline at end of file diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..34c0298 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: +let + inherit (lib) mkOption mkMerge attrNames filterAttrs; + inherit (lib.types) nullOr enum; + + cfg = config.${namespace}; +in +{ + options.${namespace} = { + preset = mkOption { + type = nullOr enum [ "server" "desktop" ]; + default = null; + example = "desktop"; + description = "Which defaults profile to start with"; + }; + }; + + config = mkMerge [ + (mkIf cfg.preset == "desktop" { + "${namespace}" = mkDefault { + hardware.has = { + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "kde"; + }; + }) + + (mkIf cfg.preset == "desktop" { + "${namespace}" = mkDefault { + services = { + ssh.enable = true; + }; + }; + }) + ]; +} \ No newline at end of file diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix new file mode 100644 index 0000000..1c053c4 --- /dev/null +++ b/modules/nixos/desktop/default.nix @@ -0,0 +1,37 @@ +{ lib, config, namespace, ... }:let + inherit (lib) mkOption mkMerge attrNames filterAttrs; + inherit (lib.types) nullOr enum bool; + + cfg = config.${namespace}.desktop; +in +{ + options.${namespace}.desktop = { + use = mkOption { + type = nullOr enum (attrNames (filterAttrs (n: type == "directory") (readDir ./.))); + default = null; + example = "plasma"; + description = "Which desktop to enable"; + }; + + autoLogin = mkOption { + type = bool; + default = false; + example = true; + description = "Enable plasma's auto login feature."; + }; + }; + + config = mkMerge [ + (mkIf cfg.desktop != null { + "${namespace}".desktop.${cfg.use}.enable = true; + + services.displayManager = { + enable = true; + + autoLogin = mkIf cfg.autoLogin { + enable = true; + }; + }; + }) + ]; +} diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix new file mode 100644 index 0000000..1d3d427 --- /dev/null +++ b/modules/nixos/desktop/gamescope/default.nix @@ -0,0 +1,27 @@ +{ lib, config, namespace, inputs, ... }:let + inherit (lib) mkEnableOption; + + cfg = config.${namespace}.desktop.gamescope; +in +{ + imports = [ inputs.jovian.nixosModules.default ]; + + options.${namespace}.desktop.gamescope = { + enable = mkEnableOption "Enable Steamdeck ui"; + }; + + config = mkIf cfg.enable { + "${namespace}".desktop.kde.enable = true; + + jovian = { + steam = { + enable = true; + autoStart = true; + user = "chris"; + updater.splash = "steamos"; + desktopSession = "plasma"; + }; + steamos.useSteamOSConfig = true; + }; + }; +} diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix new file mode 100644 index 0000000..add3f2c --- /dev/null +++ b/modules/nixos/desktop/gnome/default.nix @@ -0,0 +1,14 @@ +{ lib, config, namespace, ... }:let + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) bool; + + cfg = config.${namespace}.desktop.gnome; +in +{ + options.${namespace}.desktop.gnome = { + enable = mkEnableOption "Enable Gnome"; + }; + + config = mkIf cfg.enable { + }; +} diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix new file mode 100644 index 0000000..3a30daf --- /dev/null +++ b/modules/nixos/desktop/plasma/default.nix @@ -0,0 +1,30 @@ +{ lib, config, namespace, ... }:let + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) bool; + + cfg = config.${namespace}.desktop.plasma; +in +{ + options.${namespace}.desktop.plasma = { + enable = mkEnableOption "Enable KDE Plasma"; + }; + + config = mkIf cfg.enable { + environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ]; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + services = { + xserver.enable = false; + + desktopManager.plasma6.enable = true; + + displayManager = { + defaultSession = "plasma"; + sddm = { + enable = true; + wayland.enable = true; + }; + }; + }; + }; +} diff --git a/modules/nixos/hardware/audio/default.nix b/modules/nixos/hardware/audio/default.nix new file mode 100644 index 0000000..bf9760f --- /dev/null +++ b/modules/nixos/hardware/audio/default.nix @@ -0,0 +1,30 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.audio; +in +{ + config.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth"; + + config = mkIf cfg { + environment.systemPackages = with pkgs; [ + sof-firmware + ]; + + # https://wiki.nixos.org/wiki/PipeWire + security.rtkit.enable = true; + + services.pulseaudio.enable = false; + services.pipewire = { + enable = true; + wireplumber.enable = true; + pulse.enable = true; + + alsa = { + enable = true; + support32Bit = true; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix new file mode 100644 index 0000000..31dcdbc --- /dev/null +++ b/modules/nixos/hardware/bluetooth/default.nix @@ -0,0 +1,25 @@ +{ lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.bluetooth; +in +{ + config.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; + + config = mkIf cfg { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + + services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = { + "monitor.bluez.properties" = { + "bluez5.enable-sbc-xq" = true; + "bluez5.enable-msbc" = true; + "bluez5.enable-hw-volume" = true; + "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd.nix new file mode 100644 index 0000000..9bd0961 --- /dev/null +++ b/modules/nixos/hardware/gpu/amd.nix @@ -0,0 +1,29 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.gpu.amd; +in +{ + config.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; + + config = mkIf cfg { + services.xserver.videoDrivers = [ "amd" ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + amdgpu = { + amdvlk = { + enable = true; + support32Bit.enable = true; + }; + + initrd.enable = true; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/gpu/nvidia.nix b/modules/nixos/hardware/gpu/nvidia.nix new file mode 100644 index 0000000..0e0ea4e --- /dev/null +++ b/modules/nixos/hardware/gpu/nvidia.nix @@ -0,0 +1,31 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.gpu.nvidia; +in +{ + config.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; + + config = mkIf cfg { + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + nvidia = { + modesetting.enable = true; + open = false; + nvidiaSettings = true; + + powerManagement = { + enable = true; + finegrained = false; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix new file mode 100644 index 0000000..1177a14 --- /dev/null +++ b/modules/nixos/nix/default.nix @@ -0,0 +1,42 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.nix; +in +{ + config.${namespace}.nix = { + enable = mkEnableOption "Enable nix command"; + }; + + config = mkIf cfg.enable { + programs.git.enable = true; + + nix = { + package = pkgs.nixVersions.latest; + + settings = { + experimental-features = [ "nix-command" "flakes" ]; + allowed-users = [ "@wheel" ]; + trusted-users = [ "@wheel" ]; + + auto-optimise-store = true; + connect-timeout = 5; + http-connections = 50; + log-lines = 50; # more log lines in case of error + min-free = 1 * (1024 * 1024 * 1024); # GiB # start garbage collector + max-free = 50 * (1024 * 1024 * 1024); # GiB # until + warn-dirty = false; + }; + + gc = { + automatic = true; + dates = "monthly"; + options = "--delete-older-than 45d"; + }; + + # disable nix-channel, we use flakes instead. + channel.enable = false; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix new file mode 100644 index 0000000..76c6309 --- /dev/null +++ b/modules/nixos/services/media/default.nix @@ -0,0 +1,153 @@ +{ lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.services.media; +in +{ + config.${namespace}.services.media = { + enable = mkEnableOption "Enable media services"; + }; + + config = mkIf cfg.enable { + #========================================================================= + # Dependencies + #========================================================================= + environment.systemPackages = with pkgs; [ + podman-tui + jellyfin + jellyfin-web + jellyfin-ffmpeg + jellyseerr + mediainfo + id3v2 + yt-dlp + ]; + + # need to permit these outdated packages until servarr finally upgrades at some point... + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; + + #========================================================================= + # Prepare system + #========================================================================= + users = { + users.${user} = { + isSystemUser = true; + group = group; + }; + groups.${group} = {}; + }; + + systemd.tmpfiles.rules = [ + "d '${directory}/series' 0700 ${user} ${group} - -" + "d '${directory}/movies' 0700 ${user} ${group} - -" + "d '${directory}/music' 0700 ${user} ${group} - -" + "d '${directory}/qbittorrent' 0700 ${user} ${group} - -" + "d '${directory}/sabnzbd' 0700 ${user} ${group} - -" + "d '${directory}/reiverr/config' 0700 ${user} ${group} - -" + "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -" + "d '${directory}/downloads/done' 0700 ${user} ${group} - -" + ]; + + #========================================================================= + # Services + #========================================================================= + services = let + serviceConf = { + enable = true; + openFirewall = true; + user = user; + group = group; + }; + in { + jellyfin = serviceConf; + radarr = serviceConf; + sonarr = serviceConf; + bazarr = serviceConf; + lidarr = serviceConf; + + lanraragi = { + enable = true; + port = 6969; + }; + + jellyseerr = { + enable = true; + openFirewall = true; + }; + + prowlarr = { + enable = true; + openFirewall = true; + }; + + qbittorrent = { + enable = true; + openFirewall = true; + dataDir = "${directory}/qbittorrent"; + port = 5000; + + user = user; + group = group; + }; + + sabnzbd = { + enable = true; + openFirewall = true; + configFile = "${directory}/sabnzbd/config.ini"; + + user = user; + group = group; + }; + }; + + systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL"; + + modules.virtualisation.podman.enable = true; + + virtualisation = { + oci-containers = { + backend = "podman"; + + containers = { + flaresolverr = { + image = "flaresolverr/flaresolverr"; + autoStart = true; + ports = [ "127.0.0.1:8191:8191" ]; + }; + + reiverr = { + image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; + autoStart = true; + ports = [ "127.0.0.1:9494:9494" ]; + volumes = [ "${directory}/reiverr/config:/config" ]; + }; + }; + }; + }; + + #========================================================================= + # Hosting + #========================================================================= + services = { + caddy = { + enable = true; + virtualHosts = { + "media.kruining.eu".extraConfig = '' + import auth + + reverse_proxy http://127.0.0.1:9494 + ''; + "jellyfin.kruining.eu".extraConfig = '' + reverse_proxy http://127.0.0.1:8096 + ''; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 6969 ]; + }; +} \ No newline at end of file diff --git a/_hosts/aule/README.md b/systems/x86_64-linux/aule/README.md similarity index 100% rename from _hosts/aule/README.md rename to systems/x86_64-linux/aule/README.md diff --git a/_hosts/manwe/README.md b/systems/x86_64-linux/manwe/README.md similarity index 100% rename from _hosts/manwe/README.md rename to systems/x86_64-linux/manwe/README.md diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix new file mode 100644 index 0000000..f10ca22 --- /dev/null +++ b/systems/x86_64-linux/manwe/default.nix @@ -0,0 +1,20 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "desktop"; + + hardware.has = { + gpu.amd = true; + bluetooth = true; + }; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix new file mode 100644 index 0000000..3a3375e --- /dev/null +++ b/systems/x86_64-linux/manwe/disks.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = [ + { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } + ]; + + boot.supportedFilesystems = [ "nfs" ]; + + fileSystems = { + "/" = { device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/C842-316A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/home/chris/games" = { + device = "/dev/disk/by-label/games"; + fsType = "ext4"; + }; + + # TODO :: Reformat the disk to ext4 + "/home/chris/data" = { + device = "/dev/disk/by-label/Data"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=chris" ]; + }; + + "/home/chris/media" = { + device = "ulmo:/"; + fsType = "nfs"; + }; + }; +} diff --git a/systems/x86_64-linux/manwe/hardware.nix b/systems/x86_64-linux/manwe/hardware.nix new file mode 100644 index 0000000..60759bd --- /dev/null +++ b/systems/x86_64-linux/manwe/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/_hosts/orome/README.md b/systems/x86_64-linux/orome/README.md similarity index 100% rename from _hosts/orome/README.md rename to systems/x86_64-linux/orome/README.md diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix new file mode 100644 index 0000000..5d5bf2f --- /dev/null +++ b/systems/x86_64-linux/orome/default.nix @@ -0,0 +1,17 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "desktop"; + + bluetooth.enable = true; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/orome/disks.nix b/systems/x86_64-linux/orome/disks.nix new file mode 100644 index 0000000..5a11407 --- /dev/null +++ b/systems/x86_64-linux/orome/disks.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = []; + + boot.supportedFilesystems = [ "nfs" ]; + + fileSystems = { + "/" = { device = "/dev/disk/by-uuid/e60745c9-b3ea-4aeb-9c5c-b67ef1730826"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/42B3-C767"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + }; +} diff --git a/systems/x86_64-linux/orome/hardware.nix b/systems/x86_64-linux/orome/hardware.nix new file mode 100644 index 0000000..ee52810 --- /dev/null +++ b/systems/x86_64-linux/orome/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/_hosts/tulkas/README.md b/systems/x86_64-linux/tulkas/README.md similarity index 100% rename from _hosts/tulkas/README.md rename to systems/x86_64-linux/tulkas/README.md diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix new file mode 100644 index 0000000..792956e --- /dev/null +++ b/systems/x86_64-linux/tulkas/default.nix @@ -0,0 +1,16 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "desktop"; + desktop.use = "gamescope"; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/tulkas/disks.nix b/systems/x86_64-linux/tulkas/disks.nix new file mode 100644 index 0000000..43b8825 --- /dev/null +++ b/systems/x86_64-linux/tulkas/disks.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = [ + { device = "/dev/disk/by-uuid/beddca5c-1ecc-4a46-9fc5-fd918eed8f2a"; } + ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/aa438c4c-d193-436b-91ca-c386c0688265"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/89B8-0702"; + fsType = "vfat"; + }; + }; +} diff --git a/systems/x86_64-linux/tulkas/hardware.nix b/systems/x86_64-linux/tulkas/hardware.nix new file mode 100644 index 0000000..950d7cc --- /dev/null +++ b/systems/x86_64-linux/tulkas/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-amd" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix new file mode 100644 index 0000000..d28c19f --- /dev/null +++ b/systems/x86_64-linux/ulmo/default.nix @@ -0,0 +1,19 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "server"; + + services = { + media.enable = true; + }; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/ulmo/disks.nix b/systems/x86_64-linux/ulmo/disks.nix new file mode 100644 index 0000000..a4033f7 --- /dev/null +++ b/systems/x86_64-linux/ulmo/disks.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = [ + { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } + ]; + + boot.supportedFilesystems = [ "nfs" ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/dd518f17-61c9-4831-b1bd-e1cc2af292aa"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/0A56-EBFE"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/var/media" = { + device = "/dev/disk/by-label/data"; + fsType = "ext4"; + }; + }; +} diff --git a/systems/x86_64-linux/ulmo/hardware.nix b/systems/x86_64-linux/ulmo/hardware.nix new file mode 100644 index 0000000..4479a12 --- /dev/null +++ b/systems/x86_64-linux/ulmo/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} From 30501b7fac73855cc6e7a57078a971279752bee7 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 23:56:56 +0200 Subject: [PATCH 03/38] moved over a load more modules --- _modules/system/boot.nix | 48 ----- _modules/system/desktop/gaming.nix | 34 ---- _modules/system/desktop/wine.nix | 8 - _modules/system/graphics.nix | 40 ----- _modules/system/networking/samba.nix | 71 -------- _modules/system/options.nix | 27 --- _modules/system/services/media.nix | 167 ------------------ _modules/system/zsa_voyager.nix | 35 ---- homes/x86_64-linux/chris@manwe/default.nix | 15 +- modules/home/desktop/plasma/default.nix | 10 +- modules/home/desktop/plasma/panels.nix | 4 +- modules/home/desktop/plasma/power.nix | 4 +- modules/nixos/boot/default.nix | 25 ++- modules/nixos/default.nix | 10 +- modules/nixos/desktop/default.nix | 15 +- modules/nixos/desktop/gamescope/default.nix | 2 +- modules/nixos/desktop/gnome/default.nix | 3 +- modules/nixos/desktop/plasma/default.nix | 5 +- modules/nixos/hardware/audio/default.nix | 4 +- modules/nixos/hardware/bluetooth/default.nix | 4 +- modules/nixos/hardware/gpu/amd.nix | 4 +- modules/nixos/hardware/gpu/nvidia.nix | 4 +- modules/nixos/hardware/keyboard/voyager.nix | 46 +++++ modules/nixos/nix/default.nix | 4 +- .../services/authentication}/authelia.nix | 6 +- .../nixos/services/authentication/default.nix | 1 + .../services}/authentication/himmelblau.nix | 6 +- .../services/authentication}/zitadel.nix | 6 +- .../nixos}/services/games/minecraft.nix | 31 ++-- .../nixos}/services/games/palworld.nix | 12 +- modules/nixos/services/media/default.nix | 104 ++++++----- .../nixos/services/media}/nextcloud.nix | 37 ++-- .../nixos/services/media}/nfs.nix | 6 +- .../nixos/services}/networking/ssh.nix | 6 +- 34 files changed, 226 insertions(+), 578 deletions(-) delete mode 100644 _modules/system/boot.nix delete mode 100644 _modules/system/desktop/gaming.nix delete mode 100644 _modules/system/desktop/wine.nix delete mode 100644 _modules/system/graphics.nix delete mode 100644 _modules/system/networking/samba.nix delete mode 100644 _modules/system/options.nix delete mode 100644 _modules/system/services/media.nix delete mode 100644 _modules/system/zsa_voyager.nix create mode 100644 modules/nixos/hardware/keyboard/voyager.nix rename {_modules/system/services/auth => modules/nixos/services/authentication}/authelia.nix (98%) create mode 100644 modules/nixos/services/authentication/default.nix rename {_modules/system => modules/nixos/services}/authentication/himmelblau.nix (68%) rename {_modules/system/services/auth => modules/nixos/services/authentication}/zitadel.nix (92%) rename {_modules/system => modules/nixos}/services/games/minecraft.nix (91%) rename {_modules/system => modules/nixos}/services/games/palworld.nix (64%) rename {_modules/system/services => modules/nixos/services/media}/nextcloud.nix (77%) rename {_modules/system/networking => modules/nixos/services/media}/nfs.nix (74%) rename {_modules/system => modules/nixos/services}/networking/ssh.nix (78%) diff --git a/_modules/system/boot.nix b/_modules/system/boot.nix deleted file mode 100644 index d0fa603..0000000 --- a/_modules/system/boot.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ config, options, lib, pkgs, ... }: -let - inherit (lib) mkMerge mkIf mkEnableOption mkDefault mkForce; - - cfg = config.modules.boot; -in -{ - options.modules.boot = - { - silentBoot = mkEnableOption "Enable silent boot"; - animatedBoot = mkEnableOption "Enable boot animation"; - }; - - config = mkMerge [ - ({ - boot.loader = { - efi.canTouchEfiVariables = true; - - systemd-boot.enable = true; - - timeout = mkDefault 0; - }; - - time.timeZone = "Europe/Amsterdam"; - }) - - (mkIf (cfg.silentBoot == true) { - boot = { - consoleLogLevel = 0; - initrd.verbose = false; - kernelParams = [ "quiet" "splash" "boot.shell_on_fail" "udev.log_priority=3" "rd.systemd.show_status=auto" ]; - loader.timeout = mkDefault 0; - }; - }) - - (mkIf (cfg.animatedBoot == true) { - boot.plymouth = { - enable = true; - theme = mkForce "pixels"; - themePackages = with pkgs; [ - (adi1090x-plymouth-themes.override { - selected_themes = [ "pixels" ]; - }) - ]; - }; - }) - ]; -} \ No newline at end of file diff --git a/_modules/system/desktop/gaming.nix b/_modules/system/desktop/gaming.nix deleted file mode 100644 index 54efe3b..0000000 --- a/_modules/system/desktop/gaming.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ inputs, lib, config, ... }: let - inherit (lib) mkEnableOption mkIf; - - cfg = config.modules.desktop.gaming; -in -{ - imports = [ inputs.jovian.nixosModules.default ]; - - options.modules.desktop.gaming = { - enable = mkEnableOption "enable steamdeck like desktop"; - }; - - config = mkIf cfg.enable { - services.desktopManager.plasma6.enable = true; - - jovian = { - # devices = { - # steamdeck = { - # enable = true; - # enableGyroDsuService = true; - # autoUpdate = true; - # }; - # }; - steam = { - enable = true; - autoStart = true; - user = "chris"; - updater.splash = "steamos"; - desktopSession = "plasma"; - }; - steamos.useSteamOSConfig = true; - }; - }; -} diff --git a/_modules/system/desktop/wine.nix b/_modules/system/desktop/wine.nix deleted file mode 100644 index 7444d77..0000000 --- a/_modules/system/desktop/wine.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - # imports = [ inputs.erosanix.nixosModules.someModule ]; - - config = { - - }; -} diff --git a/_modules/system/graphics.nix b/_modules/system/graphics.nix deleted file mode 100644 index a4d9775..0000000 --- a/_modules/system/graphics.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ ... }: -{ - services.xserver.videoDrivers = [ "nvidia" ]; - - hardware = { - graphics = { - enable = true; - enable32Bit = true; - }; - - nvidia = { - modesetting.enable = true; - open = false; - nvidiaSettings = true; - - powerManagement = { - enable = true; - finegrained = false; - }; - -# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; - - # package = let - # rcu_patch = pkgs.fetchpatch { - # url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; - # hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg="; - # }; - # in config.boot.kernelPackages.nvidiaPackages.mkDriver { - # version = "550.40.07"; - # sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0="; - # sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4="; - # openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I="; - # settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs="; - # persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870="; - - # patches = [ rcu_patch ]; - # }; - }; - }; -} diff --git a/_modules/system/networking/samba.nix b/_modules/system/networking/samba.nix deleted file mode 100644 index d7e0b7f..0000000 --- a/_modules/system/networking/samba.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ pkgs, config, lib, ... }: -let - inherit (builtins) getEnv; - inherit (lib.modules) mkIf mkMerge; -in -{ - options.modules.networking.samba = let - inherit (lib.options) mkEnableOption; - in { - sharing.enable = mkEnableOption "Samba: enable NixOs -> external file-transfer"; - receicing.enable = mkEnableOption "Samba: enable external -> NixOs file-transfer"; - }; - - config = mkMerge [ - (mkIf config.modules.networking.samba.sharing.enable { - users = { - groups.samba-guest = {}; - users.samba-guest = { - isSystemUser = true; - description = "Residence of our Samba guest users"; - group = "samba-guest"; - home = "/var/empty"; - createHome = false; - shell = pkgs.shadow; - }; - }; - user.extraGroups = [ "samba-guest" ]; - - networking.firewall = { - allowPing = true; - allowedTCPPorts = [ 5327 ]; - allowedUDPPorts = [ 3702 ]; - }; - - services.samba-wsdd.enable = true; - - services.samba = { - enable = true; - openFirewall = true; - extraConfig = '' - server string = ${config.networking.hostName} - netbios name = ${config.networking.hostName} - workgroup = WORKGROUP - security = user - - create mask 0664 - force create mode 0664 - directory mask 0775 - force directory mode 0775 - follow symlink = yes - - hosts allow = 192.168.1.0/24 localhost - hosts deny = 0.0.0.0/0 - guest account = nobody - map to guest = bad user - ''; - shares = { - Public = { - path = (getEnv "HOME") + "/Public"; - browseable = "yes"; - "read only" = "yes"; - "guest ok" = "yes"; - "forse user" = "${config.user.name}"; - "force group" = "samba-guest"; - "write list" = "${config.user.name}"; - }; - }; - }; - }) - ]; -} diff --git a/_modules/system/options.nix b/_modules/system/options.nix deleted file mode 100644 index abce819..0000000 --- a/_modules/system/options.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, ... }: -let - inherit (lib.types) attrs; - inherit (lib.my) mkOpt; -in -{ - options = { - user = mkOpt attrs {}; - }; - - config = { - environment.variables = { - NIXPKGS_ALLOW_UNFREE = "1"; - }; - - nix.settings = let - inherit (lib) elem attrNames filterAttrs; - - users = (attrNames (filterAttrs (name: user: elem "wheel" (user.extraGroups or [])) config.users.users));# ++ [ "root" ]; - in - { - trusted-users = users; - allowed-users = users; - experimental-features = [ "nix-command" "flakes" ]; - }; - }; -} diff --git a/_modules/system/services/media.nix b/_modules/system/services/media.nix deleted file mode 100644 index 9ec8e5e..0000000 --- a/_modules/system/services/media.nix +++ /dev/null @@ -1,167 +0,0 @@ -{ config, lib, pkgs, ... }: -let - inherit (lib) mkIf; - - user = "media"; - group = "media"; - directory = "/var/media"; -in -{ - options.modules.services.media = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Media tools"; - }; - - imports = let - extras = fetchTarball { - url = "https://github.com/onny/nixos-nextcloud-testumgebung/archive/fa6f062830b4bc3cedb9694c1dbf01d5fdf775ac.tar.gz"; - sha256 = "0gzd0276b8da3ykapgqks2zhsqdv4jjvbv97dsxg0hgrhb74z0fs"; - }; - in [ - "${extras}/nextcloud-extras.nix" - ]; - - config = mkIf config.modules.services.media.enable { - environment.systemPackages = with pkgs; [ - podman-tui - jellyfin - jellyfin-web - jellyfin-ffmpeg - jellyseerr - mediainfo - id3v2 - yt-dlp - ]; - - # need to permit these outdated packages until servarr finally upgrades at some point... - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - - users = { - users.${user} = { - isSystemUser = true; - group = group; - }; - groups.${group} = {}; - }; - - systemd.tmpfiles.rules = [ - "d '${directory}/series' 0700 ${user} ${group} - -" - "d '${directory}/movies' 0700 ${user} ${group} - -" - "d '${directory}/music' 0700 ${user} ${group} - -" - "d '${directory}/qbittorrent' 0700 ${user} ${group} - -" - "d '${directory}/sabnzbd' 0700 ${user} ${group} - -" - "d '${directory}/reiverr/config' 0700 ${user} ${group} - -" - "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -" - "d '${directory}/downloads/done' 0700 ${user} ${group} - -" - ]; - - services = let - serviceConf = { - enable = true; - openFirewall = true; - user = user; - group = group; - }; - in { - jellyfin = serviceConf; - radarr = serviceConf; - sonarr = serviceConf; - bazarr = serviceConf; - lidarr = serviceConf; - - lanraragi = { - enable = true; - port = 6969; - }; - - jellyseerr = { - enable = true; - openFirewall = true; - }; - - prowlarr = { - enable = true; - openFirewall = true; - }; - - qbittorrent = { - enable = true; - openFirewall = true; - dataDir = "${directory}/qbittorrent"; - port = 5000; - - user = user; - group = group; - }; - - sabnzbd = { - enable = true; - openFirewall = true; - configFile = "${directory}/sabnzbd/config.ini"; - - user = user; - group = group; - }; - - caddy = { - enable = true; - virtualHosts = { - "media.kruining.eu".extraConfig = '' - import auth - - reverse_proxy http://127.0.0.1:9494 - ''; - "jellyfin.kruining.eu".extraConfig = '' - reverse_proxy http://127.0.0.1:8096 - ''; - # "series.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:8989 - # ''; - # "movies.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:7878 - # ''; - # "indexer.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:9696 - # ''; - # "torrents.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:5000 - # ''; - # "usenet.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:8080 - # ''; - }; - }; - }; - - networking.firewall.allowedTCPPorts = [ 80 443 6969 ]; - - modules.virtualisation.podman.enable = true; - - virtualisation = { - oci-containers = { - backend = "podman"; - - containers = { - flaresolverr = { - image = "flaresolverr/flaresolverr"; - autoStart = true; - ports = [ "127.0.0.1:8191:8191" ]; - }; - - reiverr = { - image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; - autoStart = true; - ports = [ "127.0.0.1:9494:9494" ]; - volumes = [ "${directory}/reiverr/config:/config" ]; - }; - }; - }; - }; - - systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL"; - }; -} diff --git a/_modules/system/zsa_voyager.nix b/_modules/system/zsa_voyager.nix deleted file mode 100644 index c900954..0000000 --- a/_modules/system/zsa_voyager.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, pkgs, options, ... }: -{ - environment.systemPackages = with pkgs; [ - keymapp - ]; - - hardware.keyboard.zsa.enable = true; - - services.udev.extraRules = '' - # Rules for Oryx web flashing and live training - KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" - KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" - - # Legacy rules for live training over webusb (Not needed for firmware v21+) - # Rule for all ZSA keyboards - SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" - # Rule for the Moonlander - SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" - # Rule for the Ergodox EZ - SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" - # Rule for the Planck EZ - SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" - - # Wally Flashing rules for the Ergodox EZ - ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" - ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" - SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" - KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" - - # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ - SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" - # Keymapp Flashing rules for the Voyager - SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" - ''; -} diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 5acdd92..a5a09f3 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -1,11 +1,8 @@ -{ lib, ... }: -let - inherit (lib); -in +{ ... }: { - sneeuwvlok = { - series = { - media.enable = true; - }; + sneeuwvlok = { + series = { + media.enable = true; }; -} \ No newline at end of file + }; +} diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix index 7a03fe9..12ffce3 100644 --- a/modules/home/desktop/plasma/default.nix +++ b/modules/home/desktop/plasma/default.nix @@ -1,5 +1,7 @@ { config, lib, namespace, osConfig ? {}, ... }: let + inherit (lib) mkIf; + cfg = config.${namespace}.desktop.plasma; osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; in @@ -19,7 +21,7 @@ in general.askForConfirmationOnLogout = false; sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; }; - + workspace = { clickItemTo = "select"; colorScheme = "EverforestDark"; @@ -56,18 +58,18 @@ in kwalletrc = { Wallet.Enabled = false; }; - + plasmarc = { General = { RaiseMaximumVolume = true; VolumeStep = 2; }; }; - + kcminputrc = { Keyboard.NumLock.value = 0; }; }; }; }; -} \ No newline at end of file +} diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix index fa4de70..a35b93c 100644 --- a/modules/home/desktop/plasma/panels.nix +++ b/modules/home/desktop/plasma/panels.nix @@ -1,5 +1,7 @@ { config, lib, namespace, osConfig ? {}, ... }: let + inherit (lib) mkIf; + cfg = config.${namespace}.desktop.plasma; osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; in @@ -119,4 +121,4 @@ in } ]; }; -} \ No newline at end of file +} diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix index 9d05dad..50e7cfe 100644 --- a/modules/home/desktop/plasma/power.nix +++ b/modules/home/desktop/plasma/power.nix @@ -1,5 +1,7 @@ { config, lib, namespace, osConfig ? {}, ... }: let + inherit (lib) mkIf; + cfg = config.${namespace}.desktop.plasma; osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; in @@ -47,4 +49,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 8037621..5c0c53c 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -1,12 +1,12 @@ -{ lib, namespace, config, ... }: +{ lib, namespace, config, pkgs, ... }: let - inherit (lib) mkIf mkMerge mkDefault mkEnableOption; - inherit (lib.types) enum; + inherit (lib) mkIf mkMerge mkDefault mkOption; + inherit (lib.types) enum bool; cfg = config.${namespace}.boot; in { - config.${namespace}.boot = { + options.${namespace}.boot = { type = mkOption { type = enum [ "bios" "uefi" ]; default = "uefi"; @@ -25,7 +25,16 @@ in config = mkMerge [ ({ - boot.loader.grub.enable = mkDefault true; + boot.loader = { + systemd-boot.enable = false; + grub.enable = true; + + grub2-theme = { + enable = true; + theme = "vimix"; + footer = true; + }; + }; }) (mkIf cfg.type == "bios" { @@ -52,7 +61,7 @@ in verbose = false; }; - kernelParams = [ + kernelParams = [ "quiet" "loglevel=3" "systemd.show_status=auto" @@ -68,7 +77,7 @@ in (mkIf cfg.animated { boot.plymouth = { enable = true; - + theme = mkDefault "pixels"; themePackages = with pkgs; [ (adi1090x-plymouth-themes.override { @@ -78,4 +87,4 @@ in }; }) ]; -} \ No newline at end of file +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 34c0298..6efb305 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, namespace, ... }: let - inherit (lib) mkOption mkMerge attrNames filterAttrs; + inherit (lib) mkIf mkDefault mkOption mkMerge; inherit (lib.types) nullOr enum; cfg = config.${namespace}; @@ -17,7 +17,7 @@ in config = mkMerge [ (mkIf cfg.preset == "desktop" { - "${namespace}" = mkDefault { + ${namespace} = mkDefault { hardware.has = { audio = true; }; @@ -26,7 +26,7 @@ in quiet = true; animated = true; }; - + desktop.use = "kde"; }; }) @@ -39,4 +39,4 @@ in }; }) ]; -} \ No newline at end of file +} diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 1c053c4..cca4c69 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,24 +1,19 @@ { lib, config, namespace, ... }:let - inherit (lib) mkOption mkMerge attrNames filterAttrs; - inherit (lib.types) nullOr enum bool; + inherit (lib) mkIf mkOption mkEnableOption mkMerge attrNames filterAttrs readDir; + inherit (lib.types) nullOr enum; cfg = config.${namespace}.desktop; in { options.${namespace}.desktop = { use = mkOption { - type = nullOr enum (attrNames (filterAttrs (n: type == "directory") (readDir ./.))); + type = nullOr enum (attrNames (filterAttrs (n: type: type == "directory") (readDir ./.))); default = null; example = "plasma"; description = "Which desktop to enable"; }; - autoLogin = mkOption { - type = bool; - default = false; - example = true; - description = "Enable plasma's auto login feature."; - }; + autoLogin = mkEnableOption "Enable plasma's auto login feature."; }; config = mkMerge [ @@ -27,7 +22,7 @@ in services.displayManager = { enable = true; - + autoLogin = mkIf cfg.autoLogin { enable = true; }; diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix index 1d3d427..f125292 100644 --- a/modules/nixos/desktop/gamescope/default.nix +++ b/modules/nixos/desktop/gamescope/default.nix @@ -1,5 +1,5 @@ { lib, config, namespace, inputs, ... }:let - inherit (lib) mkEnableOption; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gamescope; in diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix index add3f2c..126d384 100644 --- a/modules/nixos/desktop/gnome/default.nix +++ b/modules/nixos/desktop/gnome/default.nix @@ -1,6 +1,5 @@ { lib, config, namespace, ... }:let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) bool; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gnome; in diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix index 3a30daf..8be91ec 100644 --- a/modules/nixos/desktop/plasma/default.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -1,6 +1,5 @@ -{ lib, config, namespace, ... }:let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) bool; +{ pkgs, lib, config, namespace, ... }:let + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.plasma; in diff --git a/modules/nixos/hardware/audio/default.nix b/modules/nixos/hardware/audio/default.nix index bf9760f..d3f340f 100644 --- a/modules/nixos/hardware/audio/default.nix +++ b/modules/nixos/hardware/audio/default.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.audio; in { - config.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth"; + options.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth"; config = mkIf cfg { environment.systemPackages = with pkgs; [ @@ -27,4 +27,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix index 31dcdbc..1b99eef 100644 --- a/modules/nixos/hardware/bluetooth/default.nix +++ b/modules/nixos/hardware/bluetooth/default.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.bluetooth; in { - config.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; + options.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; config = mkIf cfg { hardware.bluetooth = { @@ -22,4 +22,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd.nix index 9bd0961..c47191c 100644 --- a/modules/nixos/hardware/gpu/amd.nix +++ b/modules/nixos/hardware/gpu/amd.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.gpu.amd; in { - config.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; + options.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; config = mkIf cfg { services.xserver.videoDrivers = [ "amd" ]; @@ -26,4 +26,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/gpu/nvidia.nix b/modules/nixos/hardware/gpu/nvidia.nix index 0e0ea4e..e8ac542 100644 --- a/modules/nixos/hardware/gpu/nvidia.nix +++ b/modules/nixos/hardware/gpu/nvidia.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.gpu.nvidia; in { - config.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; + options.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; config = mkIf cfg { services.xserver.videoDrivers = [ "nvidia" ]; @@ -28,4 +28,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/keyboard/voyager.nix b/modules/nixos/hardware/keyboard/voyager.nix new file mode 100644 index 0000000..fd470f8 --- /dev/null +++ b/modules/nixos/hardware/keyboard/voyager.nix @@ -0,0 +1,46 @@ +{ lib, config, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.keyboard.voyager; +in +{ + options.${namespace}.hardware.keyboard.voyager = { + enble = mkEnableOption "Enable tools for ZSA Voyager"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + keymapp + ]; + + hardware.keyboard.zsa.enable = true; + + services.udev.extraRules = '' + # Rules for Oryx web flashing and live training + KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" + KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" + + # Legacy rules for live training over webusb (Not needed for firmware v21+) + # Rule for all ZSA keyboards + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" + # Rule for the Moonlander + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" + # Rule for the Ergodox EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" + # Rule for the Planck EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" + + # Wally Flashing rules for the Ergodox EZ + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" + SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" + KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" + + # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" + # Keymapp Flashing rules for the Voyager + SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" + ''; + }; +} diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 1177a14..05c001a 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.nix; in { - config.${namespace}.nix = { + options.${namespace}.nix = { enable = mkEnableOption "Enable nix command"; }; @@ -39,4 +39,4 @@ in channel.enable = false; }; }; -} \ No newline at end of file +} diff --git a/_modules/system/services/auth/authelia.nix b/modules/nixos/services/authentication/authelia.nix similarity index 98% rename from _modules/system/services/auth/authelia.nix rename to modules/nixos/services/authentication/authelia.nix index c713279..e706439 100644 --- a/_modules/system/services/auth/authelia.nix +++ b/modules/nixos/services/authentication/authelia.nix @@ -1,12 +1,12 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; user = "authelia-testing"; - cfg = config.modules.services.auth.authelia; + cfg = config.${namespace}.services.authentication.authelia; in { - options.modules.services.auth.authelia = { + options.${namespace}.services.authentication.authelia = { enable = mkEnableOption "Authelia"; }; diff --git a/modules/nixos/services/authentication/default.nix b/modules/nixos/services/authentication/default.nix new file mode 100644 index 0000000..c157af7 --- /dev/null +++ b/modules/nixos/services/authentication/default.nix @@ -0,0 +1 @@ +{ ... }: {} diff --git a/_modules/system/authentication/himmelblau.nix b/modules/nixos/services/authentication/himmelblau.nix similarity index 68% rename from _modules/system/authentication/himmelblau.nix rename to modules/nixos/services/authentication/himmelblau.nix index 7817335..1228759 100644 --- a/_modules/system/authentication/himmelblau.nix +++ b/modules/nixos/services/authentication/himmelblau.nix @@ -1,12 +1,12 @@ -{ inputs, lib, config, ... }: let +{ inputs, lib, config, namespace, ... }: let inherit (lib) mkEnableOption mkIf; - cfg = config.modules.authentication.himmelblau; + cfg = config.${namespace}.services.authentication.himmelblau; in { imports = [ inputs.himmelblau.nixosModules.himmelblau ]; - options.modules.authentication.himmelblau = { + options.${namespace}.services.authentication.himmelblau = { enable = mkEnableOption "enable azure entra ID authentication"; }; diff --git a/_modules/system/services/auth/zitadel.nix b/modules/nixos/services/authentication/zitadel.nix similarity index 92% rename from _modules/system/services/auth/zitadel.nix rename to modules/nixos/services/authentication/zitadel.nix index 2814649..6142857 100644 --- a/_modules/system/services/auth/zitadel.nix +++ b/modules/nixos/services/authentication/zitadel.nix @@ -1,14 +1,14 @@ -{ config, options, lib, pkgs, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.modules.services.auth.zitadel; + cfg = config.${namespace}.services.authentication.zitadel; db_name = "zitadel"; db_user = "zitadel"; in { - options.modules.services.auth.zitadel = { + options.${namespace}.services.authentication.zitadel = { enable = mkEnableOption "Zitadel"; }; diff --git a/_modules/system/services/games/minecraft.nix b/modules/nixos/services/games/minecraft.nix similarity index 91% rename from _modules/system/services/games/minecraft.nix rename to modules/nixos/services/games/minecraft.nix index c414881..7f408ae 100644 --- a/_modules/system/services/games/minecraft.nix +++ b/modules/nixos/services/games/minecraft.nix @@ -1,22 +1,33 @@ -{ inputs, config, lib, pkgs, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption mkOption; + inherit (lib.types) str; + + cfg = config.${namespace}.services.games.minecraft; in { imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ]; - options.modules.services.games.minecraft = let - inherit (lib.options) mkEnableOption; - in { + options.${namespace}.services.games.minecraft = { enable = mkEnableOption "Minecraft"; + + user = mkOption { + type = str; + default = "minecraft"; + }; + + group = mkOption { + type = str; + default = "minecraft"; + }; }; - config = mkIf config.modules.services.games.minecraft.enable { - user.users."minecraft" = { + config = mkIf cfg.enable { + user.users.${cfg.user} = { isSystemUser = true; - group = "minecraft"; + group = cfg.group; }; services = { @@ -25,7 +36,7 @@ in eula = true; openFirewall = true; - user = "minecraft"; + user = cfg.user; dataDir = "/var/lib/minecraft"; managementSystem = { @@ -151,7 +162,7 @@ in symlinks = let inherit (builtins) attrNames readDir map; - inherit (pkgs) linkFarm fetchzip; + inherit (pkgs) linkFarm; linkFarmFromDir = name: dir: linkFarm name (map (x: { name = x; path = "${src}/${dir}/${x}"; }) (attrNames (readDir "${src}/${dir}"))); in { diff --git a/_modules/system/services/games/palworld.nix b/modules/nixos/services/games/palworld.nix similarity index 64% rename from _modules/system/services/games/palworld.nix rename to modules/nixos/services/games/palworld.nix index 2f11597..dea16b3 100644 --- a/_modules/system/services/games/palworld.nix +++ b/modules/nixos/services/games/palworld.nix @@ -1,15 +1,15 @@ -{ config, options, lib, pkgs, ... }: +{ config, lib, namespace, ... }: let - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.services.games.palworld; in { - options.modules.services.games.palworld = let - inherit (lib.options) mkEnableOption; - in { + options.${namespace}.services.games.palworld = { enable = mkEnableOption "Palworld"; }; - config = mkIf config.modules.services.games.palworld.enable { + config = mkIf cfg.enable { # kaas = (pkgs.mkSteamServer rec { # name = "Palworld"; # src = pkgs.fetchSteam { diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix index 76c6309..4827114 100644 --- a/modules/nixos/services/media/default.nix +++ b/modules/nixos/services/media/default.nix @@ -1,12 +1,28 @@ -{ lib, namespace, config, ... }: +{ pkgs, lib, namespace, config, ... }: let - inherit (lib) mkIf mkEnableOption; + inherit (lib) mkIf mkEnableOption mkOption; + inherit (lib.types) str; cfg = config.${namespace}.services.media; in { - config.${namespace}.services.media = { + options.${namespace}.services.media = { enable = mkEnableOption "Enable media services"; + + user = mkOption { + type = str; + default = "media"; + }; + + group = mkOption { + type = str; + default = "media"; + }; + + path = mkOption { + type = str; + default = "/var/media"; + }; }; config = mkIf cfg.enable { @@ -23,7 +39,7 @@ in id3v2 yt-dlp ]; - + # need to permit these outdated packages until servarr finally upgrades at some point... permittedInsecurePackages = [ "dotnet-sdk-6.0.428" @@ -34,22 +50,22 @@ in # Prepare system #========================================================================= users = { - users.${user} = { + users.${cfg.user} = { isSystemUser = true; - group = group; + group = cfg.group; }; - groups.${group} = {}; + groups.${cfg.group} = {}; }; systemd.tmpfiles.rules = [ - "d '${directory}/series' 0700 ${user} ${group} - -" - "d '${directory}/movies' 0700 ${user} ${group} - -" - "d '${directory}/music' 0700 ${user} ${group} - -" - "d '${directory}/qbittorrent' 0700 ${user} ${group} - -" - "d '${directory}/sabnzbd' 0700 ${user} ${group} - -" - "d '${directory}/reiverr/config' 0700 ${user} ${group} - -" - "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -" - "d '${directory}/downloads/done' 0700 ${user} ${group} - -" + "d '${cfg.directory}/series' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/movies' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/music' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -" ]; #========================================================================= @@ -59,8 +75,8 @@ in serviceConf = { enable = true; openFirewall = true; - user = user; - group = group; + user = cfg.user; + group = cfg.group; }; in { jellyfin = serviceConf; @@ -69,11 +85,6 @@ in bazarr = serviceConf; lidarr = serviceConf; - lanraragi = { - enable = true; - port = 6969; - }; - jellyseerr = { enable = true; openFirewall = true; @@ -87,20 +98,34 @@ in qbittorrent = { enable = true; openFirewall = true; - dataDir = "${directory}/qbittorrent"; + dataDir = "${cfg.directory}/qbittorrent"; port = 5000; - user = user; - group = group; + user = cfg.user; + group = cfg.group; }; sabnzbd = { enable = true; openFirewall = true; - configFile = "${directory}/sabnzbd/config.ini"; + configFile = "${cfg.directory}/sabnzbd/config.ini"; - user = user; - group = group; + user = cfg.user; + group = cfg.group; + }; + + caddy = { + enable = true; + virtualHosts = { + "media.kruining.eu".extraConfig = '' + import auth + + reverse_proxy http://127.0.0.1:9494 + ''; + "jellyfin.kruining.eu".extraConfig = '' + reverse_proxy http://127.0.0.1:8096 + ''; + }; }; }; @@ -123,31 +148,12 @@ in image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; autoStart = true; ports = [ "127.0.0.1:9494:9494" ]; - volumes = [ "${directory}/reiverr/config:/config" ]; + volumes = [ "${cfg.directory}/reiverr/config:/config" ]; }; }; }; }; - #========================================================================= - # Hosting - #========================================================================= - services = { - caddy = { - enable = true; - virtualHosts = { - "media.kruining.eu".extraConfig = '' - import auth - - reverse_proxy http://127.0.0.1:9494 - ''; - "jellyfin.kruining.eu".extraConfig = '' - reverse_proxy http://127.0.0.1:8096 - ''; - }; - }; - }; - networking.firewall.allowedTCPPorts = [ 80 443 6969 ]; }; -} \ No newline at end of file +} diff --git a/_modules/system/services/nextcloud.nix b/modules/nixos/services/media/nextcloud.nix similarity index 77% rename from _modules/system/services/nextcloud.nix rename to modules/nixos/services/media/nextcloud.nix index 4325d6c..658a5b4 100644 --- a/_modules/system/services/nextcloud.nix +++ b/modules/nixos/services/media/nextcloud.nix @@ -1,26 +1,35 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, namespace, ... }: let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption mkOption; + inherit (lib.types) str; - user = "nextcloud"; - group = "nextcloud"; + cfg = config.${namespace}.services.media.nextcloud; in { options.modules.services.nextcloud = { enable = mkEnableOption "Nextcloud"; - }; - config = mkIf config.modules.services.nextcloud.enable { - users = { - users.${user} = { - isSystemUser = true; - group = group; - }; - groups.${group} = {}; + user = mkOption { + type = str; + default = "nextcloud"; }; - home-manager.users.${user}.home = { + group = mkOption { + type = str; + default = "nextcloud"; + }; + }; + + config = mkIf cfg.enable { + users = { + users.${cfg.user} = { + isSystemUser = true; + group = cfg.group; + }; + groups.${cfg.group} = {}; + }; + + home-manager.users.${cfg.user}.home = { stateVersion = config.system.stateVersion; file.".netrc".text = '' diff --git a/_modules/system/networking/nfs.nix b/modules/nixos/services/media/nfs.nix similarity index 74% rename from _modules/system/networking/nfs.nix rename to modules/nixos/services/media/nfs.nix index 7081e6c..7e47322 100644 --- a/_modules/system/networking/nfs.nix +++ b/modules/nixos/services/media/nfs.nix @@ -1,11 +1,11 @@ -{ config, lib, ... }: +{ config, lib, namespace, ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.modules.networking.nfs; + cfg = config.${namespace}.media.nfs; in { - options.modules.networking.nfs = { + options.${namespace}.media.nfs = { enable = mkEnableOption "Enable NFS"; }; diff --git a/_modules/system/networking/ssh.nix b/modules/nixos/services/networking/ssh.nix similarity index 78% rename from _modules/system/networking/ssh.nix rename to modules/nixos/services/networking/ssh.nix index 8d2b1c6..5ebdfd2 100644 --- a/_modules/system/networking/ssh.nix +++ b/modules/nixos/services/networking/ssh.nix @@ -1,12 +1,12 @@ -{ config, lib, ... }: +{ config, lib, namespace, ... }: let inherit (lib.modules) mkIf; inherit (lib.options) mkEnableOption; - cfg = config.modules.networking.ssh; + cfg = config.${namespace}.services.networking.ssh; in { - options.modules.networking.ssh = { + options.${namespace}.services.networking.ssh = { enable = mkEnableOption "enable ssh"; }; From ef6c049068ec6210adb0d6cdd16d903b69431650 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 09:57:59 +0200 Subject: [PATCH 04/38] more work --- _modules/home/shell/default.nix | 71 ----------- _modules/home/shell/toolset/bat.nix | 22 ---- _modules/home/shell/toolset/btop.nix | 95 --------------- _modules/home/shell/toolset/eza.nix | 29 ----- _modules/home/shell/toolset/fzf.nix | 37 ------ _modules/home/shell/toolset/git.nix | 112 ------------------ _modules/home/shell/toolset/starship.nix | 101 ---------------- _modules/home/shell/toolset/tmux.nix | 107 ----------------- _modules/home/shell/toolset/yazi.nix | 22 ---- _modules/home/shell/toolset/zellij.nix | 23 ---- _modules/home/shell/toolset/zoxide.nix | 22 ---- _modules/home/shell/zsh.nix | 104 ---------------- _modules/system/networking/default.nix | 31 ----- modules/home/shell/default.nix | 53 +++++++++ modules/home/shell/toolset/bat.nix | 19 +++ modules/home/shell/toolset/btop.nix | 93 +++++++++++++++ modules/home/shell/toolset/eza.nix | 26 ++++ modules/home/shell/toolset/fzf.nix | 36 ++++++ modules/home/shell/toolset/git.nix | 111 +++++++++++++++++ .../home/shell/toolset/gnupg.nix | 10 +- modules/home/shell/toolset/starship.nix | 100 ++++++++++++++++ modules/home/shell/toolset/tmux.nix | 107 +++++++++++++++++ modules/home/shell/toolset/yazi.nix | 20 ++++ modules/home/shell/toolset/zellij.nix | 22 ++++ modules/home/shell/toolset/zoxide.nix | 19 +++ modules/home/shell/zsh.nix | 91 ++++++++++++++ modules/nixos/boot/default.nix | 22 ++-- modules/nixos/default.nix | 6 +- modules/nixos/desktop/default.nix | 15 ++- modules/nixos/shells/zsh.nix | 14 +++ modules/nixos/system/networking.nix | 25 ++++ .../nixos/system/security/boot.nix | 43 +------ modules/nixos/system/security/default.nix | 23 ++++ modules/nixos/system/security/sops.nix | 22 ++++ modules/nixos/system/security/sudo.nix | 23 ++++ .../system => modules/nixos}/theming.nix | 9 +- 36 files changed, 843 insertions(+), 842 deletions(-) delete mode 100644 _modules/home/shell/default.nix delete mode 100644 _modules/home/shell/toolset/bat.nix delete mode 100644 _modules/home/shell/toolset/btop.nix delete mode 100644 _modules/home/shell/toolset/eza.nix delete mode 100644 _modules/home/shell/toolset/fzf.nix delete mode 100644 _modules/home/shell/toolset/git.nix delete mode 100644 _modules/home/shell/toolset/starship.nix delete mode 100644 _modules/home/shell/toolset/tmux.nix delete mode 100644 _modules/home/shell/toolset/yazi.nix delete mode 100644 _modules/home/shell/toolset/zellij.nix delete mode 100644 _modules/home/shell/toolset/zoxide.nix delete mode 100644 _modules/home/shell/zsh.nix delete mode 100644 _modules/system/networking/default.nix create mode 100644 modules/home/shell/default.nix create mode 100644 modules/home/shell/toolset/bat.nix create mode 100644 modules/home/shell/toolset/btop.nix create mode 100644 modules/home/shell/toolset/eza.nix create mode 100644 modules/home/shell/toolset/fzf.nix create mode 100644 modules/home/shell/toolset/git.nix rename {_modules => modules}/home/shell/toolset/gnupg.nix (73%) create mode 100644 modules/home/shell/toolset/starship.nix create mode 100644 modules/home/shell/toolset/tmux.nix create mode 100644 modules/home/shell/toolset/yazi.nix create mode 100644 modules/home/shell/toolset/zellij.nix create mode 100644 modules/home/shell/toolset/zoxide.nix create mode 100644 modules/home/shell/zsh.nix create mode 100644 modules/nixos/shells/zsh.nix create mode 100644 modules/nixos/system/networking.nix rename _modules/system/security.nix => modules/nixos/system/security/boot.nix (70%) create mode 100644 modules/nixos/system/security/default.nix create mode 100644 modules/nixos/system/security/sops.nix create mode 100644 modules/nixos/system/security/sudo.nix rename {_modules/system => modules/nixos}/theming.nix (84%) diff --git a/_modules/home/shell/default.nix b/_modules/home/shell/default.nix deleted file mode 100644 index 3613c76..0000000 --- a/_modules/home/shell/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) nullOr enum; - - cfg = config.modules.${user}.shell; -in -{ - options.modules.${user}.shell = { - default = mkOption { - type = nullOr (enum ["fish" "zsh" "bash"]); - default = null; - description = "Default system shell"; - }; - - corePkgs.enable = mkEnableOption "core shell packages"; - }; - - config = mkMerge [ - (mkIf (cfg.default != null) { - users.defaultUserShell = pkgs."${cfg.default}"; - - # modules.${user}.shell.toolset.gnupg.enable = true; - }) - - (mkIf cfg.corePkgs.enable { - modules.${user}.shell.toolset = { - bat.enable = true; - btop.enable = true; - eza.enable = true; - fzf.enable = true; - git.enable = true; - starship.enable = true; - tmux.enable = true; - yazi.enable = true; - zoxide.enable = true; - }; - - home-manager.users.${user} = { - home.packages = attrValues { - inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag; - inherit (pkgs) fd; - - rgFull = pkgs.ripgrep.override {withPCRE2 = true;}; - }; - - home.shellAliases = { - # ls = "eza -a"; - # cat = "bat -pp"; - # y = "yazi"; - # zed = "zeditor ."; - }; - - programs = { - direnv = { - enable = true; - config.global = { - load_dotenv = true; - strict_env = true; - hide_env_diff = true; - }; - nix-direnv.enable = true; - config.whitelist.prefix = ["/home"]; - }; - }; - }; - }) - ]; -} diff --git a/_modules/home/shell/toolset/bat.nix b/_modules/home/shell/toolset/bat.nix deleted file mode 100644 index a1d2177..0000000 --- a/_modules/home/shell/toolset/bat.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.bat; -in -{ - options.modules.${user}.shell.toolset.bat = { - enable = mkEnableOption "cat replacement"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ bat ]; - - programs.bat = { - enable = true; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/btop.nix b/_modules/home/shell/toolset/btop.nix deleted file mode 100644 index f4a364d..0000000 --- a/_modules/home/shell/toolset/btop.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib) mkIf mkEnableOption; - inherit (lib.strings) concatStringsSep; - - cfg = config.modules.${user}.shell.toolset.btop; -in -{ - options.modules.${user}.shell.toolset.btop = { - enable = mkEnableOption "system-monitor"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ btop ]; - - programs.btop = { - enable = true; - settings = { - force_tty = false; - vim_keys = true; # Directional keys: "h,j,k,l,g,G" - update_ms = 1500; # ms (s^{-3}) - temp_scale = "celsius"; - base_10_sizes = false; - show_cpu_freq = true; - clock_format = "%H:%M"; - background_update = true; - disks_filter = "exclude=/boot"; - - rounded_corners = true; - theme_background = false; - truecolor = true; - presets = concatStringsSep "," [ - "cpu:1:default" - "proc:0:default cpu:0:default" - "mem:0:default" - "net:0:default cpu:0:block" - "net:0:tty" - ]; - graph_symbol = "braille"; - graph_symbol_cpu = "default"; - graph_symbol_mem = "default"; - graph_symbol_net = "default"; - graph_symbol_proc = "default"; - shown_boxes = "proc cpu mem net"; - - proc_sorting = "cpu lazy"; - proc_reversed = false; - proc_tree = false; - proc_colors = true; - proc_gradient = true; - proc_per_core = true; - proc_mem_bytes = true; - proc_info_smaps = false; - proc_left = false; - - cpu_graph_upper = "total"; - cpu_graph_lower = "total"; - cpu_single_graph = false; - cpu_bottom = false; - show_uptime = true; - check_temp = true; - cpu_sensor = "Auto"; - show_coretemp = true; - cpu_core_map = ""; - custom_cpu_name = ""; - - mem_graphs = true; - mem_below_net = false; - - show_swap = true; - swap_disk = true; - show_disks = true; - only_physical = true; - use_fstab = false; # Enable -> disables `only_physical` - disk_free_priv = false; - show_io_stat = true; - - io_mode = false; - io_graph_combined = false; - io_graph_speeds = ""; - - net_download = 100; - net_upload = 100; - net_auto = true; - net_sync = false; - net_iface = "br0"; - show_battery = true; - selected_battery = "Auto"; - log_level = "DEBUG"; - }; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/eza.nix b/_modules/home/shell/toolset/eza.nix deleted file mode 100644 index 3e2da9b..0000000 --- a/_modules/home/shell/toolset/eza.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.eza; -in -{ - options.modules.${user}.shell.toolset.eza = { - enable = mkEnableOption "system-monitor"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ eza ]; - - programs.eza = { - enable = true; - icons = "auto"; - git = true; - extraOptions = [ - "--hyperlink" - "--across" - "--group-directories-first" - ]; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/fzf.nix b/_modules/home/shell/toolset/fzf.nix deleted file mode 100644 index 3e99666..0000000 --- a/_modules/home/shell/toolset/fzf.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib) mkIf mkEnableOption; - - defShell = config.modules.${user}.shell.default; -in -{ - options.modules.${user}.shell.toolset.fzf = { - enable = mkEnableOption "TUI Fuzzy Finder."; - }; - - config = mkIf config.modules.${user}.shell.toolset.fzf.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ fzf ]; - - programs.fzf = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = defShell == "zsh"; - enableFishIntegration = defShell == "fish"; - - tmux.enableShellIntegration = true; - tmux.shellIntegrationOptions = ["-d 40%"]; - - defaultCommand = "fd --type f"; - defaultOptions = ["--height 40%" "--border"]; - - changeDirWidgetCommand = "fd --type d"; - changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"]; - - fileWidgetCommand = "fd --type f"; - fileWidgetOptions = ["--preview 'head {}'"]; - historyWidgetOptions = ["--sort" "--exact"]; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/git.nix b/_modules/home/shell/toolset/git.nix deleted file mode 100644 index f40a8ce..0000000 --- a/_modules/home/shell/toolset/git.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; -in -{ - options.modules.${user}.shell.toolset.git = { - enable = mkEnableOption "version-control system"; - }; - - config = mkIf config.modules.${user}.shell.toolset.git.enable { - environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; - - home-manager.users.${user} = { - home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; - - programs = { - zsh.initContent = '' - # -------===[ Helpful Git Fn's ]===------- # - gitignore() { - curl -s -o .gitignore https://gitignore.io/api/$1 - } - ''; - - fish.functions = { - gitignore = "curl -sL https://www.gitignore.io/api/$argv"; - }; - - git = { - enable = true; - package = pkgs.gitFull; - difftastic = { - enable = true; - background = "dark"; - color = "always"; - display = "inline"; - }; - - ignores = [ - # General: - "*.bloop" - "*.bsp" - "*.metals" - "*.metals.sbt" - "*metals.sbt" - "*.direnv" - "*.envrc" - "*hie.yaml" - "*.mill-version" - "*.jvmopts" - - # OS-related: - ".DS_Store?" - ".DS_Store" - ".CFUserTextEncoding" - ".Trash" - ".Xauthority" - "thumbs.db" - "Thumbs.db" - "Icon?" - - # Compiled residues: - "*.class" - "*.exe" - "*.o" - "*.pyc" - "*.elc" - ]; - - extraConfig = { - init.defaultBranch = "main"; - core = { - editor = "nvim"; - whitespace = "trailing-space,space-before-tab"; - }; - credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; - - user = { - name = config.modules.${user}.user.full_name; - email = config.modules.${user}.user.email; - signingKey = "~/.ssh/id_rsa.pub"; - }; - - gpg.format = "ssh"; - commit.gpgSign = true; - tag.gpgSign = true; - - push = { - autoSetupRemote = true; - default = "current"; - gpgSign = "if-asked"; - autoSquash = true; - }; - pull.rebase = true; - - filter = { - required = true; - smudge = "git-lfs smudge -- %f"; - process = "git-lfs filter-process"; - clean = "git-lfs clean -- %f"; - }; - - url = { - "https://github.com/".insteadOf = "gh:"; - "git@github.com:".insteadOf = "ssh+gh:"; - }; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/starship.nix b/_modules/home/shell/toolset/starship.nix deleted file mode 100644 index f573ff1..0000000 --- a/_modules/home/shell/toolset/starship.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; -in -{ - options.modules.${user}.shell.toolset.starship = { - enable = mkEnableOption "fancy pansy shell prompt"; - }; - - config = mkIf config.modules.${user}.shell.toolset.starship.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ starship ]; - - programs.starship = { - enable = true; - settings = { - format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character"; - - username = { - format = "[$user]($style)"; - show_always = true; - }; - - hostname = { - ssh_only = false; - ssh_symbol = "🌐 "; - format = "[$hostname](bold red)"; - trim_at = ".local"; - disabled = false; - }; - - nix_shell = { - symbol = " "; - format = "[$symbol$name]($style) "; - style = "magenta bold"; - }; - - git_branch = { - only_attached = true; - format = "[$symbol$branch]($style) "; - symbol = " "; - style = "yellow bold"; - }; - - git_commit = { - tag_disabled = false; - }; - - git_state = { - style = "magenta bold"; - }; - - git_status = { - format = "[$all_status $ahead_behind]($style) "; - style = "bold green"; - conflicted = "🏳"; - up_to_date = ""; - untracked = " "; - ahead = "⇡\${count}"; - diverged = "⇕⇡\${ahead_count}⇣\${behind_count}"; - behind = "⇣\${count}"; - stashed = " "; - modified = " "; - staged = "[++\($count\)](green)"; - renamed = "襁 "; - deleted = " "; - }; - - directory = { - read_only = " 󰌾"; - }; - - cmd_duration = { - format = "[$duration]($style) "; - style = "blue"; - }; - - os = { - format = "[$symbol](bold white)"; - disabled = false; - - symbols = { - Windows = " "; - Arch = "󰣇"; - Ubuntu = ""; - Macos = "󰀵"; - Manjaro = " "; - Nobara = " "; - Unknown = "󰠥"; - }; - }; - - fill = { - symbol = " "; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/tmux.nix b/_modules/home/shell/toolset/tmux.nix deleted file mode 100644 index 137b600..0000000 --- a/_modules/home/shell/toolset/tmux.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; -in -{ - options.modules.${user}.shell.toolset.tmux = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "terminal multiplexer"; }; - - config = mkIf config.modules.${user}.shell.toolset.tmux.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ tmux ]; - - programs.tmux = { - enable = true; - secureSocket = true; - keyMode = "vi"; - prefix = "C-a"; - terminal = "tmux-256color"; - - baseIndex = 1; - clock24 = true; - disableConfirmationPrompt = true; - escapeTime = 0; - - aggressiveResize = false; - resizeAmount = 2; - reverseSplit = false; - historyLimit = 5000; - newSession = true; - - plugins = let - inherit (pkgs.tmuxPlugins) resurrect continuum; - in [ - { - plugin = resurrect; - extraConfig = "set -g @resurrect-strategy-nvim 'session'"; - } - { - plugin = continuum; - extraConfig = '' - set -g @continuum-restore 'on' - set -g @continuum-save-interval '60' # minutes - ''; - } - ]; - - extraConfig = '' - # -------===[ Color Correction ]===------- # - set-option -ga terminal-overrides ",*256col*:Tc" - set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' - set-environment -g COLORTERM "truecolor" - - # -------===[ General-Configurations ]===------- # - set-option -g renumber-windows on - set-window-option -g automatic-rename on - set-window-option -g word-separators ' @"=()[]' - - set-option -g mouse on - set-option -s focus-events on - set-option -g renumber-windows on - set-option -g allow-rename off - - # -------===[ Activity/Sound ]===------- # - set-option -g bell-action none - set-option -g visual-bell off - set-option -g visual-silence off - set-option -g visual-activity off - set-window-option -g monitor-activity off - - # -------===[ Status-Bar ]===------- # - set-option -g status on - set-option -g status-interval 1 - set-option -g status-style bg=default,bold,italics - - set-option -g status-position top - set-option -g status-justify left - - set-option -g status-left-length "40" - set-option -g status-right-length "80" - - # -------===[ Keybindings ]===------- # - bind-key c clock-mode - - # Window Control(s): - bind-key q kill-session - bind-key Q kill-server - bind-key t new-window -c '#{pane_current_path}' - - # Buffers: - bind-key b list-buffers - bind-key p paste-buffer - bind-key P choose-buffer - - # Split bindings: - bind-key - split-window -v -c '#{pane_current_path}' - bind-key / split-window -h -c '#{pane_current_path}' - - # Copy/Paste bindings: - bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection" - bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer" - bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer" - ''; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/yazi.nix b/_modules/home/shell/toolset/yazi.nix deleted file mode 100644 index 252ae8a..0000000 --- a/_modules/home/shell/toolset/yazi.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.yazi; -in -{ - options.modules.${user}.shell.toolset.yazi = { - enable = mkEnableOption "cli file browser"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ yazi ]; - - programs.yazi = { - enable = true; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/zellij.nix b/_modules/home/shell/toolset/zellij.nix deleted file mode 100644 index 01f6c8a..0000000 --- a/_modules/home/shell/toolset/zellij.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; -in -{ - options.modules.${user}.shell.toolset.zellij = { - enable = mkEnableOption "terminal multiplexer"; - }; - - config = mkIf config.modules.${user}.shell.toolset.zellij.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ zellij ]; - - programs.zellij = { - enable = true; - attachExistingSession = true; - - settings = {}; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/zoxide.nix b/_modules/home/shell/toolset/zoxide.nix deleted file mode 100644 index 2d456b8..0000000 --- a/_modules/home/shell/toolset/zoxide.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.zoxide; -in -{ - options.modules.${user}.shell.toolset.zoxide = { - enable = mkEnableOption "cd replacement"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ zoxide ]; - - programs.zoxide = { - enable = true; - }; - }; - }; -} diff --git a/_modules/home/shell/zsh.nix b/_modules/home/shell/zsh.nix deleted file mode 100644 index e6fc881..0000000 --- a/_modules/home/shell/zsh.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.shell; -in -{ - config = mkIf (cfg.default == "zsh") { - modules.shell.zsh.enable = true; - - modules.${user}.shell = { - corePkgs.enable = true; - }; - - # Enable completion for sys-packages: - environment.pathsToLink = ["/share/zsh"]; - - home-manager.users.${user} = { - # xdg.configFile."zsh-abbreviations" = { - # target = "zsh/abbreviations"; - # text = let - # abbrevs = { - # ls = "eza -al"; - # }; - # in '' - # ${concatStrings (mapAttrsToList - # (k: v: "abbr ${k}=${escapeNixString v}") - # abbrevs - # )} - # ''; - # }; - - programs = { - starship.enableZshIntegration = true; - yazi.enableZshIntegration = true; - zellij.enableZshIntegration = true; - - zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - - history = { - size = 10000; - path = "$XDG_CONFIG_HOME/zsh/history"; - }; - - oh-my-zsh = { - enable = true; - plugins = ["git" "docker-compose" "zoxide"]; - }; - - plugins = let - mkZshPlugin = { - pkg, - file ? "${pkg.pname}.plugin.zsh", - }: { - name = pkg.pname; - src = pkg.src; - inherit file; - }; - in - with pkgs; [ - (mkZshPlugin {pkg = zsh-abbr;}) - (mkZshPlugin {pkg = zsh-autopair;}) - (mkZshPlugin {pkg = zsh-you-should-use;}) - (mkZshPlugin { - pkg = zsh-nix-shell; - file = "nix-shell.plugin.zsh"; - }) - - { - name = "zsh-autosuggestion"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-autosuggestions"; - rev = "v0.7.0"; - sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98"; - }; - } - { - name = "zsh-completions"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-completions"; - rev = "0.34.0"; - sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9"; - }; - } - { - name = "zsh-syntax-highlighting"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-syntax-highlighting"; - rev = "0.7.0"; - sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r"; - }; - } - ]; - }; - }; - }; - }; -} diff --git a/_modules/system/networking/default.nix b/_modules/system/networking/default.nix deleted file mode 100644 index d8cdec7..0000000 --- a/_modules/system/networking/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, options, lib, pkgs, ... }: let - inherit (lib.modules) mkDefault; - inherit (lib.options) mkOption; - - cfg = config.modules.networking; -in { - options.modules.networking = { - wifi.backend = mkOption { - type = with lib.types; enum [ "wpa_supplicant" "iwd" ]; - default = "wpa_supplicant"; - example = "wpa_supplicant"; - description = "set the backend used for wifi wpa_supplicant by default"; - }; - }; - - config = { - systemd.services.NetworkManager-wait-online.enable = false; - - networking = { - enableIPv6 = true; - useDHCP = mkDefault true; - - firewall.enable = true; - - networkmanager = { - enable = mkDefault true; - wifi.backend = mkDefault config.modules.networking.wifi.backend; - }; - }; - }; -} diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix new file mode 100644 index 0000000..ab4f6b3 --- /dev/null +++ b/modules/home/shell/default.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption; + inherit (lib.types) nullOr enum; + + cfg = config.${namespace}.shell; +in +{ + options.${namespace}.shell = { + default = mkOption { + type = nullOr (enum ["fish" "zsh" "bash"]); + default = null; + description = "Default system shell"; + }; + + corePkgs.enable = mkEnableOption "core shell packages"; + }; + + config = mkMerge [ + (mkIf (cfg.default != null) { + users.defaultUserShell = pkgs."${cfg.default}"; + }) + + (mkIf cfg.corePkgs.enable { + ${namespace}.shell.toolset = { + bat.enable = true; + btop.enable = true; + eza.enable = true; + fzf.enable = true; + git.enable = true; + starship.enable = true; + tmux.enable = true; + yazi.enable = true; + zoxide.enable = true; + }; + + home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ]; + + programs = { + direnv = { + enable = true; + config.global = { + load_dotenv = true; + strict_env = true; + hide_env_diff = true; + }; + nix-direnv.enable = true; + config.whitelist.prefix = ["/home"]; + }; + }; + }) + ]; +} diff --git a/modules/home/shell/toolset/bat.nix b/modules/home/shell/toolset/bat.nix new file mode 100644 index 0000000..9a1d904 --- /dev/null +++ b/modules/home/shell/toolset/bat.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.bat; +in +{ + options.${namespace}.shell.toolset.bat = { + enable = mkEnableOption "cat replacement"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ bat ]; + + programs.bat = { + enable = true; + }; + }; +} diff --git a/modules/home/shell/toolset/btop.nix b/modules/home/shell/toolset/btop.nix new file mode 100644 index 0000000..ec30da6 --- /dev/null +++ b/modules/home/shell/toolset/btop.nix @@ -0,0 +1,93 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + inherit (lib.strings) concatStringsSep; + + cfg = config.${namespace}.shell.toolset.btop; +in +{ + options.${namespace}.shell.toolset.btop = { + enable = mkEnableOption "system-monitor"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ btop ]; + + programs.btop = { + enable = true; + settings = { + force_tty = false; + vim_keys = true; # Directional keys: "h,j,k,l,g,G" + update_ms = 1500; # ms (s^{-3}) + temp_scale = "celsius"; + base_10_sizes = false; + show_cpu_freq = true; + clock_format = "%H:%M"; + background_update = true; + disks_filter = "exclude=/boot"; + + rounded_corners = true; + theme_background = false; + truecolor = true; + presets = concatStringsSep "," [ + "cpu:1:default" + "proc:0:default cpu:0:default" + "mem:0:default" + "net:0:default cpu:0:block" + "net:0:tty" + ]; + graph_symbol = "braille"; + graph_symbol_cpu = "default"; + graph_symbol_mem = "default"; + graph_symbol_net = "default"; + graph_symbol_proc = "default"; + shown_boxes = "proc cpu mem net"; + + proc_sorting = "cpu lazy"; + proc_reversed = false; + proc_tree = false; + proc_colors = true; + proc_gradient = true; + proc_per_core = true; + proc_mem_bytes = true; + proc_info_smaps = false; + proc_left = false; + + cpu_graph_upper = "total"; + cpu_graph_lower = "total"; + cpu_single_graph = false; + cpu_bottom = false; + show_uptime = true; + check_temp = true; + cpu_sensor = "Auto"; + show_coretemp = true; + cpu_core_map = ""; + custom_cpu_name = ""; + + mem_graphs = true; + mem_below_net = false; + + show_swap = true; + swap_disk = true; + show_disks = true; + only_physical = true; + use_fstab = false; # Enable -> disables `only_physical` + disk_free_priv = false; + show_io_stat = true; + + io_mode = false; + io_graph_combined = false; + io_graph_speeds = ""; + + net_download = 100; + net_upload = 100; + net_auto = true; + net_sync = false; + net_iface = "br0"; + show_battery = true; + selected_battery = "Auto"; + log_level = "DEBUG"; + }; + }; + }; +} diff --git a/modules/home/shell/toolset/eza.nix b/modules/home/shell/toolset/eza.nix new file mode 100644 index 0000000..936c335 --- /dev/null +++ b/modules/home/shell/toolset/eza.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.eza; +in +{ + options.${namespace}.shell.toolset.eza = { + enable = mkEnableOption "system-monitor"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ eza ]; + + programs.eza = { + enable = true; + icons = "auto"; + git = true; + extraOptions = [ + "--hyperlink" + "--across" + "--group-directories-first" + ]; + }; + }; +} diff --git a/modules/home/shell/toolset/fzf.nix b/modules/home/shell/toolset/fzf.nix new file mode 100644 index 0000000..031e4ce --- /dev/null +++ b/modules/home/shell/toolset/fzf.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.fzf; + defShell = config.${namespace}.shell.default; +in +{ + options.${namespace}.shell.toolset.fzf = { + enable = mkEnableOption "TUI Fuzzy Finder."; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ fzf ]; + + programs.fzf = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = defShell == "zsh"; + enableFishIntegration = defShell == "fish"; + + tmux.enableShellIntegration = true; + tmux.shellIntegrationOptions = ["-d 40%"]; + + defaultCommand = "fd --type f"; + defaultOptions = ["--height 40%" "--border"]; + + changeDirWidgetCommand = "fd --type d"; + changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"]; + + fileWidgetCommand = "fd --type f"; + fileWidgetOptions = ["--preview 'head {}'"]; + historyWidgetOptions = ["--sort" "--exact"]; + }; + }; +} diff --git a/modules/home/shell/toolset/git.nix b/modules/home/shell/toolset/git.nix new file mode 100644 index 0000000..274f579 --- /dev/null +++ b/modules/home/shell/toolset/git.nix @@ -0,0 +1,111 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.shell.toolset.git; +in +{ + options.${namespace}.shell.toolset.git = { + enable = mkEnableOption "version-control system"; + }; + + config = mkIf cfg.enable { + environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; + + home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; + + programs = { + zsh.initContent = '' + # -------===[ Helpful Git Fn's ]===------- # + gitignore() { + curl -s -o .gitignore https://gitignore.io/api/$1 + } + ''; + + fish.functions = { + gitignore = "curl -sL https://www.gitignore.io/api/$argv"; + }; + + git = { + enable = true; + package = pkgs.gitFull; + difftastic = { + enable = true; + background = "dark"; + color = "always"; + display = "inline"; + }; + + ignores = [ + # General: + "*.bloop" + "*.bsp" + "*.metals" + "*.metals.sbt" + "*metals.sbt" + "*.direnv" + "*.envrc" + "*hie.yaml" + "*.mill-version" + "*.jvmopts" + + # OS-related: + ".DS_Store?" + ".DS_Store" + ".CFUserTextEncoding" + ".Trash" + ".Xauthority" + "thumbs.db" + "Thumbs.db" + "Icon?" + + # Compiled residues: + "*.class" + "*.exe" + "*.o" + "*.pyc" + "*.elc" + ]; + + extraConfig = { + init.defaultBranch = "main"; + core = { + editor = "nvim"; + whitespace = "trailing-space,space-before-tab"; + }; + credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; + + user = { + name = config.${namespace}.user.full_name; + email = config.${namespace}.user.email; + signingKey = "~/.ssh/id_rsa.pub"; + }; + + gpg.format = "ssh"; + commit.gpgSign = true; + tag.gpgSign = true; + + push = { + autoSetupRemote = true; + default = "current"; + gpgSign = "if-asked"; + autoSquash = true; + }; + pull.rebase = true; + + filter = { + required = true; + smudge = "git-lfs smudge -- %f"; + process = "git-lfs filter-process"; + clean = "git-lfs clean -- %f"; + }; + + url = { + "https://github.com/".insteadOf = "gh:"; + "git@github.com:".insteadOf = "ssh+gh:"; + }; + }; + }; + }; + }; +} diff --git a/_modules/home/shell/toolset/gnupg.nix b/modules/home/shell/toolset/gnupg.nix similarity index 73% rename from _modules/home/shell/toolset/gnupg.nix rename to modules/home/shell/toolset/gnupg.nix index 33c4765..3a69c23 100644 --- a/_modules/home/shell/toolset/gnupg.nix +++ b/modules/home/shell/toolset/gnupg.nix @@ -1,13 +1,11 @@ { config, lib, pkgs, user, ... }: let - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.${user}.shell.toolset.gnupg; + cfg = config.${namespace}.shell.toolset.gnupg; in { - options.modules.${user}.shell.toolset.gnupg = let - inherit (lib.options) mkEnableOption; - in { + options.${namespace}.shell.toolset.gnupg = { enable = mkEnableOption "cryptographic suite"; }; @@ -16,7 +14,7 @@ in environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; - home-manager.users.${user}.programs.gnupg = { + programs.gnupg = { enable = true; agent = { diff --git a/modules/home/shell/toolset/starship.nix b/modules/home/shell/toolset/starship.nix new file mode 100644 index 0000000..507d421 --- /dev/null +++ b/modules/home/shell/toolset/starship.nix @@ -0,0 +1,100 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.starship; +in +{ + options.${namespace}.shell.toolset.starship = { + enable = mkEnableOption "fancy pansy shell prompt"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ starship ]; + + programs.starship = { + enable = true; + settings = { + format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character"; + + username = { + format = "[$user]($style)"; + show_always = true; + }; + + hostname = { + ssh_only = false; + ssh_symbol = "🌐 "; + format = "[$hostname](bold red)"; + trim_at = ".local"; + disabled = false; + }; + + nix_shell = { + symbol = " "; + format = "[$symbol$name]($style) "; + style = "magenta bold"; + }; + + git_branch = { + only_attached = true; + format = "[$symbol$branch]($style) "; + symbol = " "; + style = "yellow bold"; + }; + + git_commit = { + tag_disabled = false; + }; + + git_state = { + style = "magenta bold"; + }; + + git_status = { + format = "[$all_status $ahead_behind]($style) "; + style = "bold green"; + conflicted = "🏳"; + up_to_date = ""; + untracked = " "; + ahead = "⇡\${count}"; + diverged = "⇕⇡\${ahead_count}⇣\${behind_count}"; + behind = "⇣\${count}"; + stashed = " "; + modified = " "; + staged = "[++\($count\)](green)"; + renamed = "襁 "; + deleted = " "; + }; + + directory = { + read_only = " 󰌾"; + }; + + cmd_duration = { + format = "[$duration]($style) "; + style = "blue"; + }; + + os = { + format = "[$symbol](bold white)"; + disabled = false; + + symbols = { + Windows = " "; + Arch = "󰣇"; + Ubuntu = ""; + Macos = "󰀵"; + Manjaro = " "; + Nobara = " "; + Unknown = "󰠥"; + }; + }; + + fill = { + symbol = " "; + }; + }; + }; + }; +} diff --git a/modules/home/shell/toolset/tmux.nix b/modules/home/shell/toolset/tmux.nix new file mode 100644 index 0000000..26fe163 --- /dev/null +++ b/modules/home/shell/toolset/tmux.nix @@ -0,0 +1,107 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.tmux; +in +{ + options.${namespace}.shell.toolset.tmux = { + enable = mkEnableOption "terminal multiplexer"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ tmux ]; + + programs.tmux = { + enable = true; + secureSocket = true; + keyMode = "vi"; + prefix = "C-a"; + terminal = "tmux-256color"; + + baseIndex = 1; + clock24 = true; + disableConfirmationPrompt = true; + escapeTime = 0; + + aggressiveResize = false; + resizeAmount = 2; + reverseSplit = false; + historyLimit = 5000; + newSession = true; + + plugins = let + inherit (pkgs.tmuxPlugins) resurrect continuum; + in [ + { + plugin = resurrect; + extraConfig = "set -g @resurrect-strategy-nvim 'session'"; + } + { + plugin = continuum; + extraConfig = '' + set -g @continuum-restore 'on' + set -g @continuum-save-interval '60' # minutes + ''; + } + ]; + + extraConfig = '' + # -------===[ Color Correction ]===------- # + set-option -ga terminal-overrides ",*256col*:Tc" + set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' + set-environment -g COLORTERM "truecolor" + + # -------===[ General-Configurations ]===------- # + set-option -g renumber-windows on + set-window-option -g automatic-rename on + set-window-option -g word-separators ' @"=()[]' + + set-option -g mouse on + set-option -s focus-events on + set-option -g renumber-windows on + set-option -g allow-rename off + + # -------===[ Activity/Sound ]===------- # + set-option -g bell-action none + set-option -g visual-bell off + set-option -g visual-silence off + set-option -g visual-activity off + set-window-option -g monitor-activity off + + # -------===[ Status-Bar ]===------- # + set-option -g status on + set-option -g status-interval 1 + set-option -g status-style bg=default,bold,italics + + set-option -g status-position top + set-option -g status-justify left + + set-option -g status-left-length "40" + set-option -g status-right-length "80" + + # -------===[ Keybindings ]===------- # + bind-key c clock-mode + + # Window Control(s): + bind-key q kill-session + bind-key Q kill-server + bind-key t new-window -c '#{pane_current_path}' + + # Buffers: + bind-key b list-buffers + bind-key p paste-buffer + bind-key P choose-buffer + + # Split bindings: + bind-key - split-window -v -c '#{pane_current_path}' + bind-key / split-window -h -c '#{pane_current_path}' + + # Copy/Paste bindings: + bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection" + bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer" + bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer" + ''; + }; + }; +} diff --git a/modules/home/shell/toolset/yazi.nix b/modules/home/shell/toolset/yazi.nix new file mode 100644 index 0000000..382c661 --- /dev/null +++ b/modules/home/shell/toolset/yazi.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib.${namespace}) mkIf; + inherit (lib.options) mkEnableOption; + + cfg = config.${namespace}.shell.toolset.yazi; +in +{ + options.${namespace}.shell.toolset.yazi = { + enable = mkEnableOption "cli file browser"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ yazi ]; + + programs.yazi = { + enable = true; + }; + }; +} diff --git a/modules/home/shell/toolset/zellij.nix b/modules/home/shell/toolset/zellij.nix new file mode 100644 index 0000000..da6eae5 --- /dev/null +++ b/modules/home/shell/toolset/zellij.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.zellij; +in +{ + options.${namespace}.shell.toolset.zellij = { + enable = mkEnableOption "terminal multiplexer"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ zellij ]; + + programs.zellij = { + enable = true; + attachExistingSession = true; + + settings = {}; + }; + }; +} diff --git a/modules/home/shell/toolset/zoxide.nix b/modules/home/shell/toolset/zoxide.nix new file mode 100644 index 0000000..087f216 --- /dev/null +++ b/modules/home/shell/toolset/zoxide.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.zoxide; +in +{ + options.${namespace}.shell.toolset.zoxide = { + enable = mkEnableOption "cd replacement"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ zoxide ]; + + programs.zoxide = { + enable = true; + }; + }; +} diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh.nix new file mode 100644 index 0000000..e26cd16 --- /dev/null +++ b/modules/home/shell/zsh.nix @@ -0,0 +1,91 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf; + + cfg = config.${namespace}.shell.zsh; +in +{ + options.${namespace}.shell.zsh = { + enable = mkEnableOption "enable ZSH"; + }; + + config = mkIf cfg.enable { + ${namespace}.shell = { + zsh.enable = true; + corePkgs.enable = true; + }; + + # Enable completion for sys-packages: + environment.pathsToLink = ["/share/zsh"]; + + programs = { + starship.enableZshIntegration = true; + yazi.enableZshIntegration = true; + zellij.enableZshIntegration = true; + + zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + + history = { + size = 10000; + path = "$XDG_CONFIG_HOME/zsh/history"; + }; + + oh-my-zsh = { + enable = true; + plugins = ["git" "docker-compose" "zoxide"]; + }; + + plugins = let + mkZshPlugin = { + pkg, + file ? "${pkg.pname}.plugin.zsh", + }: { + name = pkg.pname; + src = pkg.src; + inherit file; + }; + in + with pkgs; [ + (mkZshPlugin {pkg = zsh-abbr;}) + (mkZshPlugin {pkg = zsh-autopair;}) + (mkZshPlugin {pkg = zsh-you-should-use;}) + (mkZshPlugin { + pkg = zsh-nix-shell; + file = "nix-shell.plugin.zsh"; + }) + + { + name = "zsh-autosuggestion"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autosuggestions"; + rev = "v0.7.0"; + sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98"; + }; + } + { + name = "zsh-completions"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-completions"; + rev = "0.34.0"; + sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9"; + }; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.7.0"; + sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r"; + }; + } + ]; + }; + }; + }; +} diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 5c0c53c..6ff6ac7 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -25,23 +25,27 @@ in config = mkMerge [ ({ - boot.loader = { - systemd-boot.enable = false; - grub.enable = true; + boot = { + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + systemd-boot.enable = false; + grub.enable = true; - grub2-theme = { - enable = true; - theme = "vimix"; - footer = true; + grub2-theme = { + enable = true; + theme = "vimix"; + footer = true; + }; }; }; }) - (mkIf cfg.type == "bios" { + (mkIf (cfg.type == "bios") { boot.loader.grub.efiSupport = false; }) - (mkIf cfg.type == "uefi" { + (mkIf (cfg.type == "uefi") { boot.loader = { efi.canTouchEfiVariables = true; grub = { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 6efb305..42713e4 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -16,7 +16,7 @@ in }; config = mkMerge [ - (mkIf cfg.preset == "desktop" { + (mkIf (cfg.preset == "desktop") { ${namespace} = mkDefault { hardware.has = { audio = true; @@ -31,8 +31,8 @@ in }; }) - (mkIf cfg.preset == "desktop" { - "${namespace}" = mkDefault { + (mkIf (cfg.preset == "server") { + ${namespace} = mkDefault { services = { ssh.enable = true; }; diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index cca4c69..176b80f 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,5 +1,6 @@ -{ lib, config, namespace, ... }:let - inherit (lib) mkIf mkOption mkEnableOption mkMerge attrNames filterAttrs readDir; +{ lib, config, namespace, ... }: +let + inherit (lib) mkIf mkOption mkEnableOption mkMerge; inherit (lib.types) nullOr enum; cfg = config.${namespace}.desktop; @@ -7,7 +8,7 @@ in { options.${namespace}.desktop = { use = mkOption { - type = nullOr enum (attrNames (filterAttrs (n: type: type == "directory") (readDir ./.))); + type = nullOr (enum [ "plasma" "gamescope" "gnome" ]); default = null; example = "plasma"; description = "Which desktop to enable"; @@ -17,9 +18,7 @@ in }; config = mkMerge [ - (mkIf cfg.desktop != null { - "${namespace}".desktop.${cfg.use}.enable = true; - + ({ services.displayManager = { enable = true; @@ -28,5 +27,9 @@ in }; }; }) + + (mkIf (cfg.use != null) { + ${namespace}.desktop.${cfg.use}.enable = true; + }) ]; } diff --git a/modules/nixos/shells/zsh.nix b/modules/nixos/shells/zsh.nix new file mode 100644 index 0000000..b9cf75b --- /dev/null +++ b/modules/nixos/shells/zsh.nix @@ -0,0 +1,14 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.zsh; +in +{ + options.${namespace}.shell.zsh = { + enable = mkEnableOption "enable zsh shell"; + }; + + config = mkIf cfg.enable { + }; +} diff --git a/modules/nixos/system/networking.nix b/modules/nixos/system/networking.nix new file mode 100644 index 0000000..c61a81b --- /dev/null +++ b/modules/nixos/system/networking.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkDefault; + + cfg = config.${namespace}.system.networking; +in +{ + options.${namespace}.system.networking = {}; + + config = { + systemd.services.NetworkManager-wait-online.enable = false; + + networking = { + enableIPv6 = true; + useDHCP = mkDefault true; + + firewall.enable = true; + + networkmanager = { + enable = true; + wifi.backend = "wpa_supplicant"; + }; + }; + }; +} diff --git a/_modules/system/security.nix b/modules/nixos/system/security/boot.nix similarity index 70% rename from _modules/system/security.nix rename to modules/nixos/system/security/boot.nix index 734c339..ccf1f83 100644 --- a/_modules/system/security.nix +++ b/modules/nixos/system/security/boot.nix @@ -1,43 +1,12 @@ -{ inputs, pkgs, ... }: +{ config, namespace, inputs, ... }: +let + cfg = config.${namespace}.system.security.boot; +in { - imports = [ - inputs.sops-nix.nixosModules.sops - ]; + options.${namespace}.system.security.boot = {}; config = { - environment.systemPackages = with pkgs; [ - bitwarden - sops - ]; - - sops = { - defaultSopsFile = ../../secrets/secrets.yaml; - defaultSopsFormat = "yaml"; - - age.keyFile = "/home/"; - }; - - security = { - sudo.execWheelOnly = true; - acme.acceptTerms = true; - polkit.enable = true; - pam = { - u2f = { - enable = true; - settings.cue = true; - }; - }; - }; - - networking.firewall.enable = true; - programs.gnupg.agent.enable = true; - boot = { - loader.systemd-boot = { - editor = false; - configurationLimit = 50; - }; - kernelModules = [ "tcp_bbr" ]; kernel.sysctl = { ## TCP hardening @@ -74,4 +43,4 @@ }; }; }; -} +} \ No newline at end of file diff --git a/modules/nixos/system/security/default.nix b/modules/nixos/system/security/default.nix new file mode 100644 index 0000000..e168543 --- /dev/null +++ b/modules/nixos/system/security/default.nix @@ -0,0 +1,23 @@ +{ config, namespace, inputs, ... }: +let + cfg = config.${namespace}.system.security; +in +{ + options.${namespace}.system.security = {}; + + config = { + security = { + acme.acceptTerms = true; + polkit.enable = true; + + pam = { + u2f = { + enable = true; + settings.cue = true; + }; + }; + }; + + programs.gnupg.agent.enable = true; + }; +} \ No newline at end of file diff --git a/modules/nixos/system/security/sops.nix b/modules/nixos/system/security/sops.nix new file mode 100644 index 0000000..a75856d --- /dev/null +++ b/modules/nixos/system/security/sops.nix @@ -0,0 +1,22 @@ +{ pkgs, config, namespace, inputs, ... }: +let + cfg = config.${namespace}.system.security.sops; +in +{ + imports = [ + inputs.sops-nix.nixosModules.sops + ]; + + options.${namespace}.system.security.sops = {}; + + config = { + environment.systemPackages = with pkgs; [ sops ]; + + sops = { + defaultSopsFile = ../../../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + + age.keyFile = "/home/"; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/system/security/sudo.nix b/modules/nixos/system/security/sudo.nix new file mode 100644 index 0000000..6dedf50 --- /dev/null +++ b/modules/nixos/system/security/sudo.nix @@ -0,0 +1,23 @@ +{ config, namespace, ... }: +let + cfg = config.${namespace}.system.security.sudo; +in +{ + options.${namespace}.system.security.sudo = {}; + + config = { + security = { + sudo = { + enable = false; + execWheelOnly = true; + }; + + sudo-rs = { + enable = true; + extraConfig = '' + Defaults env_keep += "EDITOR PATH DISPLAY" + ''; + }; + }; + }; +} \ No newline at end of file diff --git a/_modules/system/theming.nix b/modules/nixos/theming.nix similarity index 84% rename from _modules/system/theming.nix rename to modules/nixos/theming.nix index be7b853..d7ddb8e 100644 --- a/_modules/system/theming.nix +++ b/modules/nixos/theming.nix @@ -1,16 +1,15 @@ -{ inputs, config, lib, pkgs, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib) mkIf; - inherit (lib.options) mkEnableOption; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.theming; + cfg = config.${namespace}.theming; in { imports = [ inputs.stylix.nixosModules.stylix ]; - options.modules.theming = { + options.${namespace}.theming = { enable = mkEnableOption "enable theming"; }; From 2d0b2b5070f6be4f7fbdc0fca205f5fe8ac7403b Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 11:33:23 +0200 Subject: [PATCH 05/38] more progress --- _modules/system/common/qbittorrent.nix | 144 ------ _modules/system/virtualisation/default.nix | 7 - _modules/system/virtualisation/podman.nix | 26 -- flake.lock | 426 +++++++----------- flake.nix | 12 + homes/user-configurations/chris.nix | 8 + homes/x86_64-linux/chris@manwe/default.nix | 6 +- .../toolset/{bat.nix => bat/default.nix} | 0 .../toolset/{btop.nix => btop/default.nix} | 0 .../toolset/{eza.nix => eza/default.nix} | 0 .../toolset/{fzf.nix => fzf/default.nix} | 0 .../toolset/{git.nix => git/default.nix} | 0 .../toolset/{gnupg.nix => gnugpg/default.nix} | 0 .../{starship.nix => starship/default.nix} | 0 .../toolset/{tmux.nix => tmux/default.nix} | 0 .../toolset/{yazi.nix => yazi/default.nix} | 0 .../{zellij.nix => zellij/default.nix} | 0 .../{zoxide.nix => zoxide/default.nix} | 0 .../home/themes/catppuccin-latte.jpg | Bin {_modules => modules}/home/themes/default.nix | 10 +- .../home/themes/everforest.jpg | Bin modules/nixos/default.nix | 7 +- modules/nixos/desktop/default.nix | 12 +- modules/nixos/desktop/gamescope/default.nix | 9 +- modules/nixos/desktop/gnome/default.nix | 7 +- modules/nixos/desktop/plasma/default.nix | 7 +- .../hardware/gpu/{amd.nix => amd/default.nix} | 4 +- modules/nixos/services/media/default.nix | 35 +- .../networking/{ssh.nix => ssh/default.nix} | 0 .../virtualisation/podman/default.nix | 23 + .../{theming.nix => theming/default.nix} | 0 31 files changed, 256 insertions(+), 487 deletions(-) delete mode 100644 _modules/system/common/qbittorrent.nix delete mode 100644 _modules/system/virtualisation/default.nix delete mode 100644 _modules/system/virtualisation/podman.nix rename modules/home/shell/toolset/{bat.nix => bat/default.nix} (100%) rename modules/home/shell/toolset/{btop.nix => btop/default.nix} (100%) rename modules/home/shell/toolset/{eza.nix => eza/default.nix} (100%) rename modules/home/shell/toolset/{fzf.nix => fzf/default.nix} (100%) rename modules/home/shell/toolset/{git.nix => git/default.nix} (100%) rename modules/home/shell/toolset/{gnupg.nix => gnugpg/default.nix} (100%) rename modules/home/shell/toolset/{starship.nix => starship/default.nix} (100%) rename modules/home/shell/toolset/{tmux.nix => tmux/default.nix} (100%) rename modules/home/shell/toolset/{yazi.nix => yazi/default.nix} (100%) rename modules/home/shell/toolset/{zellij.nix => zellij/default.nix} (100%) rename modules/home/shell/toolset/{zoxide.nix => zoxide/default.nix} (100%) rename {_modules => modules}/home/themes/catppuccin-latte.jpg (100%) rename {_modules => modules}/home/themes/default.nix (81%) rename {_modules => modules}/home/themes/everforest.jpg (100%) rename modules/nixos/hardware/gpu/{amd.nix => amd/default.nix} (87%) rename modules/nixos/services/networking/{ssh.nix => ssh/default.nix} (100%) create mode 100644 modules/nixos/services/virtualisation/podman/default.nix rename modules/nixos/{theming.nix => theming/default.nix} (100%) diff --git a/_modules/system/common/qbittorrent.nix b/_modules/system/common/qbittorrent.nix deleted file mode 100644 index 4176165..0000000 --- a/_modules/system/common/qbittorrent.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.qbittorrent; - UID = 888; - GID = 888; -in -{ - options.services.qbittorrent = { - enable = mkEnableOption (lib.mdDoc "qBittorrent headless"); - - dataDir = mkOption { - type = types.path; - default = "/var/lib/qbittorrent"; - description = lib.mdDoc '' - The directory where qBittorrent stores its data files. - ''; - }; - - user = mkOption { - type = types.str; - default = "qbittorrent"; - description = lib.mdDoc '' - User account under which qBittorrent runs. - ''; - }; - - group = mkOption { - type = types.str; - default = "qbittorrent"; - description = lib.mdDoc '' - Group under which qBittorrent runs. - ''; - }; - - port = mkOption { - type = types.port; - default = 8080; - description = lib.mdDoc '' - qBittorrent web UI port. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Open services.qBittorrent.port to the outside network. - ''; - }; - - package = mkOption { - type = types.package; - default = pkgs.qbittorrent-nox; - defaultText = literalExpression "pkgs.qbittorrent-nox"; - description = lib.mdDoc '' - The qbittorrent package to use. - ''; - }; - }; - - config = mkIf cfg.enable (let - configFile = pkgs.writeText "qBittorrent.conf" '' - [BitTorrent] - Session\Port=53271 - Session\SSL\Port=45846 - Session\QueueingSystemEnabled=false - Session\MaxUploads=-1 - Session\MaxUploadsPerTorrent=-1 - - [Meta] - MigrationVersion=8 - - [Network] - Cookies=@Invalid() - - [Preferences] - WebUI\Port=5000 - WebUI\Username=admin - WebUI\Password_PBKDF2="@ByteArray(Clgb2+ZyS3PDRVqtYpj0Ow==:kjN301CJife6g5ou8N2mk6ydQWPQIGgrTAWg5ByWCqAv0jDLphR/IaVQ1tu9KtA+il1udi48xSXZ3AUpjK/fRw==)" - - [RSS] - AutoDownloader\DownloadRepacks=true - AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})" - ''; - in { - networking.firewall = mkIf cfg.openFirewall { - allowedTCPPorts = [ cfg.port ]; - }; - - systemd.tmpfiles.rules = [ - # https://www.mankier.com/5/tmpfiles.d - "d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.dataDir}/__config' 0700 ${cfg.user} ${cfg.group} - -" - "L+ '${cfg.dataDir}/__config/qBittorrent.conf' - - - - ${configFile}" - ]; - - systemd.services.qbittorrent = { - description = "qBittorrent-nox service"; - documentation = [ "man:qbittorrent-nox(1)" ]; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - Type = "simple"; - User = cfg.user; - Group = cfg.group; - - ExecStartPre = let - preStartScript = pkgs.writeScript "qbittorrent-run-prestart" '' - #!${pkgs.bash}/bin/bash - - # Create data directory if it doesn't exist - if ! test -d "$QBT_PROFILE"; then - echo "Creating initial qBittorrent data directory in: $QBT_PROFILE" - install -d -m 0755 -o "${cfg.user}" -g "${cfg.group}" "$QBT_PROFILE" - fi - ''; - in - "!${preStartScript}"; - - ExecStart = "${cfg.package}/bin/qbittorrent-nox"; - }; - - environment = { - QBT_PROFILE = cfg.dataDir; - QBT_WEBUI_PORT = toString cfg.port; - }; - }; - - users.users = mkIf (cfg.user == "qbittorrent") { - qbittorrent = { - group = cfg.group; - uid = UID; - }; - }; - - users.groups = mkIf (cfg.group == "qbittorrent") { - qbittorrent = { gid = GID; }; - }; - }); -} diff --git a/_modules/system/virtualisation/default.nix b/_modules/system/virtualisation/default.nix deleted file mode 100644 index 3bcff9f..0000000 --- a/_modules/system/virtualisation/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, options, lib, pkgs, ... }: -let - inherit (lib) mkIf mkEnableOption; -in -{ - options.modules.virtualisation = {}; -} diff --git a/_modules/system/virtualisation/podman.nix b/_modules/system/virtualisation/podman.nix deleted file mode 100644 index dd455ff..0000000 --- a/_modules/system/virtualisation/podman.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, options, lib, pkgs, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.virtualisation.podman; -in -{ - options.modules.virtualisation.podman = let - inherit (lib.options) mkEnableOption; - in - { - enable = mkEnableOption "enable podman"; - }; - - config = mkIf config.modules.virtualisation.podman.enable { - virtualisation = { - containers.enable = true; - - podman = { - enable = true; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; - }; - }; - }; -} diff --git a/flake.lock b/flake.lock index 1c8b5cb..a7d81dc 100644 --- a/flake.lock +++ b/flake.lock @@ -73,11 +73,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1749911151, - "narHash": "sha256-nQ+bDURW2sP3DdEPw5X0UsaHArDgzH2+gHdJAolurXU=", + "lastModified": 1753276606, + "narHash": "sha256-2N6MlBOBv2bDfo0Pg18j3a81HZq72uO+rvZsGK1eW/4=", "owner": "emmanuelrosa", "repo": "erosanix", - "rev": "2d1aef5159a5a67a14ae5903a6b5aa21af69faee", + "rev": "aac9ef558a5b8008a24c611d96455ed0cd1d3b16", "type": "github" }, "original": { @@ -94,11 +94,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1750487788, - "narHash": "sha256-79O83W9osY3wyvxZHqL0gw85tcACSX0TU5en3+dky/0=", + "lastModified": 1753339339, + "narHash": "sha256-r9Frae3VnbgKrWWQcV6WEykm6PxfPHVrxdOqgyt1VcU=", "owner": "nix-community", "repo": "fenix", - "rev": "933bc78d45abaf764dbfe0fd117be981631f3e9a", + "rev": "af1c3d7dd242ebf50ac75665d5c44af79730b491", "type": "github" }, "original": { @@ -114,11 +114,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1750004387, - "narHash": "sha256-5NhN7NYyPI4q9hZhrVV3jN5Y/stVePUihGlclPT1K8c=", + "lastModified": 1753320535, + "narHash": "sha256-UCz4mALWiiZPa7Chid72Na7KSH+GdUDQ/O673luMD4w=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "dd885d03a55568a59a9c2874c3b03098c078d9eb", + "rev": "b7b4baa6e76170b767d34a4461210842ba7f6068", "type": "github" }, "original": { @@ -191,6 +191,22 @@ } }, "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1650374568, @@ -206,31 +222,19 @@ "type": "github" } }, - "flake-compat_5": { - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "nvf", + "nixpkgs" + ] }, "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "lastModified": 1753121425, + "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", "type": "github" }, "original": { @@ -247,11 +251,11 @@ ] }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -335,7 +339,10 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": [ + "nvf", + "systems" + ] }, "locked": { "lastModified": 1731533236, @@ -353,7 +360,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1694529238, @@ -403,71 +410,41 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { - "lastModified": 1744584021, - "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", "type": "github" }, "original": { "owner": "GNOME", - "ref": "48.1", + "ref": "48.2", "repo": "gnome-shell", "type": "github" } }, + "grub2-themes": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1753279958, + "narHash": "sha256-EJ1udnwKYgWeAJzncAccbLPtbSWiuIANryXTGI9nY6w=", + "owner": "vinceliuice", + "repo": "grub2-themes", + "rev": "6c26f99622cb1c705b3fe2dbe1eb88521096b25a", + "type": "github" + }, + "original": { + "owner": "vinceliuice", + "repo": "grub2-themes", + "type": "github" + } + }, "himmelblau": { "inputs": { "flake-utils": "flake-utils_2", @@ -476,11 +453,11 @@ ] }, "locked": { - "lastModified": 1750450607, - "narHash": "sha256-z+sZbYISN46VKCawV8iBuwE3Cw6DoSZd5KXYrxBYbF0=", + "lastModified": 1753194162, + "narHash": "sha256-N+RdYwyw342DMd1Bo2t9OZCt4s2Qzki6nliBLHaPLNM=", "owner": "himmelblau-idm", "repo": "himmelblau", - "rev": "5dc066cc063ea857f8c8b3dc524c83eb09dc0548", + "rev": "a0bafb7cfe6be4ae7863d01b451600dc4cd7181b", "type": "github" }, "original": { @@ -497,32 +474,11 @@ ] }, "locked": { - "lastModified": 1750304462, - "narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=", + "lastModified": 1753294394, + "narHash": "sha256-1Dfgq09lHZ8AdYB2Deu/mYP1pMNpob8CgqT5Mzo44eI=", "owner": "nix-community", "repo": "home-manager", - "rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748737919, - "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "5675a9686851d9626560052a032c4e14e533c1fa", + "rev": "1fde6fb1be6cd5dc513dc1c287d69e4eb2de973e", "type": "github" }, "original": { @@ -539,11 +495,11 @@ ] }, "locked": { - "lastModified": 1750403547, - "narHash": "sha256-XDDINMbHTtKQeSRpX5mwq20z23Wg/I/G4JUinA3V8Xg=", + "lastModified": 1753333833, + "narHash": "sha256-S5RHVk+6PMwThIJY2mSbeoWTY1JrBSy1v1E1LDOFQW8=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "52b86b86d925ec00c836ecc6d36f9c947bb15736", + "rev": "e462677116c12bf23bd681a6a87dc7f98e689adf", "type": "github" }, "original": { @@ -558,11 +514,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1749989692, - "narHash": "sha256-ojISk2CXljR3qIgwgZh4iNzP3W2H3zGH49xWTJARkoM=", + "lastModified": 1753013761, + "narHash": "sha256-ggvjKAeIsjwdu6+ECBGieyBgtotD7BrsGX5BirCacYU=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "cae85629e70ce05b968757f3af8f2f2b3923d080", + "rev": "f7c04e5ad6aa43a0f9698edb0d74b44e88ee99ee", "type": "github" }, "original": { @@ -586,27 +542,6 @@ "type": "github" } }, - "nil": { - "inputs": { - "nixpkgs": [ - "nvf", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1750047244, - "narHash": "sha256-vluLARrk4485npdyHOj8XKr0yk6H22pNf+KVRNL+i/Y=", - "owner": "oxalica", - "repo": "nil", - "rev": "870a4b1b5f12004832206703ac15aa85c42c247b", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "nil", - "type": "github" - } - }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -633,14 +568,14 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1750471420, - "narHash": "sha256-NdmGCaMJH1OxOpscofZ61aqzHfVf8pMXtl9XFO/1T0k=", + "lastModified": 1753237324, + "narHash": "sha256-iXvv/VYLMyAoaTadYrX0PGwd6N2wVX337Os6k8TAlF4=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "c2cda7b9a94779abe0632ac5b64207df002fea40", + "rev": "64ca2cbbf9c65dd3bd98192d74872a80e8dcb871", "type": "github" }, "original": { @@ -666,11 +601,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748359502, - "narHash": "sha256-nnY29OR2nFG9NxF0eN0XemmJx8bpMdoRwvQt8PnI0Uw=", + "lastModified": 1751186460, + "narHash": "sha256-tSnI50oYaXOi/SFUmJC+gZ2xE9pAhTnV0D2/3JoKL7g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "502151620cdde8fda50f1f05706caae833379754", + "rev": "dd5540905b1a13176efa13fa2f8dac776bcb275a", "type": "github" }, "original": { @@ -682,11 +617,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1749950217, - "narHash": "sha256-qXoEFKOnznVvMAKezJhSXzRKsJ/LHLRY8NCw1mGhwrU=", + "lastModified": 1752974445, + "narHash": "sha256-jj/HBJFSapTk4LfeJgNLk2wEE2BO6dgBYVRbXMNOCeM=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "753176a8605439613fc6dc9911267b9f720a2615", + "rev": "9100109c11b6b5482ea949c980b86e24740dca08", "type": "github" }, "original": { @@ -695,28 +630,29 @@ "type": "github" } }, - "nixpkgs-lib_2": { + "nixpkgs_10": { "locked": { - "lastModified": 1748740939, - "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1749896453, - "narHash": "sha256-6+AmSZBogyr1zbVc2k4IBcmY/Yt39mC4+cfZi0n/AAA=", + "lastModified": 1753290466, + "narHash": "sha256-Df8wnrToZpzjqFJWhvaUUvwypj1bKM3JY6zSskwETmc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ba48a1f6ce571455cb631dee840c6cd401ea4adb", + "rev": "1744f3daf87f5bb4b2b08f6298a55b6a88ea8308", "type": "github" }, "original": { @@ -743,6 +679,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1753346648, + "narHash": "sha256-n/eFKkfFh/V3S9tCTL0ulljtcczTCfuh5P5g55Jx6bM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8cf96bf5c3356ee5867dd2a2cd771709db9848b2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1748929857, "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", @@ -758,13 +710,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1750365781, - "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", + "lastModified": 1753250450, + "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", + "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf", "type": "github" }, "original": { @@ -774,13 +726,13 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { - "lastModified": 1750215678, - "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=", + "lastModified": 1752997324, + "narHash": "sha256-vtTM4oDke3SeDj+1ey6DjmzXdq8ZZSCLWSaApADDvIE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192", + "rev": "7c688a0875df5a8c28a53fb55ae45e94eae0dddb", "type": "github" }, "original": { @@ -790,7 +742,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -806,33 +758,17 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1748460289, - "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_9": { "locked": { - "lastModified": 1727348695, - "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", - "owner": "nixos", + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -847,15 +783,14 @@ "nixpkgs": [ "stylix", "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1748730660, - "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=", + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", "owner": "nix-community", "repo": "NUR", - "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", "type": "github" }, "original": { @@ -866,19 +801,19 @@ }, "nvf": { "inputs": { + "flake-compat": "flake-compat_4", "flake-parts": "flake-parts", "flake-utils": "flake-utils_4", "mnw": "mnw", - "nil": "nil", - "nixpkgs": "nixpkgs_6", - "systems": "systems_5" + "nixpkgs": "nixpkgs_7", + "systems": "systems_4" }, "locked": { - "lastModified": 1750441488, - "narHash": "sha256-JuFBp2xM4JD/XGb69dTSDOdGbUD0fVHlgY9X9GHGTFE=", + "lastModified": 1753181140, + "narHash": "sha256-daKfPQnipcRnKnXknDzv+fzNKeEY3r/10y8YMVQ10vU=", "owner": "notashelf", "repo": "nvf", - "rev": "18c17b7b8dbf6e0f10e3eb5f1fa5341a9175a3b1", + "rev": "8fbecab446afe3454ecce6a4b817ec4f123a4a34", "type": "github" }, "original": { @@ -916,12 +851,13 @@ "fenix": "fenix", "firefox": "firefox", "flux": "flux", + "grub2-themes": "grub2-themes", "himmelblau": "himmelblau", "home-manager": "home-manager", "jovian": "jovian", "nix-minecraft": "nix-minecraft", "nixos-boot": "nixos-boot", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "nvf": "nvf", "plasma-manager": "plasma-manager", "snowfall-lib": "snowfall-lib", @@ -933,11 +869,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1750405264, - "narHash": "sha256-EMFKnO+J3dZOa9J+uiKZgHYgzALv9dqxY7NHV0DbO/U=", + "lastModified": 1753282007, + "narHash": "sha256-PgTUdSShfGVqZtDJk5noAB1rKdD/MeZ1zq4jY8n9p3c=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "b0552d779f7137c76f109666ce0ad28395c0e582", + "rev": "b5b10fb10facef4d18b4cae8ef22e640ca601255", "type": "github" }, "original": { @@ -949,7 +885,7 @@ }, "snowfall-lib": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-utils-plus": "flake-utils-plus", "nixpkgs": [ "nixpkgs" @@ -971,14 +907,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1750119275, - "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=", + "lastModified": 1752544651, + "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2", + "rev": "2c8def626f54708a9c38a5861866660395bb3461", "type": "github" }, "original": { @@ -994,14 +930,11 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_5", "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nur": "nur", - "systems": "systems_7", + "systems": "systems_6", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1009,11 +942,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1750527172, - "narHash": "sha256-ATl7gK98w27JaXzidK48YlG4o+mtfvyHu9zKuadE6j0=", + "lastModified": 1753296482, + "narHash": "sha256-VPLaHVhU6/CwnMHTjhf6945qyrXEcpjxKfpWqQXtnxI=", "owner": "danth", "repo": "stylix", - "rev": "27721407de0615e927c84f7c23277628e1d12b67", + "rev": "fbe1dab7783a3d579dc57be8ceee148104e0930b", "type": "github" }, "original": { @@ -1112,21 +1045,6 @@ "type": "github" } }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1163,11 +1081,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1748180480, - "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -1179,11 +1097,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1748740859, - "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -1195,11 +1113,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -1208,31 +1126,9 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "stylix", - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1727721329, diff --git a/flake.nix b/flake.nix index 5abe818..194c538 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,10 @@ url = "github:Jovian-Experiments/Jovian-NixOS"; inputs.nixpkgs.follows = "nixpkgs"; }; + + grub2-themes = { + url = "github:vinceliuice/grub2-themes"; + }; }; outputs = inputs: inputs.snowfall-lib.mkFlake { @@ -60,6 +64,10 @@ channels-config = { allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; }; snowfall = { @@ -76,5 +84,9 @@ nix-minecraft.overlay flux.overlays.default ]; + + homes.modules = with inputs; [ + plasma-manager.homeManagerModules.plasma-manager + ]; }; } diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix index bd48767..3a321e1 100644 --- a/homes/user-configurations/chris.nix +++ b/homes/user-configurations/chris.nix @@ -3,4 +3,12 @@ userName = "Chris Kruining"; userEmail = "chris@kruining.eu"; }; + + sneeuwvlok = { + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + }; } \ No newline at end of file diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index a5a09f3..530ea5f 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -1,8 +1,4 @@ { ... }: { - sneeuwvlok = { - series = { - media.enable = true; - }; - }; + sneeuwvlok = {}; } diff --git a/modules/home/shell/toolset/bat.nix b/modules/home/shell/toolset/bat/default.nix similarity index 100% rename from modules/home/shell/toolset/bat.nix rename to modules/home/shell/toolset/bat/default.nix diff --git a/modules/home/shell/toolset/btop.nix b/modules/home/shell/toolset/btop/default.nix similarity index 100% rename from modules/home/shell/toolset/btop.nix rename to modules/home/shell/toolset/btop/default.nix diff --git a/modules/home/shell/toolset/eza.nix b/modules/home/shell/toolset/eza/default.nix similarity index 100% rename from modules/home/shell/toolset/eza.nix rename to modules/home/shell/toolset/eza/default.nix diff --git a/modules/home/shell/toolset/fzf.nix b/modules/home/shell/toolset/fzf/default.nix similarity index 100% rename from modules/home/shell/toolset/fzf.nix rename to modules/home/shell/toolset/fzf/default.nix diff --git a/modules/home/shell/toolset/git.nix b/modules/home/shell/toolset/git/default.nix similarity index 100% rename from modules/home/shell/toolset/git.nix rename to modules/home/shell/toolset/git/default.nix diff --git a/modules/home/shell/toolset/gnupg.nix b/modules/home/shell/toolset/gnugpg/default.nix similarity index 100% rename from modules/home/shell/toolset/gnupg.nix rename to modules/home/shell/toolset/gnugpg/default.nix diff --git a/modules/home/shell/toolset/starship.nix b/modules/home/shell/toolset/starship/default.nix similarity index 100% rename from modules/home/shell/toolset/starship.nix rename to modules/home/shell/toolset/starship/default.nix diff --git a/modules/home/shell/toolset/tmux.nix b/modules/home/shell/toolset/tmux/default.nix similarity index 100% rename from modules/home/shell/toolset/tmux.nix rename to modules/home/shell/toolset/tmux/default.nix diff --git a/modules/home/shell/toolset/yazi.nix b/modules/home/shell/toolset/yazi/default.nix similarity index 100% rename from modules/home/shell/toolset/yazi.nix rename to modules/home/shell/toolset/yazi/default.nix diff --git a/modules/home/shell/toolset/zellij.nix b/modules/home/shell/toolset/zellij/default.nix similarity index 100% rename from modules/home/shell/toolset/zellij.nix rename to modules/home/shell/toolset/zellij/default.nix diff --git a/modules/home/shell/toolset/zoxide.nix b/modules/home/shell/toolset/zoxide/default.nix similarity index 100% rename from modules/home/shell/toolset/zoxide.nix rename to modules/home/shell/toolset/zoxide/default.nix diff --git a/_modules/home/themes/catppuccin-latte.jpg b/modules/home/themes/catppuccin-latte.jpg similarity index 100% rename from _modules/home/themes/catppuccin-latte.jpg rename to modules/home/themes/catppuccin-latte.jpg diff --git a/_modules/home/themes/default.nix b/modules/home/themes/default.nix similarity index 81% rename from _modules/home/themes/default.nix rename to modules/home/themes/default.nix index 3e26492..8acf633 100644 --- a/_modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -1,12 +1,12 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkDefault; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) nullOr enum; - cfg = config.modules.${user}.themes; + cfg = config.${namespace}.themes; in { - options.modules.${user}.themes = { + options.${namespace}.themes = { enable = mkEnableOption "Theming (Stylix)"; theme = mkOption { @@ -23,8 +23,8 @@ in { }; }; - config = mkIf (cfg.enable) { - modules.theming.enable = true; + config = mkIf cfg.enable { + ${namespace}.theming.enable = true; stylix = { base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; diff --git a/_modules/home/themes/everforest.jpg b/modules/home/themes/everforest.jpg similarity index 100% rename from _modules/home/themes/everforest.jpg rename to modules/home/themes/everforest.jpg diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 42713e4..46a454b 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -8,7 +8,7 @@ in { options.${namespace} = { preset = mkOption { - type = nullOr enum [ "server" "desktop" ]; + type = nullOr (enum [ "server" "desktop" ]); default = null; example = "desktop"; description = "Which defaults profile to start with"; @@ -27,14 +27,15 @@ in animated = true; }; - desktop.use = "kde"; + desktop.use = "plasma"; + theming.enable = true; }; }) (mkIf (cfg.preset == "server") { ${namespace} = mkDefault { services = { - ssh.enable = true; + networking.ssh.enable = true; }; }; }) diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 176b80f..f38a28e 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,4 +1,4 @@ -{ lib, config, namespace, ... }: +{ lib, config, namespace, inputs, ... }: let inherit (lib) mkIf mkOption mkEnableOption mkMerge; inherit (lib.types) nullOr enum; @@ -6,6 +6,10 @@ let cfg = config.${namespace}.desktop; in { + imports = [ + inputs.grub2-themes.nixosModules.default + ]; + options.${namespace}.desktop = { use = mkOption { type = nullOr (enum [ "plasma" "gamescope" "gnome" ]); @@ -28,8 +32,8 @@ in }; }) - (mkIf (cfg.use != null) { - ${namespace}.desktop.${cfg.use}.enable = true; - }) + # (mkIf (cfg.use != null) { + # ${namespace}.desktop.${cfg.use}.enable = true; + # }) ]; } diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix index f125292..92d4e96 100644 --- a/modules/nixos/desktop/gamescope/default.nix +++ b/modules/nixos/desktop/gamescope/default.nix @@ -1,4 +1,5 @@ -{ lib, config, namespace, inputs, ... }:let +{ lib, config, namespace, inputs, ... }: +let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gamescope; @@ -7,11 +8,13 @@ in imports = [ inputs.jovian.nixosModules.default ]; options.${namespace}.desktop.gamescope = { - enable = mkEnableOption "Enable Steamdeck ui"; + enable = mkEnableOption "Enable Steamdeck ui" // { + default = (config.${namespace}.desktop.use == "gamescope"); + }; }; config = mkIf cfg.enable { - "${namespace}".desktop.kde.enable = true; + ${namespace}.desktop.plasma.enable = true; jovian = { steam = { diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix index 126d384..979587f 100644 --- a/modules/nixos/desktop/gnome/default.nix +++ b/modules/nixos/desktop/gnome/default.nix @@ -1,11 +1,14 @@ -{ lib, config, namespace, ... }:let +{ lib, config, namespace, ... }: +let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gnome; in { options.${namespace}.desktop.gnome = { - enable = mkEnableOption "Enable Gnome"; + enable = mkEnableOption "Enable Gnome" // { + default = (config.${namespace}.desktop.use == "gnome"); + }; }; config = mkIf cfg.enable { diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix index 8be91ec..11c0cd9 100644 --- a/modules/nixos/desktop/plasma/default.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -1,11 +1,14 @@ -{ pkgs, lib, config, namespace, ... }:let +{ pkgs, lib, config, namespace, ... }: +let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.plasma; in { options.${namespace}.desktop.plasma = { - enable = mkEnableOption "Enable KDE Plasma"; + enable = mkEnableOption "Enable KDE Plasma" // { + default = (config.${namespace}.desktop.use == "plasma"); + }; }; config = mkIf cfg.enable { diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd/default.nix similarity index 87% rename from modules/nixos/hardware/gpu/amd.nix rename to modules/nixos/hardware/gpu/amd/default.nix index c47191c..68db574 100644 --- a/modules/nixos/hardware/gpu/amd.nix +++ b/modules/nixos/hardware/gpu/amd/default.nix @@ -2,12 +2,12 @@ let inherit (lib) mkIf mkEnableOption; - cfg = config.${namespace}.hardware.has.gpu.amd; + cfg = config.${namespace}.hardware.has.gpu; in { options.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; - config = mkIf cfg { + config = mkIf cfg.amd { services.xserver.videoDrivers = [ "amd" ]; hardware = { diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix index 4827114..7d76794 100644 --- a/modules/nixos/services/media/default.nix +++ b/modules/nixos/services/media/default.nix @@ -40,12 +40,6 @@ in yt-dlp ]; - # need to permit these outdated packages until servarr finally upgrades at some point... - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - #========================================================================= # Prepare system #========================================================================= @@ -58,14 +52,14 @@ in }; systemd.tmpfiles.rules = [ - "d '${cfg.directory}/series' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/movies' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/music' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/series' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/movies' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/music' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -" ]; #========================================================================= @@ -98,8 +92,11 @@ in qbittorrent = { enable = true; openFirewall = true; - dataDir = "${cfg.directory}/qbittorrent"; - port = 5000; + webuiPort = 5000; + + serverConfig = { + LegalNotice.Accepted = true; + }; user = cfg.user; group = cfg.group; @@ -108,7 +105,7 @@ in sabnzbd = { enable = true; openFirewall = true; - configFile = "${cfg.directory}/sabnzbd/config.ini"; + configFile = "${cfg.path}/sabnzbd/config.ini"; user = cfg.user; group = cfg.group; @@ -131,7 +128,7 @@ in systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL"; - modules.virtualisation.podman.enable = true; + ${namespace}.services.virtualisation.podman.enable = true; virtualisation = { oci-containers = { @@ -148,7 +145,7 @@ in image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; autoStart = true; ports = [ "127.0.0.1:9494:9494" ]; - volumes = [ "${cfg.directory}/reiverr/config:/config" ]; + volumes = [ "${cfg.path}/reiverr/config:/config" ]; }; }; }; diff --git a/modules/nixos/services/networking/ssh.nix b/modules/nixos/services/networking/ssh/default.nix similarity index 100% rename from modules/nixos/services/networking/ssh.nix rename to modules/nixos/services/networking/ssh/default.nix diff --git a/modules/nixos/services/virtualisation/podman/default.nix b/modules/nixos/services/virtualisation/podman/default.nix new file mode 100644 index 0000000..9b9dc89 --- /dev/null +++ b/modules/nixos/services/virtualisation/podman/default.nix @@ -0,0 +1,23 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.services.virtualisation.podman; +in +{ + options.${namespace}.services.virtualisation.podman = { + enable = mkEnableOption "enable podman"; + }; + + config = mkIf cfg.enable { + virtualisation = { + containers.enable = true; + + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; + }; +} diff --git a/modules/nixos/theming.nix b/modules/nixos/theming/default.nix similarity index 100% rename from modules/nixos/theming.nix rename to modules/nixos/theming/default.nix From b8e4a0a8bc857123022fff0d2c4b34efc114ea63 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 16:02:25 +0200 Subject: [PATCH 06/38] you know the drill at this point --- _modules/home/desktop/plasma.nix | 286 ------------------ flake.nix | 8 +- homes/user-configurations/chris.nix | 5 + modules/home/desktop/plasma/default.nix | 3 + modules/home/desktop/plasma/panels.nix | 219 +++++++------- modules/home/desktop/plasma/power.nix | 65 ++-- modules/home/shell/default.nix | 19 +- modules/home/shell/toolset/bat/default.nix | 2 +- modules/home/shell/toolset/btop/default.nix | 2 +- modules/home/shell/toolset/eza/default.nix | 2 +- modules/home/shell/toolset/fzf/default.nix | 2 +- modules/home/shell/toolset/git/default.nix | 4 +- modules/home/shell/toolset/gnugpg/default.nix | 38 +-- .../home/shell/toolset/starship/default.nix | 2 +- modules/home/shell/toolset/tmux/default.nix | 2 +- modules/home/shell/toolset/yazi/default.nix | 5 +- modules/home/shell/toolset/zellij/default.nix | 2 +- modules/home/shell/toolset/zoxide/default.nix | 2 +- .../home/shell/{zsh.nix => zsh/default.nix} | 12 +- modules/home/themes/default.nix | 6 +- modules/nixos/default.nix | 43 --- modules/nixos/shells/default.nix | 2 + .../nixos/shells/{zsh.nix => zsh/default.nix} | 2 + modules/nixos/theming/default.nix | 4 +- systems/x86_64-linux/manwe/default.nix | 11 +- systems/x86_64-linux/tulkas/default.nix | 13 +- systems/x86_64-linux/ulmo/default.nix | 21 +- 27 files changed, 227 insertions(+), 555 deletions(-) delete mode 100644 _modules/home/desktop/plasma.nix rename modules/home/shell/{zsh.nix => zsh/default.nix} (91%) delete mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/shells/default.nix rename modules/nixos/shells/{zsh.nix => zsh/default.nix} (74%) diff --git a/_modules/home/desktop/plasma.nix b/_modules/home/desktop/plasma.nix deleted file mode 100644 index c7ee813..0000000 --- a/_modules/home/desktop/plasma.nix +++ /dev/null @@ -1,286 +0,0 @@ -{ inputs, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.plasma; -in -{ - options.modules.${user}.desktop.plasma = let - inherit (lib.options) mkEnableOption mkOption; - in { - enable = mkEnableOption "plasma 6"; - - autoLogin = mkOption { - type = lib.types.bool; - default = false; - example = true; - description = "Enable plasma's auto login feature."; - }; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs.kdePackages; [ - kcoreaddons - ]; - - environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ]; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - services = { - xserver.enable = true; - - desktopManager.plasma6.enable = true; - - displayManager = { - defaultSession = "plasma"; - sddm = { - enable = true; - wayland.enable = true; - }; - autoLogin = mkIf cfg.autoLogin { - enable = true; - inherit user; - }; - }; - }; - - # should enable theme integration with gtk apps (i.e. firefox, thunderbird) - programs.dconf.enable = true; - - home-manager = { - sharedModules = [ - inputs.plasma-manager.homeManagerModules.plasma-manager - ]; - - users.${user}.programs.plasma = { - enable = true; - immutableByDefault = true; - windows.allowWindowsToRememberPositions = true; - - session = { - general.askForConfirmationOnLogout = false; - sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; - }; - - workspace = { - clickItemTo = "select"; - colorScheme = "EverforestDark"; - wallpaper = config.stylix.image; - }; - - spectacle.shortcuts = { - captureRectangularRegion = "Meta+Shift+S"; - }; - - kwin = { - edgeBarrier = 0; - cornerBarrier = false; - - effects = { - translucency.enable = true; - - blur = { - enable = true; - strength = 5; - noiseStrength = 5; - }; - - snapHelper.enable = true; - }; - }; - - panels = [ - # Windows-like panel at the bottom - { - location = "bottom"; - floating = true; - lengthMode = "fill"; - height = 42; - hiding = "none"; - screen = "all"; - widgets = [ - { - panelSpacer = { - expanding = true; - }; - } - { - kickoff = { - applicationsDisplayMode = "list"; - compactDisplayStyle = false; - favoritesDisplayMode = "grid"; - sortAlphabetically = true; - showButtonsFor = { - custom = [ - "shutdown" - "reboot" - "logout" - "lock-screen" - ]; - }; - showActionButtonCaptions = true; - }; - } - # { - # appMenu = { - # compactView = false; - # }; - # } - { - iconTasks = { - appearance = { - fill = false; - highlightWindows = true; - iconSpacing = "medium"; - indicateAudioStreams = true; - rows = { - multirowView = "never"; - maximum = null; - }; - showTooltips = true; - }; - behavior = { - grouping = { - clickAction = "showPresentWindowsEffect"; - method = "byProgramName"; - }; - minimizeActiveTaskOnClick = true; - newTasksAppearOn = "right"; - showTasks = { - onlyInCurrentActivity = true; - onlyInCurrentDesktop = true; - onlyMinimized = false; - onlyInCurrentScreen = false; - }; - sortingMethod = "manually"; - unhideOnAttentionNeeded = true; - wheel = { - ignoreMinimizedTasks = true; - switchBetweenTasks = true; - }; - }; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "preferred://terminalemulator" - "preferred://email" - "applications:zededitor.desktop" - "applications:vesktop.desktop" - "applications:steam.desktop" - ]; - }; - } - { - panelSpacer = { - expanding = true; - }; - } - { - systemTray = { - icons = { - scaleToFit = true; - spacing = "small"; - }; - items = { - hidden = [ - "org.kde.plasma.brightness" - ]; - }; - pin = false; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "shortDate"; - position = "belowTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - }; - } - ]; - } - ]; - - powerdevil = { - AC = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - battery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - lowBattery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - }; - - kscreenlocker = { - autoLock = false; - lockOnResume = false; - lockOnStartup = false; - - appearance = { - alwaysShowClock = true; - showMediaControls = true; - }; - }; - - configFile = { - baloofilerc = { - - }; - kdeglobals = { - General = { - # enable font antialiasing - XftAntialias = true; - XftHintStyle = "hintslight"; - XftSubPixel = "rgb"; - }; - }; - kwalletrc = { - Wallet.Enabled = false; - }; - plasmarc = { - General = { - RaiseMaximumVolume = true; - VolumeStep = 2; - }; - }; - kcminputrc = { - Keyboard.NumLock.value = 0; - }; - }; - }; - }; - }; -} diff --git a/flake.nix b/flake.nix index 194c538..c1408a5 100644 --- a/flake.nix +++ b/flake.nix @@ -20,13 +20,15 @@ inputs.home-manager.follows = "home-manager"; }; + # neovim nvf.url = "github:notashelf/nvf"; + # plymouth theme nixos-boot.url = "github:Melkor333/nixos-boot"; firefox.url = "github:nix-community/flake-firefox-nightly"; - stylix.url = "github:danth/stylix"; + stylix.url = "github:nix-community/stylix"; fenix = { url = "github:nix-community/fenix"; @@ -42,12 +44,14 @@ sops-nix.url = "github:Mic92/sops-nix"; himmelblau = { - url = "github:himmelblau-idm/himmelblau/main"; + url = "github:himmelblau-idm/himmelblau"; inputs.nixpkgs.follows = "nixpkgs"; }; + # windows app utilities erosanix.url = "github:emmanuelrosa/erosanix"; + # Steam deck stuff jovian = { url = "github:Jovian-Experiments/Jovian-NixOS"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix index 3a321e1..26a170b 100644 --- a/homes/user-configurations/chris.nix +++ b/homes/user-configurations/chris.nix @@ -5,6 +5,11 @@ }; sneeuwvlok = { + shell = { + default = "zsh"; + corePkgs.enable = true; + }; + themes = { enable = true; theme = "everforest"; diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix index 12ffce3..8614a97 100644 --- a/modules/home/desktop/plasma/default.nix +++ b/modules/home/desktop/plasma/default.nix @@ -17,6 +17,9 @@ in immutableByDefault = true; windows.allowWindowsToRememberPositions = true; + panels = import ./panels.nix; + powerdevil = import ./power.nix; + session = { general.askForConfirmationOnLogout = false; sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix index a35b93c..52212b7 100644 --- a/modules/home/desktop/plasma/panels.nix +++ b/modules/home/desktop/plasma/panels.nix @@ -1,124 +1,109 @@ -{ config, lib, namespace, osConfig ? {}, ... }: -let - inherit (lib) mkIf; - - cfg = config.${namespace}.desktop.plasma; - osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; -in -{ - options.${namespace}.desktop.plasma = { - - }; - - config = mkIf osCfg.enable { - programs.plasma.panels = [ +[ + { + location = "bottom"; + floating = true; + lengthMode = "fill"; + height = 42; + hiding = "none"; + screen = "all"; + widgets = [ { - location = "bottom"; - floating = true; - lengthMode = "fill"; - height = 42; - hiding = "none"; - screen = "all"; - widgets = [ - { - panelSpacer = { - expanding = true; + panelSpacer = { + expanding = true; + }; + } + { + kickoff = { + applicationsDisplayMode = "list"; + compactDisplayStyle = false; + favoritesDisplayMode = "grid"; + sortAlphabetically = true; + showButtonsFor = { + custom = [ + "shutdown" + "reboot" + "logout" + "lock-screen" + ]; + }; + showActionButtonCaptions = true; + }; + } + { + iconTasks = { + appearance = { + fill = false; + highlightWindows = true; + iconSpacing = "medium"; + indicateAudioStreams = true; + rows = { + multirowView = "never"; + maximum = null; }; - } - { - kickoff = { - applicationsDisplayMode = "list"; - compactDisplayStyle = false; - favoritesDisplayMode = "grid"; - sortAlphabetically = true; - showButtonsFor = { - custom = [ - "shutdown" - "reboot" - "logout" - "lock-screen" - ]; - }; - showActionButtonCaptions = true; + showTooltips = true; + }; + behavior = { + grouping = { + clickAction = "showPresentWindowsEffect"; + method = "byProgramName"; }; - } - { - iconTasks = { - appearance = { - fill = false; - highlightWindows = true; - iconSpacing = "medium"; - indicateAudioStreams = true; - rows = { - multirowView = "never"; - maximum = null; - }; - showTooltips = true; - }; - behavior = { - grouping = { - clickAction = "showPresentWindowsEffect"; - method = "byProgramName"; - }; - minimizeActiveTaskOnClick = true; - newTasksAppearOn = "right"; - showTasks = { - onlyInCurrentActivity = true; - onlyInCurrentDesktop = true; - onlyMinimized = false; - onlyInCurrentScreen = false; - }; - sortingMethod = "manually"; - unhideOnAttentionNeeded = true; - wheel = { - ignoreMinimizedTasks = true; - switchBetweenTasks = true; - }; - }; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "preferred://terminalemulator" - "preferred://email" - "applications:vesktop.desktop" - "applications:steam.desktop" - ]; + minimizeActiveTaskOnClick = true; + newTasksAppearOn = "right"; + showTasks = { + onlyInCurrentActivity = true; + onlyInCurrentDesktop = true; + onlyMinimized = false; + onlyInCurrentScreen = false; }; - } - { - panelSpacer = { - expanding = true; + sortingMethod = "manually"; + unhideOnAttentionNeeded = true; + wheel = { + ignoreMinimizedTasks = true; + switchBetweenTasks = true; }; - } - { - systemTray = { - icons = { - scaleToFit = true; - spacing = "small"; - }; - items = { - hidden = [ - "org.kde.plasma.brightness" - ]; - }; - pin = false; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "shortDate"; - position = "belowTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - }; - } - ]; + }; + launchers = [ + "preferred://filemanager" + "preferred://browser" + "preferred://terminalemulator" + "preferred://email" + "applications:vesktop.desktop" + "applications:steam.desktop" + ]; + }; + } + { + panelSpacer = { + expanding = true; + }; + } + { + systemTray = { + icons = { + scaleToFit = true; + spacing = "small"; + }; + items = { + hidden = [ + "org.kde.plasma.brightness" + ]; + }; + pin = false; + }; + } + { + digitalClock = { + date = { + enable = true; + format = "shortDate"; + position = "belowTime"; + }; + time = { + format = "24h"; + showSeconds = "onlyInTooltip"; + }; + }; } ]; - }; -} + } +] \ No newline at end of file diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix index 50e7cfe..e7cc4e2 100644 --- a/modules/home/desktop/plasma/power.nix +++ b/modules/home/desktop/plasma/power.nix @@ -1,52 +1,37 @@ -{ config, lib, namespace, osConfig ? {}, ... }: -let - inherit (lib) mkIf; - - cfg = config.${namespace}.desktop.plasma; - osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; -in { - options.${namespace}.desktop.plasma = { + AC = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; }; - config = mkIf osCfg.enable { - programs.plasma.powerdevil = { - AC = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; + battery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; - autoSuspend.action = "nothing"; - dimDisplay.enable = false; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; - turnOffDisplay = { - idleTimeout = "never"; - }; - }; + turnOffDisplay = { + idleTimeout = "never"; + }; + }; - battery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; + lowBattery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; - autoSuspend.action = "nothing"; - dimDisplay.enable = false; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - lowBattery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; + turnOffDisplay = { + idleTimeout = "never"; }; }; } diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index ab4f6b3..2a0837c 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption; + inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption mkDefault; inherit (lib.types) nullOr enum; cfg = config.${namespace}.shell; @@ -12,17 +12,18 @@ in default = null; description = "Default system shell"; }; - + corePkgs.enable = mkEnableOption "core shell packages"; }; config = mkMerge [ - (mkIf (cfg.default != null) { - users.defaultUserShell = pkgs."${cfg.default}"; - }) + # (if (cfg.default != null) then { + # shell = pkgs."${cfg.default}"; + # } else {}) - (mkIf cfg.corePkgs.enable { - ${namespace}.shell.toolset = { + + (mkIf (cfg.corePkgs.enable) { + ${namespace}.shell.toolset = mkDefault { bat.enable = true; btop.enable = true; eza.enable = true; @@ -33,7 +34,9 @@ in yazi.enable = true; zoxide.enable = true; }; + }) + ({ home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ]; programs = { @@ -50,4 +53,4 @@ in }; }) ]; -} +} \ No newline at end of file diff --git a/modules/home/shell/toolset/bat/default.nix b/modules/home/shell/toolset/bat/default.nix index 9a1d904..78899df 100644 --- a/modules/home/shell/toolset/bat/default.nix +++ b/modules/home/shell/toolset/bat/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/btop/default.nix b/modules/home/shell/toolset/btop/default.nix index ec30da6..b490acc 100644 --- a/modules/home/shell/toolset/btop/default.nix +++ b/modules/home/shell/toolset/btop/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; inherit (lib.strings) concatStringsSep; diff --git a/modules/home/shell/toolset/eza/default.nix b/modules/home/shell/toolset/eza/default.nix index 936c335..00026cf 100644 --- a/modules/home/shell/toolset/eza/default.nix +++ b/modules/home/shell/toolset/eza/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/fzf/default.nix b/modules/home/shell/toolset/fzf/default.nix index 031e4ce..1536083 100644 --- a/modules/home/shell/toolset/fzf/default.nix +++ b/modules/home/shell/toolset/fzf/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/git/default.nix b/modules/home/shell/toolset/git/default.nix index 274f579..48320f4 100644 --- a/modules/home/shell/toolset/git/default.nix +++ b/modules/home/shell/toolset/git/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkEnableOption mkIf; @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; + home.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; diff --git a/modules/home/shell/toolset/gnugpg/default.nix b/modules/home/shell/toolset/gnugpg/default.nix index 3a69c23..8b6ae38 100644 --- a/modules/home/shell/toolset/gnugpg/default.nix +++ b/modules/home/shell/toolset/gnugpg/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; @@ -10,27 +10,27 @@ in }; config = mkIf cfg.enable { - user.package = with pkgs; [ gnupg ]; + # home.packages = with pkgs; [ gnupg ]; - environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; + # home.sessionVariables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; - programs.gnupg = { - enable = true; + # programs.gnupg = { + # enable = true; - agent = { - enable = true; - enableSSHSupport = true; - pinentryPackage = pkgs.pinentry-gnome3; + # agent = { + # enable = true; + # enableSSHSupport = true; + # pinentryPackage = pkgs.pinentry-gnome3; - settings = let - cacheTTL = 86400; - in { - default-cache-ttl = cacheTTL; - default-cache-ttl-ssh = cacheTTL; - max-cache-ttl = cacheTTL; - max-cache-ttl-ssh = cacheTTL; - }; - }; - }; + # settings = let + # cacheTTL = 86400; + # in { + # default-cache-ttl = cacheTTL; + # default-cache-ttl-ssh = cacheTTL; + # max-cache-ttl = cacheTTL; + # max-cache-ttl-ssh = cacheTTL; + # }; + # }; + # }; }; } diff --git a/modules/home/shell/toolset/starship/default.nix b/modules/home/shell/toolset/starship/default.nix index 507d421..28d57f7 100644 --- a/modules/home/shell/toolset/starship/default.nix +++ b/modules/home/shell/toolset/starship/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/tmux/default.nix b/modules/home/shell/toolset/tmux/default.nix index 26fe163..ed14ba6 100644 --- a/modules/home/shell/toolset/tmux/default.nix +++ b/modules/home/shell/toolset/tmux/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/yazi/default.nix b/modules/home/shell/toolset/yazi/default.nix index 382c661..37138a0 100644 --- a/modules/home/shell/toolset/yazi/default.nix +++ b/modules/home/shell/toolset/yazi/default.nix @@ -1,7 +1,6 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let - inherit (lib.${namespace}) mkIf; - inherit (lib.options) mkEnableOption; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.toolset.yazi; in diff --git a/modules/home/shell/toolset/zellij/default.nix b/modules/home/shell/toolset/zellij/default.nix index da6eae5..db5b7bd 100644 --- a/modules/home/shell/toolset/zellij/default.nix +++ b/modules/home/shell/toolset/zellij/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/zoxide/default.nix b/modules/home/shell/toolset/zoxide/default.nix index 087f216..5b8acb6 100644 --- a/modules/home/shell/toolset/zoxide/default.nix +++ b/modules/home/shell/toolset/zoxide/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh/default.nix similarity index 91% rename from modules/home/shell/zsh.nix rename to modules/home/shell/zsh/default.nix index e26cd16..b37cc4c 100644 --- a/modules/home/shell/zsh.nix +++ b/modules/home/shell/zsh/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) mkIf; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.zsh; in @@ -10,13 +10,9 @@ in }; config = mkIf cfg.enable { - ${namespace}.shell = { - zsh.enable = true; - corePkgs.enable = true; - }; - - # Enable completion for sys-packages: - environment.pathsToLink = ["/share/zsh"]; + # ${namespace}.shell = { + # zsh.enable = true; + # }; programs = { starship.enableZshIntegration = true; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index 8acf633..55bccfe 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, namespace, ... }: +{ config, lib, pkgs, namespace, osConfig ? {}, ... }: let inherit (lib) mkIf mkDefault; inherit (lib.options) mkOption mkEnableOption; @@ -23,9 +23,7 @@ in { }; }; - config = mkIf cfg.enable { - ${namespace}.theming.enable = true; - + config = mkIf (cfg.enable && osConfig.${namespace}.theming.enable) { stylix = { base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix deleted file mode 100644 index 46a454b..0000000 --- a/modules/nixos/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, namespace, ... }: -let - inherit (lib) mkIf mkDefault mkOption mkMerge; - inherit (lib.types) nullOr enum; - - cfg = config.${namespace}; -in -{ - options.${namespace} = { - preset = mkOption { - type = nullOr (enum [ "server" "desktop" ]); - default = null; - example = "desktop"; - description = "Which defaults profile to start with"; - }; - }; - - config = mkMerge [ - (mkIf (cfg.preset == "desktop") { - ${namespace} = mkDefault { - hardware.has = { - audio = true; - }; - - boot = { - quiet = true; - animated = true; - }; - - desktop.use = "plasma"; - theming.enable = true; - }; - }) - - (mkIf (cfg.preset == "server") { - ${namespace} = mkDefault { - services = { - networking.ssh.enable = true; - }; - }; - }) - ]; -} diff --git a/modules/nixos/shells/default.nix b/modules/nixos/shells/default.nix new file mode 100644 index 0000000..6b5c058 --- /dev/null +++ b/modules/nixos/shells/default.nix @@ -0,0 +1,2 @@ +{ ... }: +{} \ No newline at end of file diff --git a/modules/nixos/shells/zsh.nix b/modules/nixos/shells/zsh/default.nix similarity index 74% rename from modules/nixos/shells/zsh.nix rename to modules/nixos/shells/zsh/default.nix index b9cf75b..399e7dd 100644 --- a/modules/nixos/shells/zsh.nix +++ b/modules/nixos/shells/zsh/default.nix @@ -10,5 +10,7 @@ in }; config = mkIf cfg.enable { + # Enable completion for sys-packages: + environment.pathsToLink = ["/share/zsh"]; }; } diff --git a/modules/nixos/theming/default.nix b/modules/nixos/theming/default.nix index d7ddb8e..78adb94 100644 --- a/modules/nixos/theming/default.nix +++ b/modules/nixos/theming/default.nix @@ -10,7 +10,9 @@ in ]; options.${namespace}.theming = { - enable = mkEnableOption "enable theming"; + enable = mkEnableOption "enable theming" // { + default = true; + }; }; config = mkIf cfg.enable { diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index f10ca22..19ea4fb 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -8,12 +8,19 @@ in ]; sneeuwvlok = { - preset = "desktop"; - hardware.has = { gpu.amd = true; bluetooth = true; + audio = true; }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "plasma"; + theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 792956e..0bbcd60 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -8,8 +8,19 @@ in ]; sneeuwvlok = { - preset = "desktop"; + hardware.has = { + gpu.amd = true; + bluetooth = true; + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + desktop.use = "gamescope"; + theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix index d28c19f..26df5e1 100644 --- a/systems/x86_64-linux/ulmo/default.nix +++ b/systems/x86_64-linux/ulmo/default.nix @@ -2,18 +2,17 @@ let in { - imports = [ - ./disks.nix - ./hardware.nix - ]; + imports = [ + ./disks.nix + ./hardware.nix + ]; - sneeuwvlok = { - preset = "server"; - - services = { - media.enable = true; - }; + sneeuwvlok = { + services = { + networking.ssh.enable = true; + media.enable = true; }; + }; - system.stateVersion = "23.11"; + system.stateVersion = "23.11"; } \ No newline at end of file From 4c964b774b379fe5b8d5108abaa7ff022dd51c61 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 21:05:49 +0200 Subject: [PATCH 07/38] merge --- flake.lock | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index a7d81dc..77096f3 100644 --- a/flake.lock +++ b/flake.lock @@ -462,7 +462,6 @@ }, "original": { "owner": "himmelblau-idm", - "ref": "main", "repo": "himmelblau", "type": "github" } @@ -942,15 +941,15 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1753296482, - "narHash": "sha256-VPLaHVhU6/CwnMHTjhf6945qyrXEcpjxKfpWqQXtnxI=", - "owner": "danth", + "lastModified": 1753372006, + "narHash": "sha256-eyIYqerHPYHl2Eq802wJSOwMwZ3tdvJ4D+vckDe2mD8=", + "owner": "nix-community", "repo": "stylix", - "rev": "fbe1dab7783a3d579dc57be8ceee148104e0930b", + "rev": "ceda12a6da2181e424d8ed7e68ed291745f06f49", "type": "github" }, "original": { - "owner": "danth", + "owner": "nix-community", "repo": "stylix", "type": "github" } From 99fc92030f5ae2f9a142d5b111a2c95d89f5981e Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 09:23:41 +0200 Subject: [PATCH 08/38] add some clarifying comments --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index c1408a5..e7ed350 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ stylix.url = "github:nix-community/stylix"; + # Rust toolchain fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -43,6 +44,7 @@ sops-nix.url = "github:Mic92/sops-nix"; + # Azure AD for linux himmelblau = { url = "github:himmelblau-idm/himmelblau"; inputs.nixpkgs.follows = "nixpkgs"; From 8c011c7e50a1a903a6e4d3b74a1acb4f27762a51 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 11:20:21 +0200 Subject: [PATCH 09/38] woot. got a working build again --- flake.nix | 17 ++++--- homes/user-configurations/chris.nix | 19 ------- homes/x86_64-linux/chris@manwe/default.nix | 22 +++++++- modules/home/home-manager/default.nix | 10 ++++ modules/home/shell/default.nix | 1 - modules/home/shell/toolset/git/default.nix | 2 - modules/home/themes/default.nix | 27 +++++++++- modules/nixos/desktop/gamescope/default.nix | 5 +- .../default.nix} | 0 .../security/{boot.nix => boot/default.nix} | 0 .../security/{sops.nix => sops/default.nix} | 0 .../security/{sudo.nix => sudo/default.nix} | 0 modules/nixos/theming/default.nix | 50 ------------------- systems/x86_64-linux/manwe/default.nix | 1 - systems/x86_64-linux/orome/default.nix | 7 +-- systems/x86_64-linux/tulkas/default.nix | 1 - 16 files changed, 73 insertions(+), 89 deletions(-) delete mode 100644 homes/user-configurations/chris.nix create mode 100644 modules/home/home-manager/default.nix rename modules/nixos/system/{networking.nix => networking/default.nix} (100%) rename modules/nixos/system/security/{boot.nix => boot/default.nix} (100%) rename modules/nixos/system/security/{sops.nix => sops/default.nix} (100%) rename modules/nixos/system/security/{sudo.nix => sudo/default.nix} (100%) delete mode 100644 modules/nixos/theming/default.nix diff --git a/flake.nix b/flake.nix index e7ed350..63b5789 100644 --- a/flake.nix +++ b/flake.nix @@ -68,14 +68,6 @@ inherit inputs; src = ./.; - channels-config = { - allowUnfree = true; - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - }; - snowfall = { namespace = "sneeuwvlok"; @@ -85,6 +77,14 @@ }; }; + channels-config = { + allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; + }; + overlays = with inputs; [ fenix.overlays.default nix-minecraft.overlay @@ -92,6 +92,7 @@ ]; homes.modules = with inputs; [ + stylix.homeModules.stylix plasma-manager.homeManagerModules.plasma-manager ]; }; diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix deleted file mode 100644 index 26a170b..0000000 --- a/homes/user-configurations/chris.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - programs.git = { - userName = "Chris Kruining"; - userEmail = "chris@kruining.eu"; - }; - - sneeuwvlok = { - shell = { - default = "zsh"; - corePkgs.enable = true; - }; - - themes = { - enable = true; - theme = "everforest"; - polarity = "dark"; - }; - }; -} \ No newline at end of file diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 530ea5f..7b7c8f3 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -1,4 +1,22 @@ -{ ... }: +{ osConfig, ... }: { - sneeuwvlok = {}; + home.stateVersion = osConfig.system.stateVersion; + + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; + + sneeuwvlok = { + shell = { + default = "zsh"; + corePkgs.enable = true; + }; + + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + }; } diff --git a/modules/home/home-manager/default.nix b/modules/home/home-manager/default.nix new file mode 100644 index 0000000..93bae2e --- /dev/null +++ b/modules/home/home-manager/default.nix @@ -0,0 +1,10 @@ +{ lib, osConfig ? { }, ... }: +let + inherit (lib) mkDefault; +in +{ + systemd.user.startServices = "sd-switch"; + programs.home-manager.enable = true; + + home.stateVersion = mkDefault (osConfig.system.stateVersion or "25.05"); +} \ No newline at end of file diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index 2a0837c..80aa20a 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -21,7 +21,6 @@ in # shell = pkgs."${cfg.default}"; # } else {}) - (mkIf (cfg.corePkgs.enable) { ${namespace}.shell.toolset = mkDefault { bat.enable = true; diff --git a/modules/home/shell/toolset/git/default.nix b/modules/home/shell/toolset/git/default.nix index 48320f4..3edfb60 100644 --- a/modules/home/shell/toolset/git/default.nix +++ b/modules/home/shell/toolset/git/default.nix @@ -76,8 +76,6 @@ in credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; user = { - name = config.${namespace}.user.full_name; - email = config.${namespace}.user.email; signingKey = "~/.ssh/id_rsa.pub"; }; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index 55bccfe..276e850 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -5,6 +5,7 @@ let inherit (lib.types) nullOr enum; cfg = config.${namespace}.themes; + osCfg = osConfig.${namespace}.theming; in { options.${namespace}.themes = { enable = mkEnableOption "Theming (Stylix)"; @@ -23,12 +24,36 @@ in { }; }; - config = mkIf (cfg.enable && osConfig.${namespace}.theming.enable) { + config = mkIf (cfg.enable) { stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; polarity = cfg.polarity; targets.qt.platform = mkDefault "kde6"; + + fonts = { + serif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Serif"; + }; + + sansSerif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans"; + }; + + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; }; }; } diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix index 92d4e96..80e6099 100644 --- a/modules/nixos/desktop/gamescope/default.nix +++ b/modules/nixos/desktop/gamescope/default.nix @@ -1,6 +1,6 @@ { lib, config, namespace, inputs, ... }: let - inherit (lib) mkIf mkEnableOption; + inherit (lib) mkIf mkEnableOption mkForce; cfg = config.${namespace}.desktop.gamescope; in @@ -16,6 +16,9 @@ in config = mkIf cfg.enable { ${namespace}.desktop.plasma.enable = true; + services.displayManager.sddm.enable = mkForce false; + services.displayManager.gdm.enable = mkForce false; + jovian = { steam = { enable = true; diff --git a/modules/nixos/system/networking.nix b/modules/nixos/system/networking/default.nix similarity index 100% rename from modules/nixos/system/networking.nix rename to modules/nixos/system/networking/default.nix diff --git a/modules/nixos/system/security/boot.nix b/modules/nixos/system/security/boot/default.nix similarity index 100% rename from modules/nixos/system/security/boot.nix rename to modules/nixos/system/security/boot/default.nix diff --git a/modules/nixos/system/security/sops.nix b/modules/nixos/system/security/sops/default.nix similarity index 100% rename from modules/nixos/system/security/sops.nix rename to modules/nixos/system/security/sops/default.nix diff --git a/modules/nixos/system/security/sudo.nix b/modules/nixos/system/security/sudo/default.nix similarity index 100% rename from modules/nixos/system/security/sudo.nix rename to modules/nixos/system/security/sudo/default.nix diff --git a/modules/nixos/theming/default.nix b/modules/nixos/theming/default.nix deleted file mode 100644 index 78adb94..0000000 --- a/modules/nixos/theming/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ inputs, config, lib, pkgs, namespace, ... }: -let - inherit (lib) mkIf mkEnableOption; - - cfg = config.${namespace}.theming; -in -{ - imports = [ - inputs.stylix.nixosModules.stylix - ]; - - options.${namespace}.theming = { - enable = mkEnableOption "enable theming" // { - default = true; - }; - }; - - config = mkIf cfg.enable { - stylix = { - enable = true; - autoEnable = true; - - # base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; - # image = ./${cfg.theme}.jpg; - # polarity = cfg.polarity; - - fonts = { - serif = { - package = pkgs.dejavu_fonts; - name = "DejaVu Serif"; - }; - - sansSerif = { - package = pkgs.dejavu_fonts; - name = "DejaVu Sans"; - }; - - monospace = { - package = pkgs.nerd-fonts.jetbrains-mono; - name = "JetBrainsMono Nerd Font Mono"; - }; - - emoji = { - package = pkgs.noto-fonts-emoji; - name = "Noto Color Emoji"; - }; - }; - }; - }; -} diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index 19ea4fb..821e087 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -20,7 +20,6 @@ in }; desktop.use = "plasma"; - theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix index 5d5bf2f..34210ac 100644 --- a/systems/x86_64-linux/orome/default.nix +++ b/systems/x86_64-linux/orome/default.nix @@ -8,9 +8,10 @@ in ]; sneeuwvlok = { - preset = "desktop"; - - bluetooth.enable = true; + hardware.has = { + bluetooth = true; + audio = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 0bbcd60..6aea613 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -20,7 +20,6 @@ in }; desktop.use = "gamescope"; - theming.enable = true; }; system.stateVersion = "23.11"; From a3af30e93cfa2b8322c0f659764b5c5e6bf41994 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 14:31:51 +0200 Subject: [PATCH 10/38] convert stud.io package to snowfall --- packages/{studio.nix => studio/default.nix} | 0 packages/{ => studio}/studio.png | Bin 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/{studio.nix => studio/default.nix} (100%) rename packages/{ => studio}/studio.png (100%) diff --git a/packages/studio.nix b/packages/studio/default.nix similarity index 100% rename from packages/studio.nix rename to packages/studio/default.nix diff --git a/packages/studio.png b/packages/studio/studio.png similarity index 100% rename from packages/studio.png rename to packages/studio/studio.png From 72b0f6f8fad97a4ade1b54dfada26828a170febf Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 14:33:04 +0200 Subject: [PATCH 11/38] split manwe config (WARNING split is done opposite to main branch) --- modules/nixos/boot/default.nix | 2 ++ systems/x86_64-linux/mandos/README.md | 3 +++ systems/x86_64-linux/mandos/default.nix | 26 +++++++++++++++++++ systems/x86_64-linux/mandos/disks.nix | 33 ++++++++++++++++++++++++ systems/x86_64-linux/mandos/hardware.nix | 18 +++++++++++++ systems/x86_64-linux/manwe/disks.nix | 17 ++++-------- systems/x86_64-linux/manwe/hardware.nix | 4 +-- 7 files changed, 89 insertions(+), 14 deletions(-) create mode 100644 systems/x86_64-linux/mandos/README.md create mode 100644 systems/x86_64-linux/mandos/default.nix create mode 100644 systems/x86_64-linux/mandos/disks.nix create mode 100644 systems/x86_64-linux/mandos/hardware.nix diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 6ff6ac7..45f3170 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -38,6 +38,8 @@ in footer = true; }; }; + + supportedFilesystems = [ "nfs" ] }; }) diff --git a/systems/x86_64-linux/mandos/README.md b/systems/x86_64-linux/mandos/README.md new file mode 100644 index 0000000..b7e2801 --- /dev/null +++ b/systems/x86_64-linux/mandos/README.md @@ -0,0 +1,3 @@ +# Description + +Living room Steambox. \ No newline at end of file diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix new file mode 100644 index 0000000..3186239 --- /dev/null +++ b/systems/x86_64-linux/mandos/default.nix @@ -0,0 +1,26 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + hardware.has = { + gpu.nvidia = true; + bluetooth = true; + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "gamescope"; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/mandos/disks.nix b/systems/x86_64-linux/mandos/disks.nix new file mode 100644 index 0000000..b143047 --- /dev/null +++ b/systems/x86_64-linux/mandos/disks.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + swapDevices = [ { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/C842-316A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/home/chris/games" = { + device = "/dev/disk/by-label/games"; + fsType = "ext4"; + }; + + # TODO :: Reformat the disk to ext4 + "/home/chris/data" = { + device = "/dev/disk/by-label/Data"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=chris" ]; + }; + }; +} diff --git a/systems/x86_64-linux/mandos/hardware.nix b/systems/x86_64-linux/mandos/hardware.nix new file mode 100644 index 0000000..60759bd --- /dev/null +++ b/systems/x86_64-linux/mandos/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix index 3a3375e..f13f845 100644 --- a/systems/x86_64-linux/manwe/disks.nix +++ b/systems/x86_64-linux/manwe/disks.nix @@ -22,21 +22,14 @@ in options = [ "fmask=0022" "dmask=0022" ]; }; - "/home/chris/games" = { - device = "/dev/disk/by-label/games"; - fsType = "ext4"; - }; - - # TODO :: Reformat the disk to ext4 - "/home/chris/data" = { - device = "/dev/disk/by-label/Data"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=chris" ]; - }; - "/home/chris/media" = { device = "ulmo:/"; fsType = "nfs"; }; + + "/home/chris/mandos" = { + device = "mandos:/"; + fsType = "nfs"; + }; }; } diff --git a/systems/x86_64-linux/manwe/hardware.nix b/systems/x86_64-linux/manwe/hardware.nix index 60759bd..33ae3b5 100644 --- a/systems/x86_64-linux/manwe/hardware.nix +++ b/systems/x86_64-linux/manwe/hardware.nix @@ -8,11 +8,11 @@ in boot = { initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = [ "kvm-amd" ]; kernelParams = []; extraModulePackages = [ ]; }; nixpkgs.hostPlatform = mkDefault system; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; } From 5ba5d55108e6b4d5b75bac0fffb1a68aa1ef154b Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 10:03:10 +0200 Subject: [PATCH 12/38] started migration to snowfall --- {hosts => _hosts}/aule/README.md | 0 {hosts => _hosts}/manwe/README.md | 0 {hosts => _hosts}/manwe/default.nix | 0 {hosts => _hosts}/manwe/hardware.nix | 0 .../manwe/users/chris/default.nix | 0 {hosts => _hosts}/orome/README.md | 0 {hosts => _hosts}/orome/default.nix | 0 {hosts => _hosts}/orome/hardware.nix | 0 .../orome/users/chris/default.nix | 0 {hosts => _hosts}/tulkas/README.md | 0 {hosts => _hosts}/tulkas/default.nix | 0 {hosts => _hosts}/tulkas/hardware.nix | 0 .../tulkas/users/chris/default.nix | 0 {hosts => _hosts}/ulmo/README.md | 0 {hosts => _hosts}/ulmo/default.nix | 0 {hosts => _hosts}/ulmo/hardware.nix | 0 {lib => _lib}/attrs.nix | 0 {lib => _lib}/default.nix | 0 {lib => _lib}/modules.nix | 0 {lib => _lib}/nixos.nix | 0 {lib => _lib}/options.nix | 0 {lib => _lib}/user.nix | 0 .../desktop/applications/communication.nix | 0 .../home/desktop/applications/email.nix | 0 .../home/desktop/applications/office.nix | 0 .../home/desktop/applications/passwords.nix | 0 .../home/desktop/applications/recording.nix | 0 .../home/desktop/applications/steam.nix | 0 .../home/desktop/applications/studio.nix | 0 .../home/desktop/browsers/chrome.nix | 0 .../home/desktop/browsers/default.nix | 0 .../home/desktop/browsers/firefox.nix | 0 .../home/desktop/browsers/ladybird.nix | 0 .../home/desktop/browsers/zen.nix | 0 .../home/desktop/default.nix | 0 .../home/desktop/editors/default.nix | 0 .../home/desktop/editors/kate.nix | 0 .../home/desktop/editors/nano.nix | 0 .../home/desktop/editors/nvim.nix | 0 .../home/desktop/editors/vscodium.nix | 0 .../home/desktop/editors/zed.nix | 0 .../home/desktop/games/default.nix | 0 .../home/desktop/games/minecraft.nix | 0 {modules => _modules}/home/desktop/plasma.nix | 0 .../home/desktop/terminal/alacritty.nix | 0 .../home/desktop/terminal/default.nix | 0 .../home/desktop/terminal/ghostty.nix | 0 .../home/develop/default.nix | 0 {modules => _modules}/home/develop/dotnet.nix | 0 {modules => _modules}/home/develop/js.nix | 0 {modules => _modules}/home/develop/rust.nix | 0 {modules => _modules}/home/shell/default.nix | 0 .../home/shell/toolset/bat.nix | 0 .../home/shell/toolset/btop.nix | 0 .../home/shell/toolset/eza.nix | 0 .../home/shell/toolset/fzf.nix | 0 .../home/shell/toolset/git.nix | 0 .../home/shell/toolset/gnupg.nix | 0 .../home/shell/toolset/starship.nix | 0 .../home/shell/toolset/tmux.nix | 0 .../home/shell/toolset/yazi.nix | 0 .../home/shell/toolset/zellij.nix | 0 .../home/shell/toolset/zoxide.nix | 0 {modules => _modules}/home/shell/zsh.nix | 0 .../home/themes/catppuccin-latte.jpg | Bin {modules => _modules}/home/themes/default.nix | 0 .../home/themes/everforest.jpg | Bin {modules => _modules}/home/user.nix | 0 {modules => _modules}/home/xgd.nix | 0 .../system/authentication/himmelblau.nix | 0 {modules => _modules}/system/boot.nix | 0 .../system/common/qbittorrent.nix | 0 .../system/desktop/editors/nvim.nix | 0 .../system/desktop/gaming.nix | 0 {modules => _modules}/system/desktop/wine.nix | 0 {modules => _modules}/system/graphics.nix | 0 .../system/networking/default.nix | 0 .../system/networking/nfs.nix | 0 .../system/networking/samba.nix | 0 .../system/networking/ssh.nix | 0 {modules => _modules}/system/options.nix | 0 {modules => _modules}/system/security.nix | 0 .../system/services/auth/authelia.nix | 0 .../system/services/auth/zitadel.nix | 0 .../system/services/default.nix | 0 .../system/services/games/minecraft.nix | 0 .../system/services/games/palworld.nix | 0 .../system/services/media.nix | 0 .../system/services/nextcloud.nix | 0 .../system/services/security.nix | 0 .../system/shell/default.nix | 0 {modules => _modules}/system/shell/zsh.nix | 0 {modules => _modules}/system/system/audio.nix | 0 .../system/system/bluetooth.nix | 0 {modules => _modules}/system/theming.nix | 0 .../system/virtualisation/default.nix | 0 .../system/virtualisation/podman.nix | 0 {modules => _modules}/system/zsa_voyager.nix | 0 {secrets => _secrets}/secrets.yaml | 0 flake.nix | 81 +++++++++++------- 100 files changed, 49 insertions(+), 32 deletions(-) rename {hosts => _hosts}/aule/README.md (100%) rename {hosts => _hosts}/manwe/README.md (100%) rename {hosts => _hosts}/manwe/default.nix (100%) rename {hosts => _hosts}/manwe/hardware.nix (100%) rename {hosts => _hosts}/manwe/users/chris/default.nix (100%) rename {hosts => _hosts}/orome/README.md (100%) rename {hosts => _hosts}/orome/default.nix (100%) rename {hosts => _hosts}/orome/hardware.nix (100%) rename {hosts => _hosts}/orome/users/chris/default.nix (100%) rename {hosts => _hosts}/tulkas/README.md (100%) rename {hosts => _hosts}/tulkas/default.nix (100%) rename {hosts => _hosts}/tulkas/hardware.nix (100%) rename {hosts => _hosts}/tulkas/users/chris/default.nix (100%) rename {hosts => _hosts}/ulmo/README.md (100%) rename {hosts => _hosts}/ulmo/default.nix (100%) rename {hosts => _hosts}/ulmo/hardware.nix (100%) rename {lib => _lib}/attrs.nix (100%) rename {lib => _lib}/default.nix (100%) rename {lib => _lib}/modules.nix (100%) rename {lib => _lib}/nixos.nix (100%) rename {lib => _lib}/options.nix (100%) rename {lib => _lib}/user.nix (100%) rename {modules => _modules}/home/desktop/applications/communication.nix (100%) rename {modules => _modules}/home/desktop/applications/email.nix (100%) rename {modules => _modules}/home/desktop/applications/office.nix (100%) rename {modules => _modules}/home/desktop/applications/passwords.nix (100%) rename {modules => _modules}/home/desktop/applications/recording.nix (100%) rename {modules => _modules}/home/desktop/applications/steam.nix (100%) rename {modules => _modules}/home/desktop/applications/studio.nix (100%) rename {modules => _modules}/home/desktop/browsers/chrome.nix (100%) rename {modules => _modules}/home/desktop/browsers/default.nix (100%) rename {modules => _modules}/home/desktop/browsers/firefox.nix (100%) rename {modules => _modules}/home/desktop/browsers/ladybird.nix (100%) rename {modules => _modules}/home/desktop/browsers/zen.nix (100%) rename {modules => _modules}/home/desktop/default.nix (100%) rename {modules => _modules}/home/desktop/editors/default.nix (100%) rename {modules => _modules}/home/desktop/editors/kate.nix (100%) rename {modules => _modules}/home/desktop/editors/nano.nix (100%) rename {modules => _modules}/home/desktop/editors/nvim.nix (100%) rename {modules => _modules}/home/desktop/editors/vscodium.nix (100%) rename {modules => _modules}/home/desktop/editors/zed.nix (100%) rename {modules => _modules}/home/desktop/games/default.nix (100%) rename {modules => _modules}/home/desktop/games/minecraft.nix (100%) rename {modules => _modules}/home/desktop/plasma.nix (100%) rename {modules => _modules}/home/desktop/terminal/alacritty.nix (100%) rename {modules => _modules}/home/desktop/terminal/default.nix (100%) rename {modules => _modules}/home/desktop/terminal/ghostty.nix (100%) rename {modules => _modules}/home/develop/default.nix (100%) rename {modules => _modules}/home/develop/dotnet.nix (100%) rename {modules => _modules}/home/develop/js.nix (100%) rename {modules => _modules}/home/develop/rust.nix (100%) rename {modules => _modules}/home/shell/default.nix (100%) rename {modules => _modules}/home/shell/toolset/bat.nix (100%) rename {modules => _modules}/home/shell/toolset/btop.nix (100%) rename {modules => _modules}/home/shell/toolset/eza.nix (100%) rename {modules => _modules}/home/shell/toolset/fzf.nix (100%) rename {modules => _modules}/home/shell/toolset/git.nix (100%) rename {modules => _modules}/home/shell/toolset/gnupg.nix (100%) rename {modules => _modules}/home/shell/toolset/starship.nix (100%) rename {modules => _modules}/home/shell/toolset/tmux.nix (100%) rename {modules => _modules}/home/shell/toolset/yazi.nix (100%) rename {modules => _modules}/home/shell/toolset/zellij.nix (100%) rename {modules => _modules}/home/shell/toolset/zoxide.nix (100%) rename {modules => _modules}/home/shell/zsh.nix (100%) rename {modules => _modules}/home/themes/catppuccin-latte.jpg (100%) rename {modules => _modules}/home/themes/default.nix (100%) rename {modules => _modules}/home/themes/everforest.jpg (100%) rename {modules => _modules}/home/user.nix (100%) rename {modules => _modules}/home/xgd.nix (100%) rename {modules => _modules}/system/authentication/himmelblau.nix (100%) rename {modules => _modules}/system/boot.nix (100%) rename {modules => _modules}/system/common/qbittorrent.nix (100%) rename {modules => _modules}/system/desktop/editors/nvim.nix (100%) rename {modules => _modules}/system/desktop/gaming.nix (100%) rename {modules => _modules}/system/desktop/wine.nix (100%) rename {modules => _modules}/system/graphics.nix (100%) rename {modules => _modules}/system/networking/default.nix (100%) rename {modules => _modules}/system/networking/nfs.nix (100%) rename {modules => _modules}/system/networking/samba.nix (100%) rename {modules => _modules}/system/networking/ssh.nix (100%) rename {modules => _modules}/system/options.nix (100%) rename {modules => _modules}/system/security.nix (100%) rename {modules => _modules}/system/services/auth/authelia.nix (100%) rename {modules => _modules}/system/services/auth/zitadel.nix (100%) rename {modules => _modules}/system/services/default.nix (100%) rename {modules => _modules}/system/services/games/minecraft.nix (100%) rename {modules => _modules}/system/services/games/palworld.nix (100%) rename {modules => _modules}/system/services/media.nix (100%) rename {modules => _modules}/system/services/nextcloud.nix (100%) rename {modules => _modules}/system/services/security.nix (100%) rename {modules => _modules}/system/shell/default.nix (100%) rename {modules => _modules}/system/shell/zsh.nix (100%) rename {modules => _modules}/system/system/audio.nix (100%) rename {modules => _modules}/system/system/bluetooth.nix (100%) rename {modules => _modules}/system/theming.nix (100%) rename {modules => _modules}/system/virtualisation/default.nix (100%) rename {modules => _modules}/system/virtualisation/podman.nix (100%) rename {modules => _modules}/system/zsa_voyager.nix (100%) rename {secrets => _secrets}/secrets.yaml (100%) diff --git a/hosts/aule/README.md b/_hosts/aule/README.md similarity index 100% rename from hosts/aule/README.md rename to _hosts/aule/README.md diff --git a/hosts/manwe/README.md b/_hosts/manwe/README.md similarity index 100% rename from hosts/manwe/README.md rename to _hosts/manwe/README.md diff --git a/hosts/manwe/default.nix b/_hosts/manwe/default.nix similarity index 100% rename from hosts/manwe/default.nix rename to _hosts/manwe/default.nix diff --git a/hosts/manwe/hardware.nix b/_hosts/manwe/hardware.nix similarity index 100% rename from hosts/manwe/hardware.nix rename to _hosts/manwe/hardware.nix diff --git a/hosts/manwe/users/chris/default.nix b/_hosts/manwe/users/chris/default.nix similarity index 100% rename from hosts/manwe/users/chris/default.nix rename to _hosts/manwe/users/chris/default.nix diff --git a/hosts/orome/README.md b/_hosts/orome/README.md similarity index 100% rename from hosts/orome/README.md rename to _hosts/orome/README.md diff --git a/hosts/orome/default.nix b/_hosts/orome/default.nix similarity index 100% rename from hosts/orome/default.nix rename to _hosts/orome/default.nix diff --git a/hosts/orome/hardware.nix b/_hosts/orome/hardware.nix similarity index 100% rename from hosts/orome/hardware.nix rename to _hosts/orome/hardware.nix diff --git a/hosts/orome/users/chris/default.nix b/_hosts/orome/users/chris/default.nix similarity index 100% rename from hosts/orome/users/chris/default.nix rename to _hosts/orome/users/chris/default.nix diff --git a/hosts/tulkas/README.md b/_hosts/tulkas/README.md similarity index 100% rename from hosts/tulkas/README.md rename to _hosts/tulkas/README.md diff --git a/hosts/tulkas/default.nix b/_hosts/tulkas/default.nix similarity index 100% rename from hosts/tulkas/default.nix rename to _hosts/tulkas/default.nix diff --git a/hosts/tulkas/hardware.nix b/_hosts/tulkas/hardware.nix similarity index 100% rename from hosts/tulkas/hardware.nix rename to _hosts/tulkas/hardware.nix diff --git a/hosts/tulkas/users/chris/default.nix b/_hosts/tulkas/users/chris/default.nix similarity index 100% rename from hosts/tulkas/users/chris/default.nix rename to _hosts/tulkas/users/chris/default.nix diff --git a/hosts/ulmo/README.md b/_hosts/ulmo/README.md similarity index 100% rename from hosts/ulmo/README.md rename to _hosts/ulmo/README.md diff --git a/hosts/ulmo/default.nix b/_hosts/ulmo/default.nix similarity index 100% rename from hosts/ulmo/default.nix rename to _hosts/ulmo/default.nix diff --git a/hosts/ulmo/hardware.nix b/_hosts/ulmo/hardware.nix similarity index 100% rename from hosts/ulmo/hardware.nix rename to _hosts/ulmo/hardware.nix diff --git a/lib/attrs.nix b/_lib/attrs.nix similarity index 100% rename from lib/attrs.nix rename to _lib/attrs.nix diff --git a/lib/default.nix b/_lib/default.nix similarity index 100% rename from lib/default.nix rename to _lib/default.nix diff --git a/lib/modules.nix b/_lib/modules.nix similarity index 100% rename from lib/modules.nix rename to _lib/modules.nix diff --git a/lib/nixos.nix b/_lib/nixos.nix similarity index 100% rename from lib/nixos.nix rename to _lib/nixos.nix diff --git a/lib/options.nix b/_lib/options.nix similarity index 100% rename from lib/options.nix rename to _lib/options.nix diff --git a/lib/user.nix b/_lib/user.nix similarity index 100% rename from lib/user.nix rename to _lib/user.nix diff --git a/modules/home/desktop/applications/communication.nix b/_modules/home/desktop/applications/communication.nix similarity index 100% rename from modules/home/desktop/applications/communication.nix rename to _modules/home/desktop/applications/communication.nix diff --git a/modules/home/desktop/applications/email.nix b/_modules/home/desktop/applications/email.nix similarity index 100% rename from modules/home/desktop/applications/email.nix rename to _modules/home/desktop/applications/email.nix diff --git a/modules/home/desktop/applications/office.nix b/_modules/home/desktop/applications/office.nix similarity index 100% rename from modules/home/desktop/applications/office.nix rename to _modules/home/desktop/applications/office.nix diff --git a/modules/home/desktop/applications/passwords.nix b/_modules/home/desktop/applications/passwords.nix similarity index 100% rename from modules/home/desktop/applications/passwords.nix rename to _modules/home/desktop/applications/passwords.nix diff --git a/modules/home/desktop/applications/recording.nix b/_modules/home/desktop/applications/recording.nix similarity index 100% rename from modules/home/desktop/applications/recording.nix rename to _modules/home/desktop/applications/recording.nix diff --git a/modules/home/desktop/applications/steam.nix b/_modules/home/desktop/applications/steam.nix similarity index 100% rename from modules/home/desktop/applications/steam.nix rename to _modules/home/desktop/applications/steam.nix diff --git a/modules/home/desktop/applications/studio.nix b/_modules/home/desktop/applications/studio.nix similarity index 100% rename from modules/home/desktop/applications/studio.nix rename to _modules/home/desktop/applications/studio.nix diff --git a/modules/home/desktop/browsers/chrome.nix b/_modules/home/desktop/browsers/chrome.nix similarity index 100% rename from modules/home/desktop/browsers/chrome.nix rename to _modules/home/desktop/browsers/chrome.nix diff --git a/modules/home/desktop/browsers/default.nix b/_modules/home/desktop/browsers/default.nix similarity index 100% rename from modules/home/desktop/browsers/default.nix rename to _modules/home/desktop/browsers/default.nix diff --git a/modules/home/desktop/browsers/firefox.nix b/_modules/home/desktop/browsers/firefox.nix similarity index 100% rename from modules/home/desktop/browsers/firefox.nix rename to _modules/home/desktop/browsers/firefox.nix diff --git a/modules/home/desktop/browsers/ladybird.nix b/_modules/home/desktop/browsers/ladybird.nix similarity index 100% rename from modules/home/desktop/browsers/ladybird.nix rename to _modules/home/desktop/browsers/ladybird.nix diff --git a/modules/home/desktop/browsers/zen.nix b/_modules/home/desktop/browsers/zen.nix similarity index 100% rename from modules/home/desktop/browsers/zen.nix rename to _modules/home/desktop/browsers/zen.nix diff --git a/modules/home/desktop/default.nix b/_modules/home/desktop/default.nix similarity index 100% rename from modules/home/desktop/default.nix rename to _modules/home/desktop/default.nix diff --git a/modules/home/desktop/editors/default.nix b/_modules/home/desktop/editors/default.nix similarity index 100% rename from modules/home/desktop/editors/default.nix rename to _modules/home/desktop/editors/default.nix diff --git a/modules/home/desktop/editors/kate.nix b/_modules/home/desktop/editors/kate.nix similarity index 100% rename from modules/home/desktop/editors/kate.nix rename to _modules/home/desktop/editors/kate.nix diff --git a/modules/home/desktop/editors/nano.nix b/_modules/home/desktop/editors/nano.nix similarity index 100% rename from modules/home/desktop/editors/nano.nix rename to _modules/home/desktop/editors/nano.nix diff --git a/modules/home/desktop/editors/nvim.nix b/_modules/home/desktop/editors/nvim.nix similarity index 100% rename from modules/home/desktop/editors/nvim.nix rename to _modules/home/desktop/editors/nvim.nix diff --git a/modules/home/desktop/editors/vscodium.nix b/_modules/home/desktop/editors/vscodium.nix similarity index 100% rename from modules/home/desktop/editors/vscodium.nix rename to _modules/home/desktop/editors/vscodium.nix diff --git a/modules/home/desktop/editors/zed.nix b/_modules/home/desktop/editors/zed.nix similarity index 100% rename from modules/home/desktop/editors/zed.nix rename to _modules/home/desktop/editors/zed.nix diff --git a/modules/home/desktop/games/default.nix b/_modules/home/desktop/games/default.nix similarity index 100% rename from modules/home/desktop/games/default.nix rename to _modules/home/desktop/games/default.nix diff --git a/modules/home/desktop/games/minecraft.nix b/_modules/home/desktop/games/minecraft.nix similarity index 100% rename from modules/home/desktop/games/minecraft.nix rename to _modules/home/desktop/games/minecraft.nix diff --git a/modules/home/desktop/plasma.nix b/_modules/home/desktop/plasma.nix similarity index 100% rename from modules/home/desktop/plasma.nix rename to _modules/home/desktop/plasma.nix diff --git a/modules/home/desktop/terminal/alacritty.nix b/_modules/home/desktop/terminal/alacritty.nix similarity index 100% rename from modules/home/desktop/terminal/alacritty.nix rename to _modules/home/desktop/terminal/alacritty.nix diff --git a/modules/home/desktop/terminal/default.nix b/_modules/home/desktop/terminal/default.nix similarity index 100% rename from modules/home/desktop/terminal/default.nix rename to _modules/home/desktop/terminal/default.nix diff --git a/modules/home/desktop/terminal/ghostty.nix b/_modules/home/desktop/terminal/ghostty.nix similarity index 100% rename from modules/home/desktop/terminal/ghostty.nix rename to _modules/home/desktop/terminal/ghostty.nix diff --git a/modules/home/develop/default.nix b/_modules/home/develop/default.nix similarity index 100% rename from modules/home/develop/default.nix rename to _modules/home/develop/default.nix diff --git a/modules/home/develop/dotnet.nix b/_modules/home/develop/dotnet.nix similarity index 100% rename from modules/home/develop/dotnet.nix rename to _modules/home/develop/dotnet.nix diff --git a/modules/home/develop/js.nix b/_modules/home/develop/js.nix similarity index 100% rename from modules/home/develop/js.nix rename to _modules/home/develop/js.nix diff --git a/modules/home/develop/rust.nix b/_modules/home/develop/rust.nix similarity index 100% rename from modules/home/develop/rust.nix rename to _modules/home/develop/rust.nix diff --git a/modules/home/shell/default.nix b/_modules/home/shell/default.nix similarity index 100% rename from modules/home/shell/default.nix rename to _modules/home/shell/default.nix diff --git a/modules/home/shell/toolset/bat.nix b/_modules/home/shell/toolset/bat.nix similarity index 100% rename from modules/home/shell/toolset/bat.nix rename to _modules/home/shell/toolset/bat.nix diff --git a/modules/home/shell/toolset/btop.nix b/_modules/home/shell/toolset/btop.nix similarity index 100% rename from modules/home/shell/toolset/btop.nix rename to _modules/home/shell/toolset/btop.nix diff --git a/modules/home/shell/toolset/eza.nix b/_modules/home/shell/toolset/eza.nix similarity index 100% rename from modules/home/shell/toolset/eza.nix rename to _modules/home/shell/toolset/eza.nix diff --git a/modules/home/shell/toolset/fzf.nix b/_modules/home/shell/toolset/fzf.nix similarity index 100% rename from modules/home/shell/toolset/fzf.nix rename to _modules/home/shell/toolset/fzf.nix diff --git a/modules/home/shell/toolset/git.nix b/_modules/home/shell/toolset/git.nix similarity index 100% rename from modules/home/shell/toolset/git.nix rename to _modules/home/shell/toolset/git.nix diff --git a/modules/home/shell/toolset/gnupg.nix b/_modules/home/shell/toolset/gnupg.nix similarity index 100% rename from modules/home/shell/toolset/gnupg.nix rename to _modules/home/shell/toolset/gnupg.nix diff --git a/modules/home/shell/toolset/starship.nix b/_modules/home/shell/toolset/starship.nix similarity index 100% rename from modules/home/shell/toolset/starship.nix rename to _modules/home/shell/toolset/starship.nix diff --git a/modules/home/shell/toolset/tmux.nix b/_modules/home/shell/toolset/tmux.nix similarity index 100% rename from modules/home/shell/toolset/tmux.nix rename to _modules/home/shell/toolset/tmux.nix diff --git a/modules/home/shell/toolset/yazi.nix b/_modules/home/shell/toolset/yazi.nix similarity index 100% rename from modules/home/shell/toolset/yazi.nix rename to _modules/home/shell/toolset/yazi.nix diff --git a/modules/home/shell/toolset/zellij.nix b/_modules/home/shell/toolset/zellij.nix similarity index 100% rename from modules/home/shell/toolset/zellij.nix rename to _modules/home/shell/toolset/zellij.nix diff --git a/modules/home/shell/toolset/zoxide.nix b/_modules/home/shell/toolset/zoxide.nix similarity index 100% rename from modules/home/shell/toolset/zoxide.nix rename to _modules/home/shell/toolset/zoxide.nix diff --git a/modules/home/shell/zsh.nix b/_modules/home/shell/zsh.nix similarity index 100% rename from modules/home/shell/zsh.nix rename to _modules/home/shell/zsh.nix diff --git a/modules/home/themes/catppuccin-latte.jpg b/_modules/home/themes/catppuccin-latte.jpg similarity index 100% rename from modules/home/themes/catppuccin-latte.jpg rename to _modules/home/themes/catppuccin-latte.jpg diff --git a/modules/home/themes/default.nix b/_modules/home/themes/default.nix similarity index 100% rename from modules/home/themes/default.nix rename to _modules/home/themes/default.nix diff --git a/modules/home/themes/everforest.jpg b/_modules/home/themes/everforest.jpg similarity index 100% rename from modules/home/themes/everforest.jpg rename to _modules/home/themes/everforest.jpg diff --git a/modules/home/user.nix b/_modules/home/user.nix similarity index 100% rename from modules/home/user.nix rename to _modules/home/user.nix diff --git a/modules/home/xgd.nix b/_modules/home/xgd.nix similarity index 100% rename from modules/home/xgd.nix rename to _modules/home/xgd.nix diff --git a/modules/system/authentication/himmelblau.nix b/_modules/system/authentication/himmelblau.nix similarity index 100% rename from modules/system/authentication/himmelblau.nix rename to _modules/system/authentication/himmelblau.nix diff --git a/modules/system/boot.nix b/_modules/system/boot.nix similarity index 100% rename from modules/system/boot.nix rename to _modules/system/boot.nix diff --git a/modules/system/common/qbittorrent.nix b/_modules/system/common/qbittorrent.nix similarity index 100% rename from modules/system/common/qbittorrent.nix rename to _modules/system/common/qbittorrent.nix diff --git a/modules/system/desktop/editors/nvim.nix b/_modules/system/desktop/editors/nvim.nix similarity index 100% rename from modules/system/desktop/editors/nvim.nix rename to _modules/system/desktop/editors/nvim.nix diff --git a/modules/system/desktop/gaming.nix b/_modules/system/desktop/gaming.nix similarity index 100% rename from modules/system/desktop/gaming.nix rename to _modules/system/desktop/gaming.nix diff --git a/modules/system/desktop/wine.nix b/_modules/system/desktop/wine.nix similarity index 100% rename from modules/system/desktop/wine.nix rename to _modules/system/desktop/wine.nix diff --git a/modules/system/graphics.nix b/_modules/system/graphics.nix similarity index 100% rename from modules/system/graphics.nix rename to _modules/system/graphics.nix diff --git a/modules/system/networking/default.nix b/_modules/system/networking/default.nix similarity index 100% rename from modules/system/networking/default.nix rename to _modules/system/networking/default.nix diff --git a/modules/system/networking/nfs.nix b/_modules/system/networking/nfs.nix similarity index 100% rename from modules/system/networking/nfs.nix rename to _modules/system/networking/nfs.nix diff --git a/modules/system/networking/samba.nix b/_modules/system/networking/samba.nix similarity index 100% rename from modules/system/networking/samba.nix rename to _modules/system/networking/samba.nix diff --git a/modules/system/networking/ssh.nix b/_modules/system/networking/ssh.nix similarity index 100% rename from modules/system/networking/ssh.nix rename to _modules/system/networking/ssh.nix diff --git a/modules/system/options.nix b/_modules/system/options.nix similarity index 100% rename from modules/system/options.nix rename to _modules/system/options.nix diff --git a/modules/system/security.nix b/_modules/system/security.nix similarity index 100% rename from modules/system/security.nix rename to _modules/system/security.nix diff --git a/modules/system/services/auth/authelia.nix b/_modules/system/services/auth/authelia.nix similarity index 100% rename from modules/system/services/auth/authelia.nix rename to _modules/system/services/auth/authelia.nix diff --git a/modules/system/services/auth/zitadel.nix b/_modules/system/services/auth/zitadel.nix similarity index 100% rename from modules/system/services/auth/zitadel.nix rename to _modules/system/services/auth/zitadel.nix diff --git a/modules/system/services/default.nix b/_modules/system/services/default.nix similarity index 100% rename from modules/system/services/default.nix rename to _modules/system/services/default.nix diff --git a/modules/system/services/games/minecraft.nix b/_modules/system/services/games/minecraft.nix similarity index 100% rename from modules/system/services/games/minecraft.nix rename to _modules/system/services/games/minecraft.nix diff --git a/modules/system/services/games/palworld.nix b/_modules/system/services/games/palworld.nix similarity index 100% rename from modules/system/services/games/palworld.nix rename to _modules/system/services/games/palworld.nix diff --git a/modules/system/services/media.nix b/_modules/system/services/media.nix similarity index 100% rename from modules/system/services/media.nix rename to _modules/system/services/media.nix diff --git a/modules/system/services/nextcloud.nix b/_modules/system/services/nextcloud.nix similarity index 100% rename from modules/system/services/nextcloud.nix rename to _modules/system/services/nextcloud.nix diff --git a/modules/system/services/security.nix b/_modules/system/services/security.nix similarity index 100% rename from modules/system/services/security.nix rename to _modules/system/services/security.nix diff --git a/modules/system/shell/default.nix b/_modules/system/shell/default.nix similarity index 100% rename from modules/system/shell/default.nix rename to _modules/system/shell/default.nix diff --git a/modules/system/shell/zsh.nix b/_modules/system/shell/zsh.nix similarity index 100% rename from modules/system/shell/zsh.nix rename to _modules/system/shell/zsh.nix diff --git a/modules/system/system/audio.nix b/_modules/system/system/audio.nix similarity index 100% rename from modules/system/system/audio.nix rename to _modules/system/system/audio.nix diff --git a/modules/system/system/bluetooth.nix b/_modules/system/system/bluetooth.nix similarity index 100% rename from modules/system/system/bluetooth.nix rename to _modules/system/system/bluetooth.nix diff --git a/modules/system/theming.nix b/_modules/system/theming.nix similarity index 100% rename from modules/system/theming.nix rename to _modules/system/theming.nix diff --git a/modules/system/virtualisation/default.nix b/_modules/system/virtualisation/default.nix similarity index 100% rename from modules/system/virtualisation/default.nix rename to _modules/system/virtualisation/default.nix diff --git a/modules/system/virtualisation/podman.nix b/_modules/system/virtualisation/podman.nix similarity index 100% rename from modules/system/virtualisation/podman.nix rename to _modules/system/virtualisation/podman.nix diff --git a/modules/system/zsa_voyager.nix b/_modules/system/zsa_voyager.nix similarity index 100% rename from modules/system/zsa_voyager.nix rename to _modules/system/zsa_voyager.nix diff --git a/secrets/secrets.yaml b/_secrets/secrets.yaml similarity index 100% rename from secrets/secrets.yaml rename to _secrets/secrets.yaml diff --git a/flake.nix b/flake.nix index 7275c42..872bf61 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,11 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + snowfall-lib = { + url = "github:snowfallorg/lib"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -49,40 +54,52 @@ }; }; - outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }: - let - inherit (lib.my) readNixosModules mapHosts; + outputs = inputs: inputs.snowfall-lib.mkFlake { + inherit inputs; + src = ./.; - system = "x86_64-linux"; + namespace = "sneeuwvlok"; - mkPkgs = pkgs: extraOverlays: - import pkgs { - inherit system; - config.allowUnfree = true; - overlays = extraOverlays ++ (lib.attrValues self.overlays); - }; - pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default]; - - lib = nixpkgs.lib.extend (final: prev: { - my = import ./lib { - inherit pkgs inputs; - - lib = final; - }; - }); - in - { - lib = lib.my; - - overlays = { - default = final: prev: { - my = self.packages.${system}; - }; + meta = { + name = "sneeuwvlok"; + title = "Sneeuwvlok"; }; - - packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; }); - - nixosModules = readNixosModules ./modules import; - nixosConfigurations = mapHosts ./hosts {}; }; + + # outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }: + # let + # inherit (lib.my) readNixosModules mapHosts; + + # system = "x86_64-linux"; + + # mkPkgs = pkgs: extraOverlays: + # import pkgs { + # inherit system; + # config.allowUnfree = true; + # overlays = extraOverlays ++ (lib.attrValues self.overlays); + # }; + # pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default]; + + # lib = nixpkgs.lib.extend (final: prev: { + # my = import ./lib { + # inherit pkgs inputs; + + # lib = final; + # }; + # }); + # in + # { + # lib = lib.my; + + # overlays = { + # default = final: prev: { + # my = self.packages.${system}; + # }; + # }; + + # packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; }); + + # nixosModules = readNixosModules ./modules import; + # nixosConfigurations = mapHosts ./hosts {}; + # }; } From a9a47771682ba6784d305db945408b28ea7e9733 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 16:12:13 +0200 Subject: [PATCH 13/38] made some progress --- flake.lock | 95 ++++++++++- flake.nix | 59 ++----- homes/user-configurations/chris.nix | 6 + homes/x86_64-linux/chris@manwe/default.nix | 11 ++ modules/home/desktop/plasma/default.nix | 73 +++++++++ modules/home/desktop/plasma/panels.nix | 122 ++++++++++++++ modules/home/desktop/plasma/power.nix | 50 ++++++ modules/nixos/boot/default.nix | 81 ++++++++++ modules/nixos/default.nix | 42 +++++ modules/nixos/desktop/default.nix | 37 +++++ modules/nixos/desktop/gamescope/default.nix | 27 ++++ modules/nixos/desktop/gnome/default.nix | 14 ++ modules/nixos/desktop/plasma/default.nix | 30 ++++ modules/nixos/hardware/audio/default.nix | 30 ++++ modules/nixos/hardware/bluetooth/default.nix | 25 +++ modules/nixos/hardware/gpu/amd.nix | 29 ++++ modules/nixos/hardware/gpu/nvidia.nix | 31 ++++ modules/nixos/nix/default.nix | 42 +++++ modules/nixos/services/media/default.nix | 153 ++++++++++++++++++ .../x86_64-linux}/aule/README.md | 0 .../x86_64-linux}/manwe/README.md | 0 systems/x86_64-linux/manwe/default.nix | 20 +++ systems/x86_64-linux/manwe/disks.nix | 42 +++++ systems/x86_64-linux/manwe/hardware.nix | 18 +++ .../x86_64-linux}/orome/README.md | 0 systems/x86_64-linux/orome/default.nix | 17 ++ systems/x86_64-linux/orome/disks.nix | 23 +++ systems/x86_64-linux/orome/hardware.nix | 18 +++ .../x86_64-linux}/tulkas/README.md | 0 systems/x86_64-linux/tulkas/default.nix | 16 ++ systems/x86_64-linux/tulkas/disks.nix | 23 +++ systems/x86_64-linux/tulkas/hardware.nix | 18 +++ systems/x86_64-linux/ulmo/default.nix | 19 +++ systems/x86_64-linux/ulmo/disks.nix | 31 ++++ systems/x86_64-linux/ulmo/hardware.nix | 18 +++ 35 files changed, 1176 insertions(+), 44 deletions(-) create mode 100644 homes/user-configurations/chris.nix create mode 100644 homes/x86_64-linux/chris@manwe/default.nix create mode 100644 modules/home/desktop/plasma/default.nix create mode 100644 modules/home/desktop/plasma/panels.nix create mode 100644 modules/home/desktop/plasma/power.nix create mode 100644 modules/nixos/boot/default.nix create mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/desktop/default.nix create mode 100644 modules/nixos/desktop/gamescope/default.nix create mode 100644 modules/nixos/desktop/gnome/default.nix create mode 100644 modules/nixos/desktop/plasma/default.nix create mode 100644 modules/nixos/hardware/audio/default.nix create mode 100644 modules/nixos/hardware/bluetooth/default.nix create mode 100644 modules/nixos/hardware/gpu/amd.nix create mode 100644 modules/nixos/hardware/gpu/nvidia.nix create mode 100644 modules/nixos/nix/default.nix create mode 100644 modules/nixos/services/media/default.nix rename {_hosts => systems/x86_64-linux}/aule/README.md (100%) rename {_hosts => systems/x86_64-linux}/manwe/README.md (100%) create mode 100644 systems/x86_64-linux/manwe/default.nix create mode 100644 systems/x86_64-linux/manwe/disks.nix create mode 100644 systems/x86_64-linux/manwe/hardware.nix rename {_hosts => systems/x86_64-linux}/orome/README.md (100%) create mode 100644 systems/x86_64-linux/orome/default.nix create mode 100644 systems/x86_64-linux/orome/disks.nix create mode 100644 systems/x86_64-linux/orome/hardware.nix rename {_hosts => systems/x86_64-linux}/tulkas/README.md (100%) create mode 100644 systems/x86_64-linux/tulkas/default.nix create mode 100644 systems/x86_64-linux/tulkas/disks.nix create mode 100644 systems/x86_64-linux/tulkas/hardware.nix create mode 100644 systems/x86_64-linux/ulmo/default.nix create mode 100644 systems/x86_64-linux/ulmo/disks.nix create mode 100644 systems/x86_64-linux/ulmo/hardware.nix diff --git a/flake.lock b/flake.lock index 87de250..1c8b5cb 100644 --- a/flake.lock +++ b/flake.lock @@ -191,6 +191,22 @@ } }, "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { "locked": { "lastModified": 1747046372, "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", @@ -262,6 +278,25 @@ "type": "github" } }, + "flake-utils-plus": { + "inputs": { + "flake-utils": "flake-utils_5" + }, + "locked": { + "lastModified": 1715533576, + "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "type": "github" + }, + "original": { + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "type": "github" + } + }, "flake-utils_2": { "inputs": { "systems": "systems_2" @@ -316,6 +351,24 @@ "type": "github" } }, + "flake-utils_5": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flux": { "inputs": { "nixpkgs": "nixpkgs_3" @@ -871,6 +924,7 @@ "nixpkgs": "nixpkgs_5", "nvf": "nvf", "plasma-manager": "plasma-manager", + "snowfall-lib": "snowfall-lib", "sops-nix": "sops-nix", "stylix": "stylix", "zen-browser": "zen-browser" @@ -893,6 +947,28 @@ "type": "github" } }, + "snowfall-lib": { + "inputs": { + "flake-compat": "flake-compat_4", + "flake-utils-plus": "flake-utils-plus", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736130495, + "narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=", + "owner": "snowfallorg", + "repo": "lib", + "rev": "02d941739f98a09e81f3d2d9b3ab08918958beac", + "type": "github" + }, + "original": { + "owner": "snowfallorg", + "repo": "lib", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_7" @@ -918,14 +994,14 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_8", "nur": "nur", - "systems": "systems_6", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1036,6 +1112,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 872bf61..5abe818 100644 --- a/flake.nix +++ b/flake.nix @@ -58,48 +58,23 @@ inherit inputs; src = ./.; - namespace = "sneeuwvlok"; - - meta = { - name = "sneeuwvlok"; - title = "Sneeuwvlok"; + channels-config = { + allowUnfree = true; }; + + snowfall = { + namespace = "sneeuwvlok"; + + meta = { + name = "sneeuwvlok"; + title = "Sneeuwvlok"; + }; + }; + + overlays = with inputs; [ + fenix.overlays.default + nix-minecraft.overlay + flux.overlays.default + ]; }; - - # outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }: - # let - # inherit (lib.my) readNixosModules mapHosts; - - # system = "x86_64-linux"; - - # mkPkgs = pkgs: extraOverlays: - # import pkgs { - # inherit system; - # config.allowUnfree = true; - # overlays = extraOverlays ++ (lib.attrValues self.overlays); - # }; - # pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default]; - - # lib = nixpkgs.lib.extend (final: prev: { - # my = import ./lib { - # inherit pkgs inputs; - - # lib = final; - # }; - # }); - # in - # { - # lib = lib.my; - - # overlays = { - # default = final: prev: { - # my = self.packages.${system}; - # }; - # }; - - # packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; }); - - # nixosModules = readNixosModules ./modules import; - # nixosConfigurations = mapHosts ./hosts {}; - # }; } diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix new file mode 100644 index 0000000..bd48767 --- /dev/null +++ b/homes/user-configurations/chris.nix @@ -0,0 +1,6 @@ +{ + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; +} \ No newline at end of file diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix new file mode 100644 index 0000000..5acdd92 --- /dev/null +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: +let + inherit (lib); +in +{ + sneeuwvlok = { + series = { + media.enable = true; + }; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix new file mode 100644 index 0000000..7a03fe9 --- /dev/null +++ b/modules/home/desktop/plasma/default.nix @@ -0,0 +1,73 @@ +{ config, lib, namespace, osConfig ? {}, ... }: +let + cfg = config.${namespace}.desktop.plasma; + osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; +in +{ + options.${namespace}.desktop.plasma = { + + }; + + config = mkIf osCfg.enable { + programs.plasma = { + enable = true; + + immutableByDefault = true; + windows.allowWindowsToRememberPositions = true; + + session = { + general.askForConfirmationOnLogout = false; + sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; + }; + + workspace = { + clickItemTo = "select"; + colorScheme = "EverforestDark"; + wallpaper = config.stylix.image; + }; + + spectacle.shortcuts = { + captureRectangularRegion = "Meta+Shift+S"; + }; + + kscreenlocker = { + autoLock = false; + lockOnResume = false; + lockOnStartup = false; + + appearance = { + alwaysShowClock = true; + showMediaControls = true; + }; + }; + + configFile = { + baloofilerc."Basic Settings"."Indexing-Enabled" = false; + + kdeglobals = { + General = { + # enable font antialiasing + XftAntialias = true; + XftHintStyle = "hintslight"; + XftSubPixel = "rgb"; + }; + }; + + kwalletrc = { + Wallet.Enabled = false; + }; + + plasmarc = { + General = { + RaiseMaximumVolume = true; + VolumeStep = 2; + }; + }; + + kcminputrc = { + Keyboard.NumLock.value = 0; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix new file mode 100644 index 0000000..fa4de70 --- /dev/null +++ b/modules/home/desktop/plasma/panels.nix @@ -0,0 +1,122 @@ +{ config, lib, namespace, osConfig ? {}, ... }: +let + cfg = config.${namespace}.desktop.plasma; + osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; +in +{ + options.${namespace}.desktop.plasma = { + + }; + + config = mkIf osCfg.enable { + programs.plasma.panels = [ + { + location = "bottom"; + floating = true; + lengthMode = "fill"; + height = 42; + hiding = "none"; + screen = "all"; + widgets = [ + { + panelSpacer = { + expanding = true; + }; + } + { + kickoff = { + applicationsDisplayMode = "list"; + compactDisplayStyle = false; + favoritesDisplayMode = "grid"; + sortAlphabetically = true; + showButtonsFor = { + custom = [ + "shutdown" + "reboot" + "logout" + "lock-screen" + ]; + }; + showActionButtonCaptions = true; + }; + } + { + iconTasks = { + appearance = { + fill = false; + highlightWindows = true; + iconSpacing = "medium"; + indicateAudioStreams = true; + rows = { + multirowView = "never"; + maximum = null; + }; + showTooltips = true; + }; + behavior = { + grouping = { + clickAction = "showPresentWindowsEffect"; + method = "byProgramName"; + }; + minimizeActiveTaskOnClick = true; + newTasksAppearOn = "right"; + showTasks = { + onlyInCurrentActivity = true; + onlyInCurrentDesktop = true; + onlyMinimized = false; + onlyInCurrentScreen = false; + }; + sortingMethod = "manually"; + unhideOnAttentionNeeded = true; + wheel = { + ignoreMinimizedTasks = true; + switchBetweenTasks = true; + }; + }; + launchers = [ + "preferred://filemanager" + "preferred://browser" + "preferred://terminalemulator" + "preferred://email" + "applications:vesktop.desktop" + "applications:steam.desktop" + ]; + }; + } + { + panelSpacer = { + expanding = true; + }; + } + { + systemTray = { + icons = { + scaleToFit = true; + spacing = "small"; + }; + items = { + hidden = [ + "org.kde.plasma.brightness" + ]; + }; + pin = false; + }; + } + { + digitalClock = { + date = { + enable = true; + format = "shortDate"; + position = "belowTime"; + }; + time = { + format = "24h"; + showSeconds = "onlyInTooltip"; + }; + }; + } + ]; + } + ]; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix new file mode 100644 index 0000000..9d05dad --- /dev/null +++ b/modules/home/desktop/plasma/power.nix @@ -0,0 +1,50 @@ +{ config, lib, namespace, osConfig ? {}, ... }: +let + cfg = config.${namespace}.desktop.plasma; + osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; +in +{ + options.${namespace}.desktop.plasma = { + + }; + + config = mkIf osCfg.enable { + programs.plasma.powerdevil = { + AC = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + + battery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + + lowBattery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix new file mode 100644 index 0000000..8037621 --- /dev/null +++ b/modules/nixos/boot/default.nix @@ -0,0 +1,81 @@ +{ lib, namespace, config, ... }: +let + inherit (lib) mkIf mkMerge mkDefault mkEnableOption; + inherit (lib.types) enum; + + cfg = config.${namespace}.boot; +in +{ + config.${namespace}.boot = { + type = mkOption { + type = enum [ "bios" "uefi" ]; + default = "uefi"; + }; + + quiet = mkOption { + type = bool; + default = false; + }; + + animated = mkOption { + type = bool; + default = false; + }; + }; + + config = mkMerge [ + ({ + boot.loader.grub.enable = mkDefault true; + }) + + (mkIf cfg.type == "bios" { + boot.loader.grub.efiSupport = false; + }) + + (mkIf cfg.type == "uefi" { + boot.loader = { + efi.canTouchEfiVariables = true; + grub = { + efiSupport = true; + efiInstallAsRemovable = mkDefault false; + device = "nodev"; # INFO: https://discourse.nixos.org/t/question-about-grub-and-nodev + }; + }; + }) + + (mkIf cfg.quiet { + boot = { + consoleLogLevel = 0; + + initrd = { + systemd.enable = true; + verbose = false; + }; + + kernelParams = [ + "quiet" + "loglevel=3" + "systemd.show_status=auto" + "udev.log_level=3" + "rd.udev.log_level=3" + "vt.global_cursor_default=0" + ]; + + loader.timeout = mkDefault 0; + }; + }) + + (mkIf cfg.animated { + boot.plymouth = { + enable = true; + + theme = mkDefault "pixels"; + themePackages = with pkgs; [ + (adi1090x-plymouth-themes.override { + selected_themes = [ "pixels" ]; + }) + ]; + }; + }) + ]; +} \ No newline at end of file diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..34c0298 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: +let + inherit (lib) mkOption mkMerge attrNames filterAttrs; + inherit (lib.types) nullOr enum; + + cfg = config.${namespace}; +in +{ + options.${namespace} = { + preset = mkOption { + type = nullOr enum [ "server" "desktop" ]; + default = null; + example = "desktop"; + description = "Which defaults profile to start with"; + }; + }; + + config = mkMerge [ + (mkIf cfg.preset == "desktop" { + "${namespace}" = mkDefault { + hardware.has = { + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "kde"; + }; + }) + + (mkIf cfg.preset == "desktop" { + "${namespace}" = mkDefault { + services = { + ssh.enable = true; + }; + }; + }) + ]; +} \ No newline at end of file diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix new file mode 100644 index 0000000..1c053c4 --- /dev/null +++ b/modules/nixos/desktop/default.nix @@ -0,0 +1,37 @@ +{ lib, config, namespace, ... }:let + inherit (lib) mkOption mkMerge attrNames filterAttrs; + inherit (lib.types) nullOr enum bool; + + cfg = config.${namespace}.desktop; +in +{ + options.${namespace}.desktop = { + use = mkOption { + type = nullOr enum (attrNames (filterAttrs (n: type == "directory") (readDir ./.))); + default = null; + example = "plasma"; + description = "Which desktop to enable"; + }; + + autoLogin = mkOption { + type = bool; + default = false; + example = true; + description = "Enable plasma's auto login feature."; + }; + }; + + config = mkMerge [ + (mkIf cfg.desktop != null { + "${namespace}".desktop.${cfg.use}.enable = true; + + services.displayManager = { + enable = true; + + autoLogin = mkIf cfg.autoLogin { + enable = true; + }; + }; + }) + ]; +} diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix new file mode 100644 index 0000000..1d3d427 --- /dev/null +++ b/modules/nixos/desktop/gamescope/default.nix @@ -0,0 +1,27 @@ +{ lib, config, namespace, inputs, ... }:let + inherit (lib) mkEnableOption; + + cfg = config.${namespace}.desktop.gamescope; +in +{ + imports = [ inputs.jovian.nixosModules.default ]; + + options.${namespace}.desktop.gamescope = { + enable = mkEnableOption "Enable Steamdeck ui"; + }; + + config = mkIf cfg.enable { + "${namespace}".desktop.kde.enable = true; + + jovian = { + steam = { + enable = true; + autoStart = true; + user = "chris"; + updater.splash = "steamos"; + desktopSession = "plasma"; + }; + steamos.useSteamOSConfig = true; + }; + }; +} diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix new file mode 100644 index 0000000..add3f2c --- /dev/null +++ b/modules/nixos/desktop/gnome/default.nix @@ -0,0 +1,14 @@ +{ lib, config, namespace, ... }:let + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) bool; + + cfg = config.${namespace}.desktop.gnome; +in +{ + options.${namespace}.desktop.gnome = { + enable = mkEnableOption "Enable Gnome"; + }; + + config = mkIf cfg.enable { + }; +} diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix new file mode 100644 index 0000000..3a30daf --- /dev/null +++ b/modules/nixos/desktop/plasma/default.nix @@ -0,0 +1,30 @@ +{ lib, config, namespace, ... }:let + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) bool; + + cfg = config.${namespace}.desktop.plasma; +in +{ + options.${namespace}.desktop.plasma = { + enable = mkEnableOption "Enable KDE Plasma"; + }; + + config = mkIf cfg.enable { + environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ]; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + services = { + xserver.enable = false; + + desktopManager.plasma6.enable = true; + + displayManager = { + defaultSession = "plasma"; + sddm = { + enable = true; + wayland.enable = true; + }; + }; + }; + }; +} diff --git a/modules/nixos/hardware/audio/default.nix b/modules/nixos/hardware/audio/default.nix new file mode 100644 index 0000000..bf9760f --- /dev/null +++ b/modules/nixos/hardware/audio/default.nix @@ -0,0 +1,30 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.audio; +in +{ + config.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth"; + + config = mkIf cfg { + environment.systemPackages = with pkgs; [ + sof-firmware + ]; + + # https://wiki.nixos.org/wiki/PipeWire + security.rtkit.enable = true; + + services.pulseaudio.enable = false; + services.pipewire = { + enable = true; + wireplumber.enable = true; + pulse.enable = true; + + alsa = { + enable = true; + support32Bit = true; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix new file mode 100644 index 0000000..31dcdbc --- /dev/null +++ b/modules/nixos/hardware/bluetooth/default.nix @@ -0,0 +1,25 @@ +{ lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.bluetooth; +in +{ + config.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; + + config = mkIf cfg { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + + services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = { + "monitor.bluez.properties" = { + "bluez5.enable-sbc-xq" = true; + "bluez5.enable-msbc" = true; + "bluez5.enable-hw-volume" = true; + "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd.nix new file mode 100644 index 0000000..9bd0961 --- /dev/null +++ b/modules/nixos/hardware/gpu/amd.nix @@ -0,0 +1,29 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.gpu.amd; +in +{ + config.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; + + config = mkIf cfg { + services.xserver.videoDrivers = [ "amd" ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + amdgpu = { + amdvlk = { + enable = true; + support32Bit.enable = true; + }; + + initrd.enable = true; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/gpu/nvidia.nix b/modules/nixos/hardware/gpu/nvidia.nix new file mode 100644 index 0000000..0e0ea4e --- /dev/null +++ b/modules/nixos/hardware/gpu/nvidia.nix @@ -0,0 +1,31 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.gpu.nvidia; +in +{ + config.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; + + config = mkIf cfg { + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + nvidia = { + modesetting.enable = true; + open = false; + nvidiaSettings = true; + + powerManagement = { + enable = true; + finegrained = false; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix new file mode 100644 index 0000000..1177a14 --- /dev/null +++ b/modules/nixos/nix/default.nix @@ -0,0 +1,42 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.nix; +in +{ + config.${namespace}.nix = { + enable = mkEnableOption "Enable nix command"; + }; + + config = mkIf cfg.enable { + programs.git.enable = true; + + nix = { + package = pkgs.nixVersions.latest; + + settings = { + experimental-features = [ "nix-command" "flakes" ]; + allowed-users = [ "@wheel" ]; + trusted-users = [ "@wheel" ]; + + auto-optimise-store = true; + connect-timeout = 5; + http-connections = 50; + log-lines = 50; # more log lines in case of error + min-free = 1 * (1024 * 1024 * 1024); # GiB # start garbage collector + max-free = 50 * (1024 * 1024 * 1024); # GiB # until + warn-dirty = false; + }; + + gc = { + automatic = true; + dates = "monthly"; + options = "--delete-older-than 45d"; + }; + + # disable nix-channel, we use flakes instead. + channel.enable = false; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix new file mode 100644 index 0000000..76c6309 --- /dev/null +++ b/modules/nixos/services/media/default.nix @@ -0,0 +1,153 @@ +{ lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.services.media; +in +{ + config.${namespace}.services.media = { + enable = mkEnableOption "Enable media services"; + }; + + config = mkIf cfg.enable { + #========================================================================= + # Dependencies + #========================================================================= + environment.systemPackages = with pkgs; [ + podman-tui + jellyfin + jellyfin-web + jellyfin-ffmpeg + jellyseerr + mediainfo + id3v2 + yt-dlp + ]; + + # need to permit these outdated packages until servarr finally upgrades at some point... + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; + + #========================================================================= + # Prepare system + #========================================================================= + users = { + users.${user} = { + isSystemUser = true; + group = group; + }; + groups.${group} = {}; + }; + + systemd.tmpfiles.rules = [ + "d '${directory}/series' 0700 ${user} ${group} - -" + "d '${directory}/movies' 0700 ${user} ${group} - -" + "d '${directory}/music' 0700 ${user} ${group} - -" + "d '${directory}/qbittorrent' 0700 ${user} ${group} - -" + "d '${directory}/sabnzbd' 0700 ${user} ${group} - -" + "d '${directory}/reiverr/config' 0700 ${user} ${group} - -" + "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -" + "d '${directory}/downloads/done' 0700 ${user} ${group} - -" + ]; + + #========================================================================= + # Services + #========================================================================= + services = let + serviceConf = { + enable = true; + openFirewall = true; + user = user; + group = group; + }; + in { + jellyfin = serviceConf; + radarr = serviceConf; + sonarr = serviceConf; + bazarr = serviceConf; + lidarr = serviceConf; + + lanraragi = { + enable = true; + port = 6969; + }; + + jellyseerr = { + enable = true; + openFirewall = true; + }; + + prowlarr = { + enable = true; + openFirewall = true; + }; + + qbittorrent = { + enable = true; + openFirewall = true; + dataDir = "${directory}/qbittorrent"; + port = 5000; + + user = user; + group = group; + }; + + sabnzbd = { + enable = true; + openFirewall = true; + configFile = "${directory}/sabnzbd/config.ini"; + + user = user; + group = group; + }; + }; + + systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL"; + + modules.virtualisation.podman.enable = true; + + virtualisation = { + oci-containers = { + backend = "podman"; + + containers = { + flaresolverr = { + image = "flaresolverr/flaresolverr"; + autoStart = true; + ports = [ "127.0.0.1:8191:8191" ]; + }; + + reiverr = { + image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; + autoStart = true; + ports = [ "127.0.0.1:9494:9494" ]; + volumes = [ "${directory}/reiverr/config:/config" ]; + }; + }; + }; + }; + + #========================================================================= + # Hosting + #========================================================================= + services = { + caddy = { + enable = true; + virtualHosts = { + "media.kruining.eu".extraConfig = '' + import auth + + reverse_proxy http://127.0.0.1:9494 + ''; + "jellyfin.kruining.eu".extraConfig = '' + reverse_proxy http://127.0.0.1:8096 + ''; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 6969 ]; + }; +} \ No newline at end of file diff --git a/_hosts/aule/README.md b/systems/x86_64-linux/aule/README.md similarity index 100% rename from _hosts/aule/README.md rename to systems/x86_64-linux/aule/README.md diff --git a/_hosts/manwe/README.md b/systems/x86_64-linux/manwe/README.md similarity index 100% rename from _hosts/manwe/README.md rename to systems/x86_64-linux/manwe/README.md diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix new file mode 100644 index 0000000..f10ca22 --- /dev/null +++ b/systems/x86_64-linux/manwe/default.nix @@ -0,0 +1,20 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "desktop"; + + hardware.has = { + gpu.amd = true; + bluetooth = true; + }; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix new file mode 100644 index 0000000..3a3375e --- /dev/null +++ b/systems/x86_64-linux/manwe/disks.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = [ + { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } + ]; + + boot.supportedFilesystems = [ "nfs" ]; + + fileSystems = { + "/" = { device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/C842-316A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/home/chris/games" = { + device = "/dev/disk/by-label/games"; + fsType = "ext4"; + }; + + # TODO :: Reformat the disk to ext4 + "/home/chris/data" = { + device = "/dev/disk/by-label/Data"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=chris" ]; + }; + + "/home/chris/media" = { + device = "ulmo:/"; + fsType = "nfs"; + }; + }; +} diff --git a/systems/x86_64-linux/manwe/hardware.nix b/systems/x86_64-linux/manwe/hardware.nix new file mode 100644 index 0000000..60759bd --- /dev/null +++ b/systems/x86_64-linux/manwe/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/_hosts/orome/README.md b/systems/x86_64-linux/orome/README.md similarity index 100% rename from _hosts/orome/README.md rename to systems/x86_64-linux/orome/README.md diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix new file mode 100644 index 0000000..5d5bf2f --- /dev/null +++ b/systems/x86_64-linux/orome/default.nix @@ -0,0 +1,17 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "desktop"; + + bluetooth.enable = true; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/orome/disks.nix b/systems/x86_64-linux/orome/disks.nix new file mode 100644 index 0000000..5a11407 --- /dev/null +++ b/systems/x86_64-linux/orome/disks.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = []; + + boot.supportedFilesystems = [ "nfs" ]; + + fileSystems = { + "/" = { device = "/dev/disk/by-uuid/e60745c9-b3ea-4aeb-9c5c-b67ef1730826"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/42B3-C767"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + }; +} diff --git a/systems/x86_64-linux/orome/hardware.nix b/systems/x86_64-linux/orome/hardware.nix new file mode 100644 index 0000000..ee52810 --- /dev/null +++ b/systems/x86_64-linux/orome/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/_hosts/tulkas/README.md b/systems/x86_64-linux/tulkas/README.md similarity index 100% rename from _hosts/tulkas/README.md rename to systems/x86_64-linux/tulkas/README.md diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix new file mode 100644 index 0000000..792956e --- /dev/null +++ b/systems/x86_64-linux/tulkas/default.nix @@ -0,0 +1,16 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "desktop"; + desktop.use = "gamescope"; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/tulkas/disks.nix b/systems/x86_64-linux/tulkas/disks.nix new file mode 100644 index 0000000..43b8825 --- /dev/null +++ b/systems/x86_64-linux/tulkas/disks.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = [ + { device = "/dev/disk/by-uuid/beddca5c-1ecc-4a46-9fc5-fd918eed8f2a"; } + ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/aa438c4c-d193-436b-91ca-c386c0688265"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/89B8-0702"; + fsType = "vfat"; + }; + }; +} diff --git a/systems/x86_64-linux/tulkas/hardware.nix b/systems/x86_64-linux/tulkas/hardware.nix new file mode 100644 index 0000000..950d7cc --- /dev/null +++ b/systems/x86_64-linux/tulkas/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-amd" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix new file mode 100644 index 0000000..d28c19f --- /dev/null +++ b/systems/x86_64-linux/ulmo/default.nix @@ -0,0 +1,19 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + preset = "server"; + + services = { + media.enable = true; + }; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/ulmo/disks.nix b/systems/x86_64-linux/ulmo/disks.nix new file mode 100644 index 0000000..a4033f7 --- /dev/null +++ b/systems/x86_64-linux/ulmo/disks.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + + swapDevices = [ + { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } + ]; + + boot.supportedFilesystems = [ "nfs" ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/dd518f17-61c9-4831-b1bd-e1cc2af292aa"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/0A56-EBFE"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/var/media" = { + device = "/dev/disk/by-label/data"; + fsType = "ext4"; + }; + }; +} diff --git a/systems/x86_64-linux/ulmo/hardware.nix b/systems/x86_64-linux/ulmo/hardware.nix new file mode 100644 index 0000000..4479a12 --- /dev/null +++ b/systems/x86_64-linux/ulmo/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} From 423e99886ddf86578d9d92abea9945c78f321888 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 23:56:56 +0200 Subject: [PATCH 14/38] moved over a load more modules --- _modules/system/boot.nix | 48 ----- _modules/system/desktop/gaming.nix | 34 ---- _modules/system/desktop/wine.nix | 8 - _modules/system/graphics.nix | 40 ----- _modules/system/networking/samba.nix | 71 -------- _modules/system/options.nix | 27 --- _modules/system/services/media.nix | 167 ------------------ _modules/system/zsa_voyager.nix | 35 ---- homes/x86_64-linux/chris@manwe/default.nix | 15 +- modules/home/desktop/plasma/default.nix | 10 +- modules/home/desktop/plasma/panels.nix | 4 +- modules/home/desktop/plasma/power.nix | 4 +- modules/nixos/boot/default.nix | 25 ++- modules/nixos/default.nix | 10 +- modules/nixos/desktop/default.nix | 15 +- modules/nixos/desktop/gamescope/default.nix | 2 +- modules/nixos/desktop/gnome/default.nix | 3 +- modules/nixos/desktop/plasma/default.nix | 5 +- modules/nixos/hardware/audio/default.nix | 4 +- modules/nixos/hardware/bluetooth/default.nix | 4 +- modules/nixos/hardware/gpu/amd.nix | 4 +- modules/nixos/hardware/gpu/nvidia.nix | 4 +- modules/nixos/hardware/keyboard/voyager.nix | 46 +++++ modules/nixos/nix/default.nix | 4 +- .../services/authentication}/authelia.nix | 6 +- .../nixos/services/authentication/default.nix | 1 + .../services}/authentication/himmelblau.nix | 6 +- .../services/authentication}/zitadel.nix | 6 +- .../nixos}/services/games/minecraft.nix | 31 ++-- .../nixos}/services/games/palworld.nix | 12 +- modules/nixos/services/media/default.nix | 104 ++++++----- .../nixos/services/media}/nextcloud.nix | 37 ++-- .../nixos/services/media}/nfs.nix | 6 +- .../nixos/services}/networking/ssh.nix | 6 +- 34 files changed, 226 insertions(+), 578 deletions(-) delete mode 100644 _modules/system/boot.nix delete mode 100644 _modules/system/desktop/gaming.nix delete mode 100644 _modules/system/desktop/wine.nix delete mode 100644 _modules/system/graphics.nix delete mode 100644 _modules/system/networking/samba.nix delete mode 100644 _modules/system/options.nix delete mode 100644 _modules/system/services/media.nix delete mode 100644 _modules/system/zsa_voyager.nix create mode 100644 modules/nixos/hardware/keyboard/voyager.nix rename {_modules/system/services/auth => modules/nixos/services/authentication}/authelia.nix (98%) create mode 100644 modules/nixos/services/authentication/default.nix rename {_modules/system => modules/nixos/services}/authentication/himmelblau.nix (68%) rename {_modules/system/services/auth => modules/nixos/services/authentication}/zitadel.nix (92%) rename {_modules/system => modules/nixos}/services/games/minecraft.nix (91%) rename {_modules/system => modules/nixos}/services/games/palworld.nix (64%) rename {_modules/system/services => modules/nixos/services/media}/nextcloud.nix (77%) rename {_modules/system/networking => modules/nixos/services/media}/nfs.nix (75%) rename {_modules/system => modules/nixos/services}/networking/ssh.nix (78%) diff --git a/_modules/system/boot.nix b/_modules/system/boot.nix deleted file mode 100644 index 4761b6e..0000000 --- a/_modules/system/boot.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ config, lib, pkgs, ... }: -let - inherit (lib) mkMerge mkIf mkEnableOption mkDefault mkForce; - - cfg = config.modules.boot; -in -{ - options.modules.boot = - { - silentBoot = mkEnableOption "Enable silent boot"; - animatedBoot = mkEnableOption "Enable boot animation"; - }; - - config = mkMerge [ - ({ - boot.loader = { - efi.canTouchEfiVariables = true; - - systemd-boot.enable = true; - - timeout = mkDefault 0; - }; - - time.timeZone = "Europe/Amsterdam"; - }) - - (mkIf (cfg.silentBoot == true) { - boot = { - consoleLogLevel = 0; - initrd.verbose = false; - kernelParams = [ "quiet" "splash" "boot.shell_on_fail" "udev.log_priority=3" "rd.systemd.show_status=auto" ]; - loader.timeout = mkDefault 0; - }; - }) - - (mkIf (cfg.animatedBoot == true) { - boot.plymouth = { - enable = true; - theme = mkForce "pixels"; - themePackages = with pkgs; [ - (adi1090x-plymouth-themes.override { - selected_themes = [ "pixels" ]; - }) - ]; - }; - }) - ]; -} diff --git a/_modules/system/desktop/gaming.nix b/_modules/system/desktop/gaming.nix deleted file mode 100644 index 54efe3b..0000000 --- a/_modules/system/desktop/gaming.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ inputs, lib, config, ... }: let - inherit (lib) mkEnableOption mkIf; - - cfg = config.modules.desktop.gaming; -in -{ - imports = [ inputs.jovian.nixosModules.default ]; - - options.modules.desktop.gaming = { - enable = mkEnableOption "enable steamdeck like desktop"; - }; - - config = mkIf cfg.enable { - services.desktopManager.plasma6.enable = true; - - jovian = { - # devices = { - # steamdeck = { - # enable = true; - # enableGyroDsuService = true; - # autoUpdate = true; - # }; - # }; - steam = { - enable = true; - autoStart = true; - user = "chris"; - updater.splash = "steamos"; - desktopSession = "plasma"; - }; - steamos.useSteamOSConfig = true; - }; - }; -} diff --git a/_modules/system/desktop/wine.nix b/_modules/system/desktop/wine.nix deleted file mode 100644 index 7444d77..0000000 --- a/_modules/system/desktop/wine.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - # imports = [ inputs.erosanix.nixosModules.someModule ]; - - config = { - - }; -} diff --git a/_modules/system/graphics.nix b/_modules/system/graphics.nix deleted file mode 100644 index a4d9775..0000000 --- a/_modules/system/graphics.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ ... }: -{ - services.xserver.videoDrivers = [ "nvidia" ]; - - hardware = { - graphics = { - enable = true; - enable32Bit = true; - }; - - nvidia = { - modesetting.enable = true; - open = false; - nvidiaSettings = true; - - powerManagement = { - enable = true; - finegrained = false; - }; - -# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; - - # package = let - # rcu_patch = pkgs.fetchpatch { - # url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; - # hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg="; - # }; - # in config.boot.kernelPackages.nvidiaPackages.mkDriver { - # version = "550.40.07"; - # sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0="; - # sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4="; - # openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I="; - # settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs="; - # persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870="; - - # patches = [ rcu_patch ]; - # }; - }; - }; -} diff --git a/_modules/system/networking/samba.nix b/_modules/system/networking/samba.nix deleted file mode 100644 index d7e0b7f..0000000 --- a/_modules/system/networking/samba.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ pkgs, config, lib, ... }: -let - inherit (builtins) getEnv; - inherit (lib.modules) mkIf mkMerge; -in -{ - options.modules.networking.samba = let - inherit (lib.options) mkEnableOption; - in { - sharing.enable = mkEnableOption "Samba: enable NixOs -> external file-transfer"; - receicing.enable = mkEnableOption "Samba: enable external -> NixOs file-transfer"; - }; - - config = mkMerge [ - (mkIf config.modules.networking.samba.sharing.enable { - users = { - groups.samba-guest = {}; - users.samba-guest = { - isSystemUser = true; - description = "Residence of our Samba guest users"; - group = "samba-guest"; - home = "/var/empty"; - createHome = false; - shell = pkgs.shadow; - }; - }; - user.extraGroups = [ "samba-guest" ]; - - networking.firewall = { - allowPing = true; - allowedTCPPorts = [ 5327 ]; - allowedUDPPorts = [ 3702 ]; - }; - - services.samba-wsdd.enable = true; - - services.samba = { - enable = true; - openFirewall = true; - extraConfig = '' - server string = ${config.networking.hostName} - netbios name = ${config.networking.hostName} - workgroup = WORKGROUP - security = user - - create mask 0664 - force create mode 0664 - directory mask 0775 - force directory mode 0775 - follow symlink = yes - - hosts allow = 192.168.1.0/24 localhost - hosts deny = 0.0.0.0/0 - guest account = nobody - map to guest = bad user - ''; - shares = { - Public = { - path = (getEnv "HOME") + "/Public"; - browseable = "yes"; - "read only" = "yes"; - "guest ok" = "yes"; - "forse user" = "${config.user.name}"; - "force group" = "samba-guest"; - "write list" = "${config.user.name}"; - }; - }; - }; - }) - ]; -} diff --git a/_modules/system/options.nix b/_modules/system/options.nix deleted file mode 100644 index abce819..0000000 --- a/_modules/system/options.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, ... }: -let - inherit (lib.types) attrs; - inherit (lib.my) mkOpt; -in -{ - options = { - user = mkOpt attrs {}; - }; - - config = { - environment.variables = { - NIXPKGS_ALLOW_UNFREE = "1"; - }; - - nix.settings = let - inherit (lib) elem attrNames filterAttrs; - - users = (attrNames (filterAttrs (name: user: elem "wheel" (user.extraGroups or [])) config.users.users));# ++ [ "root" ]; - in - { - trusted-users = users; - allowed-users = users; - experimental-features = [ "nix-command" "flakes" ]; - }; - }; -} diff --git a/_modules/system/services/media.nix b/_modules/system/services/media.nix deleted file mode 100644 index 9ec8e5e..0000000 --- a/_modules/system/services/media.nix +++ /dev/null @@ -1,167 +0,0 @@ -{ config, lib, pkgs, ... }: -let - inherit (lib) mkIf; - - user = "media"; - group = "media"; - directory = "/var/media"; -in -{ - options.modules.services.media = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Media tools"; - }; - - imports = let - extras = fetchTarball { - url = "https://github.com/onny/nixos-nextcloud-testumgebung/archive/fa6f062830b4bc3cedb9694c1dbf01d5fdf775ac.tar.gz"; - sha256 = "0gzd0276b8da3ykapgqks2zhsqdv4jjvbv97dsxg0hgrhb74z0fs"; - }; - in [ - "${extras}/nextcloud-extras.nix" - ]; - - config = mkIf config.modules.services.media.enable { - environment.systemPackages = with pkgs; [ - podman-tui - jellyfin - jellyfin-web - jellyfin-ffmpeg - jellyseerr - mediainfo - id3v2 - yt-dlp - ]; - - # need to permit these outdated packages until servarr finally upgrades at some point... - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - - users = { - users.${user} = { - isSystemUser = true; - group = group; - }; - groups.${group} = {}; - }; - - systemd.tmpfiles.rules = [ - "d '${directory}/series' 0700 ${user} ${group} - -" - "d '${directory}/movies' 0700 ${user} ${group} - -" - "d '${directory}/music' 0700 ${user} ${group} - -" - "d '${directory}/qbittorrent' 0700 ${user} ${group} - -" - "d '${directory}/sabnzbd' 0700 ${user} ${group} - -" - "d '${directory}/reiverr/config' 0700 ${user} ${group} - -" - "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -" - "d '${directory}/downloads/done' 0700 ${user} ${group} - -" - ]; - - services = let - serviceConf = { - enable = true; - openFirewall = true; - user = user; - group = group; - }; - in { - jellyfin = serviceConf; - radarr = serviceConf; - sonarr = serviceConf; - bazarr = serviceConf; - lidarr = serviceConf; - - lanraragi = { - enable = true; - port = 6969; - }; - - jellyseerr = { - enable = true; - openFirewall = true; - }; - - prowlarr = { - enable = true; - openFirewall = true; - }; - - qbittorrent = { - enable = true; - openFirewall = true; - dataDir = "${directory}/qbittorrent"; - port = 5000; - - user = user; - group = group; - }; - - sabnzbd = { - enable = true; - openFirewall = true; - configFile = "${directory}/sabnzbd/config.ini"; - - user = user; - group = group; - }; - - caddy = { - enable = true; - virtualHosts = { - "media.kruining.eu".extraConfig = '' - import auth - - reverse_proxy http://127.0.0.1:9494 - ''; - "jellyfin.kruining.eu".extraConfig = '' - reverse_proxy http://127.0.0.1:8096 - ''; - # "series.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:8989 - # ''; - # "movies.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:7878 - # ''; - # "indexer.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:9696 - # ''; - # "torrents.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:5000 - # ''; - # "usenet.kruining.eu".extraConfig = '' - # reverse_proxy http://127.0.0.1:8080 - # ''; - }; - }; - }; - - networking.firewall.allowedTCPPorts = [ 80 443 6969 ]; - - modules.virtualisation.podman.enable = true; - - virtualisation = { - oci-containers = { - backend = "podman"; - - containers = { - flaresolverr = { - image = "flaresolverr/flaresolverr"; - autoStart = true; - ports = [ "127.0.0.1:8191:8191" ]; - }; - - reiverr = { - image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; - autoStart = true; - ports = [ "127.0.0.1:9494:9494" ]; - volumes = [ "${directory}/reiverr/config:/config" ]; - }; - }; - }; - }; - - systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL"; - }; -} diff --git a/_modules/system/zsa_voyager.nix b/_modules/system/zsa_voyager.nix deleted file mode 100644 index c900954..0000000 --- a/_modules/system/zsa_voyager.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, pkgs, options, ... }: -{ - environment.systemPackages = with pkgs; [ - keymapp - ]; - - hardware.keyboard.zsa.enable = true; - - services.udev.extraRules = '' - # Rules for Oryx web flashing and live training - KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" - KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" - - # Legacy rules for live training over webusb (Not needed for firmware v21+) - # Rule for all ZSA keyboards - SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" - # Rule for the Moonlander - SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" - # Rule for the Ergodox EZ - SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" - # Rule for the Planck EZ - SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" - - # Wally Flashing rules for the Ergodox EZ - ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" - ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" - SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" - KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" - - # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ - SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" - # Keymapp Flashing rules for the Voyager - SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" - ''; -} diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 5acdd92..a5a09f3 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -1,11 +1,8 @@ -{ lib, ... }: -let - inherit (lib); -in +{ ... }: { - sneeuwvlok = { - series = { - media.enable = true; - }; + sneeuwvlok = { + series = { + media.enable = true; }; -} \ No newline at end of file + }; +} diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix index 7a03fe9..12ffce3 100644 --- a/modules/home/desktop/plasma/default.nix +++ b/modules/home/desktop/plasma/default.nix @@ -1,5 +1,7 @@ { config, lib, namespace, osConfig ? {}, ... }: let + inherit (lib) mkIf; + cfg = config.${namespace}.desktop.plasma; osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; in @@ -19,7 +21,7 @@ in general.askForConfirmationOnLogout = false; sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; }; - + workspace = { clickItemTo = "select"; colorScheme = "EverforestDark"; @@ -56,18 +58,18 @@ in kwalletrc = { Wallet.Enabled = false; }; - + plasmarc = { General = { RaiseMaximumVolume = true; VolumeStep = 2; }; }; - + kcminputrc = { Keyboard.NumLock.value = 0; }; }; }; }; -} \ No newline at end of file +} diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix index fa4de70..a35b93c 100644 --- a/modules/home/desktop/plasma/panels.nix +++ b/modules/home/desktop/plasma/panels.nix @@ -1,5 +1,7 @@ { config, lib, namespace, osConfig ? {}, ... }: let + inherit (lib) mkIf; + cfg = config.${namespace}.desktop.plasma; osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; in @@ -119,4 +121,4 @@ in } ]; }; -} \ No newline at end of file +} diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix index 9d05dad..50e7cfe 100644 --- a/modules/home/desktop/plasma/power.nix +++ b/modules/home/desktop/plasma/power.nix @@ -1,5 +1,7 @@ { config, lib, namespace, osConfig ? {}, ... }: let + inherit (lib) mkIf; + cfg = config.${namespace}.desktop.plasma; osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; in @@ -47,4 +49,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 8037621..5c0c53c 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -1,12 +1,12 @@ -{ lib, namespace, config, ... }: +{ lib, namespace, config, pkgs, ... }: let - inherit (lib) mkIf mkMerge mkDefault mkEnableOption; - inherit (lib.types) enum; + inherit (lib) mkIf mkMerge mkDefault mkOption; + inherit (lib.types) enum bool; cfg = config.${namespace}.boot; in { - config.${namespace}.boot = { + options.${namespace}.boot = { type = mkOption { type = enum [ "bios" "uefi" ]; default = "uefi"; @@ -25,7 +25,16 @@ in config = mkMerge [ ({ - boot.loader.grub.enable = mkDefault true; + boot.loader = { + systemd-boot.enable = false; + grub.enable = true; + + grub2-theme = { + enable = true; + theme = "vimix"; + footer = true; + }; + }; }) (mkIf cfg.type == "bios" { @@ -52,7 +61,7 @@ in verbose = false; }; - kernelParams = [ + kernelParams = [ "quiet" "loglevel=3" "systemd.show_status=auto" @@ -68,7 +77,7 @@ in (mkIf cfg.animated { boot.plymouth = { enable = true; - + theme = mkDefault "pixels"; themePackages = with pkgs; [ (adi1090x-plymouth-themes.override { @@ -78,4 +87,4 @@ in }; }) ]; -} \ No newline at end of file +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 34c0298..6efb305 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, namespace, ... }: let - inherit (lib) mkOption mkMerge attrNames filterAttrs; + inherit (lib) mkIf mkDefault mkOption mkMerge; inherit (lib.types) nullOr enum; cfg = config.${namespace}; @@ -17,7 +17,7 @@ in config = mkMerge [ (mkIf cfg.preset == "desktop" { - "${namespace}" = mkDefault { + ${namespace} = mkDefault { hardware.has = { audio = true; }; @@ -26,7 +26,7 @@ in quiet = true; animated = true; }; - + desktop.use = "kde"; }; }) @@ -39,4 +39,4 @@ in }; }) ]; -} \ No newline at end of file +} diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 1c053c4..cca4c69 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,24 +1,19 @@ { lib, config, namespace, ... }:let - inherit (lib) mkOption mkMerge attrNames filterAttrs; - inherit (lib.types) nullOr enum bool; + inherit (lib) mkIf mkOption mkEnableOption mkMerge attrNames filterAttrs readDir; + inherit (lib.types) nullOr enum; cfg = config.${namespace}.desktop; in { options.${namespace}.desktop = { use = mkOption { - type = nullOr enum (attrNames (filterAttrs (n: type == "directory") (readDir ./.))); + type = nullOr enum (attrNames (filterAttrs (n: type: type == "directory") (readDir ./.))); default = null; example = "plasma"; description = "Which desktop to enable"; }; - autoLogin = mkOption { - type = bool; - default = false; - example = true; - description = "Enable plasma's auto login feature."; - }; + autoLogin = mkEnableOption "Enable plasma's auto login feature."; }; config = mkMerge [ @@ -27,7 +22,7 @@ in services.displayManager = { enable = true; - + autoLogin = mkIf cfg.autoLogin { enable = true; }; diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix index 1d3d427..f125292 100644 --- a/modules/nixos/desktop/gamescope/default.nix +++ b/modules/nixos/desktop/gamescope/default.nix @@ -1,5 +1,5 @@ { lib, config, namespace, inputs, ... }:let - inherit (lib) mkEnableOption; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gamescope; in diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix index add3f2c..126d384 100644 --- a/modules/nixos/desktop/gnome/default.nix +++ b/modules/nixos/desktop/gnome/default.nix @@ -1,6 +1,5 @@ { lib, config, namespace, ... }:let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) bool; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gnome; in diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix index 3a30daf..8be91ec 100644 --- a/modules/nixos/desktop/plasma/default.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -1,6 +1,5 @@ -{ lib, config, namespace, ... }:let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) bool; +{ pkgs, lib, config, namespace, ... }:let + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.plasma; in diff --git a/modules/nixos/hardware/audio/default.nix b/modules/nixos/hardware/audio/default.nix index bf9760f..d3f340f 100644 --- a/modules/nixos/hardware/audio/default.nix +++ b/modules/nixos/hardware/audio/default.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.audio; in { - config.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth"; + options.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth"; config = mkIf cfg { environment.systemPackages = with pkgs; [ @@ -27,4 +27,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix index 31dcdbc..1b99eef 100644 --- a/modules/nixos/hardware/bluetooth/default.nix +++ b/modules/nixos/hardware/bluetooth/default.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.bluetooth; in { - config.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; + options.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; config = mkIf cfg { hardware.bluetooth = { @@ -22,4 +22,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd.nix index 9bd0961..c47191c 100644 --- a/modules/nixos/hardware/gpu/amd.nix +++ b/modules/nixos/hardware/gpu/amd.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.gpu.amd; in { - config.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; + options.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; config = mkIf cfg { services.xserver.videoDrivers = [ "amd" ]; @@ -26,4 +26,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/gpu/nvidia.nix b/modules/nixos/hardware/gpu/nvidia.nix index 0e0ea4e..e8ac542 100644 --- a/modules/nixos/hardware/gpu/nvidia.nix +++ b/modules/nixos/hardware/gpu/nvidia.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.hardware.has.gpu.nvidia; in { - config.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; + options.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; config = mkIf cfg { services.xserver.videoDrivers = [ "nvidia" ]; @@ -28,4 +28,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/keyboard/voyager.nix b/modules/nixos/hardware/keyboard/voyager.nix new file mode 100644 index 0000000..fd470f8 --- /dev/null +++ b/modules/nixos/hardware/keyboard/voyager.nix @@ -0,0 +1,46 @@ +{ lib, config, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.keyboard.voyager; +in +{ + options.${namespace}.hardware.keyboard.voyager = { + enble = mkEnableOption "Enable tools for ZSA Voyager"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + keymapp + ]; + + hardware.keyboard.zsa.enable = true; + + services.udev.extraRules = '' + # Rules for Oryx web flashing and live training + KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" + KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" + + # Legacy rules for live training over webusb (Not needed for firmware v21+) + # Rule for all ZSA keyboards + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" + # Rule for the Moonlander + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" + # Rule for the Ergodox EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" + # Rule for the Planck EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" + + # Wally Flashing rules for the Ergodox EZ + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" + SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" + KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" + + # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" + # Keymapp Flashing rules for the Voyager + SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" + ''; + }; +} diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 1177a14..05c001a 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -5,7 +5,7 @@ let cfg = config.${namespace}.nix; in { - config.${namespace}.nix = { + options.${namespace}.nix = { enable = mkEnableOption "Enable nix command"; }; @@ -39,4 +39,4 @@ in channel.enable = false; }; }; -} \ No newline at end of file +} diff --git a/_modules/system/services/auth/authelia.nix b/modules/nixos/services/authentication/authelia.nix similarity index 98% rename from _modules/system/services/auth/authelia.nix rename to modules/nixos/services/authentication/authelia.nix index c713279..e706439 100644 --- a/_modules/system/services/auth/authelia.nix +++ b/modules/nixos/services/authentication/authelia.nix @@ -1,12 +1,12 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; user = "authelia-testing"; - cfg = config.modules.services.auth.authelia; + cfg = config.${namespace}.services.authentication.authelia; in { - options.modules.services.auth.authelia = { + options.${namespace}.services.authentication.authelia = { enable = mkEnableOption "Authelia"; }; diff --git a/modules/nixos/services/authentication/default.nix b/modules/nixos/services/authentication/default.nix new file mode 100644 index 0000000..c157af7 --- /dev/null +++ b/modules/nixos/services/authentication/default.nix @@ -0,0 +1 @@ +{ ... }: {} diff --git a/_modules/system/authentication/himmelblau.nix b/modules/nixos/services/authentication/himmelblau.nix similarity index 68% rename from _modules/system/authentication/himmelblau.nix rename to modules/nixos/services/authentication/himmelblau.nix index 7817335..1228759 100644 --- a/_modules/system/authentication/himmelblau.nix +++ b/modules/nixos/services/authentication/himmelblau.nix @@ -1,12 +1,12 @@ -{ inputs, lib, config, ... }: let +{ inputs, lib, config, namespace, ... }: let inherit (lib) mkEnableOption mkIf; - cfg = config.modules.authentication.himmelblau; + cfg = config.${namespace}.services.authentication.himmelblau; in { imports = [ inputs.himmelblau.nixosModules.himmelblau ]; - options.modules.authentication.himmelblau = { + options.${namespace}.services.authentication.himmelblau = { enable = mkEnableOption "enable azure entra ID authentication"; }; diff --git a/_modules/system/services/auth/zitadel.nix b/modules/nixos/services/authentication/zitadel.nix similarity index 92% rename from _modules/system/services/auth/zitadel.nix rename to modules/nixos/services/authentication/zitadel.nix index 2814649..6142857 100644 --- a/_modules/system/services/auth/zitadel.nix +++ b/modules/nixos/services/authentication/zitadel.nix @@ -1,14 +1,14 @@ -{ config, options, lib, pkgs, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.modules.services.auth.zitadel; + cfg = config.${namespace}.services.authentication.zitadel; db_name = "zitadel"; db_user = "zitadel"; in { - options.modules.services.auth.zitadel = { + options.${namespace}.services.authentication.zitadel = { enable = mkEnableOption "Zitadel"; }; diff --git a/_modules/system/services/games/minecraft.nix b/modules/nixos/services/games/minecraft.nix similarity index 91% rename from _modules/system/services/games/minecraft.nix rename to modules/nixos/services/games/minecraft.nix index c414881..7f408ae 100644 --- a/_modules/system/services/games/minecraft.nix +++ b/modules/nixos/services/games/minecraft.nix @@ -1,22 +1,33 @@ -{ inputs, config, lib, pkgs, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption mkOption; + inherit (lib.types) str; + + cfg = config.${namespace}.services.games.minecraft; in { imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ]; - options.modules.services.games.minecraft = let - inherit (lib.options) mkEnableOption; - in { + options.${namespace}.services.games.minecraft = { enable = mkEnableOption "Minecraft"; + + user = mkOption { + type = str; + default = "minecraft"; + }; + + group = mkOption { + type = str; + default = "minecraft"; + }; }; - config = mkIf config.modules.services.games.minecraft.enable { - user.users."minecraft" = { + config = mkIf cfg.enable { + user.users.${cfg.user} = { isSystemUser = true; - group = "minecraft"; + group = cfg.group; }; services = { @@ -25,7 +36,7 @@ in eula = true; openFirewall = true; - user = "minecraft"; + user = cfg.user; dataDir = "/var/lib/minecraft"; managementSystem = { @@ -151,7 +162,7 @@ in symlinks = let inherit (builtins) attrNames readDir map; - inherit (pkgs) linkFarm fetchzip; + inherit (pkgs) linkFarm; linkFarmFromDir = name: dir: linkFarm name (map (x: { name = x; path = "${src}/${dir}/${x}"; }) (attrNames (readDir "${src}/${dir}"))); in { diff --git a/_modules/system/services/games/palworld.nix b/modules/nixos/services/games/palworld.nix similarity index 64% rename from _modules/system/services/games/palworld.nix rename to modules/nixos/services/games/palworld.nix index 2f11597..dea16b3 100644 --- a/_modules/system/services/games/palworld.nix +++ b/modules/nixos/services/games/palworld.nix @@ -1,15 +1,15 @@ -{ config, options, lib, pkgs, ... }: +{ config, lib, namespace, ... }: let - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.services.games.palworld; in { - options.modules.services.games.palworld = let - inherit (lib.options) mkEnableOption; - in { + options.${namespace}.services.games.palworld = { enable = mkEnableOption "Palworld"; }; - config = mkIf config.modules.services.games.palworld.enable { + config = mkIf cfg.enable { # kaas = (pkgs.mkSteamServer rec { # name = "Palworld"; # src = pkgs.fetchSteam { diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix index 76c6309..4827114 100644 --- a/modules/nixos/services/media/default.nix +++ b/modules/nixos/services/media/default.nix @@ -1,12 +1,28 @@ -{ lib, namespace, config, ... }: +{ pkgs, lib, namespace, config, ... }: let - inherit (lib) mkIf mkEnableOption; + inherit (lib) mkIf mkEnableOption mkOption; + inherit (lib.types) str; cfg = config.${namespace}.services.media; in { - config.${namespace}.services.media = { + options.${namespace}.services.media = { enable = mkEnableOption "Enable media services"; + + user = mkOption { + type = str; + default = "media"; + }; + + group = mkOption { + type = str; + default = "media"; + }; + + path = mkOption { + type = str; + default = "/var/media"; + }; }; config = mkIf cfg.enable { @@ -23,7 +39,7 @@ in id3v2 yt-dlp ]; - + # need to permit these outdated packages until servarr finally upgrades at some point... permittedInsecurePackages = [ "dotnet-sdk-6.0.428" @@ -34,22 +50,22 @@ in # Prepare system #========================================================================= users = { - users.${user} = { + users.${cfg.user} = { isSystemUser = true; - group = group; + group = cfg.group; }; - groups.${group} = {}; + groups.${cfg.group} = {}; }; systemd.tmpfiles.rules = [ - "d '${directory}/series' 0700 ${user} ${group} - -" - "d '${directory}/movies' 0700 ${user} ${group} - -" - "d '${directory}/music' 0700 ${user} ${group} - -" - "d '${directory}/qbittorrent' 0700 ${user} ${group} - -" - "d '${directory}/sabnzbd' 0700 ${user} ${group} - -" - "d '${directory}/reiverr/config' 0700 ${user} ${group} - -" - "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -" - "d '${directory}/downloads/done' 0700 ${user} ${group} - -" + "d '${cfg.directory}/series' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/movies' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/music' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.directory}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -" ]; #========================================================================= @@ -59,8 +75,8 @@ in serviceConf = { enable = true; openFirewall = true; - user = user; - group = group; + user = cfg.user; + group = cfg.group; }; in { jellyfin = serviceConf; @@ -69,11 +85,6 @@ in bazarr = serviceConf; lidarr = serviceConf; - lanraragi = { - enable = true; - port = 6969; - }; - jellyseerr = { enable = true; openFirewall = true; @@ -87,20 +98,34 @@ in qbittorrent = { enable = true; openFirewall = true; - dataDir = "${directory}/qbittorrent"; + dataDir = "${cfg.directory}/qbittorrent"; port = 5000; - user = user; - group = group; + user = cfg.user; + group = cfg.group; }; sabnzbd = { enable = true; openFirewall = true; - configFile = "${directory}/sabnzbd/config.ini"; + configFile = "${cfg.directory}/sabnzbd/config.ini"; - user = user; - group = group; + user = cfg.user; + group = cfg.group; + }; + + caddy = { + enable = true; + virtualHosts = { + "media.kruining.eu".extraConfig = '' + import auth + + reverse_proxy http://127.0.0.1:9494 + ''; + "jellyfin.kruining.eu".extraConfig = '' + reverse_proxy http://127.0.0.1:8096 + ''; + }; }; }; @@ -123,31 +148,12 @@ in image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; autoStart = true; ports = [ "127.0.0.1:9494:9494" ]; - volumes = [ "${directory}/reiverr/config:/config" ]; + volumes = [ "${cfg.directory}/reiverr/config:/config" ]; }; }; }; }; - #========================================================================= - # Hosting - #========================================================================= - services = { - caddy = { - enable = true; - virtualHosts = { - "media.kruining.eu".extraConfig = '' - import auth - - reverse_proxy http://127.0.0.1:9494 - ''; - "jellyfin.kruining.eu".extraConfig = '' - reverse_proxy http://127.0.0.1:8096 - ''; - }; - }; - }; - networking.firewall.allowedTCPPorts = [ 80 443 6969 ]; }; -} \ No newline at end of file +} diff --git a/_modules/system/services/nextcloud.nix b/modules/nixos/services/media/nextcloud.nix similarity index 77% rename from _modules/system/services/nextcloud.nix rename to modules/nixos/services/media/nextcloud.nix index 4325d6c..658a5b4 100644 --- a/_modules/system/services/nextcloud.nix +++ b/modules/nixos/services/media/nextcloud.nix @@ -1,26 +1,35 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, namespace, ... }: let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption mkOption; + inherit (lib.types) str; - user = "nextcloud"; - group = "nextcloud"; + cfg = config.${namespace}.services.media.nextcloud; in { options.modules.services.nextcloud = { enable = mkEnableOption "Nextcloud"; - }; - config = mkIf config.modules.services.nextcloud.enable { - users = { - users.${user} = { - isSystemUser = true; - group = group; - }; - groups.${group} = {}; + user = mkOption { + type = str; + default = "nextcloud"; }; - home-manager.users.${user}.home = { + group = mkOption { + type = str; + default = "nextcloud"; + }; + }; + + config = mkIf cfg.enable { + users = { + users.${cfg.user} = { + isSystemUser = true; + group = cfg.group; + }; + groups.${cfg.group} = {}; + }; + + home-manager.users.${cfg.user}.home = { stateVersion = config.system.stateVersion; file.".netrc".text = '' diff --git a/_modules/system/networking/nfs.nix b/modules/nixos/services/media/nfs.nix similarity index 75% rename from _modules/system/networking/nfs.nix rename to modules/nixos/services/media/nfs.nix index 38a42df..7674e69 100644 --- a/_modules/system/networking/nfs.nix +++ b/modules/nixos/services/media/nfs.nix @@ -1,11 +1,11 @@ -{ config, lib, ... }: +{ config, lib, namespace, ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.modules.networking.nfs; + cfg = config.${namespace}.media.nfs; in { - options.modules.networking.nfs = { + options.${namespace}.media.nfs = { enable = mkEnableOption "Enable NFS"; }; diff --git a/_modules/system/networking/ssh.nix b/modules/nixos/services/networking/ssh.nix similarity index 78% rename from _modules/system/networking/ssh.nix rename to modules/nixos/services/networking/ssh.nix index 8d2b1c6..5ebdfd2 100644 --- a/_modules/system/networking/ssh.nix +++ b/modules/nixos/services/networking/ssh.nix @@ -1,12 +1,12 @@ -{ config, lib, ... }: +{ config, lib, namespace, ... }: let inherit (lib.modules) mkIf; inherit (lib.options) mkEnableOption; - cfg = config.modules.networking.ssh; + cfg = config.${namespace}.services.networking.ssh; in { - options.modules.networking.ssh = { + options.${namespace}.services.networking.ssh = { enable = mkEnableOption "enable ssh"; }; From a03240d99de541929b7ca2a3922624cbc479d979 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 09:57:59 +0200 Subject: [PATCH 15/38] more work --- _modules/home/shell/default.nix | 71 ----------- _modules/home/shell/toolset/bat.nix | 22 ---- _modules/home/shell/toolset/btop.nix | 95 --------------- _modules/home/shell/toolset/eza.nix | 29 ----- _modules/home/shell/toolset/fzf.nix | 37 ------ _modules/home/shell/toolset/git.nix | 112 ------------------ _modules/home/shell/toolset/starship.nix | 101 ---------------- _modules/home/shell/toolset/tmux.nix | 107 ----------------- _modules/home/shell/toolset/yazi.nix | 22 ---- _modules/home/shell/toolset/zellij.nix | 23 ---- _modules/home/shell/toolset/zoxide.nix | 22 ---- _modules/home/shell/zsh.nix | 104 ---------------- _modules/system/networking/default.nix | 31 ----- modules/home/shell/default.nix | 53 +++++++++ modules/home/shell/toolset/bat.nix | 19 +++ modules/home/shell/toolset/btop.nix | 93 +++++++++++++++ modules/home/shell/toolset/eza.nix | 26 ++++ modules/home/shell/toolset/fzf.nix | 36 ++++++ modules/home/shell/toolset/git.nix | 111 +++++++++++++++++ .../home/shell/toolset/gnupg.nix | 10 +- modules/home/shell/toolset/starship.nix | 100 ++++++++++++++++ modules/home/shell/toolset/tmux.nix | 107 +++++++++++++++++ modules/home/shell/toolset/yazi.nix | 20 ++++ modules/home/shell/toolset/zellij.nix | 22 ++++ modules/home/shell/toolset/zoxide.nix | 19 +++ modules/home/shell/zsh.nix | 91 ++++++++++++++ modules/nixos/boot/default.nix | 22 ++-- modules/nixos/default.nix | 6 +- modules/nixos/desktop/default.nix | 15 ++- modules/nixos/shells/zsh.nix | 14 +++ modules/nixos/system/networking.nix | 25 ++++ .../nixos/system/security/boot.nix | 43 +------ modules/nixos/system/security/default.nix | 23 ++++ modules/nixos/system/security/sops.nix | 22 ++++ modules/nixos/system/security/sudo.nix | 23 ++++ .../system => modules/nixos}/theming.nix | 9 +- 36 files changed, 843 insertions(+), 842 deletions(-) delete mode 100644 _modules/home/shell/default.nix delete mode 100644 _modules/home/shell/toolset/bat.nix delete mode 100644 _modules/home/shell/toolset/btop.nix delete mode 100644 _modules/home/shell/toolset/eza.nix delete mode 100644 _modules/home/shell/toolset/fzf.nix delete mode 100644 _modules/home/shell/toolset/git.nix delete mode 100644 _modules/home/shell/toolset/starship.nix delete mode 100644 _modules/home/shell/toolset/tmux.nix delete mode 100644 _modules/home/shell/toolset/yazi.nix delete mode 100644 _modules/home/shell/toolset/zellij.nix delete mode 100644 _modules/home/shell/toolset/zoxide.nix delete mode 100644 _modules/home/shell/zsh.nix delete mode 100644 _modules/system/networking/default.nix create mode 100644 modules/home/shell/default.nix create mode 100644 modules/home/shell/toolset/bat.nix create mode 100644 modules/home/shell/toolset/btop.nix create mode 100644 modules/home/shell/toolset/eza.nix create mode 100644 modules/home/shell/toolset/fzf.nix create mode 100644 modules/home/shell/toolset/git.nix rename {_modules => modules}/home/shell/toolset/gnupg.nix (73%) create mode 100644 modules/home/shell/toolset/starship.nix create mode 100644 modules/home/shell/toolset/tmux.nix create mode 100644 modules/home/shell/toolset/yazi.nix create mode 100644 modules/home/shell/toolset/zellij.nix create mode 100644 modules/home/shell/toolset/zoxide.nix create mode 100644 modules/home/shell/zsh.nix create mode 100644 modules/nixos/shells/zsh.nix create mode 100644 modules/nixos/system/networking.nix rename _modules/system/security.nix => modules/nixos/system/security/boot.nix (70%) create mode 100644 modules/nixos/system/security/default.nix create mode 100644 modules/nixos/system/security/sops.nix create mode 100644 modules/nixos/system/security/sudo.nix rename {_modules/system => modules/nixos}/theming.nix (84%) diff --git a/_modules/home/shell/default.nix b/_modules/home/shell/default.nix deleted file mode 100644 index 3613c76..0000000 --- a/_modules/home/shell/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) nullOr enum; - - cfg = config.modules.${user}.shell; -in -{ - options.modules.${user}.shell = { - default = mkOption { - type = nullOr (enum ["fish" "zsh" "bash"]); - default = null; - description = "Default system shell"; - }; - - corePkgs.enable = mkEnableOption "core shell packages"; - }; - - config = mkMerge [ - (mkIf (cfg.default != null) { - users.defaultUserShell = pkgs."${cfg.default}"; - - # modules.${user}.shell.toolset.gnupg.enable = true; - }) - - (mkIf cfg.corePkgs.enable { - modules.${user}.shell.toolset = { - bat.enable = true; - btop.enable = true; - eza.enable = true; - fzf.enable = true; - git.enable = true; - starship.enable = true; - tmux.enable = true; - yazi.enable = true; - zoxide.enable = true; - }; - - home-manager.users.${user} = { - home.packages = attrValues { - inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag; - inherit (pkgs) fd; - - rgFull = pkgs.ripgrep.override {withPCRE2 = true;}; - }; - - home.shellAliases = { - # ls = "eza -a"; - # cat = "bat -pp"; - # y = "yazi"; - # zed = "zeditor ."; - }; - - programs = { - direnv = { - enable = true; - config.global = { - load_dotenv = true; - strict_env = true; - hide_env_diff = true; - }; - nix-direnv.enable = true; - config.whitelist.prefix = ["/home"]; - }; - }; - }; - }) - ]; -} diff --git a/_modules/home/shell/toolset/bat.nix b/_modules/home/shell/toolset/bat.nix deleted file mode 100644 index a1d2177..0000000 --- a/_modules/home/shell/toolset/bat.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.bat; -in -{ - options.modules.${user}.shell.toolset.bat = { - enable = mkEnableOption "cat replacement"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ bat ]; - - programs.bat = { - enable = true; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/btop.nix b/_modules/home/shell/toolset/btop.nix deleted file mode 100644 index f4a364d..0000000 --- a/_modules/home/shell/toolset/btop.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib) mkIf mkEnableOption; - inherit (lib.strings) concatStringsSep; - - cfg = config.modules.${user}.shell.toolset.btop; -in -{ - options.modules.${user}.shell.toolset.btop = { - enable = mkEnableOption "system-monitor"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ btop ]; - - programs.btop = { - enable = true; - settings = { - force_tty = false; - vim_keys = true; # Directional keys: "h,j,k,l,g,G" - update_ms = 1500; # ms (s^{-3}) - temp_scale = "celsius"; - base_10_sizes = false; - show_cpu_freq = true; - clock_format = "%H:%M"; - background_update = true; - disks_filter = "exclude=/boot"; - - rounded_corners = true; - theme_background = false; - truecolor = true; - presets = concatStringsSep "," [ - "cpu:1:default" - "proc:0:default cpu:0:default" - "mem:0:default" - "net:0:default cpu:0:block" - "net:0:tty" - ]; - graph_symbol = "braille"; - graph_symbol_cpu = "default"; - graph_symbol_mem = "default"; - graph_symbol_net = "default"; - graph_symbol_proc = "default"; - shown_boxes = "proc cpu mem net"; - - proc_sorting = "cpu lazy"; - proc_reversed = false; - proc_tree = false; - proc_colors = true; - proc_gradient = true; - proc_per_core = true; - proc_mem_bytes = true; - proc_info_smaps = false; - proc_left = false; - - cpu_graph_upper = "total"; - cpu_graph_lower = "total"; - cpu_single_graph = false; - cpu_bottom = false; - show_uptime = true; - check_temp = true; - cpu_sensor = "Auto"; - show_coretemp = true; - cpu_core_map = ""; - custom_cpu_name = ""; - - mem_graphs = true; - mem_below_net = false; - - show_swap = true; - swap_disk = true; - show_disks = true; - only_physical = true; - use_fstab = false; # Enable -> disables `only_physical` - disk_free_priv = false; - show_io_stat = true; - - io_mode = false; - io_graph_combined = false; - io_graph_speeds = ""; - - net_download = 100; - net_upload = 100; - net_auto = true; - net_sync = false; - net_iface = "br0"; - show_battery = true; - selected_battery = "Auto"; - log_level = "DEBUG"; - }; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/eza.nix b/_modules/home/shell/toolset/eza.nix deleted file mode 100644 index 3e2da9b..0000000 --- a/_modules/home/shell/toolset/eza.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.eza; -in -{ - options.modules.${user}.shell.toolset.eza = { - enable = mkEnableOption "system-monitor"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ eza ]; - - programs.eza = { - enable = true; - icons = "auto"; - git = true; - extraOptions = [ - "--hyperlink" - "--across" - "--group-directories-first" - ]; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/fzf.nix b/_modules/home/shell/toolset/fzf.nix deleted file mode 100644 index 3e99666..0000000 --- a/_modules/home/shell/toolset/fzf.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib) mkIf mkEnableOption; - - defShell = config.modules.${user}.shell.default; -in -{ - options.modules.${user}.shell.toolset.fzf = { - enable = mkEnableOption "TUI Fuzzy Finder."; - }; - - config = mkIf config.modules.${user}.shell.toolset.fzf.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ fzf ]; - - programs.fzf = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = defShell == "zsh"; - enableFishIntegration = defShell == "fish"; - - tmux.enableShellIntegration = true; - tmux.shellIntegrationOptions = ["-d 40%"]; - - defaultCommand = "fd --type f"; - defaultOptions = ["--height 40%" "--border"]; - - changeDirWidgetCommand = "fd --type d"; - changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"]; - - fileWidgetCommand = "fd --type f"; - fileWidgetOptions = ["--preview 'head {}'"]; - historyWidgetOptions = ["--sort" "--exact"]; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/git.nix b/_modules/home/shell/toolset/git.nix deleted file mode 100644 index f40a8ce..0000000 --- a/_modules/home/shell/toolset/git.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; -in -{ - options.modules.${user}.shell.toolset.git = { - enable = mkEnableOption "version-control system"; - }; - - config = mkIf config.modules.${user}.shell.toolset.git.enable { - environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; - - home-manager.users.${user} = { - home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; - - programs = { - zsh.initContent = '' - # -------===[ Helpful Git Fn's ]===------- # - gitignore() { - curl -s -o .gitignore https://gitignore.io/api/$1 - } - ''; - - fish.functions = { - gitignore = "curl -sL https://www.gitignore.io/api/$argv"; - }; - - git = { - enable = true; - package = pkgs.gitFull; - difftastic = { - enable = true; - background = "dark"; - color = "always"; - display = "inline"; - }; - - ignores = [ - # General: - "*.bloop" - "*.bsp" - "*.metals" - "*.metals.sbt" - "*metals.sbt" - "*.direnv" - "*.envrc" - "*hie.yaml" - "*.mill-version" - "*.jvmopts" - - # OS-related: - ".DS_Store?" - ".DS_Store" - ".CFUserTextEncoding" - ".Trash" - ".Xauthority" - "thumbs.db" - "Thumbs.db" - "Icon?" - - # Compiled residues: - "*.class" - "*.exe" - "*.o" - "*.pyc" - "*.elc" - ]; - - extraConfig = { - init.defaultBranch = "main"; - core = { - editor = "nvim"; - whitespace = "trailing-space,space-before-tab"; - }; - credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; - - user = { - name = config.modules.${user}.user.full_name; - email = config.modules.${user}.user.email; - signingKey = "~/.ssh/id_rsa.pub"; - }; - - gpg.format = "ssh"; - commit.gpgSign = true; - tag.gpgSign = true; - - push = { - autoSetupRemote = true; - default = "current"; - gpgSign = "if-asked"; - autoSquash = true; - }; - pull.rebase = true; - - filter = { - required = true; - smudge = "git-lfs smudge -- %f"; - process = "git-lfs filter-process"; - clean = "git-lfs clean -- %f"; - }; - - url = { - "https://github.com/".insteadOf = "gh:"; - "git@github.com:".insteadOf = "ssh+gh:"; - }; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/starship.nix b/_modules/home/shell/toolset/starship.nix deleted file mode 100644 index f573ff1..0000000 --- a/_modules/home/shell/toolset/starship.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; -in -{ - options.modules.${user}.shell.toolset.starship = { - enable = mkEnableOption "fancy pansy shell prompt"; - }; - - config = mkIf config.modules.${user}.shell.toolset.starship.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ starship ]; - - programs.starship = { - enable = true; - settings = { - format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character"; - - username = { - format = "[$user]($style)"; - show_always = true; - }; - - hostname = { - ssh_only = false; - ssh_symbol = "🌐 "; - format = "[$hostname](bold red)"; - trim_at = ".local"; - disabled = false; - }; - - nix_shell = { - symbol = " "; - format = "[$symbol$name]($style) "; - style = "magenta bold"; - }; - - git_branch = { - only_attached = true; - format = "[$symbol$branch]($style) "; - symbol = " "; - style = "yellow bold"; - }; - - git_commit = { - tag_disabled = false; - }; - - git_state = { - style = "magenta bold"; - }; - - git_status = { - format = "[$all_status $ahead_behind]($style) "; - style = "bold green"; - conflicted = "🏳"; - up_to_date = ""; - untracked = " "; - ahead = "⇡\${count}"; - diverged = "⇕⇡\${ahead_count}⇣\${behind_count}"; - behind = "⇣\${count}"; - stashed = " "; - modified = " "; - staged = "[++\($count\)](green)"; - renamed = "襁 "; - deleted = " "; - }; - - directory = { - read_only = " 󰌾"; - }; - - cmd_duration = { - format = "[$duration]($style) "; - style = "blue"; - }; - - os = { - format = "[$symbol](bold white)"; - disabled = false; - - symbols = { - Windows = " "; - Arch = "󰣇"; - Ubuntu = ""; - Macos = "󰀵"; - Manjaro = " "; - Nobara = " "; - Unknown = "󰠥"; - }; - }; - - fill = { - symbol = " "; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/tmux.nix b/_modules/home/shell/toolset/tmux.nix deleted file mode 100644 index 137b600..0000000 --- a/_modules/home/shell/toolset/tmux.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; -in -{ - options.modules.${user}.shell.toolset.tmux = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "terminal multiplexer"; }; - - config = mkIf config.modules.${user}.shell.toolset.tmux.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ tmux ]; - - programs.tmux = { - enable = true; - secureSocket = true; - keyMode = "vi"; - prefix = "C-a"; - terminal = "tmux-256color"; - - baseIndex = 1; - clock24 = true; - disableConfirmationPrompt = true; - escapeTime = 0; - - aggressiveResize = false; - resizeAmount = 2; - reverseSplit = false; - historyLimit = 5000; - newSession = true; - - plugins = let - inherit (pkgs.tmuxPlugins) resurrect continuum; - in [ - { - plugin = resurrect; - extraConfig = "set -g @resurrect-strategy-nvim 'session'"; - } - { - plugin = continuum; - extraConfig = '' - set -g @continuum-restore 'on' - set -g @continuum-save-interval '60' # minutes - ''; - } - ]; - - extraConfig = '' - # -------===[ Color Correction ]===------- # - set-option -ga terminal-overrides ",*256col*:Tc" - set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' - set-environment -g COLORTERM "truecolor" - - # -------===[ General-Configurations ]===------- # - set-option -g renumber-windows on - set-window-option -g automatic-rename on - set-window-option -g word-separators ' @"=()[]' - - set-option -g mouse on - set-option -s focus-events on - set-option -g renumber-windows on - set-option -g allow-rename off - - # -------===[ Activity/Sound ]===------- # - set-option -g bell-action none - set-option -g visual-bell off - set-option -g visual-silence off - set-option -g visual-activity off - set-window-option -g monitor-activity off - - # -------===[ Status-Bar ]===------- # - set-option -g status on - set-option -g status-interval 1 - set-option -g status-style bg=default,bold,italics - - set-option -g status-position top - set-option -g status-justify left - - set-option -g status-left-length "40" - set-option -g status-right-length "80" - - # -------===[ Keybindings ]===------- # - bind-key c clock-mode - - # Window Control(s): - bind-key q kill-session - bind-key Q kill-server - bind-key t new-window -c '#{pane_current_path}' - - # Buffers: - bind-key b list-buffers - bind-key p paste-buffer - bind-key P choose-buffer - - # Split bindings: - bind-key - split-window -v -c '#{pane_current_path}' - bind-key / split-window -h -c '#{pane_current_path}' - - # Copy/Paste bindings: - bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection" - bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer" - bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer" - ''; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/yazi.nix b/_modules/home/shell/toolset/yazi.nix deleted file mode 100644 index 252ae8a..0000000 --- a/_modules/home/shell/toolset/yazi.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.yazi; -in -{ - options.modules.${user}.shell.toolset.yazi = { - enable = mkEnableOption "cli file browser"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ yazi ]; - - programs.yazi = { - enable = true; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/zellij.nix b/_modules/home/shell/toolset/zellij.nix deleted file mode 100644 index 01f6c8a..0000000 --- a/_modules/home/shell/toolset/zellij.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; -in -{ - options.modules.${user}.shell.toolset.zellij = { - enable = mkEnableOption "terminal multiplexer"; - }; - - config = mkIf config.modules.${user}.shell.toolset.zellij.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ zellij ]; - - programs.zellij = { - enable = true; - attachExistingSession = true; - - settings = {}; - }; - }; - }; -} diff --git a/_modules/home/shell/toolset/zoxide.nix b/_modules/home/shell/toolset/zoxide.nix deleted file mode 100644 index 2d456b8..0000000 --- a/_modules/home/shell/toolset/zoxide.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.${user}.shell.toolset.zoxide; -in -{ - options.modules.${user}.shell.toolset.zoxide = { - enable = mkEnableOption "cd replacement"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ zoxide ]; - - programs.zoxide = { - enable = true; - }; - }; - }; -} diff --git a/_modules/home/shell/zsh.nix b/_modules/home/shell/zsh.nix deleted file mode 100644 index e6fc881..0000000 --- a/_modules/home/shell/zsh.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.shell; -in -{ - config = mkIf (cfg.default == "zsh") { - modules.shell.zsh.enable = true; - - modules.${user}.shell = { - corePkgs.enable = true; - }; - - # Enable completion for sys-packages: - environment.pathsToLink = ["/share/zsh"]; - - home-manager.users.${user} = { - # xdg.configFile."zsh-abbreviations" = { - # target = "zsh/abbreviations"; - # text = let - # abbrevs = { - # ls = "eza -al"; - # }; - # in '' - # ${concatStrings (mapAttrsToList - # (k: v: "abbr ${k}=${escapeNixString v}") - # abbrevs - # )} - # ''; - # }; - - programs = { - starship.enableZshIntegration = true; - yazi.enableZshIntegration = true; - zellij.enableZshIntegration = true; - - zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - - history = { - size = 10000; - path = "$XDG_CONFIG_HOME/zsh/history"; - }; - - oh-my-zsh = { - enable = true; - plugins = ["git" "docker-compose" "zoxide"]; - }; - - plugins = let - mkZshPlugin = { - pkg, - file ? "${pkg.pname}.plugin.zsh", - }: { - name = pkg.pname; - src = pkg.src; - inherit file; - }; - in - with pkgs; [ - (mkZshPlugin {pkg = zsh-abbr;}) - (mkZshPlugin {pkg = zsh-autopair;}) - (mkZshPlugin {pkg = zsh-you-should-use;}) - (mkZshPlugin { - pkg = zsh-nix-shell; - file = "nix-shell.plugin.zsh"; - }) - - { - name = "zsh-autosuggestion"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-autosuggestions"; - rev = "v0.7.0"; - sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98"; - }; - } - { - name = "zsh-completions"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-completions"; - rev = "0.34.0"; - sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9"; - }; - } - { - name = "zsh-syntax-highlighting"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-syntax-highlighting"; - rev = "0.7.0"; - sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r"; - }; - } - ]; - }; - }; - }; - }; -} diff --git a/_modules/system/networking/default.nix b/_modules/system/networking/default.nix deleted file mode 100644 index d8cdec7..0000000 --- a/_modules/system/networking/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, options, lib, pkgs, ... }: let - inherit (lib.modules) mkDefault; - inherit (lib.options) mkOption; - - cfg = config.modules.networking; -in { - options.modules.networking = { - wifi.backend = mkOption { - type = with lib.types; enum [ "wpa_supplicant" "iwd" ]; - default = "wpa_supplicant"; - example = "wpa_supplicant"; - description = "set the backend used for wifi wpa_supplicant by default"; - }; - }; - - config = { - systemd.services.NetworkManager-wait-online.enable = false; - - networking = { - enableIPv6 = true; - useDHCP = mkDefault true; - - firewall.enable = true; - - networkmanager = { - enable = mkDefault true; - wifi.backend = mkDefault config.modules.networking.wifi.backend; - }; - }; - }; -} diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix new file mode 100644 index 0000000..ab4f6b3 --- /dev/null +++ b/modules/home/shell/default.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption; + inherit (lib.types) nullOr enum; + + cfg = config.${namespace}.shell; +in +{ + options.${namespace}.shell = { + default = mkOption { + type = nullOr (enum ["fish" "zsh" "bash"]); + default = null; + description = "Default system shell"; + }; + + corePkgs.enable = mkEnableOption "core shell packages"; + }; + + config = mkMerge [ + (mkIf (cfg.default != null) { + users.defaultUserShell = pkgs."${cfg.default}"; + }) + + (mkIf cfg.corePkgs.enable { + ${namespace}.shell.toolset = { + bat.enable = true; + btop.enable = true; + eza.enable = true; + fzf.enable = true; + git.enable = true; + starship.enable = true; + tmux.enable = true; + yazi.enable = true; + zoxide.enable = true; + }; + + home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ]; + + programs = { + direnv = { + enable = true; + config.global = { + load_dotenv = true; + strict_env = true; + hide_env_diff = true; + }; + nix-direnv.enable = true; + config.whitelist.prefix = ["/home"]; + }; + }; + }) + ]; +} diff --git a/modules/home/shell/toolset/bat.nix b/modules/home/shell/toolset/bat.nix new file mode 100644 index 0000000..9a1d904 --- /dev/null +++ b/modules/home/shell/toolset/bat.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.bat; +in +{ + options.${namespace}.shell.toolset.bat = { + enable = mkEnableOption "cat replacement"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ bat ]; + + programs.bat = { + enable = true; + }; + }; +} diff --git a/modules/home/shell/toolset/btop.nix b/modules/home/shell/toolset/btop.nix new file mode 100644 index 0000000..ec30da6 --- /dev/null +++ b/modules/home/shell/toolset/btop.nix @@ -0,0 +1,93 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + inherit (lib.strings) concatStringsSep; + + cfg = config.${namespace}.shell.toolset.btop; +in +{ + options.${namespace}.shell.toolset.btop = { + enable = mkEnableOption "system-monitor"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ btop ]; + + programs.btop = { + enable = true; + settings = { + force_tty = false; + vim_keys = true; # Directional keys: "h,j,k,l,g,G" + update_ms = 1500; # ms (s^{-3}) + temp_scale = "celsius"; + base_10_sizes = false; + show_cpu_freq = true; + clock_format = "%H:%M"; + background_update = true; + disks_filter = "exclude=/boot"; + + rounded_corners = true; + theme_background = false; + truecolor = true; + presets = concatStringsSep "," [ + "cpu:1:default" + "proc:0:default cpu:0:default" + "mem:0:default" + "net:0:default cpu:0:block" + "net:0:tty" + ]; + graph_symbol = "braille"; + graph_symbol_cpu = "default"; + graph_symbol_mem = "default"; + graph_symbol_net = "default"; + graph_symbol_proc = "default"; + shown_boxes = "proc cpu mem net"; + + proc_sorting = "cpu lazy"; + proc_reversed = false; + proc_tree = false; + proc_colors = true; + proc_gradient = true; + proc_per_core = true; + proc_mem_bytes = true; + proc_info_smaps = false; + proc_left = false; + + cpu_graph_upper = "total"; + cpu_graph_lower = "total"; + cpu_single_graph = false; + cpu_bottom = false; + show_uptime = true; + check_temp = true; + cpu_sensor = "Auto"; + show_coretemp = true; + cpu_core_map = ""; + custom_cpu_name = ""; + + mem_graphs = true; + mem_below_net = false; + + show_swap = true; + swap_disk = true; + show_disks = true; + only_physical = true; + use_fstab = false; # Enable -> disables `only_physical` + disk_free_priv = false; + show_io_stat = true; + + io_mode = false; + io_graph_combined = false; + io_graph_speeds = ""; + + net_download = 100; + net_upload = 100; + net_auto = true; + net_sync = false; + net_iface = "br0"; + show_battery = true; + selected_battery = "Auto"; + log_level = "DEBUG"; + }; + }; + }; +} diff --git a/modules/home/shell/toolset/eza.nix b/modules/home/shell/toolset/eza.nix new file mode 100644 index 0000000..936c335 --- /dev/null +++ b/modules/home/shell/toolset/eza.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.eza; +in +{ + options.${namespace}.shell.toolset.eza = { + enable = mkEnableOption "system-monitor"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ eza ]; + + programs.eza = { + enable = true; + icons = "auto"; + git = true; + extraOptions = [ + "--hyperlink" + "--across" + "--group-directories-first" + ]; + }; + }; +} diff --git a/modules/home/shell/toolset/fzf.nix b/modules/home/shell/toolset/fzf.nix new file mode 100644 index 0000000..031e4ce --- /dev/null +++ b/modules/home/shell/toolset/fzf.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.fzf; + defShell = config.${namespace}.shell.default; +in +{ + options.${namespace}.shell.toolset.fzf = { + enable = mkEnableOption "TUI Fuzzy Finder."; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ fzf ]; + + programs.fzf = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = defShell == "zsh"; + enableFishIntegration = defShell == "fish"; + + tmux.enableShellIntegration = true; + tmux.shellIntegrationOptions = ["-d 40%"]; + + defaultCommand = "fd --type f"; + defaultOptions = ["--height 40%" "--border"]; + + changeDirWidgetCommand = "fd --type d"; + changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"]; + + fileWidgetCommand = "fd --type f"; + fileWidgetOptions = ["--preview 'head {}'"]; + historyWidgetOptions = ["--sort" "--exact"]; + }; + }; +} diff --git a/modules/home/shell/toolset/git.nix b/modules/home/shell/toolset/git.nix new file mode 100644 index 0000000..274f579 --- /dev/null +++ b/modules/home/shell/toolset/git.nix @@ -0,0 +1,111 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.shell.toolset.git; +in +{ + options.${namespace}.shell.toolset.git = { + enable = mkEnableOption "version-control system"; + }; + + config = mkIf cfg.enable { + environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; + + home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; + + programs = { + zsh.initContent = '' + # -------===[ Helpful Git Fn's ]===------- # + gitignore() { + curl -s -o .gitignore https://gitignore.io/api/$1 + } + ''; + + fish.functions = { + gitignore = "curl -sL https://www.gitignore.io/api/$argv"; + }; + + git = { + enable = true; + package = pkgs.gitFull; + difftastic = { + enable = true; + background = "dark"; + color = "always"; + display = "inline"; + }; + + ignores = [ + # General: + "*.bloop" + "*.bsp" + "*.metals" + "*.metals.sbt" + "*metals.sbt" + "*.direnv" + "*.envrc" + "*hie.yaml" + "*.mill-version" + "*.jvmopts" + + # OS-related: + ".DS_Store?" + ".DS_Store" + ".CFUserTextEncoding" + ".Trash" + ".Xauthority" + "thumbs.db" + "Thumbs.db" + "Icon?" + + # Compiled residues: + "*.class" + "*.exe" + "*.o" + "*.pyc" + "*.elc" + ]; + + extraConfig = { + init.defaultBranch = "main"; + core = { + editor = "nvim"; + whitespace = "trailing-space,space-before-tab"; + }; + credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; + + user = { + name = config.${namespace}.user.full_name; + email = config.${namespace}.user.email; + signingKey = "~/.ssh/id_rsa.pub"; + }; + + gpg.format = "ssh"; + commit.gpgSign = true; + tag.gpgSign = true; + + push = { + autoSetupRemote = true; + default = "current"; + gpgSign = "if-asked"; + autoSquash = true; + }; + pull.rebase = true; + + filter = { + required = true; + smudge = "git-lfs smudge -- %f"; + process = "git-lfs filter-process"; + clean = "git-lfs clean -- %f"; + }; + + url = { + "https://github.com/".insteadOf = "gh:"; + "git@github.com:".insteadOf = "ssh+gh:"; + }; + }; + }; + }; + }; +} diff --git a/_modules/home/shell/toolset/gnupg.nix b/modules/home/shell/toolset/gnupg.nix similarity index 73% rename from _modules/home/shell/toolset/gnupg.nix rename to modules/home/shell/toolset/gnupg.nix index 33c4765..3a69c23 100644 --- a/_modules/home/shell/toolset/gnupg.nix +++ b/modules/home/shell/toolset/gnupg.nix @@ -1,13 +1,11 @@ { config, lib, pkgs, user, ... }: let - inherit (lib.modules) mkIf; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.${user}.shell.toolset.gnupg; + cfg = config.${namespace}.shell.toolset.gnupg; in { - options.modules.${user}.shell.toolset.gnupg = let - inherit (lib.options) mkEnableOption; - in { + options.${namespace}.shell.toolset.gnupg = { enable = mkEnableOption "cryptographic suite"; }; @@ -16,7 +14,7 @@ in environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; - home-manager.users.${user}.programs.gnupg = { + programs.gnupg = { enable = true; agent = { diff --git a/modules/home/shell/toolset/starship.nix b/modules/home/shell/toolset/starship.nix new file mode 100644 index 0000000..507d421 --- /dev/null +++ b/modules/home/shell/toolset/starship.nix @@ -0,0 +1,100 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.starship; +in +{ + options.${namespace}.shell.toolset.starship = { + enable = mkEnableOption "fancy pansy shell prompt"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ starship ]; + + programs.starship = { + enable = true; + settings = { + format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character"; + + username = { + format = "[$user]($style)"; + show_always = true; + }; + + hostname = { + ssh_only = false; + ssh_symbol = "🌐 "; + format = "[$hostname](bold red)"; + trim_at = ".local"; + disabled = false; + }; + + nix_shell = { + symbol = " "; + format = "[$symbol$name]($style) "; + style = "magenta bold"; + }; + + git_branch = { + only_attached = true; + format = "[$symbol$branch]($style) "; + symbol = " "; + style = "yellow bold"; + }; + + git_commit = { + tag_disabled = false; + }; + + git_state = { + style = "magenta bold"; + }; + + git_status = { + format = "[$all_status $ahead_behind]($style) "; + style = "bold green"; + conflicted = "🏳"; + up_to_date = ""; + untracked = " "; + ahead = "⇡\${count}"; + diverged = "⇕⇡\${ahead_count}⇣\${behind_count}"; + behind = "⇣\${count}"; + stashed = " "; + modified = " "; + staged = "[++\($count\)](green)"; + renamed = "襁 "; + deleted = " "; + }; + + directory = { + read_only = " 󰌾"; + }; + + cmd_duration = { + format = "[$duration]($style) "; + style = "blue"; + }; + + os = { + format = "[$symbol](bold white)"; + disabled = false; + + symbols = { + Windows = " "; + Arch = "󰣇"; + Ubuntu = ""; + Macos = "󰀵"; + Manjaro = " "; + Nobara = " "; + Unknown = "󰠥"; + }; + }; + + fill = { + symbol = " "; + }; + }; + }; + }; +} diff --git a/modules/home/shell/toolset/tmux.nix b/modules/home/shell/toolset/tmux.nix new file mode 100644 index 0000000..26fe163 --- /dev/null +++ b/modules/home/shell/toolset/tmux.nix @@ -0,0 +1,107 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.tmux; +in +{ + options.${namespace}.shell.toolset.tmux = { + enable = mkEnableOption "terminal multiplexer"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ tmux ]; + + programs.tmux = { + enable = true; + secureSocket = true; + keyMode = "vi"; + prefix = "C-a"; + terminal = "tmux-256color"; + + baseIndex = 1; + clock24 = true; + disableConfirmationPrompt = true; + escapeTime = 0; + + aggressiveResize = false; + resizeAmount = 2; + reverseSplit = false; + historyLimit = 5000; + newSession = true; + + plugins = let + inherit (pkgs.tmuxPlugins) resurrect continuum; + in [ + { + plugin = resurrect; + extraConfig = "set -g @resurrect-strategy-nvim 'session'"; + } + { + plugin = continuum; + extraConfig = '' + set -g @continuum-restore 'on' + set -g @continuum-save-interval '60' # minutes + ''; + } + ]; + + extraConfig = '' + # -------===[ Color Correction ]===------- # + set-option -ga terminal-overrides ",*256col*:Tc" + set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' + set-environment -g COLORTERM "truecolor" + + # -------===[ General-Configurations ]===------- # + set-option -g renumber-windows on + set-window-option -g automatic-rename on + set-window-option -g word-separators ' @"=()[]' + + set-option -g mouse on + set-option -s focus-events on + set-option -g renumber-windows on + set-option -g allow-rename off + + # -------===[ Activity/Sound ]===------- # + set-option -g bell-action none + set-option -g visual-bell off + set-option -g visual-silence off + set-option -g visual-activity off + set-window-option -g monitor-activity off + + # -------===[ Status-Bar ]===------- # + set-option -g status on + set-option -g status-interval 1 + set-option -g status-style bg=default,bold,italics + + set-option -g status-position top + set-option -g status-justify left + + set-option -g status-left-length "40" + set-option -g status-right-length "80" + + # -------===[ Keybindings ]===------- # + bind-key c clock-mode + + # Window Control(s): + bind-key q kill-session + bind-key Q kill-server + bind-key t new-window -c '#{pane_current_path}' + + # Buffers: + bind-key b list-buffers + bind-key p paste-buffer + bind-key P choose-buffer + + # Split bindings: + bind-key - split-window -v -c '#{pane_current_path}' + bind-key / split-window -h -c '#{pane_current_path}' + + # Copy/Paste bindings: + bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection" + bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer" + bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer" + ''; + }; + }; +} diff --git a/modules/home/shell/toolset/yazi.nix b/modules/home/shell/toolset/yazi.nix new file mode 100644 index 0000000..382c661 --- /dev/null +++ b/modules/home/shell/toolset/yazi.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib.${namespace}) mkIf; + inherit (lib.options) mkEnableOption; + + cfg = config.${namespace}.shell.toolset.yazi; +in +{ + options.${namespace}.shell.toolset.yazi = { + enable = mkEnableOption "cli file browser"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ yazi ]; + + programs.yazi = { + enable = true; + }; + }; +} diff --git a/modules/home/shell/toolset/zellij.nix b/modules/home/shell/toolset/zellij.nix new file mode 100644 index 0000000..da6eae5 --- /dev/null +++ b/modules/home/shell/toolset/zellij.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.zellij; +in +{ + options.${namespace}.shell.toolset.zellij = { + enable = mkEnableOption "terminal multiplexer"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ zellij ]; + + programs.zellij = { + enable = true; + attachExistingSession = true; + + settings = {}; + }; + }; +} diff --git a/modules/home/shell/toolset/zoxide.nix b/modules/home/shell/toolset/zoxide.nix new file mode 100644 index 0000000..087f216 --- /dev/null +++ b/modules/home/shell/toolset/zoxide.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, user, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.toolset.zoxide; +in +{ + options.${namespace}.shell.toolset.zoxide = { + enable = mkEnableOption "cd replacement"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ zoxide ]; + + programs.zoxide = { + enable = true; + }; + }; +} diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh.nix new file mode 100644 index 0000000..e26cd16 --- /dev/null +++ b/modules/home/shell/zsh.nix @@ -0,0 +1,91 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf; + + cfg = config.${namespace}.shell.zsh; +in +{ + options.${namespace}.shell.zsh = { + enable = mkEnableOption "enable ZSH"; + }; + + config = mkIf cfg.enable { + ${namespace}.shell = { + zsh.enable = true; + corePkgs.enable = true; + }; + + # Enable completion for sys-packages: + environment.pathsToLink = ["/share/zsh"]; + + programs = { + starship.enableZshIntegration = true; + yazi.enableZshIntegration = true; + zellij.enableZshIntegration = true; + + zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + + history = { + size = 10000; + path = "$XDG_CONFIG_HOME/zsh/history"; + }; + + oh-my-zsh = { + enable = true; + plugins = ["git" "docker-compose" "zoxide"]; + }; + + plugins = let + mkZshPlugin = { + pkg, + file ? "${pkg.pname}.plugin.zsh", + }: { + name = pkg.pname; + src = pkg.src; + inherit file; + }; + in + with pkgs; [ + (mkZshPlugin {pkg = zsh-abbr;}) + (mkZshPlugin {pkg = zsh-autopair;}) + (mkZshPlugin {pkg = zsh-you-should-use;}) + (mkZshPlugin { + pkg = zsh-nix-shell; + file = "nix-shell.plugin.zsh"; + }) + + { + name = "zsh-autosuggestion"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autosuggestions"; + rev = "v0.7.0"; + sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98"; + }; + } + { + name = "zsh-completions"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-completions"; + rev = "0.34.0"; + sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9"; + }; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.7.0"; + sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r"; + }; + } + ]; + }; + }; + }; +} diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 5c0c53c..6ff6ac7 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -25,23 +25,27 @@ in config = mkMerge [ ({ - boot.loader = { - systemd-boot.enable = false; - grub.enable = true; + boot = { + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + systemd-boot.enable = false; + grub.enable = true; - grub2-theme = { - enable = true; - theme = "vimix"; - footer = true; + grub2-theme = { + enable = true; + theme = "vimix"; + footer = true; + }; }; }; }) - (mkIf cfg.type == "bios" { + (mkIf (cfg.type == "bios") { boot.loader.grub.efiSupport = false; }) - (mkIf cfg.type == "uefi" { + (mkIf (cfg.type == "uefi") { boot.loader = { efi.canTouchEfiVariables = true; grub = { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 6efb305..42713e4 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -16,7 +16,7 @@ in }; config = mkMerge [ - (mkIf cfg.preset == "desktop" { + (mkIf (cfg.preset == "desktop") { ${namespace} = mkDefault { hardware.has = { audio = true; @@ -31,8 +31,8 @@ in }; }) - (mkIf cfg.preset == "desktop" { - "${namespace}" = mkDefault { + (mkIf (cfg.preset == "server") { + ${namespace} = mkDefault { services = { ssh.enable = true; }; diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index cca4c69..176b80f 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,5 +1,6 @@ -{ lib, config, namespace, ... }:let - inherit (lib) mkIf mkOption mkEnableOption mkMerge attrNames filterAttrs readDir; +{ lib, config, namespace, ... }: +let + inherit (lib) mkIf mkOption mkEnableOption mkMerge; inherit (lib.types) nullOr enum; cfg = config.${namespace}.desktop; @@ -7,7 +8,7 @@ in { options.${namespace}.desktop = { use = mkOption { - type = nullOr enum (attrNames (filterAttrs (n: type: type == "directory") (readDir ./.))); + type = nullOr (enum [ "plasma" "gamescope" "gnome" ]); default = null; example = "plasma"; description = "Which desktop to enable"; @@ -17,9 +18,7 @@ in }; config = mkMerge [ - (mkIf cfg.desktop != null { - "${namespace}".desktop.${cfg.use}.enable = true; - + ({ services.displayManager = { enable = true; @@ -28,5 +27,9 @@ in }; }; }) + + (mkIf (cfg.use != null) { + ${namespace}.desktop.${cfg.use}.enable = true; + }) ]; } diff --git a/modules/nixos/shells/zsh.nix b/modules/nixos/shells/zsh.nix new file mode 100644 index 0000000..b9cf75b --- /dev/null +++ b/modules/nixos/shells/zsh.nix @@ -0,0 +1,14 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.shell.zsh; +in +{ + options.${namespace}.shell.zsh = { + enable = mkEnableOption "enable zsh shell"; + }; + + config = mkIf cfg.enable { + }; +} diff --git a/modules/nixos/system/networking.nix b/modules/nixos/system/networking.nix new file mode 100644 index 0000000..c61a81b --- /dev/null +++ b/modules/nixos/system/networking.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkDefault; + + cfg = config.${namespace}.system.networking; +in +{ + options.${namespace}.system.networking = {}; + + config = { + systemd.services.NetworkManager-wait-online.enable = false; + + networking = { + enableIPv6 = true; + useDHCP = mkDefault true; + + firewall.enable = true; + + networkmanager = { + enable = true; + wifi.backend = "wpa_supplicant"; + }; + }; + }; +} diff --git a/_modules/system/security.nix b/modules/nixos/system/security/boot.nix similarity index 70% rename from _modules/system/security.nix rename to modules/nixos/system/security/boot.nix index 734c339..ccf1f83 100644 --- a/_modules/system/security.nix +++ b/modules/nixos/system/security/boot.nix @@ -1,43 +1,12 @@ -{ inputs, pkgs, ... }: +{ config, namespace, inputs, ... }: +let + cfg = config.${namespace}.system.security.boot; +in { - imports = [ - inputs.sops-nix.nixosModules.sops - ]; + options.${namespace}.system.security.boot = {}; config = { - environment.systemPackages = with pkgs; [ - bitwarden - sops - ]; - - sops = { - defaultSopsFile = ../../secrets/secrets.yaml; - defaultSopsFormat = "yaml"; - - age.keyFile = "/home/"; - }; - - security = { - sudo.execWheelOnly = true; - acme.acceptTerms = true; - polkit.enable = true; - pam = { - u2f = { - enable = true; - settings.cue = true; - }; - }; - }; - - networking.firewall.enable = true; - programs.gnupg.agent.enable = true; - boot = { - loader.systemd-boot = { - editor = false; - configurationLimit = 50; - }; - kernelModules = [ "tcp_bbr" ]; kernel.sysctl = { ## TCP hardening @@ -74,4 +43,4 @@ }; }; }; -} +} \ No newline at end of file diff --git a/modules/nixos/system/security/default.nix b/modules/nixos/system/security/default.nix new file mode 100644 index 0000000..e168543 --- /dev/null +++ b/modules/nixos/system/security/default.nix @@ -0,0 +1,23 @@ +{ config, namespace, inputs, ... }: +let + cfg = config.${namespace}.system.security; +in +{ + options.${namespace}.system.security = {}; + + config = { + security = { + acme.acceptTerms = true; + polkit.enable = true; + + pam = { + u2f = { + enable = true; + settings.cue = true; + }; + }; + }; + + programs.gnupg.agent.enable = true; + }; +} \ No newline at end of file diff --git a/modules/nixos/system/security/sops.nix b/modules/nixos/system/security/sops.nix new file mode 100644 index 0000000..a75856d --- /dev/null +++ b/modules/nixos/system/security/sops.nix @@ -0,0 +1,22 @@ +{ pkgs, config, namespace, inputs, ... }: +let + cfg = config.${namespace}.system.security.sops; +in +{ + imports = [ + inputs.sops-nix.nixosModules.sops + ]; + + options.${namespace}.system.security.sops = {}; + + config = { + environment.systemPackages = with pkgs; [ sops ]; + + sops = { + defaultSopsFile = ../../../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + + age.keyFile = "/home/"; + }; + }; +} \ No newline at end of file diff --git a/modules/nixos/system/security/sudo.nix b/modules/nixos/system/security/sudo.nix new file mode 100644 index 0000000..6dedf50 --- /dev/null +++ b/modules/nixos/system/security/sudo.nix @@ -0,0 +1,23 @@ +{ config, namespace, ... }: +let + cfg = config.${namespace}.system.security.sudo; +in +{ + options.${namespace}.system.security.sudo = {}; + + config = { + security = { + sudo = { + enable = false; + execWheelOnly = true; + }; + + sudo-rs = { + enable = true; + extraConfig = '' + Defaults env_keep += "EDITOR PATH DISPLAY" + ''; + }; + }; + }; +} \ No newline at end of file diff --git a/_modules/system/theming.nix b/modules/nixos/theming.nix similarity index 84% rename from _modules/system/theming.nix rename to modules/nixos/theming.nix index be7b853..d7ddb8e 100644 --- a/_modules/system/theming.nix +++ b/modules/nixos/theming.nix @@ -1,16 +1,15 @@ -{ inputs, config, lib, pkgs, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib) mkIf; - inherit (lib.options) mkEnableOption; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.theming; + cfg = config.${namespace}.theming; in { imports = [ inputs.stylix.nixosModules.stylix ]; - options.modules.theming = { + options.${namespace}.theming = { enable = mkEnableOption "enable theming"; }; From f1c89a0ec19b99f59010b8bfa8f1f569de0c2380 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 11:33:23 +0200 Subject: [PATCH 16/38] more progress --- _modules/system/common/qbittorrent.nix | 144 ------ _modules/system/virtualisation/default.nix | 7 - _modules/system/virtualisation/podman.nix | 26 -- flake.lock | 426 +++++++----------- flake.nix | 12 + homes/user-configurations/chris.nix | 8 + homes/x86_64-linux/chris@manwe/default.nix | 6 +- .../toolset/{bat.nix => bat/default.nix} | 0 .../toolset/{btop.nix => btop/default.nix} | 0 .../toolset/{eza.nix => eza/default.nix} | 0 .../toolset/{fzf.nix => fzf/default.nix} | 0 .../toolset/{git.nix => git/default.nix} | 0 .../toolset/{gnupg.nix => gnugpg/default.nix} | 0 .../{starship.nix => starship/default.nix} | 0 .../toolset/{tmux.nix => tmux/default.nix} | 0 .../toolset/{yazi.nix => yazi/default.nix} | 0 .../{zellij.nix => zellij/default.nix} | 0 .../{zoxide.nix => zoxide/default.nix} | 0 .../home/themes/catppuccin-latte.jpg | Bin {_modules => modules}/home/themes/default.nix | 10 +- .../home/themes/everforest.jpg | Bin modules/nixos/default.nix | 7 +- modules/nixos/desktop/default.nix | 12 +- modules/nixos/desktop/gamescope/default.nix | 9 +- modules/nixos/desktop/gnome/default.nix | 7 +- modules/nixos/desktop/plasma/default.nix | 7 +- .../hardware/gpu/{amd.nix => amd/default.nix} | 4 +- modules/nixos/services/media/default.nix | 35 +- .../networking/{ssh.nix => ssh/default.nix} | 0 .../virtualisation/podman/default.nix | 23 + .../{theming.nix => theming/default.nix} | 0 31 files changed, 256 insertions(+), 487 deletions(-) delete mode 100644 _modules/system/common/qbittorrent.nix delete mode 100644 _modules/system/virtualisation/default.nix delete mode 100644 _modules/system/virtualisation/podman.nix rename modules/home/shell/toolset/{bat.nix => bat/default.nix} (100%) rename modules/home/shell/toolset/{btop.nix => btop/default.nix} (100%) rename modules/home/shell/toolset/{eza.nix => eza/default.nix} (100%) rename modules/home/shell/toolset/{fzf.nix => fzf/default.nix} (100%) rename modules/home/shell/toolset/{git.nix => git/default.nix} (100%) rename modules/home/shell/toolset/{gnupg.nix => gnugpg/default.nix} (100%) rename modules/home/shell/toolset/{starship.nix => starship/default.nix} (100%) rename modules/home/shell/toolset/{tmux.nix => tmux/default.nix} (100%) rename modules/home/shell/toolset/{yazi.nix => yazi/default.nix} (100%) rename modules/home/shell/toolset/{zellij.nix => zellij/default.nix} (100%) rename modules/home/shell/toolset/{zoxide.nix => zoxide/default.nix} (100%) rename {_modules => modules}/home/themes/catppuccin-latte.jpg (100%) rename {_modules => modules}/home/themes/default.nix (81%) rename {_modules => modules}/home/themes/everforest.jpg (100%) rename modules/nixos/hardware/gpu/{amd.nix => amd/default.nix} (87%) rename modules/nixos/services/networking/{ssh.nix => ssh/default.nix} (100%) create mode 100644 modules/nixos/services/virtualisation/podman/default.nix rename modules/nixos/{theming.nix => theming/default.nix} (100%) diff --git a/_modules/system/common/qbittorrent.nix b/_modules/system/common/qbittorrent.nix deleted file mode 100644 index 4176165..0000000 --- a/_modules/system/common/qbittorrent.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.qbittorrent; - UID = 888; - GID = 888; -in -{ - options.services.qbittorrent = { - enable = mkEnableOption (lib.mdDoc "qBittorrent headless"); - - dataDir = mkOption { - type = types.path; - default = "/var/lib/qbittorrent"; - description = lib.mdDoc '' - The directory where qBittorrent stores its data files. - ''; - }; - - user = mkOption { - type = types.str; - default = "qbittorrent"; - description = lib.mdDoc '' - User account under which qBittorrent runs. - ''; - }; - - group = mkOption { - type = types.str; - default = "qbittorrent"; - description = lib.mdDoc '' - Group under which qBittorrent runs. - ''; - }; - - port = mkOption { - type = types.port; - default = 8080; - description = lib.mdDoc '' - qBittorrent web UI port. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Open services.qBittorrent.port to the outside network. - ''; - }; - - package = mkOption { - type = types.package; - default = pkgs.qbittorrent-nox; - defaultText = literalExpression "pkgs.qbittorrent-nox"; - description = lib.mdDoc '' - The qbittorrent package to use. - ''; - }; - }; - - config = mkIf cfg.enable (let - configFile = pkgs.writeText "qBittorrent.conf" '' - [BitTorrent] - Session\Port=53271 - Session\SSL\Port=45846 - Session\QueueingSystemEnabled=false - Session\MaxUploads=-1 - Session\MaxUploadsPerTorrent=-1 - - [Meta] - MigrationVersion=8 - - [Network] - Cookies=@Invalid() - - [Preferences] - WebUI\Port=5000 - WebUI\Username=admin - WebUI\Password_PBKDF2="@ByteArray(Clgb2+ZyS3PDRVqtYpj0Ow==:kjN301CJife6g5ou8N2mk6ydQWPQIGgrTAWg5ByWCqAv0jDLphR/IaVQ1tu9KtA+il1udi48xSXZ3AUpjK/fRw==)" - - [RSS] - AutoDownloader\DownloadRepacks=true - AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})" - ''; - in { - networking.firewall = mkIf cfg.openFirewall { - allowedTCPPorts = [ cfg.port ]; - }; - - systemd.tmpfiles.rules = [ - # https://www.mankier.com/5/tmpfiles.d - "d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.dataDir}/__config' 0700 ${cfg.user} ${cfg.group} - -" - "L+ '${cfg.dataDir}/__config/qBittorrent.conf' - - - - ${configFile}" - ]; - - systemd.services.qbittorrent = { - description = "qBittorrent-nox service"; - documentation = [ "man:qbittorrent-nox(1)" ]; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - Type = "simple"; - User = cfg.user; - Group = cfg.group; - - ExecStartPre = let - preStartScript = pkgs.writeScript "qbittorrent-run-prestart" '' - #!${pkgs.bash}/bin/bash - - # Create data directory if it doesn't exist - if ! test -d "$QBT_PROFILE"; then - echo "Creating initial qBittorrent data directory in: $QBT_PROFILE" - install -d -m 0755 -o "${cfg.user}" -g "${cfg.group}" "$QBT_PROFILE" - fi - ''; - in - "!${preStartScript}"; - - ExecStart = "${cfg.package}/bin/qbittorrent-nox"; - }; - - environment = { - QBT_PROFILE = cfg.dataDir; - QBT_WEBUI_PORT = toString cfg.port; - }; - }; - - users.users = mkIf (cfg.user == "qbittorrent") { - qbittorrent = { - group = cfg.group; - uid = UID; - }; - }; - - users.groups = mkIf (cfg.group == "qbittorrent") { - qbittorrent = { gid = GID; }; - }; - }); -} diff --git a/_modules/system/virtualisation/default.nix b/_modules/system/virtualisation/default.nix deleted file mode 100644 index 3bcff9f..0000000 --- a/_modules/system/virtualisation/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, options, lib, pkgs, ... }: -let - inherit (lib) mkIf mkEnableOption; -in -{ - options.modules.virtualisation = {}; -} diff --git a/_modules/system/virtualisation/podman.nix b/_modules/system/virtualisation/podman.nix deleted file mode 100644 index dd455ff..0000000 --- a/_modules/system/virtualisation/podman.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, options, lib, pkgs, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.virtualisation.podman; -in -{ - options.modules.virtualisation.podman = let - inherit (lib.options) mkEnableOption; - in - { - enable = mkEnableOption "enable podman"; - }; - - config = mkIf config.modules.virtualisation.podman.enable { - virtualisation = { - containers.enable = true; - - podman = { - enable = true; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; - }; - }; - }; -} diff --git a/flake.lock b/flake.lock index 1c8b5cb..a7d81dc 100644 --- a/flake.lock +++ b/flake.lock @@ -73,11 +73,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1749911151, - "narHash": "sha256-nQ+bDURW2sP3DdEPw5X0UsaHArDgzH2+gHdJAolurXU=", + "lastModified": 1753276606, + "narHash": "sha256-2N6MlBOBv2bDfo0Pg18j3a81HZq72uO+rvZsGK1eW/4=", "owner": "emmanuelrosa", "repo": "erosanix", - "rev": "2d1aef5159a5a67a14ae5903a6b5aa21af69faee", + "rev": "aac9ef558a5b8008a24c611d96455ed0cd1d3b16", "type": "github" }, "original": { @@ -94,11 +94,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1750487788, - "narHash": "sha256-79O83W9osY3wyvxZHqL0gw85tcACSX0TU5en3+dky/0=", + "lastModified": 1753339339, + "narHash": "sha256-r9Frae3VnbgKrWWQcV6WEykm6PxfPHVrxdOqgyt1VcU=", "owner": "nix-community", "repo": "fenix", - "rev": "933bc78d45abaf764dbfe0fd117be981631f3e9a", + "rev": "af1c3d7dd242ebf50ac75665d5c44af79730b491", "type": "github" }, "original": { @@ -114,11 +114,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1750004387, - "narHash": "sha256-5NhN7NYyPI4q9hZhrVV3jN5Y/stVePUihGlclPT1K8c=", + "lastModified": 1753320535, + "narHash": "sha256-UCz4mALWiiZPa7Chid72Na7KSH+GdUDQ/O673luMD4w=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "dd885d03a55568a59a9c2874c3b03098c078d9eb", + "rev": "b7b4baa6e76170b767d34a4461210842ba7f6068", "type": "github" }, "original": { @@ -191,6 +191,22 @@ } }, "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1650374568, @@ -206,31 +222,19 @@ "type": "github" } }, - "flake-compat_5": { - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "nvf", + "nixpkgs" + ] }, "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "lastModified": 1753121425, + "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", "type": "github" }, "original": { @@ -247,11 +251,11 @@ ] }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -335,7 +339,10 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": [ + "nvf", + "systems" + ] }, "locked": { "lastModified": 1731533236, @@ -353,7 +360,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1694529238, @@ -403,71 +410,41 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { - "lastModified": 1744584021, - "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", "type": "github" }, "original": { "owner": "GNOME", - "ref": "48.1", + "ref": "48.2", "repo": "gnome-shell", "type": "github" } }, + "grub2-themes": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1753279958, + "narHash": "sha256-EJ1udnwKYgWeAJzncAccbLPtbSWiuIANryXTGI9nY6w=", + "owner": "vinceliuice", + "repo": "grub2-themes", + "rev": "6c26f99622cb1c705b3fe2dbe1eb88521096b25a", + "type": "github" + }, + "original": { + "owner": "vinceliuice", + "repo": "grub2-themes", + "type": "github" + } + }, "himmelblau": { "inputs": { "flake-utils": "flake-utils_2", @@ -476,11 +453,11 @@ ] }, "locked": { - "lastModified": 1750450607, - "narHash": "sha256-z+sZbYISN46VKCawV8iBuwE3Cw6DoSZd5KXYrxBYbF0=", + "lastModified": 1753194162, + "narHash": "sha256-N+RdYwyw342DMd1Bo2t9OZCt4s2Qzki6nliBLHaPLNM=", "owner": "himmelblau-idm", "repo": "himmelblau", - "rev": "5dc066cc063ea857f8c8b3dc524c83eb09dc0548", + "rev": "a0bafb7cfe6be4ae7863d01b451600dc4cd7181b", "type": "github" }, "original": { @@ -497,32 +474,11 @@ ] }, "locked": { - "lastModified": 1750304462, - "narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=", + "lastModified": 1753294394, + "narHash": "sha256-1Dfgq09lHZ8AdYB2Deu/mYP1pMNpob8CgqT5Mzo44eI=", "owner": "nix-community", "repo": "home-manager", - "rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748737919, - "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "5675a9686851d9626560052a032c4e14e533c1fa", + "rev": "1fde6fb1be6cd5dc513dc1c287d69e4eb2de973e", "type": "github" }, "original": { @@ -539,11 +495,11 @@ ] }, "locked": { - "lastModified": 1750403547, - "narHash": "sha256-XDDINMbHTtKQeSRpX5mwq20z23Wg/I/G4JUinA3V8Xg=", + "lastModified": 1753333833, + "narHash": "sha256-S5RHVk+6PMwThIJY2mSbeoWTY1JrBSy1v1E1LDOFQW8=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "52b86b86d925ec00c836ecc6d36f9c947bb15736", + "rev": "e462677116c12bf23bd681a6a87dc7f98e689adf", "type": "github" }, "original": { @@ -558,11 +514,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1749989692, - "narHash": "sha256-ojISk2CXljR3qIgwgZh4iNzP3W2H3zGH49xWTJARkoM=", + "lastModified": 1753013761, + "narHash": "sha256-ggvjKAeIsjwdu6+ECBGieyBgtotD7BrsGX5BirCacYU=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "cae85629e70ce05b968757f3af8f2f2b3923d080", + "rev": "f7c04e5ad6aa43a0f9698edb0d74b44e88ee99ee", "type": "github" }, "original": { @@ -586,27 +542,6 @@ "type": "github" } }, - "nil": { - "inputs": { - "nixpkgs": [ - "nvf", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1750047244, - "narHash": "sha256-vluLARrk4485npdyHOj8XKr0yk6H22pNf+KVRNL+i/Y=", - "owner": "oxalica", - "repo": "nil", - "rev": "870a4b1b5f12004832206703ac15aa85c42c247b", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "nil", - "type": "github" - } - }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -633,14 +568,14 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1750471420, - "narHash": "sha256-NdmGCaMJH1OxOpscofZ61aqzHfVf8pMXtl9XFO/1T0k=", + "lastModified": 1753237324, + "narHash": "sha256-iXvv/VYLMyAoaTadYrX0PGwd6N2wVX337Os6k8TAlF4=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "c2cda7b9a94779abe0632ac5b64207df002fea40", + "rev": "64ca2cbbf9c65dd3bd98192d74872a80e8dcb871", "type": "github" }, "original": { @@ -666,11 +601,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748359502, - "narHash": "sha256-nnY29OR2nFG9NxF0eN0XemmJx8bpMdoRwvQt8PnI0Uw=", + "lastModified": 1751186460, + "narHash": "sha256-tSnI50oYaXOi/SFUmJC+gZ2xE9pAhTnV0D2/3JoKL7g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "502151620cdde8fda50f1f05706caae833379754", + "rev": "dd5540905b1a13176efa13fa2f8dac776bcb275a", "type": "github" }, "original": { @@ -682,11 +617,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1749950217, - "narHash": "sha256-qXoEFKOnznVvMAKezJhSXzRKsJ/LHLRY8NCw1mGhwrU=", + "lastModified": 1752974445, + "narHash": "sha256-jj/HBJFSapTk4LfeJgNLk2wEE2BO6dgBYVRbXMNOCeM=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "753176a8605439613fc6dc9911267b9f720a2615", + "rev": "9100109c11b6b5482ea949c980b86e24740dca08", "type": "github" }, "original": { @@ -695,28 +630,29 @@ "type": "github" } }, - "nixpkgs-lib_2": { + "nixpkgs_10": { "locked": { - "lastModified": 1748740939, - "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1749896453, - "narHash": "sha256-6+AmSZBogyr1zbVc2k4IBcmY/Yt39mC4+cfZi0n/AAA=", + "lastModified": 1753290466, + "narHash": "sha256-Df8wnrToZpzjqFJWhvaUUvwypj1bKM3JY6zSskwETmc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ba48a1f6ce571455cb631dee840c6cd401ea4adb", + "rev": "1744f3daf87f5bb4b2b08f6298a55b6a88ea8308", "type": "github" }, "original": { @@ -743,6 +679,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1753346648, + "narHash": "sha256-n/eFKkfFh/V3S9tCTL0ulljtcczTCfuh5P5g55Jx6bM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8cf96bf5c3356ee5867dd2a2cd771709db9848b2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1748929857, "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", @@ -758,13 +710,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1750365781, - "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", + "lastModified": 1753250450, + "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", + "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf", "type": "github" }, "original": { @@ -774,13 +726,13 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { - "lastModified": 1750215678, - "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=", + "lastModified": 1752997324, + "narHash": "sha256-vtTM4oDke3SeDj+1ey6DjmzXdq8ZZSCLWSaApADDvIE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192", + "rev": "7c688a0875df5a8c28a53fb55ae45e94eae0dddb", "type": "github" }, "original": { @@ -790,7 +742,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -806,33 +758,17 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1748460289, - "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_9": { "locked": { - "lastModified": 1727348695, - "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", - "owner": "nixos", + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -847,15 +783,14 @@ "nixpkgs": [ "stylix", "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1748730660, - "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=", + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", "owner": "nix-community", "repo": "NUR", - "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", "type": "github" }, "original": { @@ -866,19 +801,19 @@ }, "nvf": { "inputs": { + "flake-compat": "flake-compat_4", "flake-parts": "flake-parts", "flake-utils": "flake-utils_4", "mnw": "mnw", - "nil": "nil", - "nixpkgs": "nixpkgs_6", - "systems": "systems_5" + "nixpkgs": "nixpkgs_7", + "systems": "systems_4" }, "locked": { - "lastModified": 1750441488, - "narHash": "sha256-JuFBp2xM4JD/XGb69dTSDOdGbUD0fVHlgY9X9GHGTFE=", + "lastModified": 1753181140, + "narHash": "sha256-daKfPQnipcRnKnXknDzv+fzNKeEY3r/10y8YMVQ10vU=", "owner": "notashelf", "repo": "nvf", - "rev": "18c17b7b8dbf6e0f10e3eb5f1fa5341a9175a3b1", + "rev": "8fbecab446afe3454ecce6a4b817ec4f123a4a34", "type": "github" }, "original": { @@ -916,12 +851,13 @@ "fenix": "fenix", "firefox": "firefox", "flux": "flux", + "grub2-themes": "grub2-themes", "himmelblau": "himmelblau", "home-manager": "home-manager", "jovian": "jovian", "nix-minecraft": "nix-minecraft", "nixos-boot": "nixos-boot", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "nvf": "nvf", "plasma-manager": "plasma-manager", "snowfall-lib": "snowfall-lib", @@ -933,11 +869,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1750405264, - "narHash": "sha256-EMFKnO+J3dZOa9J+uiKZgHYgzALv9dqxY7NHV0DbO/U=", + "lastModified": 1753282007, + "narHash": "sha256-PgTUdSShfGVqZtDJk5noAB1rKdD/MeZ1zq4jY8n9p3c=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "b0552d779f7137c76f109666ce0ad28395c0e582", + "rev": "b5b10fb10facef4d18b4cae8ef22e640ca601255", "type": "github" }, "original": { @@ -949,7 +885,7 @@ }, "snowfall-lib": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-utils-plus": "flake-utils-plus", "nixpkgs": [ "nixpkgs" @@ -971,14 +907,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1750119275, - "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=", + "lastModified": 1752544651, + "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2", + "rev": "2c8def626f54708a9c38a5861866660395bb3461", "type": "github" }, "original": { @@ -994,14 +930,11 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_5", "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nur": "nur", - "systems": "systems_7", + "systems": "systems_6", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1009,11 +942,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1750527172, - "narHash": "sha256-ATl7gK98w27JaXzidK48YlG4o+mtfvyHu9zKuadE6j0=", + "lastModified": 1753296482, + "narHash": "sha256-VPLaHVhU6/CwnMHTjhf6945qyrXEcpjxKfpWqQXtnxI=", "owner": "danth", "repo": "stylix", - "rev": "27721407de0615e927c84f7c23277628e1d12b67", + "rev": "fbe1dab7783a3d579dc57be8ceee148104e0930b", "type": "github" }, "original": { @@ -1112,21 +1045,6 @@ "type": "github" } }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1163,11 +1081,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1748180480, - "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -1179,11 +1097,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1748740859, - "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -1195,11 +1113,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -1208,31 +1126,9 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "stylix", - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1727721329, diff --git a/flake.nix b/flake.nix index 5abe818..194c538 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,10 @@ url = "github:Jovian-Experiments/Jovian-NixOS"; inputs.nixpkgs.follows = "nixpkgs"; }; + + grub2-themes = { + url = "github:vinceliuice/grub2-themes"; + }; }; outputs = inputs: inputs.snowfall-lib.mkFlake { @@ -60,6 +64,10 @@ channels-config = { allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; }; snowfall = { @@ -76,5 +84,9 @@ nix-minecraft.overlay flux.overlays.default ]; + + homes.modules = with inputs; [ + plasma-manager.homeManagerModules.plasma-manager + ]; }; } diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix index bd48767..3a321e1 100644 --- a/homes/user-configurations/chris.nix +++ b/homes/user-configurations/chris.nix @@ -3,4 +3,12 @@ userName = "Chris Kruining"; userEmail = "chris@kruining.eu"; }; + + sneeuwvlok = { + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + }; } \ No newline at end of file diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index a5a09f3..530ea5f 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -1,8 +1,4 @@ { ... }: { - sneeuwvlok = { - series = { - media.enable = true; - }; - }; + sneeuwvlok = {}; } diff --git a/modules/home/shell/toolset/bat.nix b/modules/home/shell/toolset/bat/default.nix similarity index 100% rename from modules/home/shell/toolset/bat.nix rename to modules/home/shell/toolset/bat/default.nix diff --git a/modules/home/shell/toolset/btop.nix b/modules/home/shell/toolset/btop/default.nix similarity index 100% rename from modules/home/shell/toolset/btop.nix rename to modules/home/shell/toolset/btop/default.nix diff --git a/modules/home/shell/toolset/eza.nix b/modules/home/shell/toolset/eza/default.nix similarity index 100% rename from modules/home/shell/toolset/eza.nix rename to modules/home/shell/toolset/eza/default.nix diff --git a/modules/home/shell/toolset/fzf.nix b/modules/home/shell/toolset/fzf/default.nix similarity index 100% rename from modules/home/shell/toolset/fzf.nix rename to modules/home/shell/toolset/fzf/default.nix diff --git a/modules/home/shell/toolset/git.nix b/modules/home/shell/toolset/git/default.nix similarity index 100% rename from modules/home/shell/toolset/git.nix rename to modules/home/shell/toolset/git/default.nix diff --git a/modules/home/shell/toolset/gnupg.nix b/modules/home/shell/toolset/gnugpg/default.nix similarity index 100% rename from modules/home/shell/toolset/gnupg.nix rename to modules/home/shell/toolset/gnugpg/default.nix diff --git a/modules/home/shell/toolset/starship.nix b/modules/home/shell/toolset/starship/default.nix similarity index 100% rename from modules/home/shell/toolset/starship.nix rename to modules/home/shell/toolset/starship/default.nix diff --git a/modules/home/shell/toolset/tmux.nix b/modules/home/shell/toolset/tmux/default.nix similarity index 100% rename from modules/home/shell/toolset/tmux.nix rename to modules/home/shell/toolset/tmux/default.nix diff --git a/modules/home/shell/toolset/yazi.nix b/modules/home/shell/toolset/yazi/default.nix similarity index 100% rename from modules/home/shell/toolset/yazi.nix rename to modules/home/shell/toolset/yazi/default.nix diff --git a/modules/home/shell/toolset/zellij.nix b/modules/home/shell/toolset/zellij/default.nix similarity index 100% rename from modules/home/shell/toolset/zellij.nix rename to modules/home/shell/toolset/zellij/default.nix diff --git a/modules/home/shell/toolset/zoxide.nix b/modules/home/shell/toolset/zoxide/default.nix similarity index 100% rename from modules/home/shell/toolset/zoxide.nix rename to modules/home/shell/toolset/zoxide/default.nix diff --git a/_modules/home/themes/catppuccin-latte.jpg b/modules/home/themes/catppuccin-latte.jpg similarity index 100% rename from _modules/home/themes/catppuccin-latte.jpg rename to modules/home/themes/catppuccin-latte.jpg diff --git a/_modules/home/themes/default.nix b/modules/home/themes/default.nix similarity index 81% rename from _modules/home/themes/default.nix rename to modules/home/themes/default.nix index 3e26492..8acf633 100644 --- a/_modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -1,12 +1,12 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkDefault; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) nullOr enum; - cfg = config.modules.${user}.themes; + cfg = config.${namespace}.themes; in { - options.modules.${user}.themes = { + options.${namespace}.themes = { enable = mkEnableOption "Theming (Stylix)"; theme = mkOption { @@ -23,8 +23,8 @@ in { }; }; - config = mkIf (cfg.enable) { - modules.theming.enable = true; + config = mkIf cfg.enable { + ${namespace}.theming.enable = true; stylix = { base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; diff --git a/_modules/home/themes/everforest.jpg b/modules/home/themes/everforest.jpg similarity index 100% rename from _modules/home/themes/everforest.jpg rename to modules/home/themes/everforest.jpg diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 42713e4..46a454b 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -8,7 +8,7 @@ in { options.${namespace} = { preset = mkOption { - type = nullOr enum [ "server" "desktop" ]; + type = nullOr (enum [ "server" "desktop" ]); default = null; example = "desktop"; description = "Which defaults profile to start with"; @@ -27,14 +27,15 @@ in animated = true; }; - desktop.use = "kde"; + desktop.use = "plasma"; + theming.enable = true; }; }) (mkIf (cfg.preset == "server") { ${namespace} = mkDefault { services = { - ssh.enable = true; + networking.ssh.enable = true; }; }; }) diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 176b80f..f38a28e 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,4 +1,4 @@ -{ lib, config, namespace, ... }: +{ lib, config, namespace, inputs, ... }: let inherit (lib) mkIf mkOption mkEnableOption mkMerge; inherit (lib.types) nullOr enum; @@ -6,6 +6,10 @@ let cfg = config.${namespace}.desktop; in { + imports = [ + inputs.grub2-themes.nixosModules.default + ]; + options.${namespace}.desktop = { use = mkOption { type = nullOr (enum [ "plasma" "gamescope" "gnome" ]); @@ -28,8 +32,8 @@ in }; }) - (mkIf (cfg.use != null) { - ${namespace}.desktop.${cfg.use}.enable = true; - }) + # (mkIf (cfg.use != null) { + # ${namespace}.desktop.${cfg.use}.enable = true; + # }) ]; } diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix index f125292..92d4e96 100644 --- a/modules/nixos/desktop/gamescope/default.nix +++ b/modules/nixos/desktop/gamescope/default.nix @@ -1,4 +1,5 @@ -{ lib, config, namespace, inputs, ... }:let +{ lib, config, namespace, inputs, ... }: +let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gamescope; @@ -7,11 +8,13 @@ in imports = [ inputs.jovian.nixosModules.default ]; options.${namespace}.desktop.gamescope = { - enable = mkEnableOption "Enable Steamdeck ui"; + enable = mkEnableOption "Enable Steamdeck ui" // { + default = (config.${namespace}.desktop.use == "gamescope"); + }; }; config = mkIf cfg.enable { - "${namespace}".desktop.kde.enable = true; + ${namespace}.desktop.plasma.enable = true; jovian = { steam = { diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix index 126d384..979587f 100644 --- a/modules/nixos/desktop/gnome/default.nix +++ b/modules/nixos/desktop/gnome/default.nix @@ -1,11 +1,14 @@ -{ lib, config, namespace, ... }:let +{ lib, config, namespace, ... }: +let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.gnome; in { options.${namespace}.desktop.gnome = { - enable = mkEnableOption "Enable Gnome"; + enable = mkEnableOption "Enable Gnome" // { + default = (config.${namespace}.desktop.use == "gnome"); + }; }; config = mkIf cfg.enable { diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix index 8be91ec..11c0cd9 100644 --- a/modules/nixos/desktop/plasma/default.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -1,11 +1,14 @@ -{ pkgs, lib, config, namespace, ... }:let +{ pkgs, lib, config, namespace, ... }: +let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.desktop.plasma; in { options.${namespace}.desktop.plasma = { - enable = mkEnableOption "Enable KDE Plasma"; + enable = mkEnableOption "Enable KDE Plasma" // { + default = (config.${namespace}.desktop.use == "plasma"); + }; }; config = mkIf cfg.enable { diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd/default.nix similarity index 87% rename from modules/nixos/hardware/gpu/amd.nix rename to modules/nixos/hardware/gpu/amd/default.nix index c47191c..68db574 100644 --- a/modules/nixos/hardware/gpu/amd.nix +++ b/modules/nixos/hardware/gpu/amd/default.nix @@ -2,12 +2,12 @@ let inherit (lib) mkIf mkEnableOption; - cfg = config.${namespace}.hardware.has.gpu.amd; + cfg = config.${namespace}.hardware.has.gpu; in { options.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration"; - config = mkIf cfg { + config = mkIf cfg.amd { services.xserver.videoDrivers = [ "amd" ]; hardware = { diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix index 4827114..7d76794 100644 --- a/modules/nixos/services/media/default.nix +++ b/modules/nixos/services/media/default.nix @@ -40,12 +40,6 @@ in yt-dlp ]; - # need to permit these outdated packages until servarr finally upgrades at some point... - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - #========================================================================= # Prepare system #========================================================================= @@ -58,14 +52,14 @@ in }; systemd.tmpfiles.rules = [ - "d '${cfg.directory}/series' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/movies' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/music' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -" - "d '${cfg.directory}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/series' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/movies' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/music' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -" + "d '${cfg.path}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -" ]; #========================================================================= @@ -98,8 +92,11 @@ in qbittorrent = { enable = true; openFirewall = true; - dataDir = "${cfg.directory}/qbittorrent"; - port = 5000; + webuiPort = 5000; + + serverConfig = { + LegalNotice.Accepted = true; + }; user = cfg.user; group = cfg.group; @@ -108,7 +105,7 @@ in sabnzbd = { enable = true; openFirewall = true; - configFile = "${cfg.directory}/sabnzbd/config.ini"; + configFile = "${cfg.path}/sabnzbd/config.ini"; user = cfg.user; group = cfg.group; @@ -131,7 +128,7 @@ in systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL"; - modules.virtualisation.podman.enable = true; + ${namespace}.services.virtualisation.podman.enable = true; virtualisation = { oci-containers = { @@ -148,7 +145,7 @@ in image = "ghcr.io/aleksilassila/reiverr:v2.2.0"; autoStart = true; ports = [ "127.0.0.1:9494:9494" ]; - volumes = [ "${cfg.directory}/reiverr/config:/config" ]; + volumes = [ "${cfg.path}/reiverr/config:/config" ]; }; }; }; diff --git a/modules/nixos/services/networking/ssh.nix b/modules/nixos/services/networking/ssh/default.nix similarity index 100% rename from modules/nixos/services/networking/ssh.nix rename to modules/nixos/services/networking/ssh/default.nix diff --git a/modules/nixos/services/virtualisation/podman/default.nix b/modules/nixos/services/virtualisation/podman/default.nix new file mode 100644 index 0000000..9b9dc89 --- /dev/null +++ b/modules/nixos/services/virtualisation/podman/default.nix @@ -0,0 +1,23 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.services.virtualisation.podman; +in +{ + options.${namespace}.services.virtualisation.podman = { + enable = mkEnableOption "enable podman"; + }; + + config = mkIf cfg.enable { + virtualisation = { + containers.enable = true; + + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; + }; +} diff --git a/modules/nixos/theming.nix b/modules/nixos/theming/default.nix similarity index 100% rename from modules/nixos/theming.nix rename to modules/nixos/theming/default.nix From 38dc8327d24d42881389a4a7a46727097214616e Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 16:02:25 +0200 Subject: [PATCH 17/38] you know the drill at this point --- _modules/home/desktop/plasma.nix | 286 ------------------ flake.nix | 8 +- homes/user-configurations/chris.nix | 5 + modules/home/desktop/plasma/default.nix | 3 + modules/home/desktop/plasma/panels.nix | 219 +++++++------- modules/home/desktop/plasma/power.nix | 65 ++-- modules/home/shell/default.nix | 19 +- modules/home/shell/toolset/bat/default.nix | 2 +- modules/home/shell/toolset/btop/default.nix | 2 +- modules/home/shell/toolset/eza/default.nix | 2 +- modules/home/shell/toolset/fzf/default.nix | 2 +- modules/home/shell/toolset/git/default.nix | 4 +- modules/home/shell/toolset/gnugpg/default.nix | 38 +-- .../home/shell/toolset/starship/default.nix | 2 +- modules/home/shell/toolset/tmux/default.nix | 2 +- modules/home/shell/toolset/yazi/default.nix | 5 +- modules/home/shell/toolset/zellij/default.nix | 2 +- modules/home/shell/toolset/zoxide/default.nix | 2 +- .../home/shell/{zsh.nix => zsh/default.nix} | 12 +- modules/home/themes/default.nix | 6 +- modules/nixos/default.nix | 43 --- modules/nixos/shells/default.nix | 2 + .../nixos/shells/{zsh.nix => zsh/default.nix} | 2 + modules/nixos/theming/default.nix | 4 +- systems/x86_64-linux/manwe/default.nix | 11 +- systems/x86_64-linux/tulkas/default.nix | 13 +- systems/x86_64-linux/ulmo/default.nix | 21 +- 27 files changed, 227 insertions(+), 555 deletions(-) delete mode 100644 _modules/home/desktop/plasma.nix rename modules/home/shell/{zsh.nix => zsh/default.nix} (91%) delete mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/shells/default.nix rename modules/nixos/shells/{zsh.nix => zsh/default.nix} (74%) diff --git a/_modules/home/desktop/plasma.nix b/_modules/home/desktop/plasma.nix deleted file mode 100644 index c7ee813..0000000 --- a/_modules/home/desktop/plasma.nix +++ /dev/null @@ -1,286 +0,0 @@ -{ inputs, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.plasma; -in -{ - options.modules.${user}.desktop.plasma = let - inherit (lib.options) mkEnableOption mkOption; - in { - enable = mkEnableOption "plasma 6"; - - autoLogin = mkOption { - type = lib.types.bool; - default = false; - example = true; - description = "Enable plasma's auto login feature."; - }; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs.kdePackages; [ - kcoreaddons - ]; - - environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ]; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - services = { - xserver.enable = true; - - desktopManager.plasma6.enable = true; - - displayManager = { - defaultSession = "plasma"; - sddm = { - enable = true; - wayland.enable = true; - }; - autoLogin = mkIf cfg.autoLogin { - enable = true; - inherit user; - }; - }; - }; - - # should enable theme integration with gtk apps (i.e. firefox, thunderbird) - programs.dconf.enable = true; - - home-manager = { - sharedModules = [ - inputs.plasma-manager.homeManagerModules.plasma-manager - ]; - - users.${user}.programs.plasma = { - enable = true; - immutableByDefault = true; - windows.allowWindowsToRememberPositions = true; - - session = { - general.askForConfirmationOnLogout = false; - sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; - }; - - workspace = { - clickItemTo = "select"; - colorScheme = "EverforestDark"; - wallpaper = config.stylix.image; - }; - - spectacle.shortcuts = { - captureRectangularRegion = "Meta+Shift+S"; - }; - - kwin = { - edgeBarrier = 0; - cornerBarrier = false; - - effects = { - translucency.enable = true; - - blur = { - enable = true; - strength = 5; - noiseStrength = 5; - }; - - snapHelper.enable = true; - }; - }; - - panels = [ - # Windows-like panel at the bottom - { - location = "bottom"; - floating = true; - lengthMode = "fill"; - height = 42; - hiding = "none"; - screen = "all"; - widgets = [ - { - panelSpacer = { - expanding = true; - }; - } - { - kickoff = { - applicationsDisplayMode = "list"; - compactDisplayStyle = false; - favoritesDisplayMode = "grid"; - sortAlphabetically = true; - showButtonsFor = { - custom = [ - "shutdown" - "reboot" - "logout" - "lock-screen" - ]; - }; - showActionButtonCaptions = true; - }; - } - # { - # appMenu = { - # compactView = false; - # }; - # } - { - iconTasks = { - appearance = { - fill = false; - highlightWindows = true; - iconSpacing = "medium"; - indicateAudioStreams = true; - rows = { - multirowView = "never"; - maximum = null; - }; - showTooltips = true; - }; - behavior = { - grouping = { - clickAction = "showPresentWindowsEffect"; - method = "byProgramName"; - }; - minimizeActiveTaskOnClick = true; - newTasksAppearOn = "right"; - showTasks = { - onlyInCurrentActivity = true; - onlyInCurrentDesktop = true; - onlyMinimized = false; - onlyInCurrentScreen = false; - }; - sortingMethod = "manually"; - unhideOnAttentionNeeded = true; - wheel = { - ignoreMinimizedTasks = true; - switchBetweenTasks = true; - }; - }; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "preferred://terminalemulator" - "preferred://email" - "applications:zededitor.desktop" - "applications:vesktop.desktop" - "applications:steam.desktop" - ]; - }; - } - { - panelSpacer = { - expanding = true; - }; - } - { - systemTray = { - icons = { - scaleToFit = true; - spacing = "small"; - }; - items = { - hidden = [ - "org.kde.plasma.brightness" - ]; - }; - pin = false; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "shortDate"; - position = "belowTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - }; - } - ]; - } - ]; - - powerdevil = { - AC = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - battery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - lowBattery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - }; - - kscreenlocker = { - autoLock = false; - lockOnResume = false; - lockOnStartup = false; - - appearance = { - alwaysShowClock = true; - showMediaControls = true; - }; - }; - - configFile = { - baloofilerc = { - - }; - kdeglobals = { - General = { - # enable font antialiasing - XftAntialias = true; - XftHintStyle = "hintslight"; - XftSubPixel = "rgb"; - }; - }; - kwalletrc = { - Wallet.Enabled = false; - }; - plasmarc = { - General = { - RaiseMaximumVolume = true; - VolumeStep = 2; - }; - }; - kcminputrc = { - Keyboard.NumLock.value = 0; - }; - }; - }; - }; - }; -} diff --git a/flake.nix b/flake.nix index 194c538..c1408a5 100644 --- a/flake.nix +++ b/flake.nix @@ -20,13 +20,15 @@ inputs.home-manager.follows = "home-manager"; }; + # neovim nvf.url = "github:notashelf/nvf"; + # plymouth theme nixos-boot.url = "github:Melkor333/nixos-boot"; firefox.url = "github:nix-community/flake-firefox-nightly"; - stylix.url = "github:danth/stylix"; + stylix.url = "github:nix-community/stylix"; fenix = { url = "github:nix-community/fenix"; @@ -42,12 +44,14 @@ sops-nix.url = "github:Mic92/sops-nix"; himmelblau = { - url = "github:himmelblau-idm/himmelblau/main"; + url = "github:himmelblau-idm/himmelblau"; inputs.nixpkgs.follows = "nixpkgs"; }; + # windows app utilities erosanix.url = "github:emmanuelrosa/erosanix"; + # Steam deck stuff jovian = { url = "github:Jovian-Experiments/Jovian-NixOS"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix index 3a321e1..26a170b 100644 --- a/homes/user-configurations/chris.nix +++ b/homes/user-configurations/chris.nix @@ -5,6 +5,11 @@ }; sneeuwvlok = { + shell = { + default = "zsh"; + corePkgs.enable = true; + }; + themes = { enable = true; theme = "everforest"; diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix index 12ffce3..8614a97 100644 --- a/modules/home/desktop/plasma/default.nix +++ b/modules/home/desktop/plasma/default.nix @@ -17,6 +17,9 @@ in immutableByDefault = true; windows.allowWindowsToRememberPositions = true; + panels = import ./panels.nix; + powerdevil = import ./power.nix; + session = { general.askForConfirmationOnLogout = false; sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix index a35b93c..52212b7 100644 --- a/modules/home/desktop/plasma/panels.nix +++ b/modules/home/desktop/plasma/panels.nix @@ -1,124 +1,109 @@ -{ config, lib, namespace, osConfig ? {}, ... }: -let - inherit (lib) mkIf; - - cfg = config.${namespace}.desktop.plasma; - osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; -in -{ - options.${namespace}.desktop.plasma = { - - }; - - config = mkIf osCfg.enable { - programs.plasma.panels = [ +[ + { + location = "bottom"; + floating = true; + lengthMode = "fill"; + height = 42; + hiding = "none"; + screen = "all"; + widgets = [ { - location = "bottom"; - floating = true; - lengthMode = "fill"; - height = 42; - hiding = "none"; - screen = "all"; - widgets = [ - { - panelSpacer = { - expanding = true; + panelSpacer = { + expanding = true; + }; + } + { + kickoff = { + applicationsDisplayMode = "list"; + compactDisplayStyle = false; + favoritesDisplayMode = "grid"; + sortAlphabetically = true; + showButtonsFor = { + custom = [ + "shutdown" + "reboot" + "logout" + "lock-screen" + ]; + }; + showActionButtonCaptions = true; + }; + } + { + iconTasks = { + appearance = { + fill = false; + highlightWindows = true; + iconSpacing = "medium"; + indicateAudioStreams = true; + rows = { + multirowView = "never"; + maximum = null; }; - } - { - kickoff = { - applicationsDisplayMode = "list"; - compactDisplayStyle = false; - favoritesDisplayMode = "grid"; - sortAlphabetically = true; - showButtonsFor = { - custom = [ - "shutdown" - "reboot" - "logout" - "lock-screen" - ]; - }; - showActionButtonCaptions = true; + showTooltips = true; + }; + behavior = { + grouping = { + clickAction = "showPresentWindowsEffect"; + method = "byProgramName"; }; - } - { - iconTasks = { - appearance = { - fill = false; - highlightWindows = true; - iconSpacing = "medium"; - indicateAudioStreams = true; - rows = { - multirowView = "never"; - maximum = null; - }; - showTooltips = true; - }; - behavior = { - grouping = { - clickAction = "showPresentWindowsEffect"; - method = "byProgramName"; - }; - minimizeActiveTaskOnClick = true; - newTasksAppearOn = "right"; - showTasks = { - onlyInCurrentActivity = true; - onlyInCurrentDesktop = true; - onlyMinimized = false; - onlyInCurrentScreen = false; - }; - sortingMethod = "manually"; - unhideOnAttentionNeeded = true; - wheel = { - ignoreMinimizedTasks = true; - switchBetweenTasks = true; - }; - }; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "preferred://terminalemulator" - "preferred://email" - "applications:vesktop.desktop" - "applications:steam.desktop" - ]; + minimizeActiveTaskOnClick = true; + newTasksAppearOn = "right"; + showTasks = { + onlyInCurrentActivity = true; + onlyInCurrentDesktop = true; + onlyMinimized = false; + onlyInCurrentScreen = false; }; - } - { - panelSpacer = { - expanding = true; + sortingMethod = "manually"; + unhideOnAttentionNeeded = true; + wheel = { + ignoreMinimizedTasks = true; + switchBetweenTasks = true; }; - } - { - systemTray = { - icons = { - scaleToFit = true; - spacing = "small"; - }; - items = { - hidden = [ - "org.kde.plasma.brightness" - ]; - }; - pin = false; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "shortDate"; - position = "belowTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - }; - } - ]; + }; + launchers = [ + "preferred://filemanager" + "preferred://browser" + "preferred://terminalemulator" + "preferred://email" + "applications:vesktop.desktop" + "applications:steam.desktop" + ]; + }; + } + { + panelSpacer = { + expanding = true; + }; + } + { + systemTray = { + icons = { + scaleToFit = true; + spacing = "small"; + }; + items = { + hidden = [ + "org.kde.plasma.brightness" + ]; + }; + pin = false; + }; + } + { + digitalClock = { + date = { + enable = true; + format = "shortDate"; + position = "belowTime"; + }; + time = { + format = "24h"; + showSeconds = "onlyInTooltip"; + }; + }; } ]; - }; -} + } +] \ No newline at end of file diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix index 50e7cfe..e7cc4e2 100644 --- a/modules/home/desktop/plasma/power.nix +++ b/modules/home/desktop/plasma/power.nix @@ -1,52 +1,37 @@ -{ config, lib, namespace, osConfig ? {}, ... }: -let - inherit (lib) mkIf; - - cfg = config.${namespace}.desktop.plasma; - osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; -in { - options.${namespace}.desktop.plasma = { + AC = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; }; - config = mkIf osCfg.enable { - programs.plasma.powerdevil = { - AC = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; + battery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; - autoSuspend.action = "nothing"; - dimDisplay.enable = false; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; - turnOffDisplay = { - idleTimeout = "never"; - }; - }; + turnOffDisplay = { + idleTimeout = "never"; + }; + }; - battery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; + lowBattery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; - autoSuspend.action = "nothing"; - dimDisplay.enable = false; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - lowBattery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; + turnOffDisplay = { + idleTimeout = "never"; }; }; } diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index ab4f6b3..2a0837c 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption; + inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption mkDefault; inherit (lib.types) nullOr enum; cfg = config.${namespace}.shell; @@ -12,17 +12,18 @@ in default = null; description = "Default system shell"; }; - + corePkgs.enable = mkEnableOption "core shell packages"; }; config = mkMerge [ - (mkIf (cfg.default != null) { - users.defaultUserShell = pkgs."${cfg.default}"; - }) + # (if (cfg.default != null) then { + # shell = pkgs."${cfg.default}"; + # } else {}) - (mkIf cfg.corePkgs.enable { - ${namespace}.shell.toolset = { + + (mkIf (cfg.corePkgs.enable) { + ${namespace}.shell.toolset = mkDefault { bat.enable = true; btop.enable = true; eza.enable = true; @@ -33,7 +34,9 @@ in yazi.enable = true; zoxide.enable = true; }; + }) + ({ home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ]; programs = { @@ -50,4 +53,4 @@ in }; }) ]; -} +} \ No newline at end of file diff --git a/modules/home/shell/toolset/bat/default.nix b/modules/home/shell/toolset/bat/default.nix index 9a1d904..78899df 100644 --- a/modules/home/shell/toolset/bat/default.nix +++ b/modules/home/shell/toolset/bat/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/btop/default.nix b/modules/home/shell/toolset/btop/default.nix index ec30da6..b490acc 100644 --- a/modules/home/shell/toolset/btop/default.nix +++ b/modules/home/shell/toolset/btop/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; inherit (lib.strings) concatStringsSep; diff --git a/modules/home/shell/toolset/eza/default.nix b/modules/home/shell/toolset/eza/default.nix index 936c335..00026cf 100644 --- a/modules/home/shell/toolset/eza/default.nix +++ b/modules/home/shell/toolset/eza/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/fzf/default.nix b/modules/home/shell/toolset/fzf/default.nix index 031e4ce..1536083 100644 --- a/modules/home/shell/toolset/fzf/default.nix +++ b/modules/home/shell/toolset/fzf/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/git/default.nix b/modules/home/shell/toolset/git/default.nix index 274f579..48320f4 100644 --- a/modules/home/shell/toolset/git/default.nix +++ b/modules/home/shell/toolset/git/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkEnableOption mkIf; @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; + home.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; diff --git a/modules/home/shell/toolset/gnugpg/default.nix b/modules/home/shell/toolset/gnugpg/default.nix index 3a69c23..8b6ae38 100644 --- a/modules/home/shell/toolset/gnugpg/default.nix +++ b/modules/home/shell/toolset/gnugpg/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; @@ -10,27 +10,27 @@ in }; config = mkIf cfg.enable { - user.package = with pkgs; [ gnupg ]; + # home.packages = with pkgs; [ gnupg ]; - environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; + # home.sessionVariables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; - programs.gnupg = { - enable = true; + # programs.gnupg = { + # enable = true; - agent = { - enable = true; - enableSSHSupport = true; - pinentryPackage = pkgs.pinentry-gnome3; + # agent = { + # enable = true; + # enableSSHSupport = true; + # pinentryPackage = pkgs.pinentry-gnome3; - settings = let - cacheTTL = 86400; - in { - default-cache-ttl = cacheTTL; - default-cache-ttl-ssh = cacheTTL; - max-cache-ttl = cacheTTL; - max-cache-ttl-ssh = cacheTTL; - }; - }; - }; + # settings = let + # cacheTTL = 86400; + # in { + # default-cache-ttl = cacheTTL; + # default-cache-ttl-ssh = cacheTTL; + # max-cache-ttl = cacheTTL; + # max-cache-ttl-ssh = cacheTTL; + # }; + # }; + # }; }; } diff --git a/modules/home/shell/toolset/starship/default.nix b/modules/home/shell/toolset/starship/default.nix index 507d421..28d57f7 100644 --- a/modules/home/shell/toolset/starship/default.nix +++ b/modules/home/shell/toolset/starship/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/tmux/default.nix b/modules/home/shell/toolset/tmux/default.nix index 26fe163..ed14ba6 100644 --- a/modules/home/shell/toolset/tmux/default.nix +++ b/modules/home/shell/toolset/tmux/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/yazi/default.nix b/modules/home/shell/toolset/yazi/default.nix index 382c661..37138a0 100644 --- a/modules/home/shell/toolset/yazi/default.nix +++ b/modules/home/shell/toolset/yazi/default.nix @@ -1,7 +1,6 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let - inherit (lib.${namespace}) mkIf; - inherit (lib.options) mkEnableOption; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.toolset.yazi; in diff --git a/modules/home/shell/toolset/zellij/default.nix b/modules/home/shell/toolset/zellij/default.nix index da6eae5..db5b7bd 100644 --- a/modules/home/shell/toolset/zellij/default.nix +++ b/modules/home/shell/toolset/zellij/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/zoxide/default.nix b/modules/home/shell/toolset/zoxide/default.nix index 087f216..5b8acb6 100644 --- a/modules/home/shell/toolset/zoxide/default.nix +++ b/modules/home/shell/toolset/zoxide/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh/default.nix similarity index 91% rename from modules/home/shell/zsh.nix rename to modules/home/shell/zsh/default.nix index e26cd16..b37cc4c 100644 --- a/modules/home/shell/zsh.nix +++ b/modules/home/shell/zsh/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) mkIf; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.zsh; in @@ -10,13 +10,9 @@ in }; config = mkIf cfg.enable { - ${namespace}.shell = { - zsh.enable = true; - corePkgs.enable = true; - }; - - # Enable completion for sys-packages: - environment.pathsToLink = ["/share/zsh"]; + # ${namespace}.shell = { + # zsh.enable = true; + # }; programs = { starship.enableZshIntegration = true; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index 8acf633..55bccfe 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, namespace, ... }: +{ config, lib, pkgs, namespace, osConfig ? {}, ... }: let inherit (lib) mkIf mkDefault; inherit (lib.options) mkOption mkEnableOption; @@ -23,9 +23,7 @@ in { }; }; - config = mkIf cfg.enable { - ${namespace}.theming.enable = true; - + config = mkIf (cfg.enable && osConfig.${namespace}.theming.enable) { stylix = { base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix deleted file mode 100644 index 46a454b..0000000 --- a/modules/nixos/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, namespace, ... }: -let - inherit (lib) mkIf mkDefault mkOption mkMerge; - inherit (lib.types) nullOr enum; - - cfg = config.${namespace}; -in -{ - options.${namespace} = { - preset = mkOption { - type = nullOr (enum [ "server" "desktop" ]); - default = null; - example = "desktop"; - description = "Which defaults profile to start with"; - }; - }; - - config = mkMerge [ - (mkIf (cfg.preset == "desktop") { - ${namespace} = mkDefault { - hardware.has = { - audio = true; - }; - - boot = { - quiet = true; - animated = true; - }; - - desktop.use = "plasma"; - theming.enable = true; - }; - }) - - (mkIf (cfg.preset == "server") { - ${namespace} = mkDefault { - services = { - networking.ssh.enable = true; - }; - }; - }) - ]; -} diff --git a/modules/nixos/shells/default.nix b/modules/nixos/shells/default.nix new file mode 100644 index 0000000..6b5c058 --- /dev/null +++ b/modules/nixos/shells/default.nix @@ -0,0 +1,2 @@ +{ ... }: +{} \ No newline at end of file diff --git a/modules/nixos/shells/zsh.nix b/modules/nixos/shells/zsh/default.nix similarity index 74% rename from modules/nixos/shells/zsh.nix rename to modules/nixos/shells/zsh/default.nix index b9cf75b..399e7dd 100644 --- a/modules/nixos/shells/zsh.nix +++ b/modules/nixos/shells/zsh/default.nix @@ -10,5 +10,7 @@ in }; config = mkIf cfg.enable { + # Enable completion for sys-packages: + environment.pathsToLink = ["/share/zsh"]; }; } diff --git a/modules/nixos/theming/default.nix b/modules/nixos/theming/default.nix index d7ddb8e..78adb94 100644 --- a/modules/nixos/theming/default.nix +++ b/modules/nixos/theming/default.nix @@ -10,7 +10,9 @@ in ]; options.${namespace}.theming = { - enable = mkEnableOption "enable theming"; + enable = mkEnableOption "enable theming" // { + default = true; + }; }; config = mkIf cfg.enable { diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index f10ca22..19ea4fb 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -8,12 +8,19 @@ in ]; sneeuwvlok = { - preset = "desktop"; - hardware.has = { gpu.amd = true; bluetooth = true; + audio = true; }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "plasma"; + theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 792956e..0bbcd60 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -8,8 +8,19 @@ in ]; sneeuwvlok = { - preset = "desktop"; + hardware.has = { + gpu.amd = true; + bluetooth = true; + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + desktop.use = "gamescope"; + theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix index d28c19f..26df5e1 100644 --- a/systems/x86_64-linux/ulmo/default.nix +++ b/systems/x86_64-linux/ulmo/default.nix @@ -2,18 +2,17 @@ let in { - imports = [ - ./disks.nix - ./hardware.nix - ]; + imports = [ + ./disks.nix + ./hardware.nix + ]; - sneeuwvlok = { - preset = "server"; - - services = { - media.enable = true; - }; + sneeuwvlok = { + services = { + networking.ssh.enable = true; + media.enable = true; }; + }; - system.stateVersion = "23.11"; + system.stateVersion = "23.11"; } \ No newline at end of file From e970503b78b5c3facad8de1dbddb12e243d95c64 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 21:05:49 +0200 Subject: [PATCH 18/38] merge --- flake.lock | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index a7d81dc..77096f3 100644 --- a/flake.lock +++ b/flake.lock @@ -462,7 +462,6 @@ }, "original": { "owner": "himmelblau-idm", - "ref": "main", "repo": "himmelblau", "type": "github" } @@ -942,15 +941,15 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1753296482, - "narHash": "sha256-VPLaHVhU6/CwnMHTjhf6945qyrXEcpjxKfpWqQXtnxI=", - "owner": "danth", + "lastModified": 1753372006, + "narHash": "sha256-eyIYqerHPYHl2Eq802wJSOwMwZ3tdvJ4D+vckDe2mD8=", + "owner": "nix-community", "repo": "stylix", - "rev": "fbe1dab7783a3d579dc57be8ceee148104e0930b", + "rev": "ceda12a6da2181e424d8ed7e68ed291745f06f49", "type": "github" }, "original": { - "owner": "danth", + "owner": "nix-community", "repo": "stylix", "type": "github" } From d700126642e96ad195ceab8ec9840f2816b76308 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 09:23:41 +0200 Subject: [PATCH 19/38] add some clarifying comments --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index c1408a5..e7ed350 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ stylix.url = "github:nix-community/stylix"; + # Rust toolchain fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -43,6 +44,7 @@ sops-nix.url = "github:Mic92/sops-nix"; + # Azure AD for linux himmelblau = { url = "github:himmelblau-idm/himmelblau"; inputs.nixpkgs.follows = "nixpkgs"; From ff0a8c5b1bfed81f71faf2cea76744a0311ed1bf Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 11:20:21 +0200 Subject: [PATCH 20/38] woot. got a working build again --- flake.nix | 17 ++++--- homes/user-configurations/chris.nix | 19 ------- homes/x86_64-linux/chris@manwe/default.nix | 22 +++++++- modules/home/home-manager/default.nix | 10 ++++ modules/home/shell/default.nix | 1 - modules/home/shell/toolset/git/default.nix | 2 - modules/home/themes/default.nix | 27 +++++++++- modules/nixos/desktop/gamescope/default.nix | 5 +- .../default.nix} | 0 .../security/{boot.nix => boot/default.nix} | 0 .../security/{sops.nix => sops/default.nix} | 0 .../security/{sudo.nix => sudo/default.nix} | 0 modules/nixos/theming/default.nix | 50 ------------------- systems/x86_64-linux/manwe/default.nix | 1 - systems/x86_64-linux/orome/default.nix | 7 +-- systems/x86_64-linux/tulkas/default.nix | 1 - 16 files changed, 73 insertions(+), 89 deletions(-) delete mode 100644 homes/user-configurations/chris.nix create mode 100644 modules/home/home-manager/default.nix rename modules/nixos/system/{networking.nix => networking/default.nix} (100%) rename modules/nixos/system/security/{boot.nix => boot/default.nix} (100%) rename modules/nixos/system/security/{sops.nix => sops/default.nix} (100%) rename modules/nixos/system/security/{sudo.nix => sudo/default.nix} (100%) delete mode 100644 modules/nixos/theming/default.nix diff --git a/flake.nix b/flake.nix index e7ed350..63b5789 100644 --- a/flake.nix +++ b/flake.nix @@ -68,14 +68,6 @@ inherit inputs; src = ./.; - channels-config = { - allowUnfree = true; - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - }; - snowfall = { namespace = "sneeuwvlok"; @@ -85,6 +77,14 @@ }; }; + channels-config = { + allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; + }; + overlays = with inputs; [ fenix.overlays.default nix-minecraft.overlay @@ -92,6 +92,7 @@ ]; homes.modules = with inputs; [ + stylix.homeModules.stylix plasma-manager.homeManagerModules.plasma-manager ]; }; diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix deleted file mode 100644 index 26a170b..0000000 --- a/homes/user-configurations/chris.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - programs.git = { - userName = "Chris Kruining"; - userEmail = "chris@kruining.eu"; - }; - - sneeuwvlok = { - shell = { - default = "zsh"; - corePkgs.enable = true; - }; - - themes = { - enable = true; - theme = "everforest"; - polarity = "dark"; - }; - }; -} \ No newline at end of file diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 530ea5f..7b7c8f3 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -1,4 +1,22 @@ -{ ... }: +{ osConfig, ... }: { - sneeuwvlok = {}; + home.stateVersion = osConfig.system.stateVersion; + + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; + + sneeuwvlok = { + shell = { + default = "zsh"; + corePkgs.enable = true; + }; + + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + }; } diff --git a/modules/home/home-manager/default.nix b/modules/home/home-manager/default.nix new file mode 100644 index 0000000..93bae2e --- /dev/null +++ b/modules/home/home-manager/default.nix @@ -0,0 +1,10 @@ +{ lib, osConfig ? { }, ... }: +let + inherit (lib) mkDefault; +in +{ + systemd.user.startServices = "sd-switch"; + programs.home-manager.enable = true; + + home.stateVersion = mkDefault (osConfig.system.stateVersion or "25.05"); +} \ No newline at end of file diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index 2a0837c..80aa20a 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -21,7 +21,6 @@ in # shell = pkgs."${cfg.default}"; # } else {}) - (mkIf (cfg.corePkgs.enable) { ${namespace}.shell.toolset = mkDefault { bat.enable = true; diff --git a/modules/home/shell/toolset/git/default.nix b/modules/home/shell/toolset/git/default.nix index 48320f4..3edfb60 100644 --- a/modules/home/shell/toolset/git/default.nix +++ b/modules/home/shell/toolset/git/default.nix @@ -76,8 +76,6 @@ in credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; user = { - name = config.${namespace}.user.full_name; - email = config.${namespace}.user.email; signingKey = "~/.ssh/id_rsa.pub"; }; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index 55bccfe..276e850 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -5,6 +5,7 @@ let inherit (lib.types) nullOr enum; cfg = config.${namespace}.themes; + osCfg = osConfig.${namespace}.theming; in { options.${namespace}.themes = { enable = mkEnableOption "Theming (Stylix)"; @@ -23,12 +24,36 @@ in { }; }; - config = mkIf (cfg.enable && osConfig.${namespace}.theming.enable) { + config = mkIf (cfg.enable) { stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; polarity = cfg.polarity; targets.qt.platform = mkDefault "kde6"; + + fonts = { + serif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Serif"; + }; + + sansSerif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans"; + }; + + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; }; }; } diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix index 92d4e96..80e6099 100644 --- a/modules/nixos/desktop/gamescope/default.nix +++ b/modules/nixos/desktop/gamescope/default.nix @@ -1,6 +1,6 @@ { lib, config, namespace, inputs, ... }: let - inherit (lib) mkIf mkEnableOption; + inherit (lib) mkIf mkEnableOption mkForce; cfg = config.${namespace}.desktop.gamescope; in @@ -16,6 +16,9 @@ in config = mkIf cfg.enable { ${namespace}.desktop.plasma.enable = true; + services.displayManager.sddm.enable = mkForce false; + services.displayManager.gdm.enable = mkForce false; + jovian = { steam = { enable = true; diff --git a/modules/nixos/system/networking.nix b/modules/nixos/system/networking/default.nix similarity index 100% rename from modules/nixos/system/networking.nix rename to modules/nixos/system/networking/default.nix diff --git a/modules/nixos/system/security/boot.nix b/modules/nixos/system/security/boot/default.nix similarity index 100% rename from modules/nixos/system/security/boot.nix rename to modules/nixos/system/security/boot/default.nix diff --git a/modules/nixos/system/security/sops.nix b/modules/nixos/system/security/sops/default.nix similarity index 100% rename from modules/nixos/system/security/sops.nix rename to modules/nixos/system/security/sops/default.nix diff --git a/modules/nixos/system/security/sudo.nix b/modules/nixos/system/security/sudo/default.nix similarity index 100% rename from modules/nixos/system/security/sudo.nix rename to modules/nixos/system/security/sudo/default.nix diff --git a/modules/nixos/theming/default.nix b/modules/nixos/theming/default.nix deleted file mode 100644 index 78adb94..0000000 --- a/modules/nixos/theming/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ inputs, config, lib, pkgs, namespace, ... }: -let - inherit (lib) mkIf mkEnableOption; - - cfg = config.${namespace}.theming; -in -{ - imports = [ - inputs.stylix.nixosModules.stylix - ]; - - options.${namespace}.theming = { - enable = mkEnableOption "enable theming" // { - default = true; - }; - }; - - config = mkIf cfg.enable { - stylix = { - enable = true; - autoEnable = true; - - # base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; - # image = ./${cfg.theme}.jpg; - # polarity = cfg.polarity; - - fonts = { - serif = { - package = pkgs.dejavu_fonts; - name = "DejaVu Serif"; - }; - - sansSerif = { - package = pkgs.dejavu_fonts; - name = "DejaVu Sans"; - }; - - monospace = { - package = pkgs.nerd-fonts.jetbrains-mono; - name = "JetBrainsMono Nerd Font Mono"; - }; - - emoji = { - package = pkgs.noto-fonts-emoji; - name = "Noto Color Emoji"; - }; - }; - }; - }; -} diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index 19ea4fb..821e087 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -20,7 +20,6 @@ in }; desktop.use = "plasma"; - theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix index 5d5bf2f..34210ac 100644 --- a/systems/x86_64-linux/orome/default.nix +++ b/systems/x86_64-linux/orome/default.nix @@ -8,9 +8,10 @@ in ]; sneeuwvlok = { - preset = "desktop"; - - bluetooth.enable = true; + hardware.has = { + bluetooth = true; + audio = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 0bbcd60..6aea613 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -20,7 +20,6 @@ in }; desktop.use = "gamescope"; - theming.enable = true; }; system.stateVersion = "23.11"; From 7ae7ae6b47285a4aff82bb022724bbd7dceeffef Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 14:31:51 +0200 Subject: [PATCH 21/38] convert stud.io package to snowfall --- packages/{studio.nix => studio/default.nix} | 0 packages/{ => studio}/studio.png | Bin 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/{studio.nix => studio/default.nix} (100%) rename packages/{ => studio}/studio.png (100%) diff --git a/packages/studio.nix b/packages/studio/default.nix similarity index 100% rename from packages/studio.nix rename to packages/studio/default.nix diff --git a/packages/studio.png b/packages/studio/studio.png similarity index 100% rename from packages/studio.png rename to packages/studio/studio.png From a99300a295b650988d9b11cbd1e54050e18baab2 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 14:33:04 +0200 Subject: [PATCH 22/38] split manwe config (WARNING split is done opposite to main branch) --- modules/nixos/boot/default.nix | 2 ++ systems/x86_64-linux/mandos/README.md | 3 +++ systems/x86_64-linux/mandos/default.nix | 26 +++++++++++++++++++ systems/x86_64-linux/mandos/disks.nix | 33 ++++++++++++++++++++++++ systems/x86_64-linux/mandos/hardware.nix | 18 +++++++++++++ systems/x86_64-linux/manwe/disks.nix | 17 ++++-------- systems/x86_64-linux/manwe/hardware.nix | 4 +-- 7 files changed, 89 insertions(+), 14 deletions(-) create mode 100644 systems/x86_64-linux/mandos/README.md create mode 100644 systems/x86_64-linux/mandos/default.nix create mode 100644 systems/x86_64-linux/mandos/disks.nix create mode 100644 systems/x86_64-linux/mandos/hardware.nix diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 6ff6ac7..45f3170 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -38,6 +38,8 @@ in footer = true; }; }; + + supportedFilesystems = [ "nfs" ] }; }) diff --git a/systems/x86_64-linux/mandos/README.md b/systems/x86_64-linux/mandos/README.md new file mode 100644 index 0000000..b7e2801 --- /dev/null +++ b/systems/x86_64-linux/mandos/README.md @@ -0,0 +1,3 @@ +# Description + +Living room Steambox. \ No newline at end of file diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix new file mode 100644 index 0000000..3186239 --- /dev/null +++ b/systems/x86_64-linux/mandos/default.nix @@ -0,0 +1,26 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + hardware.has = { + gpu.nvidia = true; + bluetooth = true; + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "gamescope"; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/mandos/disks.nix b/systems/x86_64-linux/mandos/disks.nix new file mode 100644 index 0000000..b143047 --- /dev/null +++ b/systems/x86_64-linux/mandos/disks.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + swapDevices = [ { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/C842-316A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/home/chris/games" = { + device = "/dev/disk/by-label/games"; + fsType = "ext4"; + }; + + # TODO :: Reformat the disk to ext4 + "/home/chris/data" = { + device = "/dev/disk/by-label/Data"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=chris" ]; + }; + }; +} diff --git a/systems/x86_64-linux/mandos/hardware.nix b/systems/x86_64-linux/mandos/hardware.nix new file mode 100644 index 0000000..60759bd --- /dev/null +++ b/systems/x86_64-linux/mandos/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix index 3a3375e..f13f845 100644 --- a/systems/x86_64-linux/manwe/disks.nix +++ b/systems/x86_64-linux/manwe/disks.nix @@ -22,21 +22,14 @@ in options = [ "fmask=0022" "dmask=0022" ]; }; - "/home/chris/games" = { - device = "/dev/disk/by-label/games"; - fsType = "ext4"; - }; - - # TODO :: Reformat the disk to ext4 - "/home/chris/data" = { - device = "/dev/disk/by-label/Data"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=chris" ]; - }; - "/home/chris/media" = { device = "ulmo:/"; fsType = "nfs"; }; + + "/home/chris/mandos" = { + device = "mandos:/"; + fsType = "nfs"; + }; }; } diff --git a/systems/x86_64-linux/manwe/hardware.nix b/systems/x86_64-linux/manwe/hardware.nix index 60759bd..33ae3b5 100644 --- a/systems/x86_64-linux/manwe/hardware.nix +++ b/systems/x86_64-linux/manwe/hardware.nix @@ -8,11 +8,11 @@ in boot = { initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = [ "kvm-amd" ]; kernelParams = []; extraModulePackages = [ ]; }; nixpkgs.hostPlatform = mkDefault system; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; } From 97096a423f65887ab8bb3fa6e24cad77b40cf610 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 14:59:57 +0200 Subject: [PATCH 23/38] resolve merge artifacts and remove old code --- {hosts => _hosts}/mandos/README.md | 0 {hosts => _hosts}/mandos/default.nix | 0 {hosts => _hosts}/mandos/hardware.nix | 0 .../mandos/users/chris/default.nix | 0 _lib/attrs.nix | 21 ------ _lib/default.nix | 22 ------ _lib/modules.nix | 52 ------------- _lib/nixos.nix | 73 ------------------- _lib/options.nix | 8 -- _lib/user.nix | 26 ------- 10 files changed, 202 deletions(-) rename {hosts => _hosts}/mandos/README.md (100%) rename {hosts => _hosts}/mandos/default.nix (100%) rename {hosts => _hosts}/mandos/hardware.nix (100%) rename {hosts => _hosts}/mandos/users/chris/default.nix (100%) delete mode 100644 _lib/attrs.nix delete mode 100644 _lib/default.nix delete mode 100644 _lib/modules.nix delete mode 100644 _lib/nixos.nix delete mode 100644 _lib/options.nix delete mode 100644 _lib/user.nix diff --git a/hosts/mandos/README.md b/_hosts/mandos/README.md similarity index 100% rename from hosts/mandos/README.md rename to _hosts/mandos/README.md diff --git a/hosts/mandos/default.nix b/_hosts/mandos/default.nix similarity index 100% rename from hosts/mandos/default.nix rename to _hosts/mandos/default.nix diff --git a/hosts/mandos/hardware.nix b/_hosts/mandos/hardware.nix similarity index 100% rename from hosts/mandos/hardware.nix rename to _hosts/mandos/hardware.nix diff --git a/hosts/mandos/users/chris/default.nix b/_hosts/mandos/users/chris/default.nix similarity index 100% rename from hosts/mandos/users/chris/default.nix rename to _hosts/mandos/users/chris/default.nix diff --git a/_lib/attrs.nix b/_lib/attrs.nix deleted file mode 100644 index 9a576b2..0000000 --- a/_lib/attrs.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, ... }: -let - inherit (lib.lists) any count; - inherit (lib.attrsets) filterAttrs listToAttrs mapAttrs' mapAttrsToList; -in rec -{ - attrsToList = attrs: - mapAttrsToList (name: value: { inherit name value; }) attrs; - - mapFilterAttrs = pred: f: attrs: - filterAttrs pred (mapAttrs' f attrs); - - getAttrs' = values: f: - listToAttrs (map f values); - - anyAttrs = pred: attrs: - any (attr: pred attr.name attr.value) (attrsToList attrs); - - countAttrs = pred: attrs: - count (attr: pred attr.name attr.value) (attrsToList attrs); -} diff --git a/_lib/default.nix b/_lib/default.nix deleted file mode 100644 index 38cfde6..0000000 --- a/_lib/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ inputs, lib, pkgs, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.fixedPoints) makeExtensible; - inherit (lib.lists) foldr; - inherit (modules) mapModules; - - modules = import ./modules.nix { - inherit lib; - - self.attrs = import ./attrs.nix { - inherit lib; - - self = {}; - }; - }; - - mylib = makeExtensible (self: - mapModules ./. (file: import file { inherit self lib pkgs inputs; }) - ); -in - mylib.extend (self: super: foldr (a: b: a // b) {} (attrValues super)) diff --git a/_lib/modules.nix b/_lib/modules.nix deleted file mode 100644 index ecc5dc9..0000000 --- a/_lib/modules.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ lib, self, ... }: -let - inherit (builtins) attrValues readDir pathExists concatLists replaceStrings listToAttrs; - inherit (lib.attrsets) mapAttrsToList filterAttrs nameValuePair; - inherit (lib.strings) hasPrefix hasSuffix removeSuffix removePrefix; - inherit (lib.trivial) id; - inherit (lib) flatten; - inherit (self.attrs) mapFilterAttrs; -in rec -{ - mapModules = dir: fn: - mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (n: v: let path = "${toString dir}/${n}"; in - if v == "directory" && pathExists "${path}/default.nix" - then nameValuePair n (fn path) - else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n && !(hasPrefix "_" n) - then nameValuePair (removeSuffix ".nix" n) (fn path) - else nameValuePair "" null - ) (readDir dir); - - mapModules' = dir: fn: attrValues (mapModules dir fn); - - mapModulesRec = dir: fn: - mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (n: v: let path = "${toString dir}/${n}"; in - if v == "directory" && pathExists "${path}/default.nix" - then nameValuePair n (mapModulesRec path fn) - else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n - then nameValuePair (removeSuffix ".nix" n) (fn path) - else nameValuePair "" null - ) (readDir dir); - - mapModulesRec' = dir: fn: let - dirs = mapAttrsToList (k: _: "${dir}/${k}") (filterAttrs (n: v: v == "directory" && !(hasPrefix "_" n)) (readDir dir)); - files = attrValues (mapModules dir id); - paths = files ++ concatLists (map (d: mapModulesRec' d id) dirs); - in - map fn paths; - - readNixosModules = dir: fn: filterAttrs (name: value: value != null && !(hasPrefix "_" name)) (listToAttrs (flatten (readDirRecursive fn dir ""))); - - readDirRecursive = fn: root: dir: mapAttrsToList (name: type: - if type == "directory" && pathExists "${root}/${dir}/${name}/default.nix" - then [ - (nameValuePair "${replaceStrings ["/"] ["_"] (removePrefix "/" dir)}_${name}" (fn "${root}/${dir}/${name}/default.nix")) - (readDirRecursive fn root "${dir}/${name}") - ] - else if type == "directory" - then readDirRecursive fn root "${dir}/${name}" - else if type == "regular" && name != "default.nix" && hasSuffix ".nix" name - then nameValuePair "${replaceStrings ["/"] ["_"] (removePrefix "/" dir)}_${removeSuffix ".nix" name}" (fn "${root}/${dir}/${name}") - else nameValuePair "" null - ) (readDir "${root}/${dir}"); -} diff --git a/_lib/nixos.nix b/_lib/nixos.nix deleted file mode 100644 index b99ffaf..0000000 --- a/_lib/nixos.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ inputs, lib, pkgs, self, ... }: let - inherit (inputs.nixpkgs.lib) nixosSystem; - inherit (builtins) baseNameOf elem map listToAttrs pathExists; - inherit (lib) filterAttrs nameValuePair attrNames; - inherit (lib.modules) mkDefault mkIf; - inherit (lib.strings) removeSuffix; - inherit (self.modules) mapModules mapModulesRec'; - inherit (self) mkSysUser; -in rec -{ - mkHost = path: attrs @ {system ? "x86_64-linux", ...}: - nixosSystem { - inherit system; - - specialArgs = {inherit lib inputs system; }; - - modules = let - stateVersion = "23.11"; - users = if (pathExists "${path}/users") then attrNames (mapModules "${path}/users" (p: p)) else []; - in [ - inputs.nixos-boot.nixosModules.default - ({ ... }: { - nixpkgs.pkgs = pkgs; - - networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path)); - - system = { - inherit stateVersion; - configurationRevision = mkIf (self ? rev) self.rev; - }; - - imports = [ - inputs.home-manager.nixosModules.home-manager - "${path}/hardware.nix" - ] - ++ (mapModulesRec' ../modules/system import); - - users = { - mutableUsers = true; # Set this to false when I get sops with passwords set up properly - users = mkIf (pathExists "${path}/users") (mapModules "${path}/users" mkSysUser); - }; - }) - (filterAttrs (n: v: !elem n ["system"]) attrs) - (import path) - (args@{ inputs, lib, pkgs, config, options, ... }: { - imports = mapModulesRec' ../modules/home (file: (import file (args // { user = "root"; }))); - }) - ({...}: { - imports = []; - - config = { - home-manager = { - backupFileExtension = "bak"; - useGlobalPkgs = true; - sharedModules = [ - inputs.plasma-manager.homeManagerModules.plasma-manager - ]; - - users = listToAttrs (map (user: (nameValuePair user { home = { inherit stateVersion; }; })) (users ++ ["root"])); - }; - }; - }) - ] - ++ (map (user: (args@{ inputs, lib, pkgs, config, options, ... }: { - imports = mapModulesRec' ../modules/home (file: (import file (args // { inherit user; }))); - - config.modules.${user} = (import "${path}/users/${user}/default.nix" args); - })) users); - }; - - mapHosts = dir: attrs @ {system ? system, ...}: - mapModules dir (hostPath: mkHost hostPath attrs); -} diff --git a/_lib/options.nix b/_lib/options.nix deleted file mode 100644 index ca175d6..0000000 --- a/_lib/options.nix +++ /dev/null @@ -1,8 +0,0 @@ -{lib, ...}: let - inherit (lib.options) mkOption; -in { - mkOpt = type: default: mkOption {inherit type default;}; - - mkOpt' = type: default: description: - mkOption {inherit type default description;}; -} diff --git a/_lib/user.nix b/_lib/user.nix deleted file mode 100644 index 3e1eb2b..0000000 --- a/_lib/user.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, ... }: let - inherit (builtins) baseNameOf; - inherit (lib.attrsets) filterAttrs; - inherit (lib.strings) removeSuffix; - inherit (lib.my) mapModulesRec'; -in rec -{ - mkSysUser = path: let - name = removeSuffix ".nix" (baseNameOf path); - in - { - inherit name; - isNormalUser = true; - initialPassword = "kaas"; - home = "/home/${name}"; - group = "users"; - }; - - mkHmUser = path: {stateVersion, ...}: - { - home = { - inherit stateVersion; - sessionPath = [ "$XDG_BIN_HOME" "$PATH" ]; # Pretty sure I don't need this. - }; - }; -} From c2d6c719a2cd450421c809bc7a301d30314a9e5d Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 15:00:17 +0200 Subject: [PATCH 24/38] fix device settings --- systems/x86_64-linux/mandos/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix index 3186239..248fa1d 100644 --- a/systems/x86_64-linux/mandos/default.nix +++ b/systems/x86_64-linux/mandos/default.nix @@ -10,7 +10,6 @@ in sneeuwvlok = { hardware.has = { gpu.nvidia = true; - bluetooth = true; audio = true; }; From 9aa634bd71d5b2af86e3c1d2a7f58e83432df0c2 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 16:52:48 +0200 Subject: [PATCH 25/38] aight, making progress --- .../desktop/applications/communication.nix | 19 ----- _modules/home/desktop/applications/office.nix | 28 ------- .../home/desktop/applications/passwords.nix | 21 ------ .../home/desktop/applications/recording.nix | 36 --------- _modules/home/desktop/applications/steam.nix | 55 -------------- _modules/home/desktop/applications/studio.nix | 17 ----- _modules/home/desktop/browsers/ladybird.nix | 17 ----- _modules/home/desktop/browsers/zen.nix | 43 ----------- _modules/home/desktop/editors/default.nix | 39 ---------- _modules/home/desktop/editors/kate.nix | 18 ----- _modules/home/desktop/editors/nano.nix | 33 -------- _modules/home/desktop/editors/nvim.nix | 38 ---------- _modules/home/desktop/editors/vscodium.nix | 18 ----- _modules/home/desktop/editors/zed.nix | 75 ------------------- _modules/home/desktop/games/default.nix | 20 ----- _modules/home/desktop/games/minecraft.nix | 23 ------ _modules/home/user.nix | 48 ------------ _modules/home/xgd.nix | 32 -------- _modules/system/desktop/editors/nvim.nix | 22 ------ .../home/application/bitwarden/default.nix | 15 ++++ modules/home/application/default.nix | 26 +++++++ modules/home/application/discord/default.nix | 15 ++++ modules/home/application/ladybird/default.nix | 15 ++++ modules/home/application/obs/default.nix | 32 ++++++++ .../home/application/onlyoffice/default.nix | 16 ++++ modules/home/application/signal/default.nix | 15 ++++ modules/home/application/steam/default.nix | 55 ++++++++++++++ modules/home/application/studio/default.nix | 15 ++++ .../home/application/teamspeak/default.nix | 15 ++++ .../home/application/thunderbird/default.nix | 28 +++---- modules/home/application/zen/default.nix | 19 +++++ modules/home/editor/default.nix | 24 ++++++ modules/home/editor/nano/default.nix | 30 ++++++++ modules/home/editor/nvim/default.nix | 43 +++++++++++ modules/home/editor/zed/default.nix | 73 ++++++++++++++++++ modules/home/game/minecraft/default.nix | 15 ++++ modules/nixos/editor/nvim/default.nix | 18 +++++ 37 files changed, 451 insertions(+), 620 deletions(-) delete mode 100644 _modules/home/desktop/applications/communication.nix delete mode 100644 _modules/home/desktop/applications/office.nix delete mode 100644 _modules/home/desktop/applications/passwords.nix delete mode 100644 _modules/home/desktop/applications/recording.nix delete mode 100644 _modules/home/desktop/applications/steam.nix delete mode 100644 _modules/home/desktop/applications/studio.nix delete mode 100644 _modules/home/desktop/browsers/ladybird.nix delete mode 100644 _modules/home/desktop/browsers/zen.nix delete mode 100644 _modules/home/desktop/editors/default.nix delete mode 100644 _modules/home/desktop/editors/kate.nix delete mode 100644 _modules/home/desktop/editors/nano.nix delete mode 100644 _modules/home/desktop/editors/nvim.nix delete mode 100644 _modules/home/desktop/editors/vscodium.nix delete mode 100644 _modules/home/desktop/editors/zed.nix delete mode 100644 _modules/home/desktop/games/default.nix delete mode 100644 _modules/home/desktop/games/minecraft.nix delete mode 100644 _modules/home/user.nix delete mode 100644 _modules/home/xgd.nix delete mode 100644 _modules/system/desktop/editors/nvim.nix create mode 100644 modules/home/application/bitwarden/default.nix create mode 100644 modules/home/application/default.nix create mode 100644 modules/home/application/discord/default.nix create mode 100644 modules/home/application/ladybird/default.nix create mode 100644 modules/home/application/obs/default.nix create mode 100644 modules/home/application/onlyoffice/default.nix create mode 100644 modules/home/application/signal/default.nix create mode 100644 modules/home/application/steam/default.nix create mode 100644 modules/home/application/studio/default.nix create mode 100644 modules/home/application/teamspeak/default.nix rename _modules/home/desktop/applications/email.nix => modules/home/application/thunderbird/default.nix (52%) create mode 100644 modules/home/application/zen/default.nix create mode 100644 modules/home/editor/default.nix create mode 100644 modules/home/editor/nano/default.nix create mode 100644 modules/home/editor/nvim/default.nix create mode 100644 modules/home/editor/zed/default.nix create mode 100644 modules/home/game/minecraft/default.nix create mode 100644 modules/nixos/editor/nvim/default.nix diff --git a/_modules/home/desktop/applications/communication.nix b/_modules/home/desktop/applications/communication.nix deleted file mode 100644 index 371bf0a..0000000 --- a/_modules/home/desktop/applications/communication.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.communication; -in -{ - options.modules.${user}.desktop.applications.communication = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable office suite (only-office)"; - }; - - config = mkIf cfg.enable - { - home-manager.users.${user}.home.packages = with pkgs; [vesktop teamspeak_client signal-desktop]; - }; -} diff --git a/_modules/home/desktop/applications/office.nix b/_modules/home/desktop/applications/office.nix deleted file mode 100644 index 9965144..0000000 --- a/_modules/home/desktop/applications/office.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.office; -in -{ - options.modules.${user}.desktop.applications.office = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable office suite (only-office)"; - }; - - config = mkIf cfg.enable - { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) onlyoffice-bin; - }; - -# nixpkgs.config.allowUnfreePredicate = pkg: -# builtins.elem (lib.getName pkg) [ "corefonts" ]; - - fonts.packages = with pkgs; [ - corefonts - ]; - }; -} diff --git a/_modules/home/desktop/applications/passwords.nix b/_modules/home/desktop/applications/passwords.nix deleted file mode 100644 index 9a07bb4..0000000 --- a/_modules/home/desktop/applications/passwords.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.passwords; -in -{ - options.modules.${user}.desktop.applications.passwords = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable password manager (bitwarden)"; - }; - - config = mkIf cfg.enable - { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) bitwarden-desktop; - }; - }; -} diff --git a/_modules/home/desktop/applications/recording.nix b/_modules/home/desktop/applications/recording.nix deleted file mode 100644 index b8ba73b..0000000 --- a/_modules/home/desktop/applications/recording.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.recording; -in -{ - options.modules.${user}.desktop.applications.recording = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable recording software (OBS Studio)"; - }; - - config = mkIf cfg.enable - { - boot = { - extraModulePackages = with config.boot.kernelPackages; [ - v4l2loopback - ]; - - extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 - ''; - }; - - security.polkit.enable = true; - - home-manager.users.${user}.home.packages = with pkgs; [ - obs-studio - obs-studio-plugins.wlrobs - obs-studio-plugins.obs-backgroundremoval - obs-studio-plugins.obs-pipewire-audio-capture - ]; - }; -} diff --git a/_modules/home/desktop/applications/steam.nix b/_modules/home/desktop/applications/steam.nix deleted file mode 100644 index 7f483e7..0000000 --- a/_modules/home/desktop/applications/steam.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib) mkEnableOption mkIf mkForce mkMerge; - - cfg = config.modules.${user}.desktop.applications.steam; - desktop = config.modules.${user}.desktop; -in -{ - options.modules.${user}.desktop.applications.steam = { - enable = mkEnableOption "Enable steam, the game/software store"; - hardware.enable = mkEnableOption "Support for steam hardware"; - }; - - config = mkIf cfg.enable (mkMerge [ - { - programs.steam = { - enable = true; - package = pkgs.steam-small.override { - extraEnv = { - DXVK_HUD = "compiler"; - MANGOHUD = true; - }; - }; - }; - hardware.steam-hardware.enable = mkForce cfg.hardware.enable; - - # https://github.com/FeralInteractive/gamemode - programs.gamemode = { - enable = true; - enableRenice = true; - settings = {}; - }; - } - - (mkIf (desktop.type == "wayland") { - # https://github.com/ValveSoftware/gamescope - programs.gamescope = { - enable = true; - capSysNice = true; - env = { - DXVK_HDR = "1"; - ENABLE_GAMESCOPE_WSI = "1"; - WINE_FULLSCREEN_FSR = "1"; - WLR_RENDERER = "vulkan"; - }; - args = ["--hdr-enabled"]; - }; - - programs.steam.gamescopeSession = { - enable = true; - args = ["--immediate-flips"]; - }; - }) - ]); -} diff --git a/_modules/home/desktop/applications/studio.nix b/_modules/home/desktop/applications/studio.nix deleted file mode 100644 index 940c386..0000000 --- a/_modules/home/desktop/applications/studio.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, config, lib, user, ... }: -let - inherit (lib) mkIf mkEnableOption; - - cfg = config.modules.${user}.desktop.applications.studio; -in -{ - options.modules.${user}.desktop.applications.studio = { - enable = mkEnableOption "Enable Bricklink Studio"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - my.studio - ]; - }; -} diff --git a/_modules/home/desktop/browsers/ladybird.nix b/_modules/home/desktop/browsers/ladybird.nix deleted file mode 100644 index b9f698f..0000000 --- a/_modules/home/desktop/browsers/ladybird.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.browsers.ladybird; -in { - options.modules.${user}.desktop.browsers.ladybird = { - enable = mkEnableOption "Enable Ladybird"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - ladybird - ]; - }; -} diff --git a/_modules/home/desktop/browsers/zen.nix b/_modules/home/desktop/browsers/zen.nix deleted file mode 100644 index cf70760..0000000 --- a/_modules/home/desktop/browsers/zen.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ inputs, options, config, lib, pkgs, user, ... }: -let - inherit (builtins) toJSON; - inherit (lib.attrsets) attrValues mapAttrsToList; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.strings) concatStrings; - - cfg = config.modules.${user}.desktop.browsers.zen; -in { - options.modules.${user}.desktop.browsers.zen = let - inherit (lib.options) mkEnableOption; - inherit (lib.types) attrsOf oneOf bool int lines str; - inherit (lib.my) mkOpt mkOpt'; - in { - enable = mkEnableOption "Gecko-based libre browser"; - privacy.enable = mkEnableOption "Privacy Focused Firefox fork"; - - profileName = mkOpt str config.user.name; - settings = mkOpt' (attrsOf (oneOf [bool int str])) {} '' - Firefox preferences set in user.js - ''; - extraConfig = mkOpt' lines "" '' - Extra lines to add to user.js - ''; - userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface"; - userContent = mkOpt' lines "" "Global CSS Styles for websites"; - }; - - config = mkMerge [ - (mkIf (config.modules.${user}.desktop.type == "wayland") { - environment.variables.MOZ_ENABLE_WAYLAND = "1"; - }) - - (mkIf cfg.enable { - home-manager.users.${user}.home.packages = let - inherit (pkgs) makeDesktopItem; - inherit (inputs.zen.packages.${pkgs.system}.specific) zen; - in [ - zen - ]; - }) - ]; -} diff --git a/_modules/home/desktop/editors/default.nix b/_modules/home/desktop/editors/default.nix deleted file mode 100644 index 292f324..0000000 --- a/_modules/home/desktop/editors/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - options, - lib, - pkgs, - user, - ... -}: let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - cfg = config.modules.${user}.desktop.editors; -in { - options.modules.${user}.desktop.editors = let - inherit (lib.options) mkOption; - inherit (lib.types) nullOr enum; - in { - default = mkOption { - type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]); - default = "nano"; - description = "Default editor for text manipulation"; - example = "nvim"; - }; - }; - - config = mkMerge [ - (mkIf (cfg.default != null) { - home-manager.users.${user}.home.sessionVariables = { - EDITOR = cfg.default; - }; - }) - - (mkIf (cfg.default == "nvim") { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) imagemagick editorconfig-core-c sqlite deno pandoc nuspell; - inherit (pkgs.hunspellDicts) nl_NL en_GB-ise; - }; - }) - ]; -} diff --git a/_modules/home/desktop/editors/kate.nix b/_modules/home/desktop/editors/kate.nix deleted file mode 100644 index 9e030e5..0000000 --- a/_modules/home/desktop/editors/kate.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, options, lib, pkgs, user, ... }: -let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.kate; -in -{ - options.modules.${user}.desktop.editors.kate = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "kate"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user}.programs.kate.enable = true; - }; -} diff --git a/_modules/home/desktop/editors/nano.nix b/_modules/home/desktop/editors/nano.nix deleted file mode 100644 index ff39996..0000000 --- a/_modules/home/desktop/editors/nano.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, options, lib, pkgs, user, ... }: -let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.nano; -in -{ - options.modules.${user}.desktop.editors.nano = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "nano"; }; - - config = mkIf cfg.enable { - home-manager.users.${user}.home.packages = with pkgs; [ - nano - ]; - - programs.nano = { - enable = true; - syntaxHighlight = true; - nanorc = '' - set autoindent - set jumpyscrolling - set linenumbers - set mouse - set saveonexit - set smarthome - set tabstospaces - set tabsize 2 - ''; - }; - }; -} diff --git a/_modules/home/desktop/editors/nvim.nix b/_modules/home/desktop/editors/nvim.nix deleted file mode 100644 index 9a738d5..0000000 --- a/_modules/home/desktop/editors/nvim.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.nvim; -in -{ - options.modules.${user}.desktop.editors.nvim = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "neo-vim (nixvim)"; - }; - - config = mkIf cfg.enable { - modules.desktop.editors.nvim.enable = true; - - programs.nvf = { - enable = true; - settings = { - vim = { - statusline.lualine.enable = true; - telescope.enable = true; - autocomplete.nvim-cmp.enable = true; - - lsp.enable = true; - - languages = { - enableTreesitter = true; - - nix.enable = true; - ts.enable = true; - rust.enable = true; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/desktop/editors/vscodium.nix b/_modules/home/desktop/editors/vscodium.nix deleted file mode 100644 index 93524bc..0000000 --- a/_modules/home/desktop/editors/vscodium.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.editors.vscodium; -in -{ - options.modules.${user}.desktop.editors.vscodium = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "vscodium"; }; - - config = mkIf cfg.enable { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) vscodium; - }; - }; -} diff --git a/_modules/home/desktop/editors/zed.nix b/_modules/home/desktop/editors/zed.nix deleted file mode 100644 index cbaafa3..0000000 --- a/_modules/home/desktop/editors/zed.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ config, lib, pkgs, user, ... }: let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.zed; -in { - options.modules.${user}.desktop.editors.zed = let - inherit (lib.options) mkEnableOption; - in {enable = mkEnableOption "zed";}; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ - zed-editor nixd nil alejandra - ]; - - programs.zed-editor = { - enable = true; - - extensions = ["nix" "toml" "html"]; - - userSettings = { - assistant.enabled = false; - - vim_mode = false; - load_direnv = "shell_hook"; - base_keymap = "JetBrains"; - - format_on_save = "on"; - bindings = { - "ctrl+s" = "workspace::SaveAll"; - }; - - tabs = { - file_icons = true; - git_status = true; - }; - project_panel.auto_reveal_entries = false; - - "experimental.theme_overrides" = { - border = "#ffffff07"; - }; - - hour_format = "hour24"; - auto_update = false; - - lsp = { - nixd = {}; - nil = { - initialization_options = { - nix = { - flake = { - autoArchive = true; - }; - }; - formatting = { - command = ["alejandra" "--quiet" "--"]; - }; - }; - binary = { - path_lookup = true; - }; - }; - }; - - languages = { - "Nix" = { - language_servers = ["nixd" "nil"]; - format_on_save = "on"; - }; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/desktop/games/default.nix b/_modules/home/desktop/games/default.nix deleted file mode 100644 index 8e4bb22..0000000 --- a/_modules/home/desktop/games/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, user, ... }: let - inherit (lib) mkEnableOption mkIf; - - cfg = config.modules.${user}.desktop.games; -in -{ - options.modules.${user}.desktop.games = { - enable = mkEnableOption "enable proton GE"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ protonup ]; - - home.sessionVariables = { - STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; - }; - }; - }; -} diff --git a/_modules/home/desktop/games/minecraft.nix b/_modules/home/desktop/games/minecraft.nix deleted file mode 100644 index b56fceb..0000000 --- a/_modules/home/desktop/games/minecraft.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.games.minecraft; -in -{ - options.modules.${user}.desktop.games.minecraft = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "minecraft (Modrinth)"; - }; - - config = mkIf cfg.enable { - # environment.systemPackages = [ - # pkgs.minecract - # ]; - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) prismlauncher; - }; - }; -} diff --git a/_modules/home/user.nix b/_modules/home/user.nix deleted file mode 100644 index 4fa3d0e..0000000 --- a/_modules/home/user.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - - cfg = config.modules.${user}.user; -in -{ - options.modules.${user}.user = let - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) nullOr enum; - in with lib.types; { - full_name = mkOption { - type = nullOr str; - default = null; - example = "John Doe"; - description = "Full name of the user, this is used as the kde plasma display name for example"; - }; - - email = mkOption { - type = nullOr str; - default = null; - example = "name@domain.tld"; - description = "user's email address"; - }; - - is_trusted = mkOption { - type = bool; - default = false; - example = true; - description = "this is used to grant sudo priviledges for the user"; - }; - - groups = mkOption { - type = listOf str; - default = []; - example = [ "some" "group" "names" ]; - description = "groups to add the user to"; - }; - }; - - config = mkIf (user != "root") { - users.users.${user} = { - description = (cfg.full_name or user); - extraGroups = cfg.groups ++ (if cfg.is_trusted then [ "wheel" ] else []); - }; - }; -} diff --git a/_modules/home/xgd.nix b/_modules/home/xgd.nix deleted file mode 100644 index 4af3989..0000000 --- a/_modules/home/xgd.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, user, ... }: -{ - home-manager.users.${user}.xdg.enable = true; - - environment = { - sessionVariables = { - XDG_CACHE_HOME = "$HOME/.cache"; - XDG_CONFIG_HOME = "$HOME/.config"; - XDG_DATA_HOME = "$HOME/.local/share"; - XDG_BIN_HOME = "$HOME/.local/bin"; - }; - - variables = { - __GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv"; - ASPELL_CONF = '' - per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; - personal $XDG_CONFIG_HOME/aspell/en_US.pws; - repl $XDG_CONFIG_HOME/aspell/en.prepl; - ''; - CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv"; - HISTFILE = "$XDG_DATA_HOME/bash/history"; - INPUTRC = "$XDG_CONFIG_HOME/readline/inputrc"; - LESSHISTFILE = "$XDG_CACHE_HOME/lesshst"; - WGETRC = "$XDG_CONFIG_HOME/wgetrc"; - }; - - extraInit = '' - export XAUTHORITY=/tmp/Xauthority - [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY" - ''; - }; -} diff --git a/_modules/system/desktop/editors/nvim.nix b/_modules/system/desktop/editors/nvim.nix deleted file mode 100644 index 12bdead..0000000 --- a/_modules/system/desktop/editors/nvim.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ inputs, config, options, lib, pkgs, ... }: -let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf; - - cfg = options.modules.desktop.editors.nvim; -in -{ - imports = [ - inputs.nvf.nixosModules.default - ]; - - options.modules.desktop.editors.nvim = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "neo-vim (nixvim)"; - }; - - config = mkIf cfg.enable { - - }; -} diff --git a/modules/home/application/bitwarden/default.nix b/modules/home/application/bitwarden/default.nix new file mode 100644 index 0000000..f2cd869 --- /dev/null +++ b/modules/home/application/bitwarden/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.bitwarden; +in +{ + options.${namespace}.application.bitwarden = { + enable = mkEnableOption "enable bitwarden"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ bitwarden-desktop ]; + }; +} diff --git a/modules/home/application/default.nix b/modules/home/application/default.nix new file mode 100644 index 0000000..702193d --- /dev/null +++ b/modules/home/application/default.nix @@ -0,0 +1,26 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkOption; + inherit (lib.types) subModule; + + cfg = config.${namespace}.application; +in +{ + options.${namespace}.application = { + defaults = mkOption { + type = subModule { + browser = mkOption { + type = enum [ "ladybird" "zen" ]; + default = "zen"; + example = "ladybird"; + }; + }; + }; + }; + + config = { + home.sessionVariables = { + BROWSER = cfg.defaults.browser; + }; + }; +} diff --git a/modules/home/application/discord/default.nix b/modules/home/application/discord/default.nix new file mode 100644 index 0000000..a736b37 --- /dev/null +++ b/modules/home/application/discord/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.discord; +in +{ + options.${namespace}.application.discord = { + enable = mkEnableOption "enable discord (vesktop)"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ vesktop ]; + }; +} diff --git a/modules/home/application/ladybird/default.nix b/modules/home/application/ladybird/default.nix new file mode 100644 index 0000000..31d7c17 --- /dev/null +++ b/modules/home/application/ladybird/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.ladybird; +in +{ + options.${namespace}.application.ladybird = { + enable = mkEnableOption "enable ladybird"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ ladybird ]; + }; +} diff --git a/modules/home/application/obs/default.nix b/modules/home/application/obs/default.nix new file mode 100644 index 0000000..52e4100 --- /dev/null +++ b/modules/home/application/obs/default.nix @@ -0,0 +1,32 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.obs; +in +{ + options.${namespace}.application.obs = { + enable = mkEnableOption "enable obs"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + obs-studio + obs-studio-plugins.wlrobs + obs-studio-plugins.obs-backgroundremoval + obs-studio-plugins.obs-pipewire-audio-capture + ]; + + boot = { + extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; + + extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + ''; + }; + + security.polkit.enable = true; + }; +} diff --git a/modules/home/application/onlyoffice/default.nix b/modules/home/application/onlyoffice/default.nix new file mode 100644 index 0000000..4bbb07b --- /dev/null +++ b/modules/home/application/onlyoffice/default.nix @@ -0,0 +1,16 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.onlyoffice; +in +{ + options.${namespace}.application.onlyoffice = { + enable = mkEnableOption "enable onlyoffice"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ onlyoffice-bin ]; + fonts.packages = with pkgs; [ corefonts ]; + }; +} diff --git a/modules/home/application/signal/default.nix b/modules/home/application/signal/default.nix new file mode 100644 index 0000000..f4eb1d0 --- /dev/null +++ b/modules/home/application/signal/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.signal; +in +{ + options.${namespace}.application.signal = { + enable = mkEnableOption "enable signal"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ signal-desktop ]; + }; +} diff --git a/modules/home/application/steam/default.nix b/modules/home/application/steam/default.nix new file mode 100644 index 0000000..104acd7 --- /dev/null +++ b/modules/home/application/steam/default.nix @@ -0,0 +1,55 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.steam; +in +{ + options.${namespace}.application.steam = { + enable = mkEnableOption "enable steam"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ protonup ]; + + home.sessionVariables = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; + }; + + programs = { + steam = { + enable = true; + package = pkgs.steam-small.override { + extraEnv = { + DXVK_HUD = "compiler"; + MANGOHUD = true; + }; + }; + + gamescopeSession = { + enable = true; + args = ["--immediate-flips"]; + }; + }; + + # https://github.com/FeralInteractive/gamemode + gamemode = { + enable = true; + enableRenice = true; + settings = {}; + }; + + gamescope = { + enable = true; + capSysNice = true; + env = { + DXVK_HDR = "1"; + ENABLE_GAMESCOPE_WSI = "1"; + WINE_FULLSCREEN_FSR = "1"; + WLR_RENDERER = "vulkan"; + }; + args = ["--hdr-enabled"]; + }; + }; + }; +} diff --git a/modules/home/application/studio/default.nix b/modules/home/application/studio/default.nix new file mode 100644 index 0000000..f515b77 --- /dev/null +++ b/modules/home/application/studio/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.studio; +in +{ + options.${namespace}.application.studio = { + enable = mkEnableOption "enable Bricklink Studio"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ studio ]; + }; +} diff --git a/modules/home/application/teamspeak/default.nix b/modules/home/application/teamspeak/default.nix new file mode 100644 index 0000000..e15bd96 --- /dev/null +++ b/modules/home/application/teamspeak/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.teamspeak; +in +{ + options.${namespace}.application.teamspeak = { + enable = mkEnableOption "enable teamspeak"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ teamspeak_client ]; + }; +} diff --git a/_modules/home/desktop/applications/email.nix b/modules/home/application/thunderbird/default.nix similarity index 52% rename from _modules/home/desktop/applications/email.nix rename to modules/home/application/thunderbird/default.nix index 7fb8fd3..caffe2a 100644 --- a/_modules/home/desktop/applications/email.nix +++ b/modules/home/application/thunderbird/default.nix @@ -1,29 +1,22 @@ -{ options, config, lib, pkgs, user, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.${user}.desktop.applications.email; + cfg = config.${namespace}.application.thunderbird; in { - options.modules.${user}.desktop.applications.email = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable email client (thunderbird)"; + options.${namespace}.application.thunderbird = { + enable = mkEnableOption "enable thunderbird"; }; - config = mkIf cfg.enable - { + config = mkIf cfg.enable { + home.packages = with pkgs; [ thunderbird ]; + programs.thunderbird = { enable = true; }; - - home-manager.users.${user} = { - home.packages = attrValues { - inherit (pkgs) thunderbird; - }; - - accounts.email.accounts = { + + accounts.email.accounts = { kruining = { primary = true; address = "chris@kruinin.eu"; @@ -48,6 +41,5 @@ in }; }; }; - }; }; } diff --git a/modules/home/application/zen/default.nix b/modules/home/application/zen/default.nix new file mode 100644 index 0000000..e07c29d --- /dev/null +++ b/modules/home/application/zen/default.nix @@ -0,0 +1,19 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.zen; +in +{ + options.${namespace}.application.zen = { + enable = mkEnableOption "enable zen"; + }; + + config = mkIf cfg.enable { + home.packages = with inputs.zen.packages.${pkgs.system}.specific; [ zen ]; + + sessionVariables = { + MOZ_ENABLE_WAYLAND = "1"; + }; + }; +} diff --git a/modules/home/editor/default.nix b/modules/home/editor/default.nix new file mode 100644 index 0000000..f2ea10d --- /dev/null +++ b/modules/home/editor/default.nix @@ -0,0 +1,24 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) attrValues mkIf mkMerge mkOption; + inherit (lib.types) nullOr enum; + + cfg = config.${namespace}.editors; +in { + options.${namespace}.editors = { + default = mkOption { + type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]); + default = "nano"; + description = "Default editor for text manipulation"; + example = "nvim"; + }; + }; + + config = mkMerge [ + (mkIf (cfg.default != null) { + home.sessionVariables = { + EDITOR = cfg.default; + }; + }) + ]; +} diff --git a/modules/home/editor/nano/default.nix b/modules/home/editor/nano/default.nix new file mode 100644 index 0000000..13eb800 --- /dev/null +++ b/modules/home/editor/nano/default.nix @@ -0,0 +1,30 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.editors.nano; +in +{ + options.${namespace}.editors.nano = { + enable = mkEnableOption "nano"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ nano ]; + + programs.nano = { + enable = true; + syntaxHighlight = true; + nanorc = '' + set autoindent + set jumpyscrolling + set linenumbers + set mouse + set saveonexit + set smarthome + set tabstospaces + set tabsize 2 + ''; + }; + }; +} diff --git a/modules/home/editor/nvim/default.nix b/modules/home/editor/nvim/default.nix new file mode 100644 index 0000000..3e0a047 --- /dev/null +++ b/modules/home/editor/nvim/default.nix @@ -0,0 +1,43 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.editor.nvim; +in +{ + options.${namespace}.editor.nvim = { + enable = mkEnableOption "enable nvim via nvf on user level"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + imagemagick + editorconfig-core-c + sqlite + deno + pandoc + nuspell + hunspellDicts.nl_NL + hunspellDicts.en_GB-ise + ]; + + programs.nvf = { + enable = true; + settings.vim = { + statusline.lualine.enable = true; + telescope.enable = true; + autocomplete.nvim-cmp.enable = true; + + lsp.enable = true; + + languages = { + enableTreesitter = true; + + nix.enable = true; + ts.enable = true; + rust.enable = true; + }; + }; + }; + }; +} diff --git a/modules/home/editor/zed/default.nix b/modules/home/editor/zed/default.nix new file mode 100644 index 0000000..94e63d3 --- /dev/null +++ b/modules/home/editor/zed/default.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, namespace, ... }: let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.editors.zed; +in { + options.${namespace}.editors.zed = { + enable = mkEnableOption "zed"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + zed-editor nixd nil alejandra + ]; + + programs.zed-editor = { + enable = true; + + extensions = [ "nix" "toml" "html" ]; + + userSettings = { + assistant.enabled = false; + + vim_mode = false; + load_direnv = "shell_hook"; + base_keymap = "JetBrains"; + + format_on_save = "on"; + bindings = { + "ctrl+s" = "workspace::SaveAll"; + }; + + tabs = { + file_icons = true; + git_status = true; + }; + project_panel.auto_reveal_entries = false; + + "experimental.theme_overrides" = { + border = "#ffffff07"; + }; + + hour_format = "hour24"; + auto_update = false; + + lsp = { + nixd = {}; + nil = { + initialization_options = { + nix = { + flake = { + autoArchive = true; + }; + }; + formatting = { + command = ["alejandra" "--quiet" "--"]; + }; + }; + binary = { + path_lookup = true; + }; + }; + }; + + languages = { + "Nix" = { + language_servers = ["nixd" "nil"]; + format_on_save = "on"; + }; + }; + }; + }; + }; +} diff --git a/modules/home/game/minecraft/default.nix b/modules/home/game/minecraft/default.nix new file mode 100644 index 0000000..e5dedc6 --- /dev/null +++ b/modules/home/game/minecraft/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.game.minecraft; +in +{ + options.${namespace}.game.minecraft = { + enable = mkEnableOption "enable minecraft"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ prismlauncher ]; + }; +} diff --git a/modules/nixos/editor/nvim/default.nix b/modules/nixos/editor/nvim/default.nix new file mode 100644 index 0000000..c29de0f --- /dev/null +++ b/modules/nixos/editor/nvim/default.nix @@ -0,0 +1,18 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.editor.nvim; +in +{ + imports = [ + inputs.nvf.nixosModules.default + ]; + + options.${namespace}.editor.nvim = { + enable = mkEnableOption "enable nvim via nvf on system level"; + }; + + config = mkIf cfg.enable { + }; +} From 3528e22c67aa7e940a64b545e5cab535bf1182e4 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 30 Jul 2025 21:38:15 +0200 Subject: [PATCH 26/38] kaas --- _hosts/mandos/README.md | 4 - _hosts/mandos/default.nix | 33 --- _hosts/mandos/hardware.nix | 35 --- _hosts/mandos/users/chris/default.nix | 65 ----- _hosts/manwe/default.nix | 37 --- _hosts/manwe/hardware.nix | 35 --- _hosts/manwe/users/chris/default.nix | 65 ----- _hosts/orome/default.nix | 20 -- _hosts/orome/hardware.nix | 32 --- _hosts/orome/users/chris/default.nix | 57 ----- _hosts/tulkas/default.nix | 22 -- _hosts/tulkas/hardware.nix | 32 --- _hosts/tulkas/users/chris/default.nix | 33 --- _hosts/ulmo/README.md | 4 - _hosts/ulmo/default.nix | 34 --- _hosts/ulmo/hardware.nix | 31 --- _modules/home/desktop/browsers/default.nix | 27 -- _modules/home/desktop/browsers/firefox.nix | 233 ------------------ _modules/home/desktop/default.nix | 10 - _modules/home/desktop/terminal/alacritty.nix | 50 ---- _modules/home/desktop/terminal/default.nix | 24 -- _modules/home/desktop/terminal/ghostty.nix | 35 --- _modules/home/develop/default.nix | 16 -- _modules/home/develop/dotnet.nix | 18 -- _modules/home/develop/js.nix | 28 --- _modules/home/develop/rust.nix | 36 --- _modules/system/services/default.nix | 4 - _modules/system/shell/default.nix | 11 - _modules/system/shell/zsh.nix | 15 -- _modules/system/system/audio.nix | 36 --- _modules/system/system/bluetooth.nix | 30 --- homes/x86_64-linux/chris@mandos/default.nix | 35 +++ homes/x86_64-linux/chris@manwe/default.nix | 37 ++- homes/x86_64-linux/chris@orome/default.nix | 48 ++++ homes/x86_64-linux/chris@tulkas/default.nix | 35 +++ .../home/application/chrome/default.nix | 47 ++-- modules/home/application/default.nix | 26 -- modules/home/application/obs/default.nix | 20 +- .../home/application/onlyoffice/default.nix | 2 +- modules/home/application/steam/default.nix | 32 +-- modules/home/default.nix | 47 ++++ modules/home/development/dotnet/default.nix | 15 ++ .../home/development/javascript/default.nix | 15 ++ modules/home/development/rust/default.nix | 15 ++ modules/home/editor/default.nix | 24 -- modules/home/editor/nvim/default.nix | 6 +- modules/home/shell/default.nix | 12 +- modules/home/terminal/alacritty/default.nix | 43 ++++ modules/home/terminal/ghostty/default.nix | 24 ++ modules/nixos/boot/default.nix | 6 +- .../services/security/vaultwarden/default.nix | 10 +- systems/x86_64-linux/mandos/default.nix | 4 +- systems/x86_64-linux/manwe/default.nix | 4 +- systems/x86_64-linux/tulkas/default.nix | 4 +- 54 files changed, 380 insertions(+), 1243 deletions(-) delete mode 100644 _hosts/mandos/README.md delete mode 100644 _hosts/mandos/default.nix delete mode 100644 _hosts/mandos/hardware.nix delete mode 100644 _hosts/mandos/users/chris/default.nix delete mode 100644 _hosts/manwe/default.nix delete mode 100644 _hosts/manwe/hardware.nix delete mode 100644 _hosts/manwe/users/chris/default.nix delete mode 100644 _hosts/orome/default.nix delete mode 100644 _hosts/orome/hardware.nix delete mode 100644 _hosts/orome/users/chris/default.nix delete mode 100644 _hosts/tulkas/default.nix delete mode 100644 _hosts/tulkas/hardware.nix delete mode 100644 _hosts/tulkas/users/chris/default.nix delete mode 100644 _hosts/ulmo/README.md delete mode 100644 _hosts/ulmo/default.nix delete mode 100644 _hosts/ulmo/hardware.nix delete mode 100644 _modules/home/desktop/browsers/default.nix delete mode 100644 _modules/home/desktop/browsers/firefox.nix delete mode 100644 _modules/home/desktop/default.nix delete mode 100644 _modules/home/desktop/terminal/alacritty.nix delete mode 100644 _modules/home/desktop/terminal/default.nix delete mode 100644 _modules/home/desktop/terminal/ghostty.nix delete mode 100644 _modules/home/develop/default.nix delete mode 100644 _modules/home/develop/dotnet.nix delete mode 100644 _modules/home/develop/js.nix delete mode 100644 _modules/home/develop/rust.nix delete mode 100644 _modules/system/services/default.nix delete mode 100644 _modules/system/shell/default.nix delete mode 100644 _modules/system/shell/zsh.nix delete mode 100644 _modules/system/system/audio.nix delete mode 100644 _modules/system/system/bluetooth.nix create mode 100644 homes/x86_64-linux/chris@mandos/default.nix create mode 100644 homes/x86_64-linux/chris@orome/default.nix create mode 100644 homes/x86_64-linux/chris@tulkas/default.nix rename _modules/home/desktop/browsers/chrome.nix => modules/home/application/chrome/default.nix (70%) delete mode 100644 modules/home/application/default.nix create mode 100644 modules/home/default.nix create mode 100644 modules/home/development/dotnet/default.nix create mode 100644 modules/home/development/javascript/default.nix create mode 100644 modules/home/development/rust/default.nix delete mode 100644 modules/home/editor/default.nix create mode 100644 modules/home/terminal/alacritty/default.nix create mode 100644 modules/home/terminal/ghostty/default.nix rename _modules/system/services/security.nix => modules/nixos/services/security/vaultwarden/default.nix (60%) diff --git a/_hosts/mandos/README.md b/_hosts/mandos/README.md deleted file mode 100644 index 3cf3db5..0000000 --- a/_hosts/mandos/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Description - -My desktop, reasoning for the name being the following chain of thought: -**Mandos -> brother of manwe -> manwe used to be main pc, now mandos is** diff --git a/_hosts/mandos/default.nix b/_hosts/mandos/default.nix deleted file mode 100644 index 5b7bf26..0000000 --- a/_hosts/mandos/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, pkgs, ... }: -{ - fileSystems = { - "/home/chris/media" = { - device = "ulmo:/"; - fsType = "nfs"; - }; - }; - - environment.systemPackages = [ pkgs.ventoy-full-qt ]; - permittedInsecurePackages = [ "ventoy-qt5-1.1.05"]; - boot.supportedFilesystems = [ "nfs" ]; - - modules = { - boot = { - silentBoot = true; - animatedBoot = true; - }; - - system.audio.enable = true; - - root = { - user = { - full_name = "__ROOT__"; - email = "__ROOT__@${config.networking.hostName}"; - }; - - shell = { - default = "zsh"; - }; - }; - }; -} diff --git a/_hosts/mandos/hardware.nix b/_hosts/mandos/hardware.nix deleted file mode 100644 index 24f6895..0000000 --- a/_hosts/mandos/hardware.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: -let - inherit (lib.modules) mkDefault; -in -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - fileSystems = { - "/" ={ - device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/C842-316A"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } - ]; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-amd" ]; - kernelParams = []; - extraModulePackages = [ ]; - }; - - nixpkgs.hostPlatform = mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/_hosts/mandos/users/chris/default.nix b/_hosts/mandos/users/chris/default.nix deleted file mode 100644 index 96461c8..0000000 --- a/_hosts/mandos/users/chris/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ ... }: -{ - user = { - full_name = "Chris Kruining"; - email = "chris@kruining.eu"; - is_trusted = true; - }; - - themes = { - enable = true; - theme = "everforest"; - polarity = "dark"; - }; - - develop = { - rust.enable = true; - js.enable = true; - dotnet.enable = true; - }; - - desktop = { - plasma = { - enable = true; - autoLogin = true; - }; - - applications = { - communication.enable = true; - email.enable = true; - office.enable = true; - steam.enable = true; - recording.enable = true; - studio.enable = true; - }; - - terminal = { - default = "ghostty"; - alacritty.enable = true; - ghostty.enable = true; - }; - - editors = { - default = "zed"; - vscodium.enable = true; - zed.enable = true; - nvim.enable = true; - nano.enable = true; - kate.enable = true; - }; - - browsers = { - default = "chromium"; - chrome.enable = true; - ladybird.enable = true; - }; - - games = { - minecraft.enable = true; - }; - }; - - shell = { - default = "zsh"; - }; -} diff --git a/_hosts/manwe/default.nix b/_hosts/manwe/default.nix deleted file mode 100644 index 62bc7fe..0000000 --- a/_hosts/manwe/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, pkgs, ... }: -{ - fileSystems = { - "/home/chris/games" = { - device = "/dev/disk/by-label/games"; - fsType = "ext4"; - }; - - "/home/chris/data" = { - device = "/dev/disk/by-label/Data"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=chris" ]; - }; - }; - - modules = { - boot = { - silentBoot = true; - animatedBoot = true; - }; - - desktop.gaming.enable = true; - - system.audio.enable = true; - - root = { - user = { - full_name = "__ROOT__"; - email = "__ROOT__@${config.networking.hostName}"; - }; - - shell = { - default = "zsh"; - }; - }; - }; -} diff --git a/_hosts/manwe/hardware.nix b/_hosts/manwe/hardware.nix deleted file mode 100644 index 35f6a44..0000000 --- a/_hosts/manwe/hardware.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: -let - inherit (lib.modules) mkDefault; -in -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - fileSystems = { - "/" ={ - device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/C842-316A"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } - ]; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; - kernelParams = []; - extraModulePackages = [ ]; - }; - - nixpkgs.hostPlatform = mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/_hosts/manwe/users/chris/default.nix b/_hosts/manwe/users/chris/default.nix deleted file mode 100644 index 96461c8..0000000 --- a/_hosts/manwe/users/chris/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ ... }: -{ - user = { - full_name = "Chris Kruining"; - email = "chris@kruining.eu"; - is_trusted = true; - }; - - themes = { - enable = true; - theme = "everforest"; - polarity = "dark"; - }; - - develop = { - rust.enable = true; - js.enable = true; - dotnet.enable = true; - }; - - desktop = { - plasma = { - enable = true; - autoLogin = true; - }; - - applications = { - communication.enable = true; - email.enable = true; - office.enable = true; - steam.enable = true; - recording.enable = true; - studio.enable = true; - }; - - terminal = { - default = "ghostty"; - alacritty.enable = true; - ghostty.enable = true; - }; - - editors = { - default = "zed"; - vscodium.enable = true; - zed.enable = true; - nvim.enable = true; - nano.enable = true; - kate.enable = true; - }; - - browsers = { - default = "chromium"; - chrome.enable = true; - ladybird.enable = true; - }; - - games = { - minecraft.enable = true; - }; - }; - - shell = { - default = "zsh"; - }; -} diff --git a/_hosts/orome/default.nix b/_hosts/orome/default.nix deleted file mode 100644 index be2ce0c..0000000 --- a/_hosts/orome/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, ... }: -{ - modules = { - system.audio.enable = true; - system.bluetooth.enable = true; - - authentication.himmelblau.enable = true; - - root = { - user = { - full_name = "__ROOT__"; - email = "__ROOT__@${config.networking.hostName}"; - }; - - shell = { - default = "zsh"; - }; - }; - }; -} diff --git a/_hosts/orome/hardware.nix b/_hosts/orome/hardware.nix deleted file mode 100644 index 2d7a84e..0000000 --- a/_hosts/orome/hardware.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: -let - inherit (lib.modules) mkDefault; -in -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/e60745c9-b3ea-4aeb-9c5c-b67ef1730826"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/42B3-C767"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = []; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; - kernelParams = []; - extraModulePackages = [ ]; - }; - - services.logrotate.checkConfig = false; - nixpkgs.hostPlatform = mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/_hosts/orome/users/chris/default.nix b/_hosts/orome/users/chris/default.nix deleted file mode 100644 index 951ea48..0000000 --- a/_hosts/orome/users/chris/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ ... }: -{ - user = { - full_name = "Chris Kruining"; - email = "chris@kruining.eu"; - is_trusted = true; - }; - - themes = { - enable = true; - theme = "everforest"; - polarity = "dark"; - }; - - develop = { - rust.enable = true; - js.enable = true; - dotnet.enable = true; - }; - - desktop = { - plasma = { - enable = true; - autoLogin = true; - }; - - applications = { - communication.enable = true; - email.enable = true; - office.enable = true; - }; - - terminal = { - default = "ghostty"; - ghostty.enable = true; - }; - - editors = { - default = "zed"; - vscodium.enable = true; - zed.enable = true; - nvim.enable = true; - nano.enable = true; - }; - - browsers = { - default = "chromium"; - firefox.enable = true; - chrome.enable = true; - }; - }; - - - shell = { - default = "zsh"; - }; -} diff --git a/_hosts/tulkas/default.nix b/_hosts/tulkas/default.nix deleted file mode 100644 index 6c4c2cb..0000000 --- a/_hosts/tulkas/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, config, ... }:let - inherit (lib) mkForce; -in -{ - modules = { - system.audio.enable = true; - - desktop.gaming.enable = true; - - root = { - user = { - full_name = "__ROOT__"; - email = "__ROOT__@${config.networking.hostName}"; - }; - - shell = { - default = "zsh"; - toolset.git.enable = mkForce false; - }; - }; - }; -} diff --git a/_hosts/tulkas/hardware.nix b/_hosts/tulkas/hardware.nix deleted file mode 100644 index acd5d75..0000000 --- a/_hosts/tulkas/hardware.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, lib, modulesPath, ... }: -let - inherit (lib.modules) mkDefault; -in -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/aa438c4c-d193-436b-91ca-c386c0688265"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/89B8-0702"; - fsType = "vfat"; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/beddca5c-1ecc-4a46-9fc5-fd918eed8f2a"; } - ]; - - boot = { - initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-amd" ]; - kernelParams = []; - extraModulePackages = [ ]; - }; - - nixpkgs.hostPlatform = mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/_hosts/tulkas/users/chris/default.nix b/_hosts/tulkas/users/chris/default.nix deleted file mode 100644 index 3f88927..0000000 --- a/_hosts/tulkas/users/chris/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, ... }: let - inherit (lib) mkForce; -in -{ - user = { - full_name = "Chris Kruining"; - email = "chris@kruining.eu"; - is_trusted = true; - }; - - themes = { - enable = true; - theme = "everforest"; - polarity = "dark"; - }; - - desktop = { - terminal = { - default = "ghostty"; - ghostty.enable = true; - }; - - editors = { - default = "nano"; - nano.enable = true; - }; - }; - - shell = { - default = "zsh"; - toolset.git.enable = mkForce false; - }; -} diff --git a/_hosts/ulmo/README.md b/_hosts/ulmo/README.md deleted file mode 100644 index dd557d1..0000000 --- a/_hosts/ulmo/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Description - -My current server, reasoning for the name being the following chain of thought: -**Ulmo -> the king of the sea -> the sea provides -> services are provided -> server runs services** \ No newline at end of file diff --git a/_hosts/ulmo/default.nix b/_hosts/ulmo/default.nix deleted file mode 100644 index a0ea9a0..0000000 --- a/_hosts/ulmo/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, ... }: -{ - config = { - fileSystems."/var/media" = { - device = "/dev/disk/by-label/data"; - fsType = "ext4"; - }; - - modules = { - networking = { - ssh.enable = true; - nfs.enable = true; - }; - - services = { - auth.authelia.enable = true; - auth.zitadel.enable = true; - media.enable = true; - nextcloud.enable = true; - }; - - root = { - user = { - full_name = "__ROOT__"; - email = "__ROOT__@${config.networking.hostName}"; - }; - - shell = { - default = "zsh"; - }; - }; - }; - }; -} diff --git a/_hosts/ulmo/hardware.nix b/_hosts/ulmo/hardware.nix deleted file mode 100644 index f9c83bd..0000000 --- a/_hosts/ulmo/hardware.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, lib, modulesPath, ... }: -let - inherit (lib.modules) mkDefault; -in -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/dd518f17-61c9-4831-b1bd-e1cc2af292aa"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0A56-EBFE"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; - kernelParams = []; - extraModulePackages = [ ]; - }; - - nixpkgs.hostPlatform = mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/_modules/home/desktop/browsers/default.nix b/_modules/home/desktop/browsers/default.nix deleted file mode 100644 index 6bdfa36..0000000 --- a/_modules/home/desktop/browsers/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - options, - config, - lib, - pkgs, - user, - ... -}: let - inherit (lib.modules) mkIf; - cfg = config.modules.${user}.desktop.browsers; -in { - options.modules.${user}.desktop.browsers = let - inherit (lib.options) mkOption; - inherit (lib.types) nullOr str; - in { - default = mkOption { - type = nullOr str; - default = null; - description = "Default system browser"; - example = "firefox"; - }; - }; - - config = mkIf (cfg.default != null) { - home-manager.users.${user}.home.sessionVariables.BROWSER = cfg.default; - }; -} diff --git a/_modules/home/desktop/browsers/firefox.nix b/_modules/home/desktop/browsers/firefox.nix deleted file mode 100644 index 7512ec9..0000000 --- a/_modules/home/desktop/browsers/firefox.nix +++ /dev/null @@ -1,233 +0,0 @@ -{ inputs, options, config, lib, pkgs, user, ... }: -let - inherit (builtins) toJSON; - inherit (lib.attrsets) attrValues mapAttrsToList; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.strings) concatStrings; - - cfg = config.modules.${user}.desktop.browsers.firefox; - usr = config.users.users.${user}; -in { - options.modules.${user}.desktop.browsers.firefox = let - inherit (lib.options) mkEnableOption; - inherit (lib.types) attrsOf oneOf bool int lines str; - inherit (lib.my) mkOpt mkOpt'; - in { - enable = mkEnableOption "Gecko-based libre browser"; - privacy.enable = mkEnableOption "Privacy Focused Firefox fork"; - - profileName = mkOpt str usr.name; - settings = mkOpt' (attrsOf (oneOf [bool int str])) {} '' - Firefox preferences set in user.js - ''; - extraConfig = mkOpt' lines "" '' - Extra lines to add to user.js - ''; - userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface"; - userContent = mkOpt' lines "" "Global CSS Styles for websites"; - }; - - config = mkMerge [ - (mkIf (config.modules.${user}.desktop.type == "wayland") { - environment.variables.MOZ_ENABLE_WAYLAND = "1"; - }) - - (mkIf cfg.enable { - modules.${user}.desktop.browsers.firefox.settings = { - # TAB cycle URL's, not buttons.. - "browser.toolbars.keyboard_navigation" = false; - # Disable annoying translation pop-up! - "browser.translations.automaticallyPopup" = false; - # Enables dark-themed flash before page-load: - "ui.systemUsesDarkTheme" = "1"; - # Developer tools -> uses dark theme - "devtools.theme" = "dark"; - # FIXME: IM-Wheel -> Manual scroll speed ctrl bcs == buggy... - "mousewheel.min_line_scroll_amount" = 35; - # Enables ETP = decent security -> firefox containers = redundent - "browser.contentblocking.category" = "strict"; - "privacy.donottrackheader.enabled" = true; - "privacy.donottrackheader.value" = 1; - "privacy.purge_trackers.enabled" = true; - # Syncs Firefox toolbar settings across machines - # WARNING: May not work across OS'es - "services.sync.prefs.sync.browser.uiCustomization.state" = true; - # Enables userContent.css and userChrome.css for our theme modules - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - # Stop creating ~/Downloads! - "browser.download.dir" = "${usr.home}/downloads"; - # Disables built-in password manager -> use external PM! - "signon.rememberSignons" = false; - # Firefox, DO NOT CHECK if you are the default browser.. - "browser.shell.checkDefaultBrowser" = false; - # Disables "New Tab Page" feature - "browser.newtabpage.enabled" = false; - # Disables Activity Stream - "browser.newtabpage.activity-stream.enabled" = false; - "browser.newtabpage.activity-stream.telemetry" = false; - # Disables new tab tile ads & preload - "browser.newtabpage.enhanced" = false; - "browser.newtabpage.introShown" = true; - "browser.newtab.preload" = false; - "browser.newtabpage.directory.ping" = ""; - "browser.newtabpage.directory.source" = "data:text/plain,{}"; - # Reduces search engine noise in the urlbar's completion window - # PS: Shortcuts and suggestions still work - "browser.urlbar.suggest.searches" = false; - "browser.urlbar.shortcuts.bookmarks" = false; - "browser.urlbar.shortcuts.history" = false; - "browser.urlbar.shortcuts.tabs" = false; - "browser.urlbar.showSearchSuggestionsFirst" = false; - "browser.urlbar.speculativeConnect.enabled" = false; - # Prevents search terms from being sent to ISP - "browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0; - # Disables sponsored search results - "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; - "browser.urlbar.suggest.quicksuggest.sponsored" = false; - # Shows whole URL in address bar - "browser.urlbar.trimURLs" = false; - # Disables non-useful funcionality of certain features - "browser.disableResetPrompt" = true; - "browser.onboarding.enabled" = false; - "browser.aboutConfig.showWarning" = false; - "media.videocontrols.picture-in-picture.video-toggle.enabled" = false; - "extensions.pocket.enabled" = false; - "extensions.shield-recipe-client.enabled" = false; - "reader.parse-on-load.enabled" = false; - # Allow seperate search-engine usage in private mode! - "browser.search.separatePrivateDefault.ui.enabled" = true; - - # Security-oriented defaults: - "security.family_safety.mode" = 0; - # https://blog.mozilla.org/security/2016/10/18/phasing-out-sha-1-on-the-public-web/ - "security.pki.sha1_enforcement_level" = 1; - # https://github.com/tlswg/tls13-spec/issues/1001 - "security.tls.enable_0rtt_data" = false; - # Uses Mozilla geolocation service instead of Google if given permission - "geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; - "geo.provider.use_gpsd" = false; - # https://support.mozilla.org/en-US/kb/extension-recommendations - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr" = false; - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = - false; - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = - false; - "extensions.htmlaboutaddons.recommendations.enabled" = false; - "extensions.htmlaboutaddons.discover.enabled" = false; - "extensions.getAddons.showPane" = false; # Uses Google Analytics - "browser.discovery.enabled" = false; - # Reduces File IO / SSD abuse, 15 seconds -> 30 minutes - "browser.sessionstore.interval" = "1800000"; - # Disables battery API - "dom.battery.enabled" = false; - # Disable cross-site ad-view tracking - "dom.private-attribution.submission.enabled" = false; - # Disables "beacon" asynchronous HTTP transfers (used for analytics) - "beacon.enabled" = false; - # Disables pinging URIs specified in HTML ping= attributes - "browser.send_pings" = false; - # Disables gamepad API to prevent USB device enumeration - "dom.gamepad.enabled" = false; - # Prevents guessing domain names on invalid entry in URL-bar - "browser.fixup.alternate.enabled" = false; - # Disables telemetry settings - "toolkit.telemetry.unified" = false; - "toolkit.telemetry.enabled" = false; - "toolkit.telemetry.server" = "data:,"; - "toolkit.telemetry.archive.enabled" = false; - "toolkit.telemetry.coverage.opt-out" = true; - "toolkit.coverage.opt-out" = true; - "toolkit.coverage.endpoint.base" = ""; - "experiments.supported" = false; - "experiments.enabled" = false; - "experiments.manifest.uri" = ""; - "browser.ping-centre.telemetry" = false; - # https://mozilla.github.io/normandy/ - "app.normandy.enabled" = false; - "app.normandy.api_url" = ""; - "app.shield.optoutstudies.enabled" = false; - # Disables health reports (basically more telemetry) - "datareporting.healthreport.uploadEnabled" = false; - "datareporting.healthreport.service.enabled" = false; - "datareporting.policy.dataSubmissionEnabled" = false; - # Disables crash reports - "breakpad.reportURL" = ""; - "browser.tabs.crashReporting.sendReport" = false; - # Prevents the submission of backlogged reports - "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; - - # Disable automatic Form autofill - "browser.formfill.enable" = false; - "extensions.formautofill.addresses.enabled" = false; - "extensions.formautofill.available" = "off"; - "extensions.formautofill.creditCards.available" = false; - "extensions.formautofill.creditCards.enabled" = false; - "extensions.formautofill.heuristics.enabled" = false; - }; - - # Use a stable profile name so we can target it in themes - home-manager.users.${user}.home = { - packages = let - inherit (pkgs) makeDesktopItem; - inherit (inputs.firefox.packages.${pkgs.system}) firefox-nightly-bin; - in [ - firefox-nightly-bin - (makeDesktopItem { - name = "firefox-nightly-private"; - desktopName = "Firefox Nightly (Private)"; - genericName = "Launch a private Firefox Nightly instance"; - icon = "firefox-nightly"; - exec = "${lib.getExe firefox-nightly-bin} --private-window"; - categories = ["Network" "WebBrowser"]; - }) - ]; - - file = let - cfgPath = ".mozilla/firefox"; - in { - firefox-profiles = { - target = "${cfgPath}/profiles.ini"; - text = '' - [Profile0] - Name=default - IsRelative=1 - Path=${cfg.profileName}.default - Default=1 - - [General] - StartWithLastProfile=1 - Version=2 - ''; - }; - - user-js = mkIf (cfg.settings != {} || cfg.extraConfig != "") { - target = "${cfgPath}/${cfg.profileName}.default/user.js"; - text = '' - ${concatStrings (mapAttrsToList (name: value: '' - user_pref("${name}", ${toJSON value}); - '') - cfg.settings)} - ${cfg.extraConfig} - ''; - }; - - user-chrome = mkIf (cfg.userChrome != "") { - target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css"; - text = cfg.userChrome; - }; - - user-content = mkIf (cfg.userContent != "") { - target = "${cfgPath}/${cfg.profileName}.default/chrome/userContent.css"; - text = cfg.userContent; - }; - }; - }; - }) - - (mkIf cfg.privacy.enable { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) librewolf; - }; - }) - ]; -} diff --git a/_modules/home/desktop/default.nix b/_modules/home/desktop/default.nix deleted file mode 100644 index d281f4e..0000000 --- a/_modules/home/desktop/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ lib, user, ... }: -let - inherit (lib.types) either str; - inherit (lib.my) mkOpt; -in -{ - options.modules.${user}.desktop = { - type = mkOpt (either str null) "wayland"; - }; -} diff --git a/_modules/home/desktop/terminal/alacritty.nix b/_modules/home/desktop/terminal/alacritty.nix deleted file mode 100644 index 76e528d..0000000 --- a/_modules/home/desktop/terminal/alacritty.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - lib, - pkgs, - user, - ... -}: let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf mkMerge; -in { - options.modules.${user}.desktop.terminal.alacritty = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "OpenGL terminal emulator"; }; - - config = mkIf config.modules.${user}.desktop.terminal.alacritty.enable { - modules.${user}.shell.toolset.tmux.enable = true; - - home-manager.users.${user}.programs.alacritty = { - enable = true; - - settings = mkMerge [ - { - env = { - TERM = "xterm-256color"; - WINIT_X11_SCALE_FACTOR = "1.0"; - }; - - window.dynamic_title = true; - - scrolling = { - history = 5000; - multiplier = 3; - }; - - selection = { - semantic_escape_chars = '',│`|:"' ()[]{}<>''; - save_to_clipboard = false; - }; - - general.live_config_reload = true; - - terminal.shell = { - program = "${getExe pkgs.zsh}"; - args = ["-l" "-c" "tmux new || tmux"]; - }; - } - ]; - }; - }; -} diff --git a/_modules/home/desktop/terminal/default.nix b/_modules/home/desktop/terminal/default.nix deleted file mode 100644 index d408215..0000000 --- a/_modules/home/desktop/terminal/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, options, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkDefault mkIf mkMerge; - - cfg = config.modules.${user}.desktop.terminal; -in { - options.modules.${user}.desktop.terminal = let - inherit (lib.options) mkOption; - inherit (lib.types) str; - in { - default = mkOption { - type = str; - default = "alacrity"; - description = "Default terminal"; - example = "alacrity"; - }; - }; - - config = mkMerge [ - { - home-manager.users.${user}.home.sessionVariables.TERMINAL = cfg.default; - } - ]; -} diff --git a/_modules/home/desktop/terminal/ghostty.nix b/_modules/home/desktop/terminal/ghostty.nix deleted file mode 100644 index 7c2eb29..0000000 --- a/_modules/home/desktop/terminal/ghostty.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - config, - options, - lib, - pkgs, - user, - ... -}: let - inherit (builtins) toString; - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf mkMerge; -in { - options.modules.${user}.desktop.terminal.ghostty = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "ghostty"; }; - - config = mkIf config.modules.${user}.desktop.terminal.ghostty.enable { - environment.systemPackages = [ - pkgs.ghostty - ]; - - modules.${user}.shell.toolset.tmux.enable = true; - - home-manager.users.${user}.programs.ghostty = { - enable = true; - settings = { - background-blur-radius = 20; - theme = "dark:stylix,light:stylix"; - window-theme = (config.modules.${user}.themes.polarity or "dark"); - background-opacity = 0.8; - minimum-contrast = 1.1; - }; - }; - }; -} diff --git a/_modules/home/develop/default.nix b/_modules/home/develop/default.nix deleted file mode 100644 index ecb8664..0000000 --- a/_modules/home/develop/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, user, ... }: -let - inherit (lib.modules) mkIf; -in -{ - options.modules.${user}.develop = let - inherit (lib.options) mkEnableOption; - in - { - xdg.enable = mkEnableOption "XDG-related conf" // { default = true; }; - }; - - config = mkIf config.modules.${user}.develop.xdg.enable { - - }; -} diff --git a/_modules/home/develop/dotnet.nix b/_modules/home/develop/dotnet.nix deleted file mode 100644 index 386d0a0..0000000 --- a/_modules/home/develop/dotnet.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ inputs, config, options, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; -in -{ - options.modules.${user}.develop.dotnet = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption ".NET developmnt"; - }; - - config = mkIf config.modules.${user}.develop.dotnet.enable { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) dotnet-sdk_8; - }; - }; -} diff --git a/_modules/home/develop/js.nix b/_modules/home/develop/js.nix deleted file mode 100644 index 80ced1b..0000000 --- a/_modules/home/develop/js.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ inputs, config, options, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; -in -{ - options.modules.${user}.develop.js = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "JS developmnt"; - }; - - config = mkMerge [ - (mkIf config.modules.${user}.develop.js.enable { - home-manager.users.${user}.home.packages = with pkgs; [ - bun - nodejs - nodePackages_latest.typescript-language-server - ]; - - }) - - (mkIf config.modules.${user}.develop.xdg.enable { - # home = { - # }; - }) - ]; -} diff --git a/_modules/home/develop/rust.nix b/_modules/home/develop/rust.nix deleted file mode 100644 index a194ab6..0000000 --- a/_modules/home/develop/rust.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ inputs, config, options, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.meta) getExe; -in -{ - options.modules.${user}.develop.rust = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Rust developmnt"; - }; - - config = mkMerge [ -# (mkIf config.modules.${user}.develop.rust.enable { -# # nixpkgs.overlays = [inputs.rust.overlays.default]; -# -# home-manager.users.${user}.home.packages = attrValues { -# # rust-package = pkgs.rust-bin.stable.latest.default; -# # inherit (pkgs) rust-analyzer rust-script; -# }; -# -# environment.shellAliases = { -# rs = "rustc"; -# ca = "cargo"; -# }; -# }) -# -# (mkIf config.module.${user}s.develop.xdg.enable { -# home-manager.users.${user}.home = { -# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo"; -# sessionPath = ["$CARGO_HOME/bin"]; -# }; -# }) - ]; -} diff --git a/_modules/system/services/default.nix b/_modules/system/services/default.nix deleted file mode 100644 index 4afadc5..0000000 --- a/_modules/system/services/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - options.modules.services = {}; -} diff --git a/_modules/system/shell/default.nix b/_modules/system/shell/default.nix deleted file mode 100644 index c1a3a90..0000000 --- a/_modules/system/shell/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.shell; -in -{ - options.modules.shell = {}; - - config = mkIf cfg.enable {}; -} diff --git a/_modules/system/shell/zsh.nix b/_modules/system/shell/zsh.nix deleted file mode 100644 index c54164b..0000000 --- a/_modules/system/shell/zsh.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; - - cfg = config.modules.shell.zsh; -in -{ - options.modules.shell.zsh = { - enable = mkEnableOption "enable ZSH"; - }; - - config = mkIf cfg.enable { - programs.zsh.enable = true; - }; -} diff --git a/_modules/system/system/audio.nix b/_modules/system/system/audio.nix deleted file mode 100644 index 1e71a76..0000000 --- a/_modules/system/system/audio.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, pkgs, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf; - - cfg = config.modules.system.audio; -in -{ - options.modules.system.audio = let - inherit (lib.options) mkEnableOption; - in - { - enable = mkEnableOption "modern audio support"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - # easyeffects - sof-firmware - ]; - - security.rtkit.enable = true; - - services.pulseaudio.enable = false; - services.pipewire = { - enable = true; - wireplumber.enable = true; - pulse.enable = true; - - alsa = { - enable = true; - support32Bit = true; - }; - }; - }; -} diff --git a/_modules/system/system/bluetooth.nix b/_modules/system/system/bluetooth.nix deleted file mode 100644 index 45343c3..0000000 --- a/_modules/system/system/bluetooth.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, lib, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.modules.system.bluetooth; -in -{ - options.modules.system.bluetooth = { - enable = mkEnableOption "enable bluetooth"; - }; - - config = mkIf cfg.enable { - hardware = { - bluetooth = { - enable = true; - powerOnBoot = true; - }; - }; - - services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = { - "monitor.bluez.properties" = { - "bluez5.enable-sbc-xq" = true; - "bluez5.enable-msbc" = true; - "bluez5.enable-hw-volume" = true; - "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; - }; - }; - }; -} diff --git a/homes/x86_64-linux/chris@mandos/default.nix b/homes/x86_64-linux/chris@mandos/default.nix new file mode 100644 index 0000000..6989314 --- /dev/null +++ b/homes/x86_64-linux/chris@mandos/default.nix @@ -0,0 +1,35 @@ +{ osConfig, ... }: +{ + home.stateVersion = osConfig.system.stateVersion; + + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; + + sneeuwvlok = { + defaults = { + shell = "zsh"; + terminal = "ghostty"; + browser = "zen"; + editor = "zed"; + }; + + shell = { + corePkgs.enable = true; + }; + + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + + application = { + bitwarden.enable = true; + teamspeak.enable = true; + steam.enable = true; + zen.enable = true; + }; + }; +} diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 7b7c8f3..cd6fa1a 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -8,8 +8,14 @@ }; sneeuwvlok = { + defaults = { + shell = "zsh"; + terminal = "ghostty"; + browser = "zen"; + editor = "zed"; + }; + shell = { - default = "zsh"; corePkgs.enable = true; }; @@ -18,5 +24,34 @@ theme = "everforest"; polarity = "dark"; }; + + development = { + rust.enable = true; + javascript.enable = true; + dotnet.enable = true; + }; + + application = { + bitwarden.enable = true; + discord.enable = true; + ladybird.enable = true; + obs.enable = true; + onlyoffice.enable = true; + signal.enable = true; + steam.enable = true; + studio.enable = true; + teamspeak.enable = true; + thunderbird.enable = true; + zen.enable = true; + }; + + shell.zsh.enable = true; + terminal.ghostty.enable = true; + + editor = { + zed.enable = true; + nvim.enable = true; + nano.enable = true; + }; }; } diff --git a/homes/x86_64-linux/chris@orome/default.nix b/homes/x86_64-linux/chris@orome/default.nix new file mode 100644 index 0000000..dece506 --- /dev/null +++ b/homes/x86_64-linux/chris@orome/default.nix @@ -0,0 +1,48 @@ +{ osConfig, ... }: +{ + home.stateVersion = osConfig.system.stateVersion; + + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; + + sneeuwvlok = { + defaults = { + shell = "zsh"; + terminal = "ghostty"; + browser = "zen"; + editor = "zed"; + }; + + shell = { + corePkgs.enable = true; + }; + + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + + development = { + javascript.enable = true; + dotnet.enable = true; + }; + + application = { + bitwarden.enable = true; + onlyoffice.enable = true; + signal.enable = true; + zen.enable = true; + }; + + shell.zsh.enable = true; + terminal.ghostty.enable = true; + + editor = { + zed.enable = true; + nano.enable = true; + }; + }; +} diff --git a/homes/x86_64-linux/chris@tulkas/default.nix b/homes/x86_64-linux/chris@tulkas/default.nix new file mode 100644 index 0000000..6989314 --- /dev/null +++ b/homes/x86_64-linux/chris@tulkas/default.nix @@ -0,0 +1,35 @@ +{ osConfig, ... }: +{ + home.stateVersion = osConfig.system.stateVersion; + + programs.git = { + userName = "Chris Kruining"; + userEmail = "chris@kruining.eu"; + }; + + sneeuwvlok = { + defaults = { + shell = "zsh"; + terminal = "ghostty"; + browser = "zen"; + editor = "zed"; + }; + + shell = { + corePkgs.enable = true; + }; + + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + + application = { + bitwarden.enable = true; + teamspeak.enable = true; + steam.enable = true; + zen.enable = true; + }; + }; +} diff --git a/_modules/home/desktop/browsers/chrome.nix b/modules/home/application/chrome/default.nix similarity index 70% rename from _modules/home/desktop/browsers/chrome.nix rename to modules/home/application/chrome/default.nix index 5a7143c..ac9f5ef 100644 --- a/_modules/home/desktop/browsers/chrome.nix +++ b/modules/home/application/chrome/default.nix @@ -1,18 +1,17 @@ -{ config, lib, pkgs, user, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; - inherit (builtins) fetchurl; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.${user}.desktop.browsers.chrome; -in { - options.modules.${user}.desktop.browsers.chrome = { - enable = mkEnableOption "Enable Chrome"; + cfg = config.${namespace}.application.chrome; +in +{ + options.${namespace}.application.chrome = { + enable = mkEnableOption "enable chrome"; }; config = mkIf cfg.enable { - home-manager.users.${user}.home.packages = [ - pkgs.chromium + home.packages = with pkgs; [ + chromium # (pkgs.ungoogled-chromium.override { # commandLineArgs = [ # "--enable-features=AcceleratedVideoEncoder" @@ -26,7 +25,7 @@ in { programs.chromium = { enable = true; - enablePlasmaBrowserIntegration = true; + # enablePlasmaBrowserIntegration = true; extensions = let # create_extension_for = browserVersion: { id, sha256, version }: { # inherit id; @@ -64,19 +63,19 @@ in { # version = ""; # }) ]; - defaultSearchProviderEnabled = true; - defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}"; - extraOpts = { - "ExtensionManifestV2Availability" = 2; - "BrowserSignin" = 0; - "SyncDisabled" = true; - "PasswordManagerEnabled" = false; - "SpellcheckEnabled" = true; - "SpellcheckLanguage" = [ - "nl-NL" - "en-GB" - ]; - }; + # defaultSearchProviderEnabled = true; + # defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}"; + # extraOpts = { + # "ExtensionManifestV2Availability" = 2; + # "BrowserSignin" = 0; + # "SyncDisabled" = true; + # "PasswordManagerEnabled" = false; + # "SpellcheckEnabled" = true; + # "SpellcheckLanguage" = [ + # "nl-NL" + # "en-GB" + # ]; + # }; }; }; } diff --git a/modules/home/application/default.nix b/modules/home/application/default.nix deleted file mode 100644 index 702193d..0000000 --- a/modules/home/application/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ inputs, config, lib, pkgs, namespace, ... }: -let - inherit (lib) mkIf mkOption; - inherit (lib.types) subModule; - - cfg = config.${namespace}.application; -in -{ - options.${namespace}.application = { - defaults = mkOption { - type = subModule { - browser = mkOption { - type = enum [ "ladybird" "zen" ]; - default = "zen"; - example = "ladybird"; - }; - }; - }; - }; - - config = { - home.sessionVariables = { - BROWSER = cfg.defaults.browser; - }; - }; -} diff --git a/modules/home/application/obs/default.nix b/modules/home/application/obs/default.nix index 52e4100..fe84f1c 100644 --- a/modules/home/application/obs/default.nix +++ b/modules/home/application/obs/default.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, pkgs, namespace, ... }: +{ config, lib, pkgs, namespace, osConfig ? {}, ... }: let inherit (lib) mkIf mkEnableOption; @@ -16,16 +16,16 @@ in obs-studio-plugins.obs-backgroundremoval obs-studio-plugins.obs-pipewire-audio-capture ]; - - boot = { - extraModulePackages = with config.boot.kernelPackages; [ - v4l2loopback - ]; - extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 - ''; - }; + # boot = { + # extraModulePackages = with config.boot.kernelPackages; [ + # v4l2loopback + # ]; + + # extraModprobeConfig = '' + # options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + # ''; + # }; security.polkit.enable = true; }; diff --git a/modules/home/application/onlyoffice/default.nix b/modules/home/application/onlyoffice/default.nix index 4bbb07b..8153b68 100644 --- a/modules/home/application/onlyoffice/default.nix +++ b/modules/home/application/onlyoffice/default.nix @@ -11,6 +11,6 @@ in config = mkIf cfg.enable { home.packages = with pkgs; [ onlyoffice-bin ]; - fonts.packages = with pkgs; [ corefonts ]; + # fonts.packages = with pkgs; [ corefonts ]; }; } diff --git a/modules/home/application/steam/default.nix b/modules/home/application/steam/default.nix index 104acd7..7bc338d 100644 --- a/modules/home/application/steam/default.nix +++ b/modules/home/application/steam/default.nix @@ -33,23 +33,23 @@ in }; # https://github.com/FeralInteractive/gamemode - gamemode = { - enable = true; - enableRenice = true; - settings = {}; - }; + # gamemode = { + # enable = true; + # enableRenice = true; + # settings = {}; + # }; - gamescope = { - enable = true; - capSysNice = true; - env = { - DXVK_HDR = "1"; - ENABLE_GAMESCOPE_WSI = "1"; - WINE_FULLSCREEN_FSR = "1"; - WLR_RENDERER = "vulkan"; - }; - args = ["--hdr-enabled"]; - }; + # gamescope = { + # enable = true; + # capSysNice = true; + # env = { + # DXVK_HDR = "1"; + # ENABLE_GAMESCOPE_WSI = "1"; + # WINE_FULLSCREEN_FSR = "1"; + # WLR_RENDERER = "vulkan"; + # }; + # args = ["--hdr-enabled"]; + # }; }; }; } diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..bd59116 --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,47 @@ +{ pkgs, config, lib, namespace, ... }: +let + inherit (lib) mkOption; + inherit (lib.types) enum; + + cfg = config.${namespace}.defaults; +in { + options.${namespace}.defaults = { + editor = mkOption { + type = enum [ "nano" "nvim" "zed" ]; + default = "nano"; + description = "Default editor for text manipulation"; + example = "nvim"; + }; + + shell = mkOption { + type = enum [ "fish" "zsh" "bash" ]; + default = "zsh"; + description = "Default shell"; + example = "zsh"; + }; + + terminal = mkOption { + type = enum [ "ghostty" "alacritty" ]; + default = "ghostty"; + description = "Default terminal"; + example = "ghostty"; + }; + + browser = mkOption { + type = enum [ "chrome" "ladybird" "zen" ]; + default = "zen"; + description = "Default terminal"; + example = "zen"; + }; + }; + + config = { + home.sessionVariables = { + EDITOR = cfg.editor; + TERMINAL = cfg.terminal; + BROWSER = cfg.browser; + }; + + shell = pkgs.${cfg.shell}; + }; +} diff --git a/modules/home/development/dotnet/default.nix b/modules/home/development/dotnet/default.nix new file mode 100644 index 0000000..7ed848e --- /dev/null +++ b/modules/home/development/dotnet/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.development.dotnet; +in +{ + options.${namespace}.development.dotnet = { + enable = mkEnableOption "Enable dotnet development tools"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ dotnet-sdk_8 ]; + }; +} diff --git a/modules/home/development/javascript/default.nix b/modules/home/development/javascript/default.nix new file mode 100644 index 0000000..e649c86 --- /dev/null +++ b/modules/home/development/javascript/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.development.javascript; +in +{ + options.${namespace}.development.javascript = { + enable = mkEnableOption "Enable javascript development tools"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ bun nodejs nodePackages_latest.typescript-language-server ]; + }; +} diff --git a/modules/home/development/rust/default.nix b/modules/home/development/rust/default.nix new file mode 100644 index 0000000..4208c68 --- /dev/null +++ b/modules/home/development/rust/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.development.rust; +in +{ + options.${namespace}.development.rust = { + enable = mkEnableOption "Enable rust development tools"; + }; + + config = mkIf cfg.enable { + + }; +} diff --git a/modules/home/editor/default.nix b/modules/home/editor/default.nix deleted file mode 100644 index f2ea10d..0000000 --- a/modules/home/editor/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, options, lib, pkgs, namespace, ... }: -let - inherit (lib) attrValues mkIf mkMerge mkOption; - inherit (lib.types) nullOr enum; - - cfg = config.${namespace}.editors; -in { - options.${namespace}.editors = { - default = mkOption { - type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]); - default = "nano"; - description = "Default editor for text manipulation"; - example = "nvim"; - }; - }; - - config = mkMerge [ - (mkIf (cfg.default != null) { - home.sessionVariables = { - EDITOR = cfg.default; - }; - }) - ]; -} diff --git a/modules/home/editor/nvim/default.nix b/modules/home/editor/nvim/default.nix index 3e0a047..a3fd32a 100644 --- a/modules/home/editor/nvim/default.nix +++ b/modules/home/editor/nvim/default.nix @@ -5,12 +5,16 @@ let cfg = config.${namespace}.editor.nvim; in { + imports = [ + inputs.nvf.nixosModules.default + ]; + options.${namespace}.editor.nvim = { enable = mkEnableOption "enable nvim via nvf on user level"; }; config = mkIf cfg.enable { - home.packages = with pkgs; [ + home.packages = with pkgs; [ imagemagick editorconfig-core-c sqlite diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index 80aa20a..2fbd8e8 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -7,20 +7,10 @@ let in { options.${namespace}.shell = { - default = mkOption { - type = nullOr (enum ["fish" "zsh" "bash"]); - default = null; - description = "Default system shell"; - }; - corePkgs.enable = mkEnableOption "core shell packages"; }; config = mkMerge [ - # (if (cfg.default != null) then { - # shell = pkgs."${cfg.default}"; - # } else {}) - (mkIf (cfg.corePkgs.enable) { ${namespace}.shell.toolset = mkDefault { bat.enable = true; @@ -52,4 +42,4 @@ in }; }) ]; -} \ No newline at end of file +} diff --git a/modules/home/terminal/alacritty/default.nix b/modules/home/terminal/alacritty/default.nix new file mode 100644 index 0000000..b6e5822 --- /dev/null +++ b/modules/home/terminal/alacritty/default.nix @@ -0,0 +1,43 @@ +{ config, lib, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.terminal.alacritty; +in +{ + options.${namespace}.terminal.alacritty = { + enable = mkEnableOption "enable alacritty"; + }; + + config = mkIf cfg.enable { + programs.alacritty = { + enable = true; + + settings = { + env = { + TERM = "xterm-256color"; + WINIT_X11_SCALE_FACTOR = "1.0"; + }; + + window.dynamic_title = true; + + scrolling = { + history = 5000; + multiplier = 3; + }; + + selection = { + semantic_escape_chars = '',│`|:"' ()[]{}<>''; + save_to_clipboard = false; + }; + + general.live_config_reload = true; + + # terminal.shell = { + # program = "${getExe pkgs.zsh}"; + # args = ["-l" "-c" "tmux new || tmux"]; + # }; + }; + }; + }; +} diff --git a/modules/home/terminal/ghostty/default.nix b/modules/home/terminal/ghostty/default.nix new file mode 100644 index 0000000..ddb6dd0 --- /dev/null +++ b/modules/home/terminal/ghostty/default.nix @@ -0,0 +1,24 @@ +{ config, lib, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.terminal.ghostty; +in +{ + options.${namespace}.terminal.ghostty = { + enable = mkEnableOption "enable ghostty"; + }; + + config = mkIf cfg.enable { + rograms.ghostty = { + enable = true; + settings = { + background-blur-radius = 20; + theme = "dark:stylix,light:stylix"; + window-theme = (config.${namespace}.themes.polarity or "dark"); + background-opacity = 0.8; + minimum-contrast = 1.1; + }; + }; + }; +} diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 45f3170..255d3d6 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -27,7 +27,7 @@ in ({ boot = { kernelPackages = pkgs.linuxPackages_latest; - + loader = { systemd-boot.enable = false; grub.enable = true; @@ -38,8 +38,8 @@ in footer = true; }; }; - - supportedFilesystems = [ "nfs" ] + + supportedFilesystems = [ "nfs" ]; }; }) diff --git a/_modules/system/services/security.nix b/modules/nixos/services/security/vaultwarden/default.nix similarity index 60% rename from _modules/system/services/security.nix rename to modules/nixos/services/security/vaultwarden/default.nix index ff8bf62..6870606 100644 --- a/_modules/system/services/security.nix +++ b/modules/nixos/services/security/vaultwarden/default.nix @@ -1,13 +1,13 @@ -{ config, lib, pkgs, ... }: +{ pkgs, config, lib, namespace, ... }: let -inherit (lib.options) mkEnableOption; inherit (lib.modules) mkIf; + inherit (lib.options) mkEnableOption; - cfg = config.modules.services.security; + cfg = config.${namespace}.services.security.vaultwarden; in { - options.modules.services.security = { - enable = mkEnableOption "Security service(s): Vaultwarden"; + options.${namespace}.services.security.vaultwarden = { + enable = mkEnableOption "enable vaultwarden"; }; config = mkIf cfg.enable { diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix index 248fa1d..a8a0a76 100644 --- a/systems/x86_64-linux/mandos/default.nix +++ b/systems/x86_64-linux/mandos/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -22,4 +20,4 @@ in }; system.stateVersion = "23.11"; -} \ No newline at end of file +} diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index 821e087..cb01d21 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -23,4 +21,4 @@ in }; system.stateVersion = "23.11"; -} \ No newline at end of file +} diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 6aea613..66960ce 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -23,4 +21,4 @@ in }; system.stateVersion = "23.11"; -} \ No newline at end of file +} From ca645515a869a9f999210367a75ae02ac40a2ec7 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 30 Jul 2025 21:46:11 +0200 Subject: [PATCH 27/38] update deps --- flake.lock | 126 ++++++++++++++++++++++------------------------------- 1 file changed, 52 insertions(+), 74 deletions(-) diff --git a/flake.lock b/flake.lock index 77096f3..1c719cd 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1748408240, - "narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=", + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", "type": "github" }, "original": { @@ -73,11 +73,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1753276606, - "narHash": "sha256-2N6MlBOBv2bDfo0Pg18j3a81HZq72uO+rvZsGK1eW/4=", + "lastModified": 1753879613, + "narHash": "sha256-oYhCJSAIZiu3maM2q6JBzh0+MYd4KTaq5eNFIstUurE=", "owner": "emmanuelrosa", "repo": "erosanix", - "rev": "aac9ef558a5b8008a24c611d96455ed0cd1d3b16", + "rev": "0ad38bd182cd737f0f4b878ea04cb3676ecd4000", "type": "github" }, "original": { @@ -94,11 +94,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1753339339, - "narHash": "sha256-r9Frae3VnbgKrWWQcV6WEykm6PxfPHVrxdOqgyt1VcU=", + "lastModified": 1753858083, + "narHash": "sha256-9eNLBxVBaOLGTOC1QkwrzRtnb1x9MB/3PYLb+CiALZY=", "owner": "nix-community", "repo": "fenix", - "rev": "af1c3d7dd242ebf50ac75665d5c44af79730b491", + "rev": "2c5508b7563b9138a00cd82e213febfc9cbbb36c", "type": "github" }, "original": { @@ -114,11 +114,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1753320535, - "narHash": "sha256-UCz4mALWiiZPa7Chid72Na7KSH+GdUDQ/O673luMD4w=", + "lastModified": 1753895972, + "narHash": "sha256-2Z8CGq7T6h7ntbx0AQP/+A8xCOim0PjjZtUUVtdHCyI=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "b7b4baa6e76170b767d34a4461210842ba7f6068", + "rev": "33ee3b8b2e231adf7f04e5d061a200e6f705fa02", "type": "github" }, "original": { @@ -284,7 +284,7 @@ }, "flake-utils-plus": { "inputs": { - "flake-utils": "flake-utils_5" + "flake-utils": "flake-utils_4" }, "locked": { "lastModified": 1715533576, @@ -338,27 +338,6 @@ } }, "flake-utils_4": { - "inputs": { - "systems": [ - "nvf", - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { "inputs": { "systems": "systems_5" }, @@ -453,11 +432,11 @@ ] }, "locked": { - "lastModified": 1753194162, - "narHash": "sha256-N+RdYwyw342DMd1Bo2t9OZCt4s2Qzki6nliBLHaPLNM=", + "lastModified": 1753902883, + "narHash": "sha256-F7IUdBe//PDtcztUdu3XYxzJuKbYip6TwIRWLdrftO0=", "owner": "himmelblau-idm", "repo": "himmelblau", - "rev": "a0bafb7cfe6be4ae7863d01b451600dc4cd7181b", + "rev": "d01709bf0100183045927c03b90db78fb8e40bda", "type": "github" }, "original": { @@ -473,11 +452,11 @@ ] }, "locked": { - "lastModified": 1753294394, - "narHash": "sha256-1Dfgq09lHZ8AdYB2Deu/mYP1pMNpob8CgqT5Mzo44eI=", + "lastModified": 1753888434, + "narHash": "sha256-xQhSeLJVsxxkwchE4s6v1CnOI6YegCqeA1fgk/ivVI4=", "owner": "nix-community", "repo": "home-manager", - "rev": "1fde6fb1be6cd5dc513dc1c287d69e4eb2de973e", + "rev": "0630790b31d4547d79ff247bc3ba1adda3a017d9", "type": "github" }, "original": { @@ -494,11 +473,11 @@ ] }, "locked": { - "lastModified": 1753333833, - "narHash": "sha256-S5RHVk+6PMwThIJY2mSbeoWTY1JrBSy1v1E1LDOFQW8=", + "lastModified": 1753887317, + "narHash": "sha256-BvxpPSXXHTWIIkphI7zNWGHLf6gk0uvuwLsLTV25hVg=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "e462677116c12bf23bd681a6a87dc7f98e689adf", + "rev": "ed55ffa3af8714a7443a083c753f479c107d9770", "type": "github" }, "original": { @@ -513,11 +492,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1753013761, - "narHash": "sha256-ggvjKAeIsjwdu6+ECBGieyBgtotD7BrsGX5BirCacYU=", + "lastModified": 1753618592, + "narHash": "sha256-9sDACkrSbZOA1srKWQzvbkBFHZeXvHW8EYpWrVZPxDg=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "f7c04e5ad6aa43a0f9698edb0d74b44e88ee99ee", + "rev": "81b2f78680ca3864bfdc0d4cbc3444af3e1ff271", "type": "github" }, "original": { @@ -570,11 +549,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1753237324, - "narHash": "sha256-iXvv/VYLMyAoaTadYrX0PGwd6N2wVX337Os6k8TAlF4=", + "lastModified": 1753842237, + "narHash": "sha256-hbDXVQBilvccF8SrbwNO3LhM1zMZlVqhAJBE5bkpT2Y=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "64ca2cbbf9c65dd3bd98192d74872a80e8dcb871", + "rev": "75d4eacfb24ffb1b0b9fee2d64d45dd689400e16", "type": "github" }, "original": { @@ -616,11 +595,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1752974445, - "narHash": "sha256-jj/HBJFSapTk4LfeJgNLk2wEE2BO6dgBYVRbXMNOCeM=", + "lastModified": 1753579242, + "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "9100109c11b6b5482ea949c980b86e24740dca08", + "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", "type": "github" }, "original": { @@ -647,11 +626,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1753290466, - "narHash": "sha256-Df8wnrToZpzjqFJWhvaUUvwypj1bKM3JY6zSskwETmc=", + "lastModified": 1753861192, + "narHash": "sha256-n17/8ENnBvGojKWRkrS6RXZ/GYqnTVGXACsV7sG1rwo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1744f3daf87f5bb4b2b08f6298a55b6a88ea8308", + "rev": "0b917819129ed70f9344dda23f56313130711412", "type": "github" }, "original": { @@ -679,11 +658,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1753346648, - "narHash": "sha256-n/eFKkfFh/V3S9tCTL0ulljtcczTCfuh5P5g55Jx6bM=", + "lastModified": 1753904442, + "narHash": "sha256-XHeb6yarZ9YLd3aQsnc0c8FrpnBGtHckQGZBPYXF7Uk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8cf96bf5c3356ee5867dd2a2cd771709db9848b2", + "rev": "d02f407d2bb5a5cb2f2f75c2a7c30d5b854be11b", "type": "github" }, "original": { @@ -711,11 +690,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1753250450, - "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=", + "lastModified": 1753694789, + "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf", + "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", "type": "github" }, "original": { @@ -727,11 +706,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1752997324, - "narHash": "sha256-vtTM4oDke3SeDj+1ey6DjmzXdq8ZZSCLWSaApADDvIE=", + "lastModified": 1753432016, + "narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7c688a0875df5a8c28a53fb55ae45e94eae0dddb", + "rev": "6027c30c8e9810896b92429f0092f624f7b1aace", "type": "github" }, "original": { @@ -802,17 +781,16 @@ "inputs": { "flake-compat": "flake-compat_4", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_4", "mnw": "mnw", "nixpkgs": "nixpkgs_7", "systems": "systems_4" }, "locked": { - "lastModified": 1753181140, - "narHash": "sha256-daKfPQnipcRnKnXknDzv+fzNKeEY3r/10y8YMVQ10vU=", + "lastModified": 1753878721, + "narHash": "sha256-Y+Kr6FTHggnZ31nhaiOhIboIi+dhnLmQ9p0xf0wwnDc=", "owner": "notashelf", "repo": "nvf", - "rev": "8fbecab446afe3454ecce6a4b817ec4f123a4a34", + "rev": "e35a74c44a35b28fd09f136dd3c0dbe9f300258f", "type": "github" }, "original": { @@ -868,11 +846,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1753282007, - "narHash": "sha256-PgTUdSShfGVqZtDJk5noAB1rKdD/MeZ1zq4jY8n9p3c=", + "lastModified": 1753789923, + "narHash": "sha256-z45szWoM2UZJuo2791LnkI6agdtBhZFSo87elnhp/eI=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "b5b10fb10facef4d18b4cae8ef22e640ca601255", + "rev": "e57f18480dc3b1a0f46cd83e2aaa1cf3b53d8ece", "type": "github" }, "original": { @@ -941,11 +919,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1753372006, - "narHash": "sha256-eyIYqerHPYHl2Eq802wJSOwMwZ3tdvJ4D+vckDe2mD8=", + "lastModified": 1753896214, + "narHash": "sha256-oHSPFAGuIx1VwKS8j0ADEtO8rteZY9EMSMvj1SaoxFA=", "owner": "nix-community", "repo": "stylix", - "rev": "ceda12a6da2181e424d8ed7e68ed291745f06f49", + "rev": "3b6731f6f065fa9936d94f188b0c8cf7a33cf04c", "type": "github" }, "original": { From 41acda91f4a1b3a7debe601e521f1fc2aec86ba6 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 30 Jul 2025 22:58:39 +0200 Subject: [PATCH 28/38] I ffing give up for today... --- homes/x86_64-linux/chris@manwe/default.nix | 2 +- modules/home/application/obs/default.nix | 2 - modules/home/application/steam/default.nix | 26 ++++----- .../home/application/thunderbird/default.nix | 10 ++-- modules/home/application/zen/default.nix | 4 +- modules/home/default.nix | 2 +- modules/home/editor/nano/default.nix | 32 +++++------ modules/home/editor/nvim/default.nix | 37 ++++++------- modules/home/editor/zed/default.nix | 4 +- modules/home/shell/default.nix | 3 +- modules/home/shell/toolset/fzf/default.nix | 5 +- modules/home/terminal/ghostty/default.nix | 2 +- modules/nixos/application/steam/default.nix | 55 +++++++++++++++++++ .../application/studio/default.nix | 4 +- .../nixos/application/thunderbird/default.nix | 17 ++++++ modules/nixos/editor/nano/default.nix | 28 ++++++++++ modules/nixos/hardware/gpu/nvidia/default.nix | 49 +++++++++++++++++ systems/x86_64-linux/mandos/default.nix | 8 +++ systems/x86_64-linux/manwe/default.nix | 10 ++++ systems/x86_64-linux/orome/default.nix | 12 +++- systems/x86_64-linux/tulkas/default.nix | 8 +++ systems/x86_64-linux/ulmo/default.nix | 8 ++- 22 files changed, 253 insertions(+), 75 deletions(-) create mode 100644 modules/nixos/application/steam/default.nix rename modules/{home => nixos}/application/studio/default.nix (71%) create mode 100644 modules/nixos/application/thunderbird/default.nix create mode 100644 modules/nixos/editor/nano/default.nix create mode 100644 modules/nixos/hardware/gpu/nvidia/default.nix diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index cd6fa1a..5f9e1bf 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -39,7 +39,7 @@ onlyoffice.enable = true; signal.enable = true; steam.enable = true; - studio.enable = true; + # studio.enable = true; teamspeak.enable = true; thunderbird.enable = true; zen.enable = true; diff --git a/modules/home/application/obs/default.nix b/modules/home/application/obs/default.nix index fe84f1c..a2be203 100644 --- a/modules/home/application/obs/default.nix +++ b/modules/home/application/obs/default.nix @@ -26,7 +26,5 @@ in # options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 # ''; # }; - - security.polkit.enable = true; }; } diff --git a/modules/home/application/steam/default.nix b/modules/home/application/steam/default.nix index 7bc338d..4e62c41 100644 --- a/modules/home/application/steam/default.nix +++ b/modules/home/application/steam/default.nix @@ -17,20 +17,20 @@ in }; programs = { - steam = { - enable = true; - package = pkgs.steam-small.override { - extraEnv = { - DXVK_HUD = "compiler"; - MANGOHUD = true; - }; - }; + # steam = { + # enable = true; + # package = pkgs.steam-small.override { + # extraEnv = { + # DXVK_HUD = "compiler"; + # MANGOHUD = true; + # }; + # }; - gamescopeSession = { - enable = true; - args = ["--immediate-flips"]; - }; - }; + # gamescopeSession = { + # enable = true; + # args = ["--immediate-flips"]; + # }; + # }; # https://github.com/FeralInteractive/gamemode # gamemode = { diff --git a/modules/home/application/thunderbird/default.nix b/modules/home/application/thunderbird/default.nix index caffe2a..ef38a21 100644 --- a/modules/home/application/thunderbird/default.nix +++ b/modules/home/application/thunderbird/default.nix @@ -10,12 +10,12 @@ in }; config = mkIf cfg.enable { - home.packages = with pkgs; [ thunderbird ]; + # home.packages = with pkgs; [ thunderbird ]; + + # programs.thunderbird = { + # enable = true; + # }; - programs.thunderbird = { - enable = true; - }; - accounts.email.accounts = { kruining = { primary = true; diff --git a/modules/home/application/zen/default.nix b/modules/home/application/zen/default.nix index e07c29d..4723cc3 100644 --- a/modules/home/application/zen/default.nix +++ b/modules/home/application/zen/default.nix @@ -10,9 +10,9 @@ in }; config = mkIf cfg.enable { - home.packages = with inputs.zen.packages.${pkgs.system}.specific; [ zen ]; + home.packages = [ inputs.zen-browser.packages.${pkgs.system}.specific ]; - sessionVariables = { + home.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; }; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index bd59116..e3185e0 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -42,6 +42,6 @@ in { BROWSER = cfg.browser; }; - shell = pkgs.${cfg.shell}; + # home.shell = pkgs.${cfg.shell}; }; } diff --git a/modules/home/editor/nano/default.nix b/modules/home/editor/nano/default.nix index 13eb800..870db8e 100644 --- a/modules/home/editor/nano/default.nix +++ b/modules/home/editor/nano/default.nix @@ -2,29 +2,29 @@ let inherit (lib) mkEnableOption mkIf; - cfg = config.${namespace}.editors.nano; + cfg = config.${namespace}.editor.nano; in { - options.${namespace}.editors.nano = { + options.${namespace}.editor.nano = { enable = mkEnableOption "nano"; }; config = mkIf cfg.enable { home.packages = with pkgs; [ nano ]; - programs.nano = { - enable = true; - syntaxHighlight = true; - nanorc = '' - set autoindent - set jumpyscrolling - set linenumbers - set mouse - set saveonexit - set smarthome - set tabstospaces - set tabsize 2 - ''; - }; + # programs.nano = { + # enable = true; + # syntaxHighlight = true; + # nanorc = '' + # set autoindent + # set jumpyscrolling + # set linenumbers + # set mouse + # set saveonexit + # set smarthome + # set tabstospaces + # set tabsize 2 + # ''; + # }; }; } diff --git a/modules/home/editor/nvim/default.nix b/modules/home/editor/nvim/default.nix index a3fd32a..162772f 100644 --- a/modules/home/editor/nvim/default.nix +++ b/modules/home/editor/nvim/default.nix @@ -5,9 +5,9 @@ let cfg = config.${namespace}.editor.nvim; in { - imports = [ - inputs.nvf.nixosModules.default - ]; + # imports = [ + # inputs.nvf.nixosModules.default + # ]; options.${namespace}.editor.nvim = { enable = mkEnableOption "enable nvim via nvf on user level"; @@ -18,30 +18,29 @@ in imagemagick editorconfig-core-c sqlite - deno pandoc nuspell hunspellDicts.nl_NL hunspellDicts.en_GB-ise ]; - programs.nvf = { - enable = true; - settings.vim = { - statusline.lualine.enable = true; - telescope.enable = true; - autocomplete.nvim-cmp.enable = true; + # programs.nvf = { + # enable = true; + # settings.vim = { + # statusline.lualine.enable = true; + # telescope.enable = true; + # autocomplete.nvim-cmp.enable = true; - lsp.enable = true; + # lsp.enable = true; - languages = { - enableTreesitter = true; + # languages = { + # enableTreesitter = true; - nix.enable = true; - ts.enable = true; - rust.enable = true; - }; - }; - }; + # nix.enable = true; + # ts.enable = true; + # rust.enable = true; + # }; + # }; + # }; }; } diff --git a/modules/home/editor/zed/default.nix b/modules/home/editor/zed/default.nix index 94e63d3..b35acba 100644 --- a/modules/home/editor/zed/default.nix +++ b/modules/home/editor/zed/default.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.${namespace}.editors.zed; + cfg = config.${namespace}.editor.zed; in { - options.${namespace}.editors.zed = { + options.${namespace}.editor.zed = { enable = mkEnableOption "zed"; }; diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index 2fbd8e8..d1df4cb 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption mkDefault; - inherit (lib.types) nullOr enum; + inherit (lib) mkIf mkMerge mkEnableOption mkDefault; cfg = config.${namespace}.shell; in diff --git a/modules/home/shell/toolset/fzf/default.nix b/modules/home/shell/toolset/fzf/default.nix index 1536083..e2f0313 100644 --- a/modules/home/shell/toolset/fzf/default.nix +++ b/modules/home/shell/toolset/fzf/default.nix @@ -3,7 +3,6 @@ let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.toolset.fzf; - defShell = config.${namespace}.shell.default; in { options.${namespace}.shell.toolset.fzf = { @@ -16,8 +15,8 @@ in programs.fzf = { enable = true; enableBashIntegration = true; - enableZshIntegration = defShell == "zsh"; - enableFishIntegration = defShell == "fish"; + enableZshIntegration = true; + enableFishIntegration = true; tmux.enableShellIntegration = true; tmux.shellIntegrationOptions = ["-d 40%"]; diff --git a/modules/home/terminal/ghostty/default.nix b/modules/home/terminal/ghostty/default.nix index ddb6dd0..00d925c 100644 --- a/modules/home/terminal/ghostty/default.nix +++ b/modules/home/terminal/ghostty/default.nix @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - rograms.ghostty = { + programs.ghostty = { enable = true; settings = { background-blur-radius = 20; diff --git a/modules/nixos/application/steam/default.nix b/modules/nixos/application/steam/default.nix new file mode 100644 index 0000000..0bde133 --- /dev/null +++ b/modules/nixos/application/steam/default.nix @@ -0,0 +1,55 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.steam; +in +{ + options.${namespace}.application.steam = { + enable = mkEnableOption "enable steam"; + }; + + config = mkIf cfg.enable { + # home.packages = with pkgs; [ protonup ]; + + # home.sessionVariables = { + # STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; + # }; + + programs = { + steam = { + enable = true; + package = pkgs.steam-small.override { + extraEnv = { + DXVK_HUD = "compiler"; + MANGOHUD = true; + }; + }; + + gamescopeSession = { + enable = true; + args = ["--immediate-flips"]; + }; + }; + + # https://github.com/FeralInteractive/gamemode + gamemode = { + enable = true; + enableRenice = true; + settings = {}; + }; + + # gamescope = { + # enable = true; + # capSysNice = true; + # env = { + # DXVK_HDR = "1"; + # ENABLE_GAMESCOPE_WSI = "1"; + # WINE_FULLSCREEN_FSR = "1"; + # WLR_RENDERER = "vulkan"; + # }; + # args = ["--hdr-enabled"]; + # }; + }; + }; +} diff --git a/modules/home/application/studio/default.nix b/modules/nixos/application/studio/default.nix similarity index 71% rename from modules/home/application/studio/default.nix rename to modules/nixos/application/studio/default.nix index f515b77..94b07fd 100644 --- a/modules/home/application/studio/default.nix +++ b/modules/nixos/application/studio/default.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, pkgs, namespace, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; @@ -10,6 +10,6 @@ in }; config = mkIf cfg.enable { - home.packages = with pkgs; [ studio ]; + environment.systemPackages = with pkgs; [ studio ]; }; } diff --git a/modules/nixos/application/thunderbird/default.nix b/modules/nixos/application/thunderbird/default.nix new file mode 100644 index 0000000..09856ef --- /dev/null +++ b/modules/nixos/application/thunderbird/default.nix @@ -0,0 +1,17 @@ +{ config, lib, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.thunderbird; +in +{ + options.${namespace}.application.thunderbird = { + enable = mkEnableOption "enable thunderbird"; + }; + + config = mkIf cfg.enable { + programs.thunderbird = { + enable = true; + }; + }; +} diff --git a/modules/nixos/editor/nano/default.nix b/modules/nixos/editor/nano/default.nix new file mode 100644 index 0000000..1cb7ff1 --- /dev/null +++ b/modules/nixos/editor/nano/default.nix @@ -0,0 +1,28 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.editor.nano; +in +{ + options.${namespace}.editor.nano = { + enable = mkEnableOption "nano"; + }; + + config = mkIf cfg.enable { + programs.nano = { + enable = true; + syntaxHighlight = true; + nanorc = '' + set autoindent + set jumpyscrolling + set linenumbers + set mouse + set saveonexit + set smarthome + set tabstospaces + set tabsize 2 + ''; + }; + }; +} diff --git a/modules/nixos/hardware/gpu/nvidia/default.nix b/modules/nixos/hardware/gpu/nvidia/default.nix new file mode 100644 index 0000000..ab7c087 --- /dev/null +++ b/modules/nixos/hardware/gpu/nvidia/default.nix @@ -0,0 +1,49 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.gpu; +in +{ + options.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; + + config = mkIf cfg.nvidia { + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + nvidia = { + modesetting.enable = true; + open = false; + nvidiaSettings = true; + + powerManagement = { + enable = true; + finegrained = false; + }; + + # package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; + + # package = let + # rcu_patch = pkgs.fetchpatch { + # url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; + # hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg="; + # }; + # in config.boot.kernelPackages.nvidiaPackages.mkDriver { + # version = "550.40.07"; + # sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0="; + # sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4="; + # openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I="; + # settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs="; + # persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870="; + + # patches = [ rcu_patch ]; + # }; + }; + }; + }; +} diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix index a8a0a76..b1605f8 100644 --- a/systems/x86_64-linux/mandos/default.nix +++ b/systems/x86_64-linux/mandos/default.nix @@ -17,6 +17,14 @@ }; desktop.use = "gamescope"; + + application = { + steam.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index cb01d21..18c18a9 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -18,6 +18,16 @@ }; desktop.use = "plasma"; + + application = { + steam.enable = true; + thunderbird.enable = true; + studio.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix index 34210ac..48e049b 100644 --- a/systems/x86_64-linux/orome/default.nix +++ b/systems/x86_64-linux/orome/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -12,7 +10,15 @@ in bluetooth = true; audio = true; }; + + application = { + steam.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; -} \ No newline at end of file +} diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 66960ce..40d1673 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -18,6 +18,14 @@ }; desktop.use = "gamescope"; + + application = { + steam.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix index 26df5e1..7a2540f 100644 --- a/systems/x86_64-linux/ulmo/default.nix +++ b/systems/x86_64-linux/ulmo/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -12,7 +10,11 @@ in networking.ssh.enable = true; media.enable = true; }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; -} \ No newline at end of file +} From 8282155619e92c2c5d2a65394fb805cf485b16a0 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 08:15:35 +0200 Subject: [PATCH 29/38] ooooooooooooohhhhhh, is that alllllllll --- homes/x86_64-linux/chris@manwe/default.nix | 2 +- modules/{nixos => home}/application/studio/default.nix | 2 +- systems/x86_64-linux/manwe/default.nix | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) rename modules/{nixos => home}/application/studio/default.nix (83%) diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index 5f9e1bf..cd6fa1a 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -39,7 +39,7 @@ onlyoffice.enable = true; signal.enable = true; steam.enable = true; - # studio.enable = true; + studio.enable = true; teamspeak.enable = true; thunderbird.enable = true; zen.enable = true; diff --git a/modules/nixos/application/studio/default.nix b/modules/home/application/studio/default.nix similarity index 83% rename from modules/nixos/application/studio/default.nix rename to modules/home/application/studio/default.nix index 94b07fd..7f8173a 100644 --- a/modules/nixos/application/studio/default.nix +++ b/modules/home/application/studio/default.nix @@ -10,6 +10,6 @@ in }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ studio ]; + home.packages = with pkgs.${namespace}; [ studio ]; }; } diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index 18c18a9..510c000 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -22,7 +22,6 @@ application = { steam.enable = true; thunderbird.enable = true; - studio.enable = true; }; editor = { From 80c3873cf3caf90c2069e353c33001a7b137d4c2 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 09:19:34 +0200 Subject: [PATCH 30/38] re enable thunderbird in home manager --- .../home/application/thunderbird/default.nix | 13 ++++++++----- .../nixos/application/thunderbird/default.nix | 17 ----------------- systems/x86_64-linux/manwe/default.nix | 1 - 3 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 modules/nixos/application/thunderbird/default.nix diff --git a/modules/home/application/thunderbird/default.nix b/modules/home/application/thunderbird/default.nix index ef38a21..c05f57b 100644 --- a/modules/home/application/thunderbird/default.nix +++ b/modules/home/application/thunderbird/default.nix @@ -10,11 +10,14 @@ in }; config = mkIf cfg.enable { - # home.packages = with pkgs; [ thunderbird ]; + programs.thunderbird = { + enable = true; + package = pkgs.thunderbird-latest; - # programs.thunderbird = { - # enable = true; - # }; + profiles.${config.snowfallorg.user.name} = { + isDefault = true; + }; + }; accounts.email.accounts = { kruining = { @@ -27,7 +30,7 @@ in }; thunderbird = { enable = true; - profiles = [ "chris" ]; + profiles = [ config.snowfallorg.user.name ]; }; }; diff --git a/modules/nixos/application/thunderbird/default.nix b/modules/nixos/application/thunderbird/default.nix deleted file mode 100644 index 09856ef..0000000 --- a/modules/nixos/application/thunderbird/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, namespace, ... }: -let - inherit (lib) mkIf mkEnableOption; - - cfg = config.${namespace}.application.thunderbird; -in -{ - options.${namespace}.application.thunderbird = { - enable = mkEnableOption "enable thunderbird"; - }; - - config = mkIf cfg.enable { - programs.thunderbird = { - enable = true; - }; - }; -} diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index 510c000..c333f85 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -21,7 +21,6 @@ application = { steam.enable = true; - thunderbird.enable = true; }; editor = { From 74212cbd58285c0ca6780ea4d00f292c6af6e374 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 14:46:28 +0200 Subject: [PATCH 31/38] cleanup code --- README.md | 7 +++++ flake.lock | 22 +++++++++++++++ flake.nix | 8 ++++++ justfile | 29 ++++++++++++++++++++ modules/nixos/application/steam/default.nix | 6 ----- modules/nixos/boot/default.nix | 2 +- systems/x86_64-linux/melkor/README.md | 3 +++ systems/x86_64-linux/varda/README.md | 3 +++ systems/x86_64-linux/varda/default.nix | 30 +++++++++++++++++++++ systems/x86_64-linux/yavanna/README.md | 3 +++ 10 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 README.md create mode 100644 justfile create mode 100644 systems/x86_64-linux/melkor/README.md create mode 100644 systems/x86_64-linux/varda/README.md create mode 100644 systems/x86_64-linux/varda/default.nix create mode 100644 systems/x86_64-linux/yavanna/README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4924525 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ + + +## Inpirations + +- [dafitt/dotfiles](https://github.com/dafitt/dotfiles/) +- [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix) +- [alex007sirois/nix-config](https://github.com/alex007sirois/nix-config) (justfile) \ No newline at end of file diff --git a/flake.lock b/flake.lock index 1c719cd..c0545f0 100644 --- a/flake.lock +++ b/flake.lock @@ -577,6 +577,27 @@ "type": "github" } }, + "nixos-wsl": { + "inputs": { + "flake-compat": [], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1753704990, + "narHash": "sha256-5E14xuNWy2Un1nFR55k68hgbnD8U2x/rE5DXJtYKusw=", + "owner": "nix-community", + "repo": "nixos-wsl", + "rev": "58c814cc6d4a789191f9c12e18277107144b0c91", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-wsl", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1751186460, @@ -834,6 +855,7 @@ "jovian": "jovian", "nix-minecraft": "nix-minecraft", "nixos-boot": "nixos-boot", + "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_6", "nvf": "nvf", "plasma-manager": "plasma-manager", diff --git a/flake.nix b/flake.nix index 63b5789..08e767a 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,14 @@ grub2-themes = { url = "github:vinceliuice/grub2-themes"; }; + + nixos-wsl = { + url = "github:nix-community/nixos-wsl"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-compat.follows = ""; + }; + }; }; outputs = inputs: inputs.snowfall-lib.mkFlake { diff --git a/justfile b/justfile new file mode 100644 index 0000000..e436695 --- /dev/null +++ b/justfile @@ -0,0 +1,29 @@ +default: + @just --list --unsorted + +flake := justfile_directory() +determinate-flags := "--option extra-substituters https://install.determinate.systems --option extra-trusted-public-keys cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" + +update *inputs: + nix flake update {{inputs}} + +update-all: + nix flake update + +build host: + nh os build {{flake}} -H {{host}} -- {{determinate-flags}} + +test: + nh os test {{flake}} -- {{determinate-flags}} + +switch: + nh os boot --ask {{flake}} -- {{determinate-flags}} + +prepare-deploy-ssh target: + ssh-copy-id {{target}} + +prepare-deploy-kexec target: (prepare-deploy-ssh target) + ssh {{target}} "(curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root) && /root/kexec/run" + +deploy target hostname: (prepare-deploy-ssh target) + nix run github:nix-community/nixos-anywhere -- --flake '.#{{hostname}}' {{target}} \ No newline at end of file diff --git a/modules/nixos/application/steam/default.nix b/modules/nixos/application/steam/default.nix index 0bde133..6170e8a 100644 --- a/modules/nixos/application/steam/default.nix +++ b/modules/nixos/application/steam/default.nix @@ -10,12 +10,6 @@ in }; config = mkIf cfg.enable { - # home.packages = with pkgs; [ protonup ]; - - # home.sessionVariables = { - # STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; - # }; - programs = { steam = { enable = true; diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 255d3d6..1f844d1 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -30,7 +30,7 @@ in loader = { systemd-boot.enable = false; - grub.enable = true; + grub.enable = mkDefault true; grub2-theme = { enable = true; diff --git a/systems/x86_64-linux/melkor/README.md b/systems/x86_64-linux/melkor/README.md new file mode 100644 index 0000000..a430921 --- /dev/null +++ b/systems/x86_64-linux/melkor/README.md @@ -0,0 +1,3 @@ +# Description + +TBD \ No newline at end of file diff --git a/systems/x86_64-linux/varda/README.md b/systems/x86_64-linux/varda/README.md new file mode 100644 index 0000000..2bff48a --- /dev/null +++ b/systems/x86_64-linux/varda/README.md @@ -0,0 +1,3 @@ +# Description + +Installer ISO \ No newline at end of file diff --git a/systems/x86_64-linux/varda/default.nix b/systems/x86_64-linux/varda/default.nix new file mode 100644 index 0000000..2aa8c22 --- /dev/null +++ b/systems/x86_64-linux/varda/default.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: +{ + imports = [ + "${pkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix" + "${pkgs}/nixos/modules/installer/cd-dvd/channel.nix" + ]; + + sneeuwvlok = { + services = { + networking.ssh.enable = true; + media.enable = true; + }; + + editor = { + nano.enable = true; + }; + }; + + boot = { + kernelPackages = pkgs.linuxPackages_latest; + supportedFilesystems = lib.mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"]; + }; + + services = { + qemuGuest.enable = true; + openssh.settings.PermitRootLogin = "yes"; + }; + + system.stateVersion = "23.11"; +} diff --git a/systems/x86_64-linux/yavanna/README.md b/systems/x86_64-linux/yavanna/README.md new file mode 100644 index 0000000..a430921 --- /dev/null +++ b/systems/x86_64-linux/yavanna/README.md @@ -0,0 +1,3 @@ +# Description + +TBD \ No newline at end of file From 5afa9a8062bd91b4ec0f9269442d98c327eeec59 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 14:47:58 +0200 Subject: [PATCH 32/38] update deps --- flake.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index c0545f0..edac429 100644 --- a/flake.lock +++ b/flake.lock @@ -94,11 +94,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1753858083, - "narHash": "sha256-9eNLBxVBaOLGTOC1QkwrzRtnb1x9MB/3PYLb+CiALZY=", + "lastModified": 1753944209, + "narHash": "sha256-dcGdqxhRRGoA/S38BsWOrwIiLYEBOqXKauHdFwKR310=", "owner": "nix-community", "repo": "fenix", - "rev": "2c5508b7563b9138a00cd82e213febfc9cbbb36c", + "rev": "5ef8607d6e8a08cfb3946aaacaa0494792adf4ae", "type": "github" }, "original": { @@ -114,11 +114,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1753895972, - "narHash": "sha256-2Z8CGq7T6h7ntbx0AQP/+A8xCOim0PjjZtUUVtdHCyI=", + "lastModified": 1753960679, + "narHash": "sha256-q82/pjksNMev2AJqK1v38BcK29kB2f7yB2GTEsrlR2M=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "33ee3b8b2e231adf7f04e5d061a200e6f705fa02", + "rev": "c709bb72ee604949ff54df9519dc6cb0c6040007", "type": "github" }, "original": { @@ -452,11 +452,11 @@ ] }, "locked": { - "lastModified": 1753888434, - "narHash": "sha256-xQhSeLJVsxxkwchE4s6v1CnOI6YegCqeA1fgk/ivVI4=", + "lastModified": 1753943136, + "narHash": "sha256-eiEE5SabVcIlGSTRcRyBjmJMaYAV95SJnjy8YSsVeW4=", "owner": "nix-community", "repo": "home-manager", - "rev": "0630790b31d4547d79ff247bc3ba1adda3a017d9", + "rev": "bd82507edd860c453471c46957cbbe3c9fd01b5c", "type": "github" }, "original": { @@ -473,11 +473,11 @@ ] }, "locked": { - "lastModified": 1753887317, - "narHash": "sha256-BvxpPSXXHTWIIkphI7zNWGHLf6gk0uvuwLsLTV25hVg=", + "lastModified": 1753938227, + "narHash": "sha256-KzjI9khMC2tOL5FClh3sHq8Gax1O5Rw0bH1hvJ3FU3E=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "ed55ffa3af8714a7443a083c753f479c107d9770", + "rev": "8d1f0004594e0eddc00159ad7666e669a6bcb711", "type": "github" }, "original": { @@ -549,11 +549,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1753842237, - "narHash": "sha256-hbDXVQBilvccF8SrbwNO3LhM1zMZlVqhAJBE5bkpT2Y=", + "lastModified": 1753928630, + "narHash": "sha256-ASqyvmJ2EEUCyDJGMHRQ1ZqWnCd4SiVd7hi7dGBuSvw=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "75d4eacfb24ffb1b0b9fee2d64d45dd689400e16", + "rev": "30af81148ee29a4a13c938c25d3e68877b1b27fb", "type": "github" }, "original": { @@ -647,11 +647,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1753861192, - "narHash": "sha256-n17/8ENnBvGojKWRkrS6RXZ/GYqnTVGXACsV7sG1rwo=", + "lastModified": 1753948617, + "narHash": "sha256-68ounbeMLJTO/Igq0rEqjldNReb/r2gR9zgLU2qiH7A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0b917819129ed70f9344dda23f56313130711412", + "rev": "4f1a1d0af135001efc1a58c8f31ede7bb1045874", "type": "github" }, "original": { @@ -679,11 +679,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1753904442, - "narHash": "sha256-XHeb6yarZ9YLd3aQsnc0c8FrpnBGtHckQGZBPYXF7Uk=", + "lastModified": 1753965693, + "narHash": "sha256-ks84bo0xIjUdRJGqLHQTyXR5OGb+8zUQg+XarbSEtrw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d02f407d2bb5a5cb2f2f75c2a7c30d5b854be11b", + "rev": "113bb8d5ca48dc31c62835b5fafed82092d87a91", "type": "github" }, "original": { @@ -868,11 +868,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1753789923, - "narHash": "sha256-z45szWoM2UZJuo2791LnkI6agdtBhZFSo87elnhp/eI=", + "lastModified": 1753838657, + "narHash": "sha256-4FA7NTmrAqW5yt4A3hhzgDmAFD0LbGRMGKhb1LBSItI=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "e57f18480dc3b1a0f46cd83e2aaa1cf3b53d8ece", + "rev": "8611b714597c89b092f3d4874f14acd3f72f44fd", "type": "github" }, "original": { @@ -941,11 +941,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1753896214, - "narHash": "sha256-oHSPFAGuIx1VwKS8j0ADEtO8rteZY9EMSMvj1SaoxFA=", + "lastModified": 1753919664, + "narHash": "sha256-U7Ts8VbVD4Z6n67gFx00dkpQJu27fMu173IUopX3pNI=", "owner": "nix-community", "repo": "stylix", - "rev": "3b6731f6f065fa9936d94f188b0c8cf7a33cf04c", + "rev": "30f5022236cf8dd257941cb0f910e198e7e464c7", "type": "github" }, "original": { From 0255a153ca6cfd50562c7c96c43a1db61384116f Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 15:00:12 +0200 Subject: [PATCH 33/38] fix readme format --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4924525..af500c0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +# My nix flake for my systems ## Inpirations From 112fc3ddb34e04fc1347f1301e4a6eed5015f472 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 16:04:08 +0200 Subject: [PATCH 34/38] started to create an installer image (gum is AWESOME) --- flake.nix | 5 ++ modules/nixos/nix/default.nix | 2 + systems/x86_64-linux/varda/default.nix | 84 +++++++++++++++++++++++--- 3 files changed, 82 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 08e767a..3d518fb 100644 --- a/flake.nix +++ b/flake.nix @@ -99,6 +99,11 @@ flux.overlays.default ]; + system.hosts.varda.modules = with inputs; [ + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix" + "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" + ]; + homes.modules = with inputs; [ stylix.homeModules.stylix plasma-manager.homeManagerModules.plasma-manager diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 05c001a..7d1f069 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -15,6 +15,8 @@ in nix = { package = pkgs.nixVersions.latest; + extraOptions = "experimental-features = nix-command flakes"; + settings = { experimental-features = [ "nix-command" "flakes" ]; allowed-users = [ "@wheel" ]; diff --git a/systems/x86_64-linux/varda/default.nix b/systems/x86_64-linux/varda/default.nix index 2aa8c22..557d8f1 100644 --- a/systems/x86_64-linux/varda/default.nix +++ b/systems/x86_64-linux/varda/default.nix @@ -1,10 +1,8 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: +let + inherit (lib) mkForce; +in { - imports = [ - "${pkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix" - "${pkgs}/nixos/modules/installer/cd-dvd/channel.nix" - ]; - sneeuwvlok = { services = { networking.ssh.enable = true; @@ -17,14 +15,82 @@ }; boot = { - kernelPackages = pkgs.linuxPackages_latest; - supportedFilesystems = lib.mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"]; + supportedFilesystems = mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"]; }; services = { qemuGuest.enable = true; - openssh.settings.PermitRootLogin = "yes"; + openssh.settings.PermitRootLogin = mkForce "yes"; }; + environment.systemPackages = with pkgs; [ + # sbctl + git + gum + ( + writeShellScriptBin "rescue" '' + #!/usr/bin/env bash + set -euo pipefail + + gum "device name" + + sudo mkdir -p /mnt/{dev,proc,sys,boot} + sudo mount -o bind /dev /mnt/dev + sudo mount -o bind /proc /mnt/proc + sudo mount -o bind /sys /mnt/sys + sudo chroot /mnt /nix/var/nix/profiles/system/activate + sudo chroot /mnt /run/current-system/sw/bin/bash + + sudo mount /dev/vda1 /mnt/boot + sudo cryptsetup open /dev/vda3 cryptroot + sudo mount /dev/mapper/cryptroot /mnt/ + + sudo nixos-enter + '' + ) + ( + writeShellScriptBin "nix_installer" + '' + #!/usr/bin/env bash + set -euo pipefail + + if [ "$(id -u)" -eq 0 ]; then + echo "ERROR! $(basename "$0") should be run as a regular user" + exit 1 + fi + + if [ ! -d "$HOME/github/sneeuwvlok/.git" ]; then + git clone https://github.com/chris-kruining/sneeuwvlok.git "$HOME/github/sneeuwvlok" + fi + + TARGET_HOST=$(ls -1 ~/github/sneeuwvlok/systems/*/default.nix | cut -d'/' -f6 | grep -v iso | gum choose) + + if [ ! -e "$HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" ]; then + echo "ERROR! $(basename "$0") could not find the required $HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" + exit 1 + fi + + gum confirm --default=false \ + "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $TARGET_HOST. Are you sure you want to continue?" + + echo "Partitioning Disks" + sudo nix run github:nix-community/disko \ + --extra-experimental-features "nix-command flakes" \ + --no-write-lock-file \ + -- \ + --mode zap_create_mount \ + "$HOME/dotfiles/hosts/$TARGET_HOST/disks.nix" + + #echo "Creating blank volume" + #sudo btrfs subvolume snapshot -r /mnt/ /mnt/root-blank + + #echo "Set up attic binary cache" + #attic use prod || true + + sudo nixos-install --flake "$HOME/dotfiles#$TARGET_HOST" + '' + ) + ]; + system.stateVersion = "23.11"; } From 0f2f2a09f0c98b998ae67996adf2aba143af540d Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 19:40:43 +0200 Subject: [PATCH 35/38] right, that makes sense --- LICENSE.md | 19 +++ README.md | 3 +- flake.nix | 5 - .../x86_64-install-iso/minimal/default.nix | 120 ++++++++++++++++++ systems/x86_64-linux/varda/README.md | 2 +- systems/x86_64-linux/varda/default.nix | 96 -------------- 6 files changed, 142 insertions(+), 103 deletions(-) create mode 100644 LICENSE.md create mode 100644 systems/x86_64-install-iso/minimal/default.nix delete mode 100644 systems/x86_64-linux/varda/default.nix diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..5626bcd --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index af500c0..66ef62f 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,5 @@ - [dafitt/dotfiles](https://github.com/dafitt/dotfiles/) - [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix) -- [alex007sirois/nix-config](https://github.com/alex007sirois/nix-config) (justfile) \ No newline at end of file +- [alex007sirois/nix-config](https://github.com/alex007sirois/nix-config) (justfile) +- [hmajid2301/nixicle](https://gitlab.com/hmajid2301/nixicle) (the GOAT, he did what I am aiming for!) \ No newline at end of file diff --git a/flake.nix b/flake.nix index 3d518fb..08e767a 100644 --- a/flake.nix +++ b/flake.nix @@ -99,11 +99,6 @@ flux.overlays.default ]; - system.hosts.varda.modules = with inputs; [ - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix" - "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" - ]; - homes.modules = with inputs; [ stylix.homeModules.stylix plasma-manager.homeManagerModules.plasma-manager diff --git a/systems/x86_64-install-iso/minimal/default.nix b/systems/x86_64-install-iso/minimal/default.nix new file mode 100644 index 0000000..f3ba5e1 --- /dev/null +++ b/systems/x86_64-install-iso/minimal/default.nix @@ -0,0 +1,120 @@ +{ pkgs, lib, ... }: +let + inherit (lib) mkForce; +in +{ + boot = { + supportedFilesystems = mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"]; + + loader.efi.canTouchEfiVariables = true; + }; + + networking = { + wireless.enable = true; + networkmanager.enable = true; + }; + + nix = { + enable = true; + extraOptions = "experimental-features = nix-command flakes"; + channel.enable = false; + + settings = { + experimental-features = [ "nix-command" "flakes" ]; + allowed-users = [ "@wheel" ]; + trusted-users = [ "@wheel" ]; + + auto-optimise-store = true; + connect-timeout = 5; + http-connections = 50; + log-lines = 50; # more log lines in case of error + min-free = 1 * (1024 * 1024 * 1024); # GiB # start garbage collector + max-free = 50 * (1024 * 1024 * 1024); # GiB # until + warn-dirty = false; + }; + }; + + services = { + ssh.enable = true; + qemuGuest.enable = true; + openssh.settings.PermitRootLogin = mkForce "yes"; + }; + + system.locale.enable = true; + + user = { + name = "nixos"; + initialPassword = "kaas"; + }; + + environment.systemPackages = with pkgs; [ + # sbctl + git + # gum + # ( + # writeShellScriptBin "rescue" '' + # #!/usr/bin/env bash + # set -euo pipefail + + # gum "device name" + + # sudo mkdir -p /mnt/{dev,proc,sys,boot} + # sudo mount -o bind /dev /mnt/dev + # sudo mount -o bind /proc /mnt/proc + # sudo mount -o bind /sys /mnt/sys + # sudo chroot /mnt /nix/var/nix/profiles/system/activate + # sudo chroot /mnt /run/current-system/sw/bin/bash + + # sudo mount /dev/vda1 /mnt/boot + # sudo cryptsetup open /dev/vda3 cryptroot + # sudo mount /dev/mapper/cryptroot /mnt/ + + # sudo nixos-enter + # '' + # ) + # ( + # writeShellScriptBin "nix_installer" + # '' + # #!/usr/bin/env bash + # set -euo pipefail + + # if [ "$(id -u)" -eq 0 ]; then + # echo "ERROR! $(basename "$0") should be run as a regular user" + # exit 1 + # fi + + # if [ ! -d "$HOME/github/sneeuwvlok/.git" ]; then + # git clone https://github.com/chris-kruining/sneeuwvlok.git "$HOME/github/sneeuwvlok" + # fi + + # TARGET_HOST=$(ls -1 ~/github/sneeuwvlok/systems/*/default.nix | cut -d'/' -f6 | grep -v iso | gum choose) + + # if [ ! -e "$HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" ]; then + # echo "ERROR! $(basename "$0") could not find the required $HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" + # exit 1 + # fi + + # gum confirm --default=false \ + # "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $TARGET_HOST. Are you sure you want to continue?" + + # echo "Partitioning Disks" + # sudo nix run github:nix-community/disko \ + # --extra-experimental-features "nix-command flakes" \ + # --no-write-lock-file \ + # -- \ + # --mode zap_create_mount \ + # "$HOME/dotfiles/hosts/$TARGET_HOST/disks.nix" + + # #echo "Creating blank volume" + # #sudo btrfs subvolume snapshot -r /mnt/ /mnt/root-blank + + # #echo "Set up attic binary cache" + # #attic use prod || true + + # sudo nixos-install --flake "$HOME/dotfiles#$TARGET_HOST" + # '' + # ) + ]; + + system.stateVersion = "23.11"; +} diff --git a/systems/x86_64-linux/varda/README.md b/systems/x86_64-linux/varda/README.md index 2bff48a..a430921 100644 --- a/systems/x86_64-linux/varda/README.md +++ b/systems/x86_64-linux/varda/README.md @@ -1,3 +1,3 @@ # Description -Installer ISO \ No newline at end of file +TBD \ No newline at end of file diff --git a/systems/x86_64-linux/varda/default.nix b/systems/x86_64-linux/varda/default.nix deleted file mode 100644 index 557d8f1..0000000 --- a/systems/x86_64-linux/varda/default.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ pkgs, lib, ... }: -let - inherit (lib) mkForce; -in -{ - sneeuwvlok = { - services = { - networking.ssh.enable = true; - media.enable = true; - }; - - editor = { - nano.enable = true; - }; - }; - - boot = { - supportedFilesystems = mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"]; - }; - - services = { - qemuGuest.enable = true; - openssh.settings.PermitRootLogin = mkForce "yes"; - }; - - environment.systemPackages = with pkgs; [ - # sbctl - git - gum - ( - writeShellScriptBin "rescue" '' - #!/usr/bin/env bash - set -euo pipefail - - gum "device name" - - sudo mkdir -p /mnt/{dev,proc,sys,boot} - sudo mount -o bind /dev /mnt/dev - sudo mount -o bind /proc /mnt/proc - sudo mount -o bind /sys /mnt/sys - sudo chroot /mnt /nix/var/nix/profiles/system/activate - sudo chroot /mnt /run/current-system/sw/bin/bash - - sudo mount /dev/vda1 /mnt/boot - sudo cryptsetup open /dev/vda3 cryptroot - sudo mount /dev/mapper/cryptroot /mnt/ - - sudo nixos-enter - '' - ) - ( - writeShellScriptBin "nix_installer" - '' - #!/usr/bin/env bash - set -euo pipefail - - if [ "$(id -u)" -eq 0 ]; then - echo "ERROR! $(basename "$0") should be run as a regular user" - exit 1 - fi - - if [ ! -d "$HOME/github/sneeuwvlok/.git" ]; then - git clone https://github.com/chris-kruining/sneeuwvlok.git "$HOME/github/sneeuwvlok" - fi - - TARGET_HOST=$(ls -1 ~/github/sneeuwvlok/systems/*/default.nix | cut -d'/' -f6 | grep -v iso | gum choose) - - if [ ! -e "$HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" ]; then - echo "ERROR! $(basename "$0") could not find the required $HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" - exit 1 - fi - - gum confirm --default=false \ - "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $TARGET_HOST. Are you sure you want to continue?" - - echo "Partitioning Disks" - sudo nix run github:nix-community/disko \ - --extra-experimental-features "nix-command flakes" \ - --no-write-lock-file \ - -- \ - --mode zap_create_mount \ - "$HOME/dotfiles/hosts/$TARGET_HOST/disks.nix" - - #echo "Creating blank volume" - #sudo btrfs subvolume snapshot -r /mnt/ /mnt/root-blank - - #echo "Set up attic binary cache" - #attic use prod || true - - sudo nixos-install --flake "$HOME/dotfiles#$TARGET_HOST" - '' - ) - ]; - - system.stateVersion = "23.11"; -} From 700fe012a1dbf956f5d5b585f32292bf9b60da87 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 20:25:28 +0200 Subject: [PATCH 36/38] alright, figured out the build command I need also removed the justfile for now, will take a look at that again in the future, less dependencies for now --- README.md | 15 +++++++- flake.lock | 37 +++++++++++++++++++ flake.nix | 5 +++ justfile | 29 --------------- .../x86_64-install-iso/minimal/default.nix | 15 ++++---- 5 files changed, 64 insertions(+), 37 deletions(-) delete mode 100644 justfile diff --git a/README.md b/README.md index 66ef62f..2eb75c9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,21 @@ # My nix flake for my systems +## Commands + +### Show the output of the flake + +```sh +nix flake show +``` + +### Create install iso + +```sh +nix build .#install-isoConfigurations.minimal +``` + ## Inpirations - [dafitt/dotfiles](https://github.com/dafitt/dotfiles/) - [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix) -- [alex007sirois/nix-config](https://github.com/alex007sirois/nix-config) (justfile) - [hmajid2301/nixicle](https://gitlab.com/hmajid2301/nixicle) (the GOAT, he did what I am aiming for!) \ No newline at end of file diff --git a/flake.lock b/flake.lock index edac429..1935971 100644 --- a/flake.lock +++ b/flake.lock @@ -562,6 +562,21 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1736643958, + "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixos-boot": { "locked": { "lastModified": 1722927293, @@ -577,6 +592,27 @@ "type": "github" } }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751903740, + "narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "032decf9db65efed428afd2fa39d80f7089085eb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": [], @@ -855,6 +891,7 @@ "jovian": "jovian", "nix-minecraft": "nix-minecraft", "nixos-boot": "nixos-boot", + "nixos-generators": "nixos-generators", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_6", "nvf": "nvf", diff --git a/flake.nix b/flake.nix index 08e767a..d696f4b 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,11 @@ inputs.home-manager.follows = "home-manager"; }; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # neovim nvf.url = "github:notashelf/nvf"; diff --git a/justfile b/justfile deleted file mode 100644 index e436695..0000000 --- a/justfile +++ /dev/null @@ -1,29 +0,0 @@ -default: - @just --list --unsorted - -flake := justfile_directory() -determinate-flags := "--option extra-substituters https://install.determinate.systems --option extra-trusted-public-keys cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" - -update *inputs: - nix flake update {{inputs}} - -update-all: - nix flake update - -build host: - nh os build {{flake}} -H {{host}} -- {{determinate-flags}} - -test: - nh os test {{flake}} -- {{determinate-flags}} - -switch: - nh os boot --ask {{flake}} -- {{determinate-flags}} - -prepare-deploy-ssh target: - ssh-copy-id {{target}} - -prepare-deploy-kexec target: (prepare-deploy-ssh target) - ssh {{target}} "(curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root) && /root/kexec/run" - -deploy target hostname: (prepare-deploy-ssh target) - nix run github:nix-community/nixos-anywhere -- --flake '.#{{hostname}}' {{target}} \ No newline at end of file diff --git a/systems/x86_64-install-iso/minimal/default.nix b/systems/x86_64-install-iso/minimal/default.nix index f3ba5e1..7d80104 100644 --- a/systems/x86_64-install-iso/minimal/default.nix +++ b/systems/x86_64-install-iso/minimal/default.nix @@ -10,7 +10,7 @@ in }; networking = { - wireless.enable = true; + wireless.enable = mkForce false; networkmanager.enable = true; }; @@ -35,16 +35,17 @@ in }; services = { - ssh.enable = true; qemuGuest.enable = true; - openssh.settings.PermitRootLogin = mkForce "yes"; + openssh = { + enable = true; + settings.PermitRootLogin = mkForce "yes"; + }; }; - system.locale.enable = true; - - user = { - name = "nixos"; + users.users.nixos = { initialPassword = "kaas"; + initialHashedPassword = mkForce null; + extraGroups = [ "networkmanager" ]; }; environment.systemPackages = with pkgs; [ From d7b3d24e19d407ee6506c2fbe5b1125449242b7e Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 22:14:54 +0200 Subject: [PATCH 37/38] update hardware conf for manwe --- systems/x86_64-linux/manwe/disks.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix index f13f845..3482cf7 100644 --- a/systems/x86_64-linux/manwe/disks.nix +++ b/systems/x86_64-linux/manwe/disks.nix @@ -5,19 +5,18 @@ in { # TODO :: Implement disko at some point - swapDevices = [ - { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } - ]; + swapDevices = []; boot.supportedFilesystems = [ "nfs" ]; fileSystems = { - "/" = { device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; + "/" = { + device = "/dev/disk/by-uuid/58272a1d-1b1d-4f42-b34a-bbc489f11022"; fsType = "ext4"; }; "/boot" = { - device = "/dev/disk/by-uuid/C842-316A"; + device = "/dev/disk/by-uuid/BC59-C3D9"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; From de913443fbc06871684204a905d3dc228e8f2550 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 22:23:05 +0200 Subject: [PATCH 38/38] I may have made a typo --- systems/x86_64-linux/manwe/disks.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix index 3482cf7..913d5d7 100644 --- a/systems/x86_64-linux/manwe/disks.nix +++ b/systems/x86_64-linux/manwe/disks.nix @@ -11,12 +11,12 @@ in fileSystems = { "/" = { - device = "/dev/disk/by-uuid/58272a1d-1b1d-4f42-b34a-bbc489f11022"; + device = "/dev/disk/by-label/NIXROOT"; fsType = "ext4"; }; "/boot" = { - device = "/dev/disk/by-uuid/BC59-C3D9"; + device = "/dev/disk/by-label/NIXBOOT"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; };