From c8f6c4d81883378a7c2f2d15e51a8fb5158dbcd0 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 23 Jul 2025 10:03:10 +0200 Subject: [PATCH 01/11] 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/11] 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/11] 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/11] 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/11] 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/11] 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/11] 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/11] 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/11] 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/11] 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/11] 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; }