Compare commits
9 Commits
4467dea9eb
...
c42a8a7fdf
Author | SHA1 | Date | |
---|---|---|---|
c42a8a7fdf | |||
823d721ac7 | |||
eda9b91af4 | |||
581a63a196 | |||
c32c800237 | |||
d3200def3b | |||
15db902e00 | |||
a9bf46a138 | |||
6bca877aee |
@@ -16,12 +16,9 @@
|
||||
networking.hostName = "hurricane";
|
||||
|
||||
# Network security specific to host
|
||||
networking.firewall.allowedTCPPorts = [];
|
||||
networking.firewall.allowedTCPPorts = [3000];
|
||||
networking.firewall.allowedUDPPorts = [];
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Intel GPU support
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
@@ -40,7 +37,11 @@
|
||||
btop
|
||||
];
|
||||
|
||||
# host-specific Systemd services
|
||||
# host-specific services
|
||||
services = {
|
||||
# Intel CPU overheating support
|
||||
thermald.enable = true;
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
@@ -13,9 +13,6 @@
|
||||
./hm/hyprpaper.nix
|
||||
];
|
||||
|
||||
# Encrypted drive
|
||||
boot.initrd.luks.devices."luks-1728f038-43a6-4e0d-b7dd-19a4c1083605".device = "/dev/disk/by-uuid/1728f038-43a6-4e0d-b7dd-19a4c1083605";
|
||||
|
||||
networking.hostName = "wildfire";
|
||||
|
||||
# AMD GPU support
|
||||
|
@@ -22,7 +22,9 @@
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-be9995ed-6b36-4f4d-a374-28a85fc50ed8".device = "/dev/disk/by-uuid/be9995ed-6b36-4f4d-a374-28a85fc50ed8";
|
||||
# Encrypted drive
|
||||
boot.initrd.luks.devices."luks-1728f038-43a6-4e0d-b7dd-19a4c1083605".device = "/dev/disk/by-uuid/1728f038-43a6-4e0d-b7dd-19a4c1083605"; # SWAP partition
|
||||
boot.initrd.luks.devices."luks-be9995ed-6b36-4f4d-a374-28a85fc50ed8".device = "/dev/disk/by-uuid/be9995ed-6b36-4f4d-a374-28a85fc50ed8"; # main partition
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B7CE-982B";
|
||||
|
@@ -5,7 +5,9 @@
|
||||
pkgs-unstable,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
colors = import ./gruvbox-theme.nix;
|
||||
in {
|
||||
imports = [
|
||||
# Import Home Manager as a NixOS module for user-specific configurations
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@@ -65,9 +67,25 @@
|
||||
# BOOT CONFIGURATION
|
||||
# ================================
|
||||
boot = {
|
||||
# Use systemd-boot (modern UEFI bootloader)
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
# Use GRUB (modern UEFI bootloader)
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
enableCryptodisk = false; # ← GRUB lives on the unencrypted ESP
|
||||
configurationLimit = 15; # Keep up to 15 generations of GRUB configuration files
|
||||
memtest86.enable = true; # Enable memtest86 for hardware testing
|
||||
|
||||
# Styling
|
||||
backgroundColor = "${colors.gruvbox.bg0}";
|
||||
#splashImage = "";
|
||||
};
|
||||
};
|
||||
# Always use the latest kernel for best hardware support
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
@@ -136,8 +154,17 @@
|
||||
|
||||
# Enable GNOME keyring for password management
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Bluetooth support
|
||||
blueman.enable = true;
|
||||
};
|
||||
|
||||
# Bluetooth support
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# power management tool which allows for managing hibernate and suspend states
|
||||
powerManagement.enable = true;
|
||||
|
||||
# ================================
|
||||
# PERMISSIONS
|
||||
# ================================
|
||||
@@ -152,8 +179,24 @@
|
||||
# Allow installation of proprietary/unfree software
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Enable modern Nix features (flakes and new CLI)
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix = {
|
||||
settings.experimental-features = ["nix-command" "flakes"]; # Enable modern Nix features (flakes and new CLI)
|
||||
|
||||
# Optimise the Nix store automatically to recover space
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = ["03:45"];
|
||||
persistent = true; # Run missed optimisations
|
||||
};
|
||||
|
||||
# Garbage collect the Nix store automatically to recover space
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 60d";
|
||||
persistent = true; # Run missed GC
|
||||
};
|
||||
};
|
||||
|
||||
# ================================
|
||||
# AUTOMATIC MAINTENANCE
|
||||
|
@@ -125,7 +125,6 @@
|
||||
|
||||
# ---- SYSTEM CONTROL ----
|
||||
pavucontrol # GUI audio mixer and control
|
||||
blueman # Bluetooth manager with system tray
|
||||
networkmanagerapplet # Network management system tray
|
||||
brightnessctl # Screen brightness control (laptops)
|
||||
|
||||
|
@@ -70,8 +70,8 @@ in {
|
||||
new_optimizations = true;
|
||||
ignore_opacity = true;
|
||||
xray = false;
|
||||
size = 2;
|
||||
passes = 5;
|
||||
size = 3;
|
||||
passes = 3;
|
||||
popups = true;
|
||||
};
|
||||
shadow = {
|
||||
|
@@ -7,8 +7,8 @@ in {
|
||||
background = {
|
||||
# Background image is set in host specific configuration
|
||||
#path = "$HOME/git/nixos/modules/hm/images/sky.png";
|
||||
blur_size = 3;
|
||||
blur_passes = 4;
|
||||
blur_size = 2;
|
||||
blur_passes = 3;
|
||||
contrast = 1;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.2;
|
||||
|
@@ -120,7 +120,7 @@
|
||||
{
|
||||
output = ["HDMI-A-1"];
|
||||
spacing = 8;
|
||||
"modules-left" = ["hyprland/workspaces" "cava" "mpris"];
|
||||
"modules-left" = ["hyprland/workspaces"];
|
||||
"modules-center" = ["hyprland/window"];
|
||||
"modules-right" = ["clock"];
|
||||
|
||||
|
@@ -52,6 +52,7 @@ in {
|
||||
nodejs_22
|
||||
pnpm
|
||||
cypress
|
||||
pgadmin4-desktopmode
|
||||
postgresql_15
|
||||
beam26Packages.erlang
|
||||
beam26Packages.erlfmt
|
||||
|
@@ -2,13 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Days of nix generations to keep
|
||||
KEEP_DAYS=60
|
||||
# extra buffer before we trigger a GC
|
||||
BUFFER_DAYS=30
|
||||
# minimum number of generations to keep
|
||||
KEEP_MIN=5
|
||||
|
||||
# Check for force flag
|
||||
FORCE_REBUILD=false
|
||||
if [[ "$1" == "-f" || "$1" == "--force" ]]; then
|
||||
@@ -67,18 +60,3 @@ current=$(nixos-rebuild list-generations | grep current)
|
||||
|
||||
# Commit all changes witih the generation metadata
|
||||
git commit -am "$NIXOS_HOST: $current"
|
||||
|
||||
# Clean up old generations if conditions are met
|
||||
gens=$(nixos-rebuild list-generations | tail -n +2)
|
||||
# If there are less than KEEP_MIN generations, exit
|
||||
(( $(wc -l <<<"$gens") <= KEEP_MIN )) && exit 0
|
||||
|
||||
# Get the oldest generation
|
||||
old=$(awk 'END{print $2" "$3}' <<<"$gens")
|
||||
# Calculate the age of the oldest generation in days
|
||||
age=$(( ( $(date +%s) - $(date -d "$old" +%s) )/86400 ))
|
||||
# If the age is greater than KEEP_DAYS+BUFFER_DAYS, delete the oldest generation
|
||||
(( age > KEEP_DAYS+BUFFER_DAYS )) || exit 0
|
||||
sudo nix-collect-garbage --delete-older-than ${KEEP_DAYS}d &>logs/nixos-gc.log || (cat logs/nixos-gc.log | grep --color error && exit 1)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user