Refactoring
This commit is contained in:
222
flake.nix
222
flake.nix
@@ -58,111 +58,10 @@
|
||||
stationette = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./hardware-configuration.nix
|
||||
disko.nixosModules.disko
|
||||
impermanence.nixosModules.impermanence
|
||||
./hardware
|
||||
./system
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
# nix --extra-experimental-features "nix-command flakes" run github:nix-community/disko/latest#disko-install -- --flake ./#stationette --disk stationette --write-efi-boot-entries /dev/sda
|
||||
disko.devices = {
|
||||
disk = {
|
||||
stationette = {
|
||||
type = "disk";
|
||||
device = "/dev/sda"; # Check this with lsblk
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "fmask=0022" "dmask=0022" "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Force overwrite
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
swap.swapfile.size = "8G";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
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";
|
||||
};
|
||||
swapDevices = [ {
|
||||
device = "/.swapvol/swapfile";
|
||||
} ];
|
||||
powerManagement.enable = true;
|
||||
systemd = {
|
||||
packages = with pkgs; [
|
||||
@@ -178,95 +77,6 @@
|
||||
pathsToLink = [
|
||||
"/share/uwsm"
|
||||
];
|
||||
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"
|
||||
];
|
||||
};
|
||||
systemPackages = with pkgs; [
|
||||
# hyprland-preview-share-picker.packages.${system}.default
|
||||
swaybg
|
||||
imagemagick
|
||||
makima
|
||||
fcitx5
|
||||
pywal16
|
||||
uwsm
|
||||
v4l-utils
|
||||
brightnessctl
|
||||
satty
|
||||
hyprpaper
|
||||
libnotify
|
||||
mako
|
||||
qt6.qtwayland
|
||||
grim
|
||||
gnome-calculator
|
||||
hypridle
|
||||
hyprlock
|
||||
hyprpicker
|
||||
wlogout
|
||||
wl-clipboard
|
||||
waybar
|
||||
bat
|
||||
highlight
|
||||
btop
|
||||
eza
|
||||
fzf
|
||||
neovim
|
||||
ripgrep
|
||||
tldr
|
||||
unzip
|
||||
openssl
|
||||
wget
|
||||
zip
|
||||
zoxide
|
||||
jq
|
||||
git
|
||||
lazygit
|
||||
less
|
||||
tree
|
||||
tmux
|
||||
tmuxinator
|
||||
wget
|
||||
zenity
|
||||
gum
|
||||
pkgs-unstable.yazi
|
||||
rsync
|
||||
p7zip
|
||||
impala
|
||||
xdg-terminal-exec
|
||||
rustc
|
||||
cargo
|
||||
gcc
|
||||
rustfmt
|
||||
clippy
|
||||
];
|
||||
};
|
||||
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 ];
|
||||
};
|
||||
};
|
||||
users.users.chris = {
|
||||
uid = 1000;
|
||||
@@ -304,34 +114,6 @@
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
home-manager = {
|
||||
users.chris = { pkgs, lib, ... }: {
|
||||
|
||||
Reference in New Issue
Block a user