From 56c640398bb05040c77a95c62d0471f717ac11af Mon Sep 17 00:00:00 2001 From: Porta Date: Sun, 15 Nov 2026 22:13:38 +1000 Subject: [PATCH] Massive refactor --- .gitmodules | 3 + README.md | 38 +++- flake.lock | 163 ++---------------- flake.nix | 12 +- modules/features/connectivity/kde-connect.nix | 5 +- .../features/connectivity/media-server.nix | 1 - .../features/connectivity/network-proxy.nix | 2 +- modules/features/connectivity/sync.nix | 8 +- .../features/connectivity/virtualisation.nix | 5 +- modules/features/desktop/default.nix | 6 +- modules/features/desktop/niri.nix | 17 +- modules/features/desktop/noctalia.nix | 3 - modules/features/media/cream-installer.nix | 13 +- modules/features/media/gaming.nix | 7 +- modules/features/media/multimedia.nix | 5 +- modules/features/media/music.nix | 6 - modules/features/terminal/btop.nix | 5 +- modules/features/terminal/cdevenv.nix | 5 +- modules/features/terminal/default.nix | 9 +- modules/features/terminal/fastfetch.nix | 5 +- modules/features/terminal/fish.nix | 11 +- modules/features/terminal/flatpak.nix | 6 +- modules/features/terminal/git.nix | 4 +- modules/features/terminal/go.nix | 14 +- modules/features/terminal/helix.nix | 13 +- modules/features/terminal/jetbrains.nix | 4 +- modules/features/terminal/kitty.nix | 5 +- modules/features/terminal/nixd.nix | 11 +- modules/features/terminal/rust.nix | 11 +- modules/features/terminal/yazi.nix | 5 +- modules/features/themes/almond-blossoms.nix | 112 +----------- modules/features/themes/atelier-plateau.nix | 112 +----------- modules/features/themes/autogen.nix | 113 +----------- modules/features/themes/catpuccin-mocha.nix | 112 +----------- modules/features/themes/common.nix | 91 ++++++++++ modules/features/themes/monochrome.nix | 112 +----------- modules/features/themes/tokyo-night.nix | 112 +----------- modules/system/core.nix | 15 +- modules/system/flake-parts.nix | 4 + modules/system/hosts/fractal/default.nix | 18 +- .../hosts/fractal/double-minegrub-menu.nix | 40 +++-- modules/system/hosts/hades/default.nix | 139 --------------- modules/system/hosts/hades/hardware.nix | 67 ------- modules/system/hosts/hades/zfs-support.nix | 58 ------- modules/system/hosts/usb/default.nix | 59 ------- modules/system/user-parts.nix | 31 +--- modules/system/user.nix | 8 +- vendor/minecraft-plymouth-theme | 1 + 48 files changed, 271 insertions(+), 1335 deletions(-) create mode 100644 .gitmodules create mode 100644 modules/features/themes/common.nix delete mode 100644 modules/system/hosts/hades/default.nix delete mode 100644 modules/system/hosts/hades/hardware.nix delete mode 100644 modules/system/hosts/hades/zfs-support.nix delete mode 100644 modules/system/hosts/usb/default.nix create mode 160000 vendor/minecraft-plymouth-theme diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4a92c2e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vendor/minecraft-plymouth-theme"] + path = vendor/minecraft-plymouth-theme + url = https://github.com/nikp123/minecraft-plymouth-theme diff --git a/README.md b/README.md index 983e875..a030582 100755 --- a/README.md +++ b/README.md @@ -31,9 +31,11 @@ _Declarative NixOS configuration with Flakes & Home Manager_
| **Browser** | Firefox | | **File Manager** | Yazi | | **Themeing** | Stylix | -| **Filesystem** | Ext4, Btrfs, or ZFS (host-dependent) | +| **Filesystem** | Btrfs (root), FAT32 (EFI) | -### Local machine profile: `fractal` +### Machine profile: `fractal` + +`fractal` is the only host configuration maintained in this repository. The `fractal` host targets Porta's MSI MS-7C95 desktop (AMD Ryzen 5 5500, NVIDIA GeForce RTX 5060 Ti, Intel Wireless-AC 3168 Wi-Fi/Bluetooth, and x86_64 UEFI). It enables the Niri/Noctalia desktop, terminal tools, gaming, and multimedia modules. The configured displays are HDMI-A-1 at 1920×1080/180 Hz and DP-2 at 1920×1080/60 Hz. @@ -43,6 +45,38 @@ The account is configured as `porta` and uses the local Git identity. No login p The `cream-installer` feature installs [CreamInstaller](https://github.com/Novattz/creamlinux-installer) using its upstream Nix package, pinned in `flake.lock`. It is enabled on `fractal` and applies the upstream WebKit workaround automatically when NVIDIA video drivers are configured. Add `cream-installer` to another host's module list to enable it there; run `creamlinux` or use the desktop launcher after rebuilding. +### Repository setup and Minecraft Plymouth theme + +Clone with `git clone --recurse-submodules `. For an existing +checkout, run `git submodule update --init --recursive` before evaluating or +rebuilding the configuration. + +The Minecraft Plymouth theme lives in `vendor/minecraft-plymouth-theme` as a Git +submodule of [nikp123/minecraft-plymouth-theme](https://github.com/nikp123/minecraft-plymouth-theme). +Its revision is pinned by the parent repository. The flake uses a relative path +and includes submodules automatically; this requires Nix 2.27 or newer. +`nix flake update` does not advance this submodule. To update it deliberately, +run `git submodule update --remote vendor/minecraft-plymouth-theme`, then +`nix flake lock`, review the changes, and commit the updated submodule pointer +with any lock-file changes. + +The Fractal profile imports the theme's module but currently leaves +`boot.plymouth.plymouth-minecraft-theme.enable` disabled. This cleanup preserves +that boot behavior. + +### Themes and maintenance + +Feature modules rely on the shared `core` module for Home Manager integration. + +Select a theme by changing the `self.nixosModules.theme-tokyo-night` import in +`modules/system/user.nix`. The variants in `modules/features/themes/` share +fonts, cursor, media files, and opacity through `theme-common`; wallpaper and +palette choices remain in each variant. + +Run `nix fmt` to format the configuration and +`nix eval --raw .#nixosConfigurations.fractal.config.system.build.toplevel.drvPath` +to check system evaluation before a rebuild. + ### Common Commands | Command | Description | diff --git a/flake.lock b/flake.lock index 2337c8a..c8605f6 100755 --- a/flake.lock +++ b/flake.lock @@ -158,22 +158,6 @@ "type": "github" } }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -211,24 +195,6 @@ } }, "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" - }, - "locked": { - "lastModified": 1793576659, - "narHash": "sha256-V1h85lUaJBQoHFrB2vpXZOE0Ju1MYSnIpsehoVZYlDo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "ea2630b7470978622c7689a1ff75d2b389175399", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -265,31 +231,6 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nix-gaming", - "flake-compat" - ], - "nixpkgs": [ - "nix-gaming", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1793686154, - "narHash": "sha256-Zb/0L3soxrkfcrywpfp0J++0WFLB3tzh0Xtx9up+VNc=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "204b6977e00caac19e2313015a598543ca7be150", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { @@ -309,24 +250,6 @@ "type": "gitlab" } }, - "hardware": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1794597451, - "narHash": "sha256-bUkc9dMpCFiJuuf5Efr7pnCDs5q18aA8zJah+MYZl9w=", - "owner": "nixos", - "repo": "nixos-hardware", - "rev": "eb3c90bd715f7a9a28719bb014f53d309ccb2fc8", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixos-hardware", - "type": "github" - } - }, "helix-plugins": { "inputs": { "nixpkgs": [ @@ -392,15 +315,14 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1792655490, - "narHash": "sha256-gpyx39ETju7nb+P/ySe3uCkNSJVryPM5EthwPHS66+o=", - "path": "/home/porta/Code/minecraft-plymouth-theme", + "path": "./vendor/minecraft-plymouth-theme", "type": "path" }, "original": { - "path": "/home/porta/Code/minecraft-plymouth-theme", + "path": "./vendor/minecraft-plymouth-theme", "type": "path" - } + }, + "parent": [] }, "minegrub-world-sel-theme": { "inputs": { @@ -517,29 +439,6 @@ "type": "github" } }, - "nix-gaming": { - "inputs": { - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_3", - "git-hooks": "git-hooks", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1794635160, - "narHash": "sha256-sWKsklpNQ4zh1pFd+/uKrCo1u4G6lDhmRmLRZ8p+n9g=", - "owner": "fufexan", - "repo": "nix-gaming", - "rev": "5760f2de87aa5209cf4c0d971dec9fe1c1a725a3", - "type": "github" - }, - "original": { - "owner": "fufexan", - "repo": "nix-gaming", - "type": "github" - } - }, "nixflix": { "inputs": { "mkdocs-catppuccin": "mkdocs-catppuccin", @@ -565,15 +464,18 @@ }, "nixpkgs": { "locked": { - "lastModified": 1789546076, - "narHash": "sha256-vWkSk5bbfTqdtMoSgD9FshACO8JCvXTFi+3cqEp0mH0=", - "rev": "b1b875982b17dabde9b4a37f3e229e74913e6db3", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1074753.b1b875982b17/nixexprs.tar.xz" + "lastModified": 1794386569, + "narHash": "sha256-x9sADJvoVG0L6RejZB+/BB4YiGZFBZrfTlhF4uBq1tQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d4f25a3e562008648d45bcf2d70bcc7422cad84e", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-lib": { @@ -606,21 +508,6 @@ "type": "github" } }, - "nixpkgs-lib_3": { - "locked": { - "lastModified": 1793504054, - "narHash": "sha256-ThkfL3D/FhCiZFc9+3BtxwuMmpuK+/bGtXCSo1+yVew=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "7851ba61fd862b277cb6a9cef37394bc18bb94e4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1794552581, @@ -637,22 +524,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1794386569, - "narHash": "sha256-x9sADJvoVG0L6RejZB+/BB4YiGZFBZrfTlhF4uBq1tQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "d4f25a3e562008648d45bcf2d70bcc7422cad84e", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "noctalia": { "inputs": { "nixpkgs": [ @@ -705,16 +576,14 @@ "creamlinux-installer": "creamlinux-installer", "double-minegrub-menu": "double-minegrub-menu", "flake-parts": "flake-parts", - "hardware": "hardware", "helix-plugins": "helix-plugins", "home-manager": "home-manager", "import-tree": "import-tree", "minecraft-plymouth-theme": "minecraft-plymouth-theme", "musnix": "musnix", "niri": "niri", - "nix-gaming": "nix-gaming", "nixflix": "nixflix", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "noctalia": "noctalia", "stylix": "stylix" } @@ -747,7 +616,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_3", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index d041188..b5b07f2 100755 --- a/flake.nix +++ b/flake.nix @@ -18,12 +18,12 @@ # flake inputs inputs = { + # Include the pinned Git submodule in the flake source. + self.submodules = true; # nixos core module inputs - https://wiki.nixos.org/wiki/NixOS_Wiki # nixpkgs version - https://github.com/NixOS/nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - # nix hardware - https://github.com/NixOS/nixos-hardware - hardware.url = "github:nixos/nixos-hardware"; # Minecraft-themed GRUB double-menu module double-minegrub-menu = { @@ -32,7 +32,7 @@ }; minecraft-plymouth-theme = { - url = "path:/home/porta/Code/minecraft-plymouth-theme"; + url = "path:./vendor/minecraft-plymouth-theme"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -48,12 +48,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # nice-to-haves for gaming - https://github.com/fufexan/nix-gaming - nix-gaming = { - url = "github:fufexan/nix-gaming"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - # CreamInstaller's upstream Nix package creamlinux-installer = { url = "github:Novattz/creamlinux-installer"; diff --git a/modules/features/connectivity/kde-connect.nix b/modules/features/connectivity/kde-connect.nix index 4f93a4a..85587ab 100644 --- a/modules/features/connectivity/kde-connect.nix +++ b/modules/features/connectivity/kde-connect.nix @@ -1,5 +1,5 @@ # base level inputs, should only ever be self and/or inputs -{ inputs, ... }: +{ ... }: { @@ -10,9 +10,6 @@ { - # import system level module for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # kde connect network ports networking.firewall = rec { allowedTCPPortRanges = [ diff --git a/modules/features/connectivity/media-server.nix b/modules/features/connectivity/media-server.nix index 0e5e9ac..0fb2df3 100644 --- a/modules/features/connectivity/media-server.nix +++ b/modules/features/connectivity/media-server.nix @@ -14,7 +14,6 @@ imports = [ # system level module for home manager functionality - inputs.home-manager.nixosModules.home-manager # module import for nixflix inputs.nixflix.nixosModules.default diff --git a/modules/features/connectivity/network-proxy.nix b/modules/features/connectivity/network-proxy.nix index b261af7..21af773 100644 --- a/modules/features/connectivity/network-proxy.nix +++ b/modules/features/connectivity/network-proxy.nix @@ -1,5 +1,5 @@ # base level inputs and arguments, should only ever be self and/or inputs -{ inputs, ... }: +{ ... }: { diff --git a/modules/features/connectivity/sync.nix b/modules/features/connectivity/sync.nix index 9bb6801..4f59977 100644 --- a/modules/features/connectivity/sync.nix +++ b/modules/features/connectivity/sync.nix @@ -1,5 +1,5 @@ # base level inputs and arguments, should only ever be self and/or inputs -{ inputs, ... }: +{ ... }: { @@ -12,9 +12,6 @@ # system level configuration options { - # import system level module for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # opens network ports for syncthing networking.firewall = { allowedTCPPorts = [ 8384 ]; @@ -26,8 +23,6 @@ ''; }; - - # system level syncthing options go here services.syncthing = { enable = true; @@ -47,7 +42,6 @@ # syncthing packages to include home.packages = with pkgs; [ - syncthing # syncthing package git-sync # for sync version control ]; diff --git a/modules/features/connectivity/virtualisation.nix b/modules/features/connectivity/virtualisation.nix index de931a4..0acfa43 100644 --- a/modules/features/connectivity/virtualisation.nix +++ b/modules/features/connectivity/virtualisation.nix @@ -1,5 +1,5 @@ # base level inputs and arguments, should only ever be self and/or inputs -{ inputs, ... }: +{ ... }: { @@ -10,9 +10,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # adding user to required groups users.users.${user-parts.user.username} = { extraGroups = [ diff --git a/modules/features/desktop/default.nix b/modules/features/desktop/default.nix index 9a552dd..e4f0b96 100644 --- a/modules/features/desktop/default.nix +++ b/modules/features/desktop/default.nix @@ -1,4 +1,4 @@ -{ self, inputs, ... }: +{ self, ... }: { @@ -7,7 +7,6 @@ { pkgs, - lib, user-parts, ... }: @@ -23,9 +22,6 @@ # desktop shell/status bar self.nixosModules.noctalia - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - ]; # polkit diff --git a/modules/features/desktop/niri.nix b/modules/features/desktop/niri.nix index 4171f7d..15611b1 100644 --- a/modules/features/desktop/niri.nix +++ b/modules/features/desktop/niri.nix @@ -14,8 +14,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; # for latest niri versions nixpkgs.overlays = [ inputs.niri.overlays.niri ]; # system packages for desktop environment @@ -63,10 +61,7 @@ getProportions = divisions: lib.lists.unique ( - lib.lists.flatten ( - # TODO: make this a callable function - map (x: map (y: { proportion = x / y; }) divisions) divisions - ) + lib.lists.flatten (map (x: map (y: { proportion = x / y; }) divisions) divisions) ); # then get all the unique outputs (removing double ups of 0.5 or others) columnWidths = getProportions widthDivisions; @@ -231,14 +226,6 @@ to = "#80c8ff"; }; }; - # used when increasing window size in steps - # disabled, using black magic above - #preset-column-widths = [ - #{ proportion = 0.33; } - #{ proportion = 0.5; } - #{ proportion = 0.67; } - #{ proportion = 1.0; } - #]; }; layer-rules = [ @@ -331,8 +318,6 @@ "Mod+Q".repeat = false; "Mod+O".action = toggle-overview; "Mod+O".repeat = false; - #"Mod+Tab".action = spawn "${pkgs.wofi}/bin/wofi"; - #"Mod+Tab".repeat = false; # launcher "Mod+Return".action = spawn "${pkgs.kitty}/bin/kitty"; "Mod+Return".repeat = false; # terminal # noctalia launcher diff --git a/modules/features/desktop/noctalia.nix b/modules/features/desktop/noctalia.nix index 3bf856b..21f7799 100644 --- a/modules/features/desktop/noctalia.nix +++ b/modules/features/desktop/noctalia.nix @@ -9,9 +9,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # binary cache to reduce rebuild time nix.settings = { extra-substituters = [ diff --git a/modules/features/media/cream-installer.nix b/modules/features/media/cream-installer.nix index 556467c..1b4e5d4 100644 --- a/modules/features/media/cream-installer.nix +++ b/modules/features/media/cream-installer.nix @@ -2,7 +2,12 @@ { flake.nixosModules.cream-installer = - { config, lib, pkgs, ... }: + { + config, + lib, + pkgs, + ... + }: let creamlinux = import inputs.creamlinux-installer { inherit pkgs; }; in @@ -10,9 +15,9 @@ environment.systemPackages = [ (creamlinux.overrideAttrs (old: { # Upstream's WebKit workaround is required on NVIDIA GPUs. - preFixup = (old.preFixup or "") + lib.optionalString - (builtins.elem "nvidia" config.services.xserver.videoDrivers) - '' + preFixup = + (old.preFixup or "") + + lib.optionalString (builtins.elem "nvidia" config.services.xserver.videoDrivers) '' gappsWrapperArgs+=(--set WEBKIT_DISABLE_DMABUF_RENDERER 1) ''; })) diff --git a/modules/features/media/gaming.nix b/modules/features/media/gaming.nix index 10ba80b..df89705 100644 --- a/modules/features/media/gaming.nix +++ b/modules/features/media/gaming.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -70,7 +70,6 @@ prismlauncher # modded minecraft osu-lazer-bin # rhythm is just a click away! wine - #inputs.nix-gaming.packages.${pkgs.system}.osu-mime # osu mime types ]; }; @@ -81,16 +80,12 @@ { pkgs, - lib, user-parts, ... }: { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # physical input users.users.${user-parts.user.username}.extraGroups = [ "input" ]; diff --git a/modules/features/media/multimedia.nix b/modules/features/media/multimedia.nix index 88cad91..fecd7ce 100644 --- a/modules/features/media/multimedia.nix +++ b/modules/features/media/multimedia.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,9 +9,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # networking networking.firewall = { diff --git a/modules/features/media/music.nix b/modules/features/media/music.nix index 14bf6ef..75dd08f 100644 --- a/modules/features/media/music.nix +++ b/modules/features/media/music.nix @@ -9,9 +9,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - home-manager.users.${user-parts.user.username} = { # audio effects @@ -62,9 +59,6 @@ imports = [ - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - # for realtime audio production and enhancements inputs.musnix.nixosModules.musnix diff --git a/modules/features/terminal/btop.nix b/modules/features/terminal/btop.nix index 1fa963f..6671949 100644 --- a/modules/features/terminal/btop.nix +++ b/modules/features/terminal/btop.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,9 +9,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - environment.systemPackages = with pkgs; [ btop weechat diff --git a/modules/features/terminal/cdevenv.nix b/modules/features/terminal/cdevenv.nix index b8bc9c3..82ae933 100644 --- a/modules/features/terminal/cdevenv.nix +++ b/modules/features/terminal/cdevenv.nix @@ -1,9 +1,8 @@ -{ inputs, ... }: +{ ... }: { flake.nixosModules.cdevenv = - { pkgs, user-parts, ... }: + { pkgs, ... }: { - imports = [ inputs.home-manager.nixosModules.home-manager ]; # onig_sys links against the system Oniguruma library. nixpkgs.overlays = [ diff --git a/modules/features/terminal/default.nix b/modules/features/terminal/default.nix index 827cb52..7b7093e 100644 --- a/modules/features/terminal/default.nix +++ b/modules/features/terminal/default.nix @@ -1,20 +1,17 @@ -{ self, inputs, ... }: +{ self, ... }: { # terminal supermodule flake.nixosModules.terminal = - { pkgs, ... }: + { ... }: { # list of modules to include imports = [ - # home manager - inputs.home-manager.nixosModules.home-manager - # text editor self.nixosModules.helix @@ -49,7 +46,7 @@ # to make kitty an optional include flake.nixosModules.terminal-emulator = - { pkgs, ... }: + { ... }: { diff --git a/modules/features/terminal/fastfetch.nix b/modules/features/terminal/fastfetch.nix index 6ce6a13..547c866 100644 --- a/modules/features/terminal/fastfetch.nix +++ b/modules/features/terminal/fastfetch.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,9 +9,6 @@ { - # needed for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # home manager options home-manager.users.${user-parts.user.username} = { diff --git a/modules/features/terminal/fish.nix b/modules/features/terminal/fish.nix index 922ccd3..da928ac 100644 --- a/modules/features/terminal/fish.nix +++ b/modules/features/terminal/fish.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,13 +9,8 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - - # adding shell packages to system, unsure if necessary + # Fish and Bash are installed by the system shell modules. environment.systemPackages = with pkgs; [ - fish # primary shell - bash # backup shell alacritty ]; @@ -63,8 +58,6 @@ ]; # command aliases & abbreviations - shellAbbrs = { - }; shellAliases = { rbu = "sudo systemctl reboot --firmware-setup"; }; diff --git a/modules/features/terminal/flatpak.nix b/modules/features/terminal/flatpak.nix index 92cd84b..fc749fc 100644 --- a/modules/features/terminal/flatpak.nix +++ b/modules/features/terminal/flatpak.nix @@ -1,8 +1,6 @@ -{ inputs, ... }: +{ ... }: { - flake.nixosModules.flatpak = - { pkgs, user-parts, ... }: { - imports = [ inputs.home-manager.nixosModules.home-manager ]; + flake.nixosModules.flatpak = { ... }: { services.flatpak.enable = true; }; } diff --git a/modules/features/terminal/git.nix b/modules/features/terminal/git.nix index be63976..0cfbf5a 100644 --- a/modules/features/terminal/git.nix +++ b/modules/features/terminal/git.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,8 +9,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; environment.systemPackages = [ pkgs.git-filter-repo ]; # system level git declaration diff --git a/modules/features/terminal/go.nix b/modules/features/terminal/go.nix index 90396b1..ad75ef1 100644 --- a/modules/features/terminal/go.nix +++ b/modules/features/terminal/go.nix @@ -1,9 +1,11 @@ -{ inputs, ... }: +{ ... }: { flake.nixosModules.go = - {pkgs, user-parts, ...}: - { - imports = [ inputs.home-manager.nixosModules.home-manager ]; - environment.systemPackages = with pkgs; [ go gopls ]; - }; + { pkgs, ... }: + { + environment.systemPackages = with pkgs; [ + go + gopls + ]; + }; } diff --git a/modules/features/terminal/helix.nix b/modules/features/terminal/helix.nix index 513add4..bcddb8b 100644 --- a/modules/features/terminal/helix.nix +++ b/modules/features/terminal/helix.nix @@ -14,9 +14,6 @@ { - # needed for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # editor variables environment.variables = { EDITOR = "hx"; @@ -33,8 +30,6 @@ # home manager options home-manager.users.${user-parts.user.username} = - #{ config, ... }: - { # module import for helix plugins home manager module @@ -61,10 +56,10 @@ # helix plugins plugins = with pkgs.helixPlugins; [ - smooth-scroll # allows smoother scrolling - show-keys # shows keypresses within helix - scooter # interactive find and replace - notify # notification popups for helix + smooth-scroll-hx # allows smoother scrolling + show-keys-hx # shows keypresses within helix + scooter-hx # interactive find and replace + notify-hx # notification popups for helix ]; # lsp settings diff --git a/modules/features/terminal/jetbrains.nix b/modules/features/terminal/jetbrains.nix index 7868dcc..5bc4eb7 100644 --- a/modules/features/terminal/jetbrains.nix +++ b/modules/features/terminal/jetbrains.nix @@ -1,7 +1,7 @@ -{ inputs, ... }: +{ ... }: { flake.nixosModules.jetbrains = - { pkgs, user-parts, ... }: + { pkgs, ... }: { environment.systemPackages = with pkgs; [ jetbrains-toolbox ]; }; diff --git a/modules/features/terminal/kitty.nix b/modules/features/terminal/kitty.nix index 234fdce..9efaa9b 100644 --- a/modules/features/terminal/kitty.nix +++ b/modules/features/terminal/kitty.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,9 +9,6 @@ { - # needed for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # home manager options home-manager.users.${user-parts.user.username} = { diff --git a/modules/features/terminal/nixd.nix b/modules/features/terminal/nixd.nix index 91b2f5c..bd32f45 100644 --- a/modules/features/terminal/nixd.nix +++ b/modules/features/terminal/nixd.nix @@ -1,9 +1,8 @@ -{ inputs, ... }: +{ ... }: { flake.nixosModules.nixd = - { pkgs, user-parts, ... }: + { pkgs, ... }: { - imports = [ inputs.home-manager.nixosModules.home-manager ]; # fnm's zstd-sys dependency needs pkg-config and libzstd at build time. nixpkgs.overlays = [ @@ -12,18 +11,12 @@ nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.pkg-config ]; buildInputs = (old.buildInputs or [ ]) ++ [ final.zstd ]; }); - # The forced system-library hook lacks matching inputs in this package. - # Keep upstream's bundled libraries until nixpkgs supplies those inputs. - #codex = prev.codex.overrideAttrs (old: { - # dontCargoUseSystemLibs = true; - #}); }) ]; environment.systemPackages = with pkgs; [ nixd fnm - #codex bubblewrap ]; programs.nix-ld = { diff --git a/modules/features/terminal/rust.nix b/modules/features/terminal/rust.nix index 0c04e60..3b26c89 100644 --- a/modules/features/terminal/rust.nix +++ b/modules/features/terminal/rust.nix @@ -1,9 +1,8 @@ -{ inputs, ... }: +{ ... }: { flake.nixosModules.rust = - {pkgs, user-parts, ...}: - { - imports = [ inputs.home-manager.nixosModules.home-manager ]; - environment.systemPackages = with pkgs; [ rust-analyzer ]; - }; + { pkgs, ... }: + { + environment.systemPackages = with pkgs; [ rust-analyzer ]; + }; } diff --git a/modules/features/terminal/yazi.nix b/modules/features/terminal/yazi.nix index 244276d..5cb90c0 100644 --- a/modules/features/terminal/yazi.nix +++ b/modules/features/terminal/yazi.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { @@ -9,9 +9,6 @@ { - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; - # home manager options home-manager.users.${user-parts.user.username} = { diff --git a/modules/features/themes/almond-blossoms.nix b/modules/features/themes/almond-blossoms.nix index be9939f..0bce598 100644 --- a/modules/features/themes/almond-blossoms.nix +++ b/modules/features/themes/almond-blossoms.nix @@ -1,112 +1,10 @@ -{ inputs, ... }: - +{ self, ... }: { - - # tokyo-night-dark theme flake.nixosModules.theme-almond-blossoms = + { pkgs, ... }: { - config, - lib, - pkgs, - user-parts, - ... - }: - - let - - # set wallpaper here - wallpaper = ../../../assets/media/wallpapers/almond-blossoms.jpg; - - in - - { - - imports = [ - - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - - # for stylix functionality - inputs.stylix.nixosModules.stylix - - ]; - - stylix = { - - # enables automatic themeing based on wallpaper - enable = true; - image = "${wallpaper}"; - polarity = "dark"; - base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; - - # cursor settings - cursor = { - package = with pkgs; bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 25; - }; - - # font settings - fonts = { - - # point sizes for various ui elements - sizes = { - terminal = 12; - desktop = 12; - popups = 12; - applications = 12; - }; - - # emoji font to use - emoji = { - package = with pkgs; noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - - # text fonts to use - monospace = { - package = with pkgs; spleen; - name = "Spleen 32x64"; - }; - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - - }; - }; - - home-manager.users.${user-parts.user.username} = { - - # copies avatars from flake into home - home.file."Avatars" = { - source = ../../../assets/media/avatars; - target = "/home/${user-parts.user.username}/Pictures/Avatars"; - recursive = true; - }; - - # copies wallpapers from flake into home - home.file."Wallpapers" = { - source = ../../../assets/media/wallpapers; - target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; - recursive = true; - }; - - stylix = { - - # skews theme towards dark mode - polarity = "dark"; - - # opacity settings - # 1.0 is opaque, 0.0 is transparent - opacity = { - applications = 0.8; - terminal = 0.8; - desktop = 0.9; - popups = 0.9; - }; - - }; - - }; - + imports = [ self.nixosModules.theme-common ]; + stylix.image = "${../../../assets/media/wallpapers/almond-blossoms.jpg}"; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; }; } diff --git a/modules/features/themes/atelier-plateau.nix b/modules/features/themes/atelier-plateau.nix index e0548c7..1bfff57 100644 --- a/modules/features/themes/atelier-plateau.nix +++ b/modules/features/themes/atelier-plateau.nix @@ -1,112 +1,10 @@ -{ inputs, ... }: - +{ self, ... }: { - - # atelier-plateau theme flake.nixosModules.theme-atelier-plateau = + { pkgs, ... }: { - config, - lib, - pkgs, - user-parts, - ... - }: - - let - - # set wallpaper here - wallpaper = ../../../assets/media/wallpapers/purple-waves.png; - - in - - { - - imports = [ - - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - - # for stylix functionality - inputs.stylix.nixosModules.stylix - - ]; - - stylix = { - - # enables automatic themeing based on wallpaper - enable = true; - image = "${wallpaper}"; - polarity = "dark"; - base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-plateau.yaml"; - - # cursor settings - cursor = { - package = with pkgs; bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 25; - }; - - # font settings - fonts = { - - # point sizes for various ui elements - sizes = { - terminal = 12; - desktop = 12; - popups = 12; - applications = 12; - }; - - # emoji font to use - emoji = { - package = with pkgs; noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - - # text fonts to use - monospace = { - package = with pkgs; spleen; - name = "Spleen 32x64"; - }; - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - - }; - }; - - home-manager.users.${user-parts.user.username} = { - - # copies avatars from flake into home - home.file."Avatars" = { - source = ../../../assets/media/avatars; - target = "/home/${user-parts.user.username}/Pictures/Avatars"; - recursive = true; - }; - - # copies wallpapers from flake into home - home.file."Wallpapers" = { - source = ../../../assets/media/wallpapers; - target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; - recursive = true; - }; - - stylix = { - - # skews theme towards dark mode - polarity = "dark"; - - # opacity settings - # 1.0 is opaque, 0.0 is transparent - opacity = { - applications = 0.8; - terminal = 0.8; - desktop = 0.9; - popups = 0.9; - }; - - }; - - }; - + imports = [ self.nixosModules.theme-common ]; + stylix.image = "${../../../assets/media/wallpapers/purple-waves.png}"; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-plateau.yaml"; }; } diff --git a/modules/features/themes/autogen.nix b/modules/features/themes/autogen.nix index 658e7d9..56e5949 100644 --- a/modules/features/themes/autogen.nix +++ b/modules/features/themes/autogen.nix @@ -1,114 +1,9 @@ -{ inputs, ... }: - +{ self, ... }: { - - # autogenerated theme flake.nixosModules.theme-autogen = + { ... }: { - config, - lib, - pkgs, - user-parts, - ... - }: - - let - - # set wallpaper here - wallpaper = ../../../assets/media/wallpapers/nixos.png; - - in - - { - - imports = [ - - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - - # for stylix functionality - inputs.stylix.nixosModules.stylix - - ]; - - stylix = { - - # enables automatic themeing based on wallpaper - enable = true; - image = "${wallpaper}"; - polarity = "dark"; - - # cursor settings - cursor = { - package = with pkgs; bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 25; - }; - - # font settings - fonts = { - - # point sizes for various ui elements - sizes = { - terminal = 12; - desktop = 12; - popups = 12; - applications = 12; - }; - - # emoji font to use - emoji = { - package = with pkgs; noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - - # text fonts to use - monospace = { - package = with pkgs; spleen; - name = "Spleen 32x64"; - }; - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - - }; - }; - - home-manager.users.${user-parts.user.username} = { - - # copies avatars from flake into home - home.file."Avatars" = { - source = ../../../assets/media/avatars; - target = "/home/${user-parts.user.username}/Pictures/Avatars"; - recursive = true; - }; - - # copies wallpapers from flake into home - home.file."Wallpapers" = { - source = ../../../assets/media/wallpapers; - target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; - recursive = true; - }; - - stylix = { - - # skews theme towards dark mode - polarity = "dark"; - - # opacity settings - # 1.0 is opaque, 0.0 is transparent - opacity = { - applications = 0.8; - terminal = 0.8; - desktop = 0.9; - popups = 0.9; - }; - - # application icons to use - #icons = { }; - - }; - - }; - + imports = [ self.nixosModules.theme-common ]; + stylix.image = "${../../../assets/media/wallpapers/nixos.png}"; }; } diff --git a/modules/features/themes/catpuccin-mocha.nix b/modules/features/themes/catpuccin-mocha.nix index 19c76c3..ff70707 100644 --- a/modules/features/themes/catpuccin-mocha.nix +++ b/modules/features/themes/catpuccin-mocha.nix @@ -1,112 +1,10 @@ -{ inputs, ... }: - +{ self, ... }: { - - # autogenerated theme flake.nixosModules.theme-catpuccin = + { pkgs, ... }: { - config, - lib, - pkgs, - user-parts, - ... - }: - - let - - # set wallpaper here - wallpaper = ../../../assets/media/wallpapers/leaves.png; - - in - - { - - imports = [ - - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - - # for stylix functionality - inputs.stylix.nixosModules.stylix - - ]; - - stylix = { - - # enables automatic themeing with catpuccin mocha - enable = true; - image = "${wallpaper}"; - polarity = "dark"; - base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; - - # cursor settings - cursor = { - package = with pkgs; bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 25; - }; - - # font settings - fonts = { - - # point sizes for various ui elements - sizes = { - terminal = 12; - desktop = 12; - popups = 12; - applications = 12; - }; - - # emoji font to use - emoji = { - package = with pkgs; noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - - # text fonts to use - monospace = { - package = with pkgs; spleen; - name = "Spleen 32x64"; - }; - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - - }; - }; - - home-manager.users.${user-parts.user.username} = { - - # copies avatars from flake into home - home.file."Avatars" = { - source = ../../../assets/media/avatars; - target = "/home/${user-parts.user.username}/Pictures/Avatars"; - recursive = true; - }; - - # copies wallpapers from flake into home - home.file."Wallpapers" = { - source = ../../../assets/media/wallpapers; - target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; - recursive = true; - }; - - stylix = { - - # skews theme towards dark mode - polarity = "dark"; - - # opacity settings - # 1.0 is opaque, 0.0 is transparent - opacity = { - applications = 0.8; - terminal = 0.8; - desktop = 0.9; - popups = 0.9; - }; - - }; - - }; - + imports = [ self.nixosModules.theme-common ]; + stylix.image = "${../../../assets/media/wallpapers/leaves.png}"; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; }; } diff --git a/modules/features/themes/common.nix b/modules/features/themes/common.nix new file mode 100644 index 0000000..f079917 --- /dev/null +++ b/modules/features/themes/common.nix @@ -0,0 +1,91 @@ +{ inputs, ... }: +{ + # Shared fonts, cursor, media files, and opacity for all theme variants. + flake.nixosModules.theme-common = + { + config, + pkgs, + user-parts, + ... + }: + { + imports = [ + inputs.stylix.nixosModules.stylix + ]; + stylix = { + + # enables automatic themeing based on wallpaper + enable = true; + polarity = "dark"; + + # cursor settings + cursor = { + package = with pkgs; bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 25; + }; + + # font settings + fonts = { + + # point sizes for various ui elements + sizes = { + terminal = 12; + desktop = 12; + popups = 12; + applications = 12; + }; + + # emoji font to use + emoji = { + package = with pkgs; noto-fonts-color-emoji; + name = "Noto Color Emoji"; + }; + + # text fonts to use + monospace = { + package = with pkgs; spleen; + name = "Spleen 32x64"; + }; + serif = config.stylix.fonts.monospace; + sansSerif = config.stylix.fonts.monospace; + + }; + }; + + home-manager.users.${user-parts.user.username} = { + + # copies avatars from flake into home + home.file."Avatars" = { + source = ../../../assets/media/avatars; + target = "/home/${user-parts.user.username}/Pictures/Avatars"; + recursive = true; + }; + + # copies wallpapers from flake into home + home.file."Wallpapers" = { + source = ../../../assets/media/wallpapers; + target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; + recursive = true; + }; + + stylix = { + + # skews theme towards dark mode + polarity = "dark"; + + # opacity settings + # 1.0 is opaque, 0.0 is transparent + opacity = { + applications = 0.8; + terminal = 0.8; + desktop = 0.9; + popups = 0.9; + }; + + }; + + }; + + }; +} diff --git a/modules/features/themes/monochrome.nix b/modules/features/themes/monochrome.nix index af0ed8b..035b15e 100644 --- a/modules/features/themes/monochrome.nix +++ b/modules/features/themes/monochrome.nix @@ -1,111 +1,13 @@ -{ inputs, ... }: - +{ self, ... }: { - - # monochrome theme flake.nixosModules.theme-monochrome = + { lib, user-parts, ... }: { - config, - lib, - pkgs, - user-parts, - ... - }: - - let - - # set wallpaper here - wallpaper = ../../../assets/media/wallpapers/attunement.png; - - in - - { - - imports = [ - - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - - # for stylix functionality - inputs.stylix.nixosModules.stylix - - ]; - - stylix = { - - # enables automatic themeing based on wallpaper - enable = true; - image = "${wallpaper}"; - polarity = "dark"; - - # cursor settings - cursor = { - package = with pkgs; bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 25; - }; - - # font settings - fonts = { - - # point sizes for various ui elements - sizes = { - terminal = 12; - desktop = 12; - popups = 12; - applications = 12; - }; - - # emoji font to use - emoji = { - package = with pkgs; noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - - # text fonts to use - monospace = { - package = with pkgs; spleen; - name = "Spleen 32x64"; - }; - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - - }; + imports = [ self.nixosModules.theme-common ]; + stylix.image = "${../../../assets/media/wallpapers/attunement.png}"; + home-manager.users.${user-parts.user.username}.stylix.opacity = { + applications = lib.mkForce 0.9; + terminal = lib.mkForce 0.9; }; - - home-manager.users.${user-parts.user.username} = { - - # copies avatars from flake into home - home.file."Avatars" = { - source = ../../../assets/media/avatars; - target = "/home/${user-parts.user.username}/Pictures/Avatars"; - recursive = true; - }; - - # copies wallpapers from flake into home - home.file."Wallpapers" = { - source = ../../../assets/media/wallpapers; - target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; - recursive = true; - }; - - stylix = { - - # skews theme towards dark mode - polarity = "dark"; - - # opacity settings - # 1.0 is opaque, 0.0 is transparent - opacity = { - applications = 0.9; - terminal = 0.9; - desktop = 0.9; - popups = 0.9; - }; - - }; - - }; - }; } diff --git a/modules/features/themes/tokyo-night.nix b/modules/features/themes/tokyo-night.nix index cb967be..cef0244 100644 --- a/modules/features/themes/tokyo-night.nix +++ b/modules/features/themes/tokyo-night.nix @@ -1,112 +1,10 @@ -{ inputs, ... }: - +{ self, ... }: { - - # tokyo-night-dark theme flake.nixosModules.theme-tokyo-night = + { pkgs, ... }: { - config, - lib, - pkgs, - user-parts, - ... - }: - - let - - # set wallpaper here - wallpaper = ../../../assets/media/wallpapers/mima-kirigoe.jpg; - - in - - { - - imports = [ - - # for home manager functionality - inputs.home-manager.nixosModules.home-manager - - # for stylix functionality - inputs.stylix.nixosModules.stylix - - ]; - - stylix = { - - # enables automatic themeing based on wallpaper - enable = true; - image = "${wallpaper}"; - polarity = "dark"; - base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-dark.yaml"; - - # cursor settings - cursor = { - package = with pkgs; bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 25; - }; - - # font settings - fonts = { - - # point sizes for various ui elements - sizes = { - terminal = 12; - desktop = 12; - popups = 12; - applications = 12; - }; - - # emoji font to use - emoji = { - package = with pkgs; noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - - # text fonts to use - monospace = { - package = with pkgs; spleen; - name = "Spleen 32x64"; - }; - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - - }; - }; - - home-manager.users.${user-parts.user.username} = { - - # copies avatars from flake into home - home.file."Avatars" = { - source = ../../../assets/media/avatars; - target = "/home/${user-parts.user.username}/Pictures/Avatars"; - recursive = true; - }; - - # copies wallpapers from flake into home - home.file."Wallpapers" = { - source = ../../../assets/media/wallpapers; - target = "/home/${user-parts.user.username}/Pictures/Wallpapers"; - recursive = true; - }; - - stylix = { - - # skews theme towards dark mode - polarity = "dark"; - - # opacity settings - # 1.0 is opaque, 0.0 is transparent - opacity = { - applications = 0.8; - terminal = 0.8; - desktop = 0.9; - popups = 0.9; - }; - - }; - - }; - + imports = [ self.nixosModules.theme-common ]; + stylix.image = "${../../../assets/media/wallpapers/mima-kirigoe.jpg}"; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-dark.yaml"; }; } diff --git a/modules/system/core.nix b/modules/system/core.nix index 4557a55..363504b 100644 --- a/modules/system/core.nix +++ b/modules/system/core.nix @@ -1,4 +1,4 @@ -{ self, inputs, ... }: +{ inputs, ... }: { @@ -14,7 +14,7 @@ { - # other modules to load + # Shared Home Manager integration for all feature modules. imports = [ inputs.home-manager.nixosModules.home-manager ]; # don't touch this @@ -33,7 +33,6 @@ ]; }; # kernel and boot settings for plymouth - # initrd.verbose = false; consoleLogLevel = 3; kernelParams = [ # grub kernel parameters, set to prevent excessive output on boot @@ -111,15 +110,12 @@ allowUnfree = true; allowBroken = true; }; - # nixpkgs overlays - overlays = [ ]; }; # for encryption programs.gnupg.agent = { enable = true; enableSSHSupport = false; - #pinentryPackage = [ ]; }; programs.ssh.startAgent = true; services.gnome.gcr-ssh-agent.enable = false; @@ -140,9 +136,9 @@ # tools nix-output-monitor # displays more info on nix commands steam-run # emulates fhs environment - iproute2 # ip and ss, used by HellForge's Linux launcher - util-linux # unshare, used by HellForge's Linux launcher - procps # pgrep, used by HellForge's Linux launcher + # Keep explicit entries to preserve their priority over system defaults. + util-linux # filesystem and process utilities + procps # process monitoring socat # Steam port bridge for HellForge's Linux launcher tldr # simpler manual pages bc # basic calculator @@ -161,7 +157,6 @@ file # shows file types tree # shows directory tree structure tokei # displays lines of code in repository - gnupg # encryption key management ripgrep # searches files for input git-crypt # transparent file encryption in git curl # receives data over http/s diff --git a/modules/system/flake-parts.nix b/modules/system/flake-parts.nix index b26ee39..ab4e83b 100644 --- a/modules/system/flake-parts.nix +++ b/modules/system/flake-parts.nix @@ -8,6 +8,10 @@ # uarchs to build for systems = [ "x86_64-linux" ]; + perSystem = { pkgs, ... }: { + formatter = pkgs.nixfmt-tree; + }; + }; } diff --git a/modules/system/hosts/fractal/default.nix b/modules/system/hosts/fractal/default.nix index f70d77d..799876e 100644 --- a/modules/system/hosts/fractal/default.nix +++ b/modules/system/hosts/fractal/default.nix @@ -56,30 +56,18 @@ ]; virtualisation.docker.enable = true; - users.users.porta.extraGroups = [ "docker" ]; + users.users.${user-parts.user.username}.extraGroups = [ "docker" ]; boot = { loader = { grub = { enable = true; device = "nodev"; efiSupport = true; - #double-minegrub-menu = { - # enable = true; - # main_menu_background = "random"; - # splash_text = "100% Declarative"; - # world_selection_background_scaled = "1920x1080"; - #}; }; efi.canTouchEfiVariables = true; timeout = lib.mkDefault 5; }; - # initrd.systemd.enable = true; - #plymouth.plymouth-minecraft-theme.enable = true; }; - # Minegrub supplies its own GRUB theme; don't layer Stylix's GRUB theme over it. - #stylix.targets.grub.enable = false; - # The local Minecraft theme supplies Plymouth's theme and assets. - #stylix.targets.plymouth.enable = false; hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; @@ -116,10 +104,6 @@ services.fstrim.enable = true; - nixpkgs.config = { - allowBroken = true; - allowUnfree = true; - }; # Display arrangement detected on fractal: HDMI-A-1 is primary, # with DP-2 immediately to its right. home-manager.users.${user-parts.user.username} = { diff --git a/modules/system/hosts/fractal/double-minegrub-menu.nix b/modules/system/hosts/fractal/double-minegrub-menu.nix index 4c6a314..15309b6 100644 --- a/modules/system/hosts/fractal/double-minegrub-menu.nix +++ b/modules/system/hosts/fractal/double-minegrub-menu.nix @@ -1,13 +1,17 @@ { ... }: { flake.nixosModules.double-minegrub-menu = - { config, lib, pkgs, ... }: + { + config, + lib, + pkgs, + ... + }: let cfg = config.boot.loader.grub.double-minegrub-menu; backgroundArg = - if cfg.main_menu_background == "random" then "" - else "backgrounds/${cfg.main_menu_background}"; + if cfg.main_menu_background == "random" then "" else "backgrounds/${cfg.main_menu_background}"; splashTextArg = if cfg.splash_text == "random" then "" else cfg.splash_text; minegrubTheme = pkgs.fetchFromGitHub { @@ -34,20 +38,22 @@ themeDir = "${minegrubTheme}/minegrub"; backgroundDir = "${minegrubTheme}/background_options"; - themeFiles = builtins.listToAttrs (map - (file: { - name = builtins.unsafeDiscardStringContext - ("grub/themes/minegrub" + lib.removePrefix (toString themeDir) (toString file)); + themeFiles = builtins.listToAttrs ( + map (file: { + name = builtins.unsafeDiscardStringContext ( + "grub/themes/minegrub" + lib.removePrefix (toString themeDir) (toString file) + ); value = file; - }) - (lib.filesystem.listFilesRecursive themeDir)); - backgroundFiles = builtins.listToAttrs (map - (file: { - name = builtins.unsafeDiscardStringContext - ("grub/themes/minegrub/backgrounds" + lib.removePrefix (toString backgroundDir) (toString file)); + }) (lib.filesystem.listFilesRecursive themeDir) + ); + backgroundFiles = builtins.listToAttrs ( + map (file: { + name = builtins.unsafeDiscardStringContext ( + "grub/themes/minegrub/backgrounds" + lib.removePrefix (toString backgroundDir) (toString file) + ); value = file; - }) - (lib.filesystem.listFilesRecursive backgroundDir)); + }) (lib.filesystem.listFilesRecursive backgroundDir) + ); in { options.boot.loader.grub.double-minegrub-menu = { @@ -83,7 +89,9 @@ }; extraFiles = { "grub/mainmenu.cfg" = ./mainmenu.cfg; - } // themeFiles // backgroundFiles; + } + // themeFiles + // backgroundFiles; extraConfig = '' if [ -z "$chosen" ] ; then if [ "''${config_file}" ] ; then diff --git a/modules/system/hosts/hades/default.nix b/modules/system/hosts/hades/default.nix deleted file mode 100644 index 0558c50..0000000 --- a/modules/system/hosts/hades/default.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ self, inputs, ... }: - -{ - - # defines the hades specific configuration - flake.nixosConfigurations.hades = - inputs.nixpkgs.lib.nixosSystem - - { - - # modules that comprise the host specific configuration - modules = with self.nixosModules; [ - - # user modules - serenity # user module declaration - - # shared system modules - core # shared configuration options - user-parts # user variables - - # host-specific modules - hades-configuration # host specific configuration options below - hades-hardware # hardware configuration options for host - zfs-support # zfs support module for hades specific zpool - - # feature modules - virtualisation # virtual machines - network-proxy # basic dns crypt proxy - media-server # remote mediashare configuration - kde-connect # phone <-> desktop connectivity - terminal # most terminal programs - terminal-emulator # terminal program for desktops - desktop # most desktop programs - music # music consumption - music-production # music creation - gaming # gaming modules, steam, osu, etc. - multimedia # image and video programs - virtual-reality # configuration for vr setup - - ]; - - }; - - # host module declaration - flake.nixosModules.hades-configuration = - - { - config, - pkgs, - lib, - ... - }: - - { - - # set hostname - networking.hostName = "hades"; - - # bootloader settings - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - timeout = lib.mkDefault 5; - }; - initrd.systemd.enable = true; - }; - - # cpu settings - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # gpu monitoring and control - services.lact = { - enable = true; - }; - - # gpu firmware - https://nixos.wiki/wiki/AMD_GPU - boot = { - # gpu drivers during boot and pre boot - initrd.kernelModules = [ "amdgpu" ]; - # exposes gpu drivers to system - kernelModules = [ - "amdgpu" - "kvm-amd" - ]; - }; - hardware = { - # amd discrete graphics support - graphics.enable = true; - amdgpu = { - # fixes early video issues - initrd.enable = true; - # amd sanctioned overclocking - overdrive = { - enable = true; - #ppfeaturemask = "0xfffd7fff"; # default - ppfeaturemask = "0xffffffff"; # all overdrive features - }; - }; - - # bluetooth configuration - bluetooth = { - enable = true; - powerOnBoot = true; - #input.general.UserspaceHID = true; - #settings.General.Experimental = true; - #settings.General.FastConnectable = true; - }; - }; - - # fstrim for ssd - services.fstrim.enable = true; - - # corsair mouse software - hardware.ckb-next.enable = true; - - # enable printing support - services.printing.enable = true; - - # other packages for hades hardware and peripherals - environment.systemPackages = with pkgs; [ - - # hades performance and hardware - s-tui # stress testing - undervolt # cpu tweaking - - # hades peripherals - #input-remapper # razer keypad - #razergenie # razer keypad - #openrazer-daemon # razer keypad - #openrgb-with-all-plugins # for various rgb devices - android-cli # adb for vr headset - android-tools # adb for vr headset - - ]; - - }; - -} diff --git a/modules/system/hosts/hades/hardware.nix b/modules/system/hosts/hades/hardware.nix deleted file mode 100644 index c6d6cce..0000000 --- a/modules/system/hosts/hades/hardware.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ ... }: - -{ - - # hardware module declaration - flake.nixosModules.hades-hardware = - - { - config, - pkgs, - lib, - modulesPath, - ... - }: - - { - - # important - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - # kernel modules to include - boot.initrd.availableKernelModules = [ - "ehci_pci" - "xhci_pci" - "ahci" - "nvme" - "usbhid" - "usb_storage" - "sd_mod" - ]; - - # generic kernel module options - boot = { - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-amd" ]; - extraModulePackages = [ ]; - }; - - # boot partition - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/2C83-7F40"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - # root device configuration - boot.initrd.luks.devices."luks-35440a88-293e-455b-a018-ee1086b07321".device = - "/dev/disk/by-uuid/35440a88-293e-455b-a018-ee1086b07321"; - fileSystems."/" = { - device = "/dev/mapper/luks-35440a88-293e-455b-a018-ee1086b07321"; - fsType = "ext4"; - }; - - # swap device configuration - boot.initrd.luks.devices."luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d".device = - "/dev/disk/by-uuid/55f7d546-fac9-4ea0-a21e-4c50ecc0d67d"; - swapDevices = [ - { - device = "/dev/mapper/luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d"; - } - ]; - }; - -} diff --git a/modules/system/hosts/hades/zfs-support.nix b/modules/system/hosts/hades/zfs-support.nix deleted file mode 100644 index c41ba7d..0000000 --- a/modules/system/hosts/hades/zfs-support.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ inputs, ... }: - -{ - - flake.nixosModules.zfs-support = - - { - config, - lib, - pkgs, - ... - }: - - let - - # matches kernel to latest with zfs support - # Black magic wizardry from https://wiki.nixos.org/wiki/ZFS - zfsCompatibleKernelPackages = lib.filterAttrs ( - name: kernelPackages: - (builtins.match "linux_[0-9]+_[0-9]+" name) != null - && (builtins.tryEval kernelPackages).success - && (!kernelPackages.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken) - ) pkgs.linuxKernel.packages; - latestKernelPackage = lib.last ( - lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) ( - builtins.attrValues zfsCompatibleKernelPackages - ) - ); - - in - - { - imports = [ inputs.home-manager.nixosModules.home-manager ]; - - boot = { - # sets system to use latest zfs compatible kernel - kernelPackages = lib.mkForce latestKernelPackage; - # adds zfs support at boot - supportedFilesystems = [ "zfs" ]; - # zfs boot settings - zfs = { - forceImportRoot = false; - # imports hades specific zpool - extraPools = [ "orcus" ]; - }; - }; - - # adds zfs to system packages - environment.systemPackages = with pkgs; [ zfs ]; - - # is this needed? - YES nixos yelled at me about it - networking.hostId = "603b0c8b"; - - # data integrity service - services.zfs.autoScrub.enable = true; - }; - -} diff --git a/modules/system/hosts/usb/default.nix b/modules/system/hosts/usb/default.nix deleted file mode 100644 index 9393337..0000000 --- a/modules/system/hosts/usb/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ self, inputs, ... }: - -{ - - # defines the installer specific configuration - # use the following command to build a bootable iso - # with the declared system configuration - # `$ nix run nixpkgs#nixos-generators -- --format iso --flake .#usb -o result` - flake.nixosConfigurations.usb = inputs.nixpkgs.lib.nixosSystem { - - # modules that comprise the installer specific configuration - modules = with self.nixosModules; [ - - # user modules - serenity # user module declaration - - # shared system modules - core # shared core system modules - user-parts # basic user library - - # host-specific modules - usb-configuration # defined below - - # feature modules - terminal # full featured terminal supermodule - network-proxy # basic dnscrypt proxy - - ]; - - }; - - # host module declaration - flake.nixosModules.usb-configuration = - - { pkgs, lib, ... }: - - { - - # set hostname - networking.hostName = "serenity-os"; - - # bootloader settings - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - timeout = lib.mkDefault 5; - }; - initrd.systemd.enable = true; - }; - - # extra supported filesystems at boot - boot.supportedFilesystems = [ - "ntfs" - ]; - - }; - -} diff --git a/modules/system/user-parts.nix b/modules/system/user-parts.nix index 16acd7f..b8bb8c9 100644 --- a/modules/system/user-parts.nix +++ b/modules/system/user-parts.nix @@ -45,22 +45,10 @@ default = "user"; }; - # user.avatar - avatar = lib.mkOption { - type = lib.types.str; - default = "avatar.png"; - }; - # user.home-directory home-directory = lib.mkOption { type = lib.types.str; - # defalt declared below - }; - - # user.default-locale - default-locale = lib.mkOption { - type = lib.types.str; - default = "en_US.UTF-8"; + # default declared below }; }; @@ -68,19 +56,6 @@ default = { }; }; - # user shell to use - shell = lib.mkOption { - type = lib.types.submodule { - options = { - # fish, bash, zsh, etc. - user-shell = lib.mkOption { - type = lib.types.str; - default = "pkgs.fish"; - }; - }; - }; - }; - # git config git = lib.mkOption { type = lib.types.submodule { @@ -103,8 +78,8 @@ }; config = { - # Make `nixos-variables` available as a module argument to all NixOS - # modules (home-manager modules already get it via extraSpecialArgs). + # Make `user-parts` available as a module argument to all NixOS + # modules. _module.args.user-parts = config.nixos.user-parts; # sets user.home-directory's default value based on user.username's value nixos.user-parts.user = { diff --git a/modules/system/user.nix b/modules/system/user.nix index 302d4b5..eed67bf 100644 --- a/modules/system/user.nix +++ b/modules/system/user.nix @@ -1,4 +1,4 @@ -{ self, inputs, ... }: +{ self, ... }: { @@ -7,7 +7,6 @@ { pkgs, - config, user-parts, ... }: @@ -16,9 +15,6 @@ imports = [ - # necessary for home manager function - inputs.home-manager.nixosModules.home-manager - # select user theme self.nixosModules.theme-tokyo-night @@ -31,9 +27,7 @@ nixos.user-parts = { user = { username = "porta"; - avatar = "../../assets/media/avatars/carpet.jpg"; home-directory = "/home/porta/"; - default-locale = "en_US.UTF-8"; }; git = { username = "Porta"; diff --git a/vendor/minecraft-plymouth-theme b/vendor/minecraft-plymouth-theme new file mode 160000 index 0000000..f0b471e --- /dev/null +++ b/vendor/minecraft-plymouth-theme @@ -0,0 +1 @@ +Subproject commit f0b471e0642f132f9af1e09324f8def18400f60f