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";
|
networking.hostName = "hurricane";
|
||||||
|
|
||||||
# Network security specific to host
|
# Network security specific to host
|
||||||
networking.firewall.allowedTCPPorts = [];
|
networking.firewall.allowedTCPPorts = [3000];
|
||||||
networking.firewall.allowedUDPPorts = [];
|
networking.firewall.allowedUDPPorts = [];
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Intel GPU support
|
# Intel GPU support
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -40,7 +37,11 @@
|
|||||||
btop
|
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
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
@@ -13,9 +13,6 @@
|
|||||||
./hm/hyprpaper.nix
|
./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";
|
networking.hostName = "wildfire";
|
||||||
|
|
||||||
# AMD GPU support
|
# AMD GPU support
|
||||||
|
@@ -22,7 +22,9 @@
|
|||||||
fsType = "ext4";
|
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" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/B7CE-982B";
|
device = "/dev/disk/by-uuid/B7CE-982B";
|
||||||
|
@@ -5,7 +5,9 @@
|
|||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
colors = import ./gruvbox-theme.nix;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
# Import Home Manager as a NixOS module for user-specific configurations
|
# Import Home Manager as a NixOS module for user-specific configurations
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
@@ -65,9 +67,25 @@
|
|||||||
# BOOT CONFIGURATION
|
# BOOT CONFIGURATION
|
||||||
# ================================
|
# ================================
|
||||||
boot = {
|
boot = {
|
||||||
# Use systemd-boot (modern UEFI bootloader)
|
loader = {
|
||||||
loader.systemd-boot.enable = true;
|
efi = {
|
||||||
loader.efi.canTouchEfiVariables = true;
|
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
|
# Always use the latest kernel for best hardware support
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
};
|
};
|
||||||
@@ -136,8 +154,17 @@
|
|||||||
|
|
||||||
# Enable GNOME keyring for password management
|
# Enable GNOME keyring for password management
|
||||||
gnome.gnome-keyring.enable = true;
|
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
|
# PERMISSIONS
|
||||||
# ================================
|
# ================================
|
||||||
@@ -152,8 +179,24 @@
|
|||||||
# Allow installation of proprietary/unfree software
|
# Allow installation of proprietary/unfree software
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Enable modern Nix features (flakes and new CLI)
|
nix = {
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
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
|
# AUTOMATIC MAINTENANCE
|
||||||
|
@@ -125,7 +125,6 @@
|
|||||||
|
|
||||||
# ---- SYSTEM CONTROL ----
|
# ---- SYSTEM CONTROL ----
|
||||||
pavucontrol # GUI audio mixer and control
|
pavucontrol # GUI audio mixer and control
|
||||||
blueman # Bluetooth manager with system tray
|
|
||||||
networkmanagerapplet # Network management system tray
|
networkmanagerapplet # Network management system tray
|
||||||
brightnessctl # Screen brightness control (laptops)
|
brightnessctl # Screen brightness control (laptops)
|
||||||
|
|
||||||
|
@@ -70,8 +70,8 @@ in {
|
|||||||
new_optimizations = true;
|
new_optimizations = true;
|
||||||
ignore_opacity = true;
|
ignore_opacity = true;
|
||||||
xray = false;
|
xray = false;
|
||||||
size = 2;
|
size = 3;
|
||||||
passes = 5;
|
passes = 3;
|
||||||
popups = true;
|
popups = true;
|
||||||
};
|
};
|
||||||
shadow = {
|
shadow = {
|
||||||
|
@@ -7,8 +7,8 @@ in {
|
|||||||
background = {
|
background = {
|
||||||
# Background image is set in host specific configuration
|
# Background image is set in host specific configuration
|
||||||
#path = "$HOME/git/nixos/modules/hm/images/sky.png";
|
#path = "$HOME/git/nixos/modules/hm/images/sky.png";
|
||||||
blur_size = 3;
|
blur_size = 2;
|
||||||
blur_passes = 4;
|
blur_passes = 3;
|
||||||
contrast = 1;
|
contrast = 1;
|
||||||
brightness = 0.5;
|
brightness = 0.5;
|
||||||
vibrancy = 0.2;
|
vibrancy = 0.2;
|
||||||
|
@@ -120,7 +120,7 @@
|
|||||||
{
|
{
|
||||||
output = ["HDMI-A-1"];
|
output = ["HDMI-A-1"];
|
||||||
spacing = 8;
|
spacing = 8;
|
||||||
"modules-left" = ["hyprland/workspaces" "cava" "mpris"];
|
"modules-left" = ["hyprland/workspaces"];
|
||||||
"modules-center" = ["hyprland/window"];
|
"modules-center" = ["hyprland/window"];
|
||||||
"modules-right" = ["clock"];
|
"modules-right" = ["clock"];
|
||||||
|
|
||||||
|
@@ -52,6 +52,7 @@ in {
|
|||||||
nodejs_22
|
nodejs_22
|
||||||
pnpm
|
pnpm
|
||||||
cypress
|
cypress
|
||||||
|
pgadmin4-desktopmode
|
||||||
postgresql_15
|
postgresql_15
|
||||||
beam26Packages.erlang
|
beam26Packages.erlang
|
||||||
beam26Packages.erlfmt
|
beam26Packages.erlfmt
|
||||||
|
@@ -2,13 +2,6 @@
|
|||||||
|
|
||||||
set -e
|
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
|
# Check for force flag
|
||||||
FORCE_REBUILD=false
|
FORCE_REBUILD=false
|
||||||
if [[ "$1" == "-f" || "$1" == "--force" ]]; then
|
if [[ "$1" == "-f" || "$1" == "--force" ]]; then
|
||||||
@@ -67,18 +60,3 @@ current=$(nixos-rebuild list-generations | grep current)
|
|||||||
|
|
||||||
# Commit all changes witih the generation metadata
|
# Commit all changes witih the generation metadata
|
||||||
git commit -am "$NIXOS_HOST: $current"
|
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