Some general cleanup

This commit is contained in:
2025-11-03 14:44:57 +01:00
parent a24a8ac966
commit 7f037522dc
4 changed files with 165 additions and 138 deletions

30
flake.lock generated
View File

@@ -9,11 +9,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1761827347, "lastModified": 1762142233,
"narHash": "sha256-tIrTFSntAyXVrQE9GnauXzQxEZJCZA9TEp4jAENsgwA=", "narHash": "sha256-iaCwRAWud6hcy6piBAiU9t8swmyAGVmucHnTjcPe6IM=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "0c234b99a8606b482d6644e1f2d26d41985fb85c", "rev": "3a26d7cf3b5d8083fc7c406e8aed4251e364c48f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -45,11 +45,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761770832, "lastModified": 1761878381,
"narHash": "sha256-IQIWG6kHxnUpx5KEb9r0BROL3/R6UQ/30aO2oHncBA8=", "narHash": "sha256-lCRaipHgszaFZ1Cs8fdGJguVycCisBAf2HEFgip5+xU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "124b99dbd1594dbebdd575ac7142752ee96a98a0", "rev": "4ac96eb21c101a3e5b77ba105febc5641a8959aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -120,11 +120,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1761672384, "lastModified": 1761907660,
"narHash": "sha256-o9KF3DJL7g7iYMZq9SWgfS1BFlNbsm6xplRjVlOCkXI=", "narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "08dacfca559e1d7da38f3cf05f1f45ee9bfd213c", "rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -136,11 +136,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1761907660, "lastModified": 1762168314,
"narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", "narHash": "sha256-+DX6mIF47gRGoK0mqkTg1Jmcjcup0CAXJFHVkdUx8YA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", "rev": "94fc102d2c15d9c1a861e59de550807c65358e1b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -165,11 +165,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761758177, "lastModified": 1761964689,
"narHash": "sha256-MsVJG2gQTm6n2jIGu2KDT87AMeMx1GExOaEQqNkQKVE=", "narHash": "sha256-Zo3LQQDz+64EQ9zor/WmeNTFLoZkjmhp0UY3G0D3seE=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "37f8f092415b444c3bed6eda6bcbee51cee22e5d", "rev": "63d22578600f70d293aede6bc737efef60ebd97f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -1,83 +1,139 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"uas"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd"; device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=@nix" "subvol=@nix"
"ssd" "ssd"
"space_cache=v2" "space_cache=v2"
"noatime" "noatime"
"compress=zstd" "compress=zstd:5"
"autodefrag"
]; ];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd"; device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=@home" "subvol=@home"
"ssd" "ssd"
"space_cache=v2" "space_cache=v2"
"noatime" "noatime"
"compress=zstd" "compress=zstd:5"
"autodefrag"
]; ];
}; };
fileSystems."/nix" = fileSystems."/nix" = {
{ device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd"; device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=@nix_nix" "subvol=@nix_nix"
"ssd" "ssd"
"space_cache=v2" "space_cache=v2"
"noatime" "noatime"
"compress=zstd" "compress=zstd:10"
"autodefrag"
]; ];
}; };
fileSystems."/var" = fileSystems."/var" = {
{ device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd"; device = "/dev/disk/by-uuid/688ed267-cec9-400a-9226-32b0538eaecd";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=@nix_var" "subvol=@nix_var"
"ssd" "ssd"
"space_cache=v2" "space_cache=v2"
"noatime" "noatime"
"compress=zstd" "compress=zstd:7"
"autodefrag"
]; ];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/3DB5-50DE"; device = "/dev/disk/by-uuid/3DB5-50DE";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
fileSystems."/media/data" = fileSystems."/media/data" = {
{ device = "/dev/disk/by-uuid/4c0c8b24-6fca-49c1-8e34-e00e240576e3"; device = "/dev/disk/by-uuid/4c0c8b24-6fca-49c1-8e34-e00e240576e3";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=Data" ]; options = [
"subvol=Data"
"space_cache=v2"
"compress=zstd:5"
"noatime"
"autodefrag"
];
}; };
fileSystems."/media/games" = fileSystems."/media/games" = {
{ device = "/dev/disk/by-uuid/4c0c8b24-6fca-49c1-8e34-e00e240576e3"; device = "/dev/disk/by-uuid/4c0c8b24-6fca-49c1-8e34-e00e240576e3";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=Games" ]; options = [
"subvol=Games"
"space_cache=v2"
"compress=zstd:5"
"noatime"
"autodefrag"
];
};
fileSystems."/media/home-backup" = {
device = "/dev/disk/by-uuid/4c0c8b24-6fca-49c1-8e34-e00e240576e3";
fsType = "btrfs";
options = [
"subvol=home-backup"
"space_cache=v2"
"compress=zstd:10"
"noatime"
"autodefrag"
];
};
fileSystems."/media/pipa" = {
device = "/dev/disk/by-uuid/0013f713-acf4-496b-b43f-25258283b884";
fsType = "f2fs";
options = [
"compress_algorithm=zstd:6"
"compress_chksum"
"atgc"
"gc_merge"
"lazytime"
];
}; };
swapDevices = [ ]; swapDevices = [ ];

View File

