Massive refactor

This commit is contained in:
Porta 2026-11-15 22:13:38 +10:00
parent 572ac016c4
commit 56c640398b
No known key found for this signature in database
48 changed files with 271 additions and 1335 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "vendor/minecraft-plymouth-theme"]
path = vendor/minecraft-plymouth-theme
url = https://github.com/nikp123/minecraft-plymouth-theme

View file

@ -31,9 +31,11 @@ _Declarative NixOS configuration with Flakes & Home Manager_ <br>
| **Browser** | Firefox | | **Browser** | Firefox |
| **File Manager** | Yazi | | **File Manager** | Yazi |
| **Themeing** | Stylix | | **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. 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. 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 <repository-url>`. 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 ### Common Commands
| Command | Description | | Command | Description |

163
flake.lock generated
View file

@ -158,22 +158,6 @@
"type": "github" "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": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -211,24 +195,6 @@
} }
}, },
"flake-parts_3": { "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": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"stylix", "stylix",
@ -265,31 +231,6 @@
"type": "github" "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": { "gnome-shell": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -309,24 +250,6 @@
"type": "gitlab" "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": { "helix-plugins": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -392,15 +315,14 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1792655490, "path": "./vendor/minecraft-plymouth-theme",
"narHash": "sha256-gpyx39ETju7nb+P/ySe3uCkNSJVryPM5EthwPHS66+o=",
"path": "/home/porta/Code/minecraft-plymouth-theme",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/home/porta/Code/minecraft-plymouth-theme", "path": "./vendor/minecraft-plymouth-theme",
"type": "path" "type": "path"
} },
"parent": []
}, },
"minegrub-world-sel-theme": { "minegrub-world-sel-theme": {
"inputs": { "inputs": {
@ -517,29 +439,6 @@
"type": "github" "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": { "nixflix": {
"inputs": { "inputs": {
"mkdocs-catppuccin": "mkdocs-catppuccin", "mkdocs-catppuccin": "mkdocs-catppuccin",
@ -565,15 +464,18 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1789546076, "lastModified": 1794386569,
"narHash": "sha256-vWkSk5bbfTqdtMoSgD9FshACO8JCvXTFi+3cqEp0mH0=", "narHash": "sha256-x9sADJvoVG0L6RejZB+/BB4YiGZFBZrfTlhF4uBq1tQ=",
"rev": "b1b875982b17dabde9b4a37f3e229e74913e6db3", "owner": "nixos",
"type": "tarball", "repo": "nixpkgs",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1074753.b1b875982b17/nixexprs.tar.xz" "rev": "d4f25a3e562008648d45bcf2d70bcc7422cad84e",
"type": "github"
}, },
"original": { "original": {
"type": "tarball", "owner": "nixos",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
@ -606,21 +508,6 @@
"type": "github" "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": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1794552581, "lastModified": 1794552581,
@ -637,22 +524,6 @@
"type": "github" "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": { "noctalia": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -705,16 +576,14 @@
"creamlinux-installer": "creamlinux-installer", "creamlinux-installer": "creamlinux-installer",
"double-minegrub-menu": "double-minegrub-menu", "double-minegrub-menu": "double-minegrub-menu",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"hardware": "hardware",
"helix-plugins": "helix-plugins", "helix-plugins": "helix-plugins",
"home-manager": "home-manager", "home-manager": "home-manager",
"import-tree": "import-tree", "import-tree": "import-tree",
"minecraft-plymouth-theme": "minecraft-plymouth-theme", "minecraft-plymouth-theme": "minecraft-plymouth-theme",
"musnix": "musnix", "musnix": "musnix",
"niri": "niri", "niri": "niri",
"nix-gaming": "nix-gaming",
"nixflix": "nixflix", "nixflix": "nixflix",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"noctalia": "noctalia", "noctalia": "noctalia",
"stylix": "stylix" "stylix": "stylix"
} }
@ -747,7 +616,7 @@
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_3",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"

View file

@ -18,12 +18,12 @@
# flake inputs # flake inputs
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 # nixos core module inputs - https://wiki.nixos.org/wiki/NixOS_Wiki
# nixpkgs version - https://github.com/NixOS/nixpkgs # nixpkgs version - https://github.com/NixOS/nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 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 # Minecraft-themed GRUB double-menu module
double-minegrub-menu = { double-minegrub-menu = {
@ -32,7 +32,7 @@
}; };
minecraft-plymouth-theme = { minecraft-plymouth-theme = {
url = "path:/home/porta/Code/minecraft-plymouth-theme"; url = "path:./vendor/minecraft-plymouth-theme";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -48,12 +48,6 @@
inputs.nixpkgs.follows = "nixpkgs"; 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 # CreamInstaller's upstream Nix package
creamlinux-installer = { creamlinux-installer = {
url = "github:Novattz/creamlinux-installer"; url = "github:Novattz/creamlinux-installer";

View file

@ -1,5 +1,5 @@
# base level inputs, should only ever be self and/or inputs # 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 # kde connect network ports
networking.firewall = rec { networking.firewall = rec {
allowedTCPPortRanges = [ allowedTCPPortRanges = [

View file

@ -14,7 +14,6 @@
imports = [ imports = [
# system level module for home manager functionality # system level module for home manager functionality
inputs.home-manager.nixosModules.home-manager
# module import for nixflix # module import for nixflix
inputs.nixflix.nixosModules.default inputs.nixflix.nixosModules.default

View file

@ -1,5 +1,5 @@
# base level inputs and arguments, should only ever be self and/or inputs # base level inputs and arguments, should only ever be self and/or inputs
{ inputs, ... }: { ... }:
{ {

View file

@ -1,5 +1,5 @@
# base level inputs and arguments, should only ever be self and/or inputs # base level inputs and arguments, should only ever be self and/or inputs
{ inputs, ... }: { ... }:
{ {
@ -12,9 +12,6 @@
# system level configuration options # system level configuration options
{ {
# import system level module for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# opens network ports for syncthing # opens network ports for syncthing
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 8384 ]; allowedTCPPorts = [ 8384 ];
@ -26,8 +23,6 @@
''; '';
}; };
# system level syncthing options go here # system level syncthing options go here
services.syncthing = { services.syncthing = {
enable = true; enable = true;
@ -47,7 +42,6 @@
# syncthing packages to include # syncthing packages to include
home.packages = with pkgs; [ home.packages = with pkgs; [
syncthing # syncthing package
git-sync # for sync version control git-sync # for sync version control
]; ];

View file

@ -1,5 +1,5 @@
# base level inputs and arguments, should only ever be self and/or inputs # 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 # adding user to required groups
users.users.${user-parts.user.username} = { users.users.${user-parts.user.username} = {
extraGroups = [ extraGroups = [

View file

@ -1,4 +1,4 @@
{ self, inputs, ... }: { self, ... }:
{ {
@ -7,7 +7,6 @@
{ {
pkgs, pkgs,
lib,
user-parts, user-parts,
... ...
}: }:
@ -23,9 +22,6 @@
# desktop shell/status bar # desktop shell/status bar
self.nixosModules.noctalia self.nixosModules.noctalia
# for home manager functionality
inputs.home-manager.nixosModules.home-manager
]; ];
# polkit # polkit

View file

@ -14,8 +14,6 @@
{ {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# for latest niri versions # for latest niri versions
nixpkgs.overlays = [ inputs.niri.overlays.niri ]; nixpkgs.overlays = [ inputs.niri.overlays.niri ];
# system packages for desktop environment # system packages for desktop environment
@ -63,10 +61,7 @@
getProportions = getProportions =
divisions: divisions:
lib.lists.unique ( lib.lists.unique (
lib.lists.flatten ( lib.lists.flatten (map (x: map (y: { proportion = x / y; }) divisions) divisions)
# TODO: make this a callable function
map (x: map (y: { proportion = x / y; }) divisions) divisions
)
); );
# then get all the unique outputs (removing double ups of 0.5 or others) # then get all the unique outputs (removing double ups of 0.5 or others)
columnWidths = getProportions widthDivisions; columnWidths = getProportions widthDivisions;
@ -231,14 +226,6 @@
to = "#80c8ff"; 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 = [ layer-rules = [
@ -331,8 +318,6 @@
"Mod+Q".repeat = false; "Mod+Q".repeat = false;
"Mod+O".action = toggle-overview; "Mod+O".action = toggle-overview;
"Mod+O".repeat = false; "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".action = spawn "${pkgs.kitty}/bin/kitty";
"Mod+Return".repeat = false; # terminal "Mod+Return".repeat = false; # terminal
# noctalia launcher # noctalia launcher

View file

@ -9,9 +9,6 @@
{ {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# binary cache to reduce rebuild time # binary cache to reduce rebuild time
nix.settings = { nix.settings = {
extra-substituters = [ extra-substituters = [

View file

@ -2,7 +2,12 @@
{ {
flake.nixosModules.cream-installer = flake.nixosModules.cream-installer =
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
creamlinux = import inputs.creamlinux-installer { inherit pkgs; }; creamlinux = import inputs.creamlinux-installer { inherit pkgs; };
in in
@ -10,9 +15,9 @@
environment.systemPackages = [ environment.systemPackages = [
(creamlinux.overrideAttrs (old: { (creamlinux.overrideAttrs (old: {
# Upstream's WebKit workaround is required on NVIDIA GPUs. # Upstream's WebKit workaround is required on NVIDIA GPUs.
preFixup = (old.preFixup or "") + lib.optionalString preFixup =
(builtins.elem "nvidia" config.services.xserver.videoDrivers) (old.preFixup or "")
'' + lib.optionalString (builtins.elem "nvidia" config.services.xserver.videoDrivers) ''
gappsWrapperArgs+=(--set WEBKIT_DISABLE_DMABUF_RENDERER 1) gappsWrapperArgs+=(--set WEBKIT_DISABLE_DMABUF_RENDERER 1)
''; '';
})) }))

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { ... }:
{ {
@ -70,7 +70,6 @@
prismlauncher # modded minecraft prismlauncher # modded minecraft
osu-lazer-bin # rhythm is just a click away! osu-lazer-bin # rhythm is just a click away!
wine wine
#inputs.nix-gaming.packages.${pkgs.system}.osu-mime # osu mime types
]; ];
}; };
@ -81,16 +80,12 @@
{ {
pkgs, pkgs,
lib,
user-parts, user-parts,
... ...
}: }:
{ {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# physical input # physical input
users.users.${user-parts.user.username}.extraGroups = [ "input" ]; users.users.${user-parts.user.username}.extraGroups = [ "input" ];

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { ... }:
{ {
@ -9,9 +9,6 @@
{ {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# networking # networking
networking.firewall = { networking.firewall = {

View file

@ -9,9 +9,6 @@
{ {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager.users.${user-parts.user.username} = { home-manager.users.${user-parts.user.username} = {
# audio effects # audio effects
@ -62,9 +59,6 @@
imports = [ imports = [
# for home manager functionality
inputs.home-manager.nixosModules.home-manager
# for realtime audio production and enhancements # for realtime audio production and enhancements
inputs.musnix.nixosModules.musnix inputs.musnix.nixosModules.musnix

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { ... }:
{ {
@ -9,9 +9,6 @@
{ {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
btop btop
weechat weechat

View file

@ -1,9 +1,8 @@
{ inputs, ... }: { ... }:
{ {
flake.nixosModules.cdevenv = flake.nixosModules.cdevenv =
{ pkgs, user-parts, ... }: { pkgs, ... }:
{ {
imports = [ inputs.home-manager.nixosModules.home-manager ];
# onig_sys links against the system Oniguruma library. # onig_sys links against the system Oniguruma library.
nixpkgs.overlays = [ nixpkgs.overlays = [

View file

@ -1,20 +1,17 @@
{ self, inputs, ... }: { self, ... }:
{ {
# terminal supermodule # terminal supermodule
flake.nixosModules.terminal = flake.nixosModules.terminal =
{ pkgs, ... }: { ... }:
{ {
# list of modules to include # list of modules to include
imports = [ imports = [
# home manager
inputs.home-manager.nixosModules.home-manager
# text editor # text editor
self.nixosModules.helix self.nixosModules.helix
@ -49,7 +46,7 @@
# to make kitty an optional include # to make kitty an optional include
flake.nixosModules.terminal-emulator = flake.nixosModules.terminal-emulator =
{ pkgs, ... }: { ... }:
{ {

View file

@ -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 options
home-manager.users.${user-parts.user.username} = { home-manager.users.${user-parts.user.username} = {

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { ... }:
{ {
@ -9,13 +9,8 @@
{ {
# for home manager functionality # Fish and Bash are installed by the system shell modules.
imports = [ inputs.home-manager.nixosModules.home-manager ];
# adding shell packages to system, unsure if necessary
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
fish # primary shell
bash # backup shell
alacritty alacritty
]; ];
@ -63,8 +58,6 @@
]; ];
# command aliases & abbreviations # command aliases & abbreviations
shellAbbrs = {
};
shellAliases = { shellAliases = {
rbu = "sudo systemctl reboot --firmware-setup"; rbu = "sudo systemctl reboot --firmware-setup";
}; };

View file

@ -1,8 +1,6 @@
{ inputs, ... }: { ... }:
{ {
flake.nixosModules.flatpak = flake.nixosModules.flatpak = { ... }: {
{ pkgs, user-parts, ... }: {
imports = [ inputs.home-manager.nixosModules.home-manager ];
services.flatpak.enable = true; services.flatpak.enable = true;
}; };
} }

View file

@ -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 ]; environment.systemPackages = [ pkgs.git-filter-repo ];
# system level git declaration # system level git declaration

View file

@ -1,9 +1,11 @@
{ inputs, ... }: { ... }:
{ {
flake.nixosModules.go = flake.nixosModules.go =
{pkgs, user-parts, ...}: { pkgs, ... }:
{ {
imports = [ inputs.home-manager.nixosModules.home-manager ]; environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [ go gopls ]; go
}; gopls
];
};
} }

View file

@ -14,9 +14,6 @@
{ {
# needed for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# editor variables # editor variables
environment.variables = { environment.variables = {
EDITOR = "hx"; EDITOR = "hx";
@ -33,8 +30,6 @@
# home manager options # home manager options
home-manager.users.${user-parts.user.username} = home-manager.users.${user-parts.user.username} =
#{ config, ... }:
{ {
# module import for helix plugins home manager module # module import for helix plugins home manager module
@ -61,10 +56,10 @@
# helix plugins # helix plugins
plugins = with pkgs.helixPlugins; [ plugins = with pkgs.helixPlugins; [
smooth-scroll # allows smoother scrolling smooth-scroll-hx # allows smoother scrolling
show-keys # shows keypresses within helix show-keys-hx # shows keypresses within helix
scooter # interactive find and replace scooter-hx # interactive find and replace
notify # notification popups for helix notify-hx # notification popups for helix
]; ];
# lsp settings # lsp settings

View file

@ -1,7 +1,7 @@
{ inputs, ... }: { ... }:
{ {
flake.nixosModules.jetbrains = flake.nixosModules.jetbrains =
{ pkgs, user-parts, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ jetbrains-toolbox ]; environment.systemPackages = with pkgs; [ jetbrains-toolbox ];
}; };

View file

@ -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 options
home-manager.users.${user-parts.user.username} = { home-manager.users.${user-parts.user.username} = {

View file

@ -1,9 +1,8 @@
{ inputs, ... }: { ... }:
{ {
flake.nixosModules.nixd = 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. # fnm's zstd-sys dependency needs pkg-config and libzstd at build time.
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -12,18 +11,12 @@
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.pkg-config ]; nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.pkg-config ];
buildInputs = (old.buildInputs or [ ]) ++ [ final.zstd ]; 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; [ environment.systemPackages = with pkgs; [
nixd nixd
fnm fnm
#codex
bubblewrap bubblewrap
]; ];
programs.nix-ld = { programs.nix-ld = {

View file

@ -1,9 +1,8 @@
{ inputs, ... }: { ... }:
{ {
flake.nixosModules.rust = flake.nixosModules.rust =
{pkgs, user-parts, ...}: { pkgs, ... }:
{ {
imports = [ inputs.home-manager.nixosModules.home-manager ]; environment.systemPackages = with pkgs; [ rust-analyzer ];
environment.systemPackages = with pkgs; [ rust-analyzer ]; };
};
} }

View file

@ -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 options
home-manager.users.${user-parts.user.username} = { home-manager.users.${user-parts.user.username} = {

View file

@ -1,112 +1,10 @@
{ inputs, ... }: { self, ... }:
{ {
# tokyo-night-dark theme
flake.nixosModules.theme-almond-blossoms = flake.nixosModules.theme-almond-blossoms =
{ pkgs, ... }:
{ {
config, imports = [ self.nixosModules.theme-common ];
lib, stylix.image = "${../../../assets/media/wallpapers/almond-blossoms.jpg}";
pkgs, stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
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;
};
};
};
}; };
} }

View file

@ -1,112 +1,10 @@
{ inputs, ... }: { self, ... }:
{ {
# atelier-plateau theme
flake.nixosModules.theme-atelier-plateau = flake.nixosModules.theme-atelier-plateau =
{ pkgs, ... }:
{ {
config, imports = [ self.nixosModules.theme-common ];
lib, stylix.image = "${../../../assets/media/wallpapers/purple-waves.png}";
pkgs, stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-plateau.yaml";
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;
};
};
};
}; };
} }

View file

@ -1,114 +1,9 @@
{ inputs, ... }: { self, ... }:
{ {
# autogenerated theme
flake.nixosModules.theme-autogen = flake.nixosModules.theme-autogen =
{ ... }:
{ {
config, imports = [ self.nixosModules.theme-common ];
lib, stylix.image = "${../../../assets/media/wallpapers/nixos.png}";
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 = { };
};
};
}; };
} }

View file

@ -1,112 +1,10 @@
{ inputs, ... }: { self, ... }:
{ {
# autogenerated theme
flake.nixosModules.theme-catpuccin = flake.nixosModules.theme-catpuccin =
{ pkgs, ... }:
{ {
config, imports = [ self.nixosModules.theme-common ];
lib, stylix.image = "${../../../assets/media/wallpapers/leaves.png}";
pkgs, stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
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;
};
};
};
}; };
} }

View file

@ -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;
};
};
};
};
}

View file

@ -1,111 +1,13 @@
{ inputs, ... }: { self, ... }:
{ {
# monochrome theme
flake.nixosModules.theme-monochrome = flake.nixosModules.theme-monochrome =
{ lib, user-parts, ... }:
{ {
config, imports = [ self.nixosModules.theme-common ];
lib, stylix.image = "${../../../assets/media/wallpapers/attunement.png}";
pkgs, home-manager.users.${user-parts.user.username}.stylix.opacity = {
user-parts, applications = lib.mkForce 0.9;
... terminal = lib.mkForce 0.9;
}:
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;
};
}; };
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;
};
};
};
}; };
} }

View file

@ -1,112 +1,10 @@
{ inputs, ... }: { self, ... }:
{ {
# tokyo-night-dark theme
flake.nixosModules.theme-tokyo-night = flake.nixosModules.theme-tokyo-night =
{ pkgs, ... }:
{ {
config, imports = [ self.nixosModules.theme-common ];
lib, stylix.image = "${../../../assets/media/wallpapers/mima-kirigoe.jpg}";
pkgs, stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-dark.yaml";
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;
};
};
};
}; };
} }

View file

@ -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 ]; imports = [ inputs.home-manager.nixosModules.home-manager ];
# don't touch this # don't touch this
@ -33,7 +33,6 @@
]; ];
}; };
# kernel and boot settings for plymouth # kernel and boot settings for plymouth
# initrd.verbose = false;
consoleLogLevel = 3; consoleLogLevel = 3;
kernelParams = [ kernelParams = [
# grub kernel parameters, set to prevent excessive output on boot # grub kernel parameters, set to prevent excessive output on boot
@ -111,15 +110,12 @@
allowUnfree = true; allowUnfree = true;
allowBroken = true; allowBroken = true;
}; };
# nixpkgs overlays
overlays = [ ];
}; };
# for encryption # for encryption
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = false; enableSSHSupport = false;
#pinentryPackage = [ ];
}; };
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
services.gnome.gcr-ssh-agent.enable = false; services.gnome.gcr-ssh-agent.enable = false;
@ -140,9 +136,9 @@
# tools # tools
nix-output-monitor # displays more info on nix commands nix-output-monitor # displays more info on nix commands
steam-run # emulates fhs environment steam-run # emulates fhs environment
iproute2 # ip and ss, used by HellForge's Linux launcher # Keep explicit entries to preserve their priority over system defaults.
util-linux # unshare, used by HellForge's Linux launcher util-linux # filesystem and process utilities
procps # pgrep, used by HellForge's Linux launcher procps # process monitoring
socat # Steam port bridge for HellForge's Linux launcher socat # Steam port bridge for HellForge's Linux launcher
tldr # simpler manual pages tldr # simpler manual pages
bc # basic calculator bc # basic calculator
@ -161,7 +157,6 @@
file # shows file types file # shows file types
tree # shows directory tree structure tree # shows directory tree structure
tokei # displays lines of code in repository tokei # displays lines of code in repository
gnupg # encryption key management
ripgrep # searches files for input ripgrep # searches files for input
git-crypt # transparent file encryption in git git-crypt # transparent file encryption in git
curl # receives data over http/s curl # receives data over http/s

View file

@ -8,6 +8,10 @@
# uarchs to build for # uarchs to build for
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
perSystem = { pkgs, ... }: {
formatter = pkgs.nixfmt-tree;
};
}; };
} }

View file

@ -56,30 +56,18 @@
]; ];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
users.users.porta.extraGroups = [ "docker" ]; users.users.${user-parts.user.username}.extraGroups = [ "docker" ];
boot = { boot = {
loader = { loader = {
grub = { grub = {
enable = true; enable = true;
device = "nodev"; device = "nodev";
efiSupport = true; efiSupport = true;
#double-minegrub-menu = {
# enable = true;
# main_menu_background = "random";
# splash_text = "100% Declarative";
# world_selection_background_scaled = "1920x1080";
#};
}; };
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
timeout = lib.mkDefault 5; 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.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
@ -116,10 +104,6 @@
services.fstrim.enable = true; services.fstrim.enable = true;
nixpkgs.config = {
allowBroken = true;
allowUnfree = true;
};
# Display arrangement detected on fractal: HDMI-A-1 is primary, # Display arrangement detected on fractal: HDMI-A-1 is primary,
# with DP-2 immediately to its right. # with DP-2 immediately to its right.
home-manager.users.${user-parts.user.username} = { home-manager.users.${user-parts.user.username} = {

View file

@ -1,13 +1,17 @@
{ ... }: { ... }:
{ {
flake.nixosModules.double-minegrub-menu = flake.nixosModules.double-minegrub-menu =
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.boot.loader.grub.double-minegrub-menu; cfg = config.boot.loader.grub.double-minegrub-menu;
backgroundArg = backgroundArg =
if cfg.main_menu_background == "random" then "" if cfg.main_menu_background == "random" then "" else "backgrounds/${cfg.main_menu_background}";
else "backgrounds/${cfg.main_menu_background}";
splashTextArg = if cfg.splash_text == "random" then "" else cfg.splash_text; splashTextArg = if cfg.splash_text == "random" then "" else cfg.splash_text;
minegrubTheme = pkgs.fetchFromGitHub { minegrubTheme = pkgs.fetchFromGitHub {
@ -34,20 +38,22 @@
themeDir = "${minegrubTheme}/minegrub"; themeDir = "${minegrubTheme}/minegrub";
backgroundDir = "${minegrubTheme}/background_options"; backgroundDir = "${minegrubTheme}/background_options";
themeFiles = builtins.listToAttrs (map themeFiles = builtins.listToAttrs (
(file: { map (file: {
name = builtins.unsafeDiscardStringContext name = builtins.unsafeDiscardStringContext (
("grub/themes/minegrub" + lib.removePrefix (toString themeDir) (toString file)); "grub/themes/minegrub" + lib.removePrefix (toString themeDir) (toString file)
);
value = file; value = file;
}) }) (lib.filesystem.listFilesRecursive themeDir)
(lib.filesystem.listFilesRecursive themeDir)); );
backgroundFiles = builtins.listToAttrs (map backgroundFiles = builtins.listToAttrs (
(file: { map (file: {
name = builtins.unsafeDiscardStringContext name = builtins.unsafeDiscardStringContext (
("grub/themes/minegrub/backgrounds" + lib.removePrefix (toString backgroundDir) (toString file)); "grub/themes/minegrub/backgrounds" + lib.removePrefix (toString backgroundDir) (toString file)
);
value = file; value = file;
}) }) (lib.filesystem.listFilesRecursive backgroundDir)
(lib.filesystem.listFilesRecursive backgroundDir)); );
in in
{ {
options.boot.loader.grub.double-minegrub-menu = { options.boot.loader.grub.double-minegrub-menu = {
@ -83,7 +89,9 @@
}; };
extraFiles = { extraFiles = {
"grub/mainmenu.cfg" = ./mainmenu.cfg; "grub/mainmenu.cfg" = ./mainmenu.cfg;
} // themeFiles // backgroundFiles; }
// themeFiles
// backgroundFiles;
extraConfig = '' extraConfig = ''
if [ -z "$chosen" ] ; then if [ -z "$chosen" ] ; then
if [ "''${config_file}" ] ; then if [ "''${config_file}" ] ; then

View file

@ -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
];
};
}

View file

@ -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";
}
];
};
}

View file

@ -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;
};
}

View file

@ -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"
];
};
}

View file

@ -45,22 +45,10 @@
default = "user"; default = "user";
}; };
# user.avatar
avatar = lib.mkOption {
type = lib.types.str;
default = "avatar.png";
};
# user.home-directory # user.home-directory
home-directory = lib.mkOption { home-directory = lib.mkOption {
type = lib.types.str; type = lib.types.str;
# defalt declared below # default declared below
};
# user.default-locale
default-locale = lib.mkOption {
type = lib.types.str;
default = "en_US.UTF-8";
}; };
}; };
@ -68,19 +56,6 @@
default = { }; 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 config
git = lib.mkOption { git = lib.mkOption {
type = lib.types.submodule { type = lib.types.submodule {
@ -103,8 +78,8 @@
}; };
config = { config = {
# Make `nixos-variables` available as a module argument to all NixOS # Make `user-parts` available as a module argument to all NixOS
# modules (home-manager modules already get it via extraSpecialArgs). # modules.
_module.args.user-parts = config.nixos.user-parts; _module.args.user-parts = config.nixos.user-parts;
# sets user.home-directory's default value based on user.username's value # sets user.home-directory's default value based on user.username's value
nixos.user-parts.user = { nixos.user-parts.user = {

View file

@ -1,4 +1,4 @@
{ self, inputs, ... }: { self, ... }:
{ {
@ -7,7 +7,6 @@
{ {
pkgs, pkgs,
config,
user-parts, user-parts,
... ...
}: }:
@ -16,9 +15,6 @@
imports = [ imports = [
# necessary for home manager function
inputs.home-manager.nixosModules.home-manager
# select user theme # select user theme
self.nixosModules.theme-tokyo-night self.nixosModules.theme-tokyo-night
@ -31,9 +27,7 @@
nixos.user-parts = { nixos.user-parts = {
user = { user = {
username = "porta"; username = "porta";
avatar = "../../assets/media/avatars/carpet.jpg";
home-directory = "/home/porta/"; home-directory = "/home/porta/";
default-locale = "en_US.UTF-8";
}; };
git = { git = {
username = "Porta"; username = "Porta";

1
vendor/minecraft-plymouth-theme vendored Submodule

@ -0,0 +1 @@
Subproject commit f0b471e0642f132f9af1e09324f8def18400f60f