Refactoring

This commit is contained in:
2026-03-09 20:27:18 +00:00
parent 3c76981dc6
commit 6d89b0c685
10 changed files with 266 additions and 221 deletions

54
system/boot.nix Normal file
View File

@@ -0,0 +1,54 @@
{ impermanence, ... }:
{
boot = {
loader = {
limine = {
enable = true;
extraConfig = ''
timeout: 3
default_entry: 2
interface_branding: Station Bootloader
interface_branding_color: 2
hash_mismatch_panic: no
term_background: 1a1b26
backdrop: 1a1b26
# Tokyo Night palette
term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6
term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5
term_foreground: c0caf5
term_foreground_bright: c0caf5
term_background_bright: 24283b
'';
};
efi.canTouchEfiVariables = true;
# timeout = 0;
};
plymouth = {
enable = true;
theme = "black_hud";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override {
selected_themes = [ "black_hud" ];
})
];
};
initrd.verbose = false;
# Found by running sudo btrfs inspect-internal map-swapfile -r /.swapvol/swapfile
kernelParams = [
"resume_offset=533760"
"quiet"
"udev.log_level=3"
"systemd.show_status=auto"
"splash"
];
bootspec.enable = true;
resumeDevice = "/dev/disk/by-partlabel/disk-stationette-root";
};
}

11
system/default.nix Normal file
View File

@@ -0,0 +1,11 @@
{ ... }:
{
imports = [
./boot.nix
./impermanence.nix
./networking.nix
./packages.nix
./services.nix
]
}

22
system/impermanence.nix Normal file
View File

@@ -0,0 +1,22 @@
{ impermanence, ... }:
{
imports = [ impermanence.nixosModules.impermanence ];
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/networkmanager"
"/var/lib/nixos"
"/etc/ssh"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
files = [
"/etc/machine-id"
];
};
}

21
system/networking.nix Normal file
View File

@@ -0,0 +1,21 @@
{ ... }:
{
networking = {
hostName = "stationette";
networkmanager.enable = true;
wireless = {
iwd.enable = true;
networks = {
ssid = "Outskirt Stable";
psk = "SidonPhlegm";
};
};
firewall = {
enable = true;
# Ports used by Local Send
allowedTCPPorts = [ 53317 ];
allowedUDPPorts = [ 53317 ];
};
};
}

59
system/packages.nix Normal file
View File

@@ -0,0 +1,59 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
bat # Better cat
brightnessctl # Backlight control
btop # Resource monitor
cargo # Rust build tool
clippy # Rust linter
eza # Better ls
fcitx5 # Input method framework TODO: Figure out and configure
fzf # Fuzzy file finder
gcc # C compiler
git # Git
gnome-calculator # Calculator TODO: Find a better TUI calculator
grim # Screenshot tool TODO: Figure out and configure
gum # Terminal UI tool
highlight # Syntax highlighting tool TODO: Hook up to ZSH
hypridle # Idle daemon for Hyprland
hyprlock # Screen locker for Hyprland
hyprpaper # Wallpaper utility for Hyprland TODO: Check if necessary with swaybg
hyprpicker # Hyprland colour picker
# hyprland-preview-share-picker.packages.${system}.default # Hyprland share picker TODO: Figure out and configure
imagemagick # Image manipulation tool
impala # Wifi TUI
jq # CLI JSON processor
lazygit # Git TUI
less # Pager
libnotify # Notification daemon
makima # Key remapper for Linux TODO: Figure out and configure
mako # Notification daemon
neovim # Editor
openssl # SSL/TLS toolkit
p7zip # 7-Zip archiver
pkgs-unstable.yazi # Terminal file manager
pywal16 # Image colorscheme generator
qt6.qtwayland # qtwayland support
ripgrep # Better grep
rsync # Remote file sync
rustc # Rust compiler
rustfmt # Rust formatter
satty # Screenshot editor TODO: Figure out and configure
swaybg # Wayland wallpaper utility
tldr # Simplified man pages
tmux # Terminal multiplexer
tmuxinator # Tmux configurator
tree # Tree structure viewing Tool
unzip # Compressing tool
uwsm # Universal Wayland Session Manager
v4l-utils # Video4Linux utilities TODO: Figure out why I need this
waybar # Status bar for Hyprland
wget # Download tool
wl-clipboard # Wayland clipboard manager
wlogout # Wayland logout menu
xdg-terminal-exec # XDG terminal execution utility
zip # Archiver tool
zoxide # Better cd
];
}

31
system/services.nix Normal file
View File

@@ -0,0 +1,31 @@
{ ... }:
{
services = {
openssh.enable = true;
dbus.enable = true;
envfs.enable = true; # This ensures normal shebangs work (#!/bin/bash)
expressvpn.enable = true;
locate.enable = true;
fwupd.enable = true;
"power-profiles-daemon".enable = true;
upower = {
enable = true;
percentageLow = 20;
percentageCritical = 5;
percentageAction = 3;
criticalPowerAction = "Hibernate";
};
displayManager = {
sddm = {
enable = true;
wayland.enable = true;
theme = "maya";
};
autoLogin.enable = true;
autoLogin.user = "chris";
defaultSession = "hyprland-uwsm";
};
};
}