@@ -14,14 +14,17 @@
numlock-state = true; numlock-state = true;
remember-numlock-state = true; remember-numlock-state = true;
}; };
"org/gnome/desktop/peripherals/mouse" = { "org/gnome/desktop/peripherals/mouse" = {
speed-profile = "flat"; speed-profile = "flat";
speed = -0.5; speed = -0.5;
}; };
"org/gnome/desktop/peripherals/touchpad" = { "org/gnome/desktop/peripherals/touchpad" = {
speed-profile = "flat"; speed-profile = "flat";
speed = -0.5; speed = -0.5;
}; };
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
color-scheme = "prefer-dark"; color-scheme = "prefer-dark";
gtk-theme = "Flat-Remix-GTK-Red-Darkest"; gtk-theme = "Flat-Remix-GTK-Red-Darkest";
@@ -29,21 +32,25 @@
cursor-theme = "Bibata-Modern-Classic"; cursor-theme = "Bibata-Modern-Classic";
clock-format = "24h"; clock-format = "24h";
}; };
"org/gnome/shell/portal" = { "org/gnome/shell/portal" = {
color-scheme = "prefer-dark"; color-scheme = "prefer-dark";
}; };
}; };
} }
]; ];
adb.enable = true; adb.enable = true;
bat.enable = true; bat.enable = true;
zsh.enable = true; zsh.enable = true;
gamemode.enable = true; gamemode.enable = true;
firefox.enable = true; firefox.enable = true;
git = { git = {
enable = true; enable = true;
lfs.enable = true; lfs.enable = true;
}; };
nh = { nh = {
clean = { clean = {
enable = true; enable = true;
@@ -52,6 +59,7 @@
enable = true; enable = true;
flake = "/etc/nixos"; flake = "/etc/nixos";
}; };
nix-ld = { nix-ld = {
enable = true; enable = true;
libraries = with pkgs; [ ]; libraries = with pkgs; [ ];
@@ -64,6 +72,7 @@
# wlrobs # wlrobs
# ]; # ];
# }; # };
steam = { steam = {
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
enable = true; enable = true;

View File

@@ -6,7 +6,6 @@
}: }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
zram-generator zram-generator
]; ];
@@ -14,6 +13,7 @@
services = { services = {
lact.enable = true; lact.enable = true;
printing.enable = true; printing.enable = true;
flatpak = { flatpak = {
enable = true; enable = true;
remotes = [ remotes = [
@@ -39,10 +39,6 @@
appId = "org.gtk.Gtk3theme.Adwaita-dark"; appId = "org.gtk.Gtk3theme.Adwaita-dark";
origin = "flathub"; origin = "flathub";
} }
# {
# appId = "org.freedesktop.Platform.ffmpeg-full";
# origin = "flathub";
# }
{ {
appId = "org.gtk.Gtk3theme.Flat-Remix-GTK-Red-Darkest"; appId = "org.gtk.Gtk3theme.Flat-Remix-GTK-Red-Darkest";
origin = "flathub"; origin = "flathub";
@@ -51,23 +47,13 @@
appId = "com.github.iwalton3.jellyfin-media-player"; appId = "com.github.iwalton3.jellyfin-media-player";
origin = "flathub"; origin = "flathub";
} }
# {
# appId = "com.github.tchx84.Flatseal";
# origin = "flathub";
# }
# {
# appId = "com.github.tchx84.Flatseal";
# origin = "flathub";
# }
# {
# appId = "com.github.tchx84.Flatseal";
# origin = "flathub";
# }
]; ];
}; };
sshd.enable = true; sshd.enable = true;
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
xserver = { xserver = {
enable = true; enable = true;
excludePackages = with pkgs; [ excludePackages = with pkgs; [
@@ -78,6 +64,7 @@
variant = ""; variant = "";
}; };
}; };
pulseaudio.enable = false; pulseaudio.enable = false;
pipewire = { pipewire = {
enable = true; enable = true;
@@ -91,13 +78,16 @@
# no need to redefine it in your config for now) # no need to redefine it in your config for now)
#media-session.enable = true; #media-session.enable = true;
}; };
hardware.openrgb.motherboard = "amd"; hardware.openrgb.motherboard = "amd";
hardware.openrgb.enable = true; hardware.openrgb.enable = true;
journald.extraConfig = '' journald.extraConfig = ''
SystemMaxUse=2G SystemMaxUse=2G
RuntimeMaxUse=1G RuntimeMaxUse=1G
SystemMaxFiles=100 SystemMaxFiles=100
''; '';
zram-generator = { zram-generator = {
enable = true; enable = true;
settings = { settings = {
@@ -107,50 +97,21 @@
}; };
}; };
}; };
btrfs = {
autoScrub = {
enable = true;
interval = "monthly";
}; };
};
fstrim = {
enable = true;
interval = "weekly";
};
};
systemd = { systemd = {
services."fstrim-all" = {
description = "Run fstrim on all mounted filesystems";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.util-linux}/bin/fstrim -av";
};
};
timers."fstrim-all" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "weekly";
Persistent = true;
};
};
services."btrfs-scrub-root" = {
description = "Run btrfs scrub on / (monthly)";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.btrfs-progs}/bin/btrfs scrub start -B -R /";
};
};
timers."btrfs-scrub-root" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "monthly";
Persistent = true;
};
};
services."btrfs-scrub-home" = {
description = "Run btrfs scrub on /home (monthly)";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.btrfs-progs}/bin/btrfs scrub start -B -R /home";
};
};
timers."btrfs-scrub-home" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "monthly";
Persistent = true;
};
};
services."nix-prune-generations" = { services."nix-prune-generations" = {
description = "Keep only 5 system generations and run nix-collect-garbage"; description = "Keep only 5 system generations and run nix-collect-garbage";
serviceConfig = { serviceConfig = {
@@ -162,6 +123,7 @@
Nice = "10"; Nice = "10";
}; };
}; };
timers."nix-prune-generations" = { timers."nix-prune-generations" = {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {