{pkgs, ...}: { imports = [ ./hardware-configuration.nix ]; # Enable flakes and nix commands nix = { settings = { experimental-features = ["nix-command" "flakes"]; # Enable automatic garbage collection auto-optimise-store = true; }; # Automatic cleanup of old generations gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; }; # Boot configuration boot.loader.grub = { enable = true; efiSupport = true; efiInstallAsRemovable = true; }; # Your base configuration here system.autoUpgrade = { enable = true; allowReboot = true; dates = "04:00"; flake = "path:/etc/nixos/current-systemconfig"; randomizedDelaySec = "45min"; flags = [ "--update-input nixpkgs" "--update-input base-config" ]; }; # Other base configurations... services.openssh = { enable = true; settings = { PermitRootLogin = "no"; PasswordAuthentication = false; MaxAuthTries = 3; LoginGraceTime = "30s"; }; ports = [2222]; }; # System packages environment.systemPackages = with pkgs; [ # Docker tools docker docker-compose # System utilities neovim git unstable.gum just jq (pkgs.writeShellScriptBin "shp" '' exec sudo ${pkgs.just}/bin/just -f /etc/self-host-playbook/justfile "$@" '') ]; # Enable Docker with recommended settings virtualisation = { docker = { enable = true; # Enable docker daemon to start on boot enableOnBoot = true; # Use overlay2 storage driver storageDriver = "overlay2"; # Enable live restore liveRestore = true; }; oci-containers = { backend = "docker"; }; }; environment.etc = { # Main justfile "self-host-playbook/justfile".source = ../justfiles/main.just; # Tier justfiles "self-host-playbook/tiers/core.just".source = ../justfiles/tiers/core.just; "self-host-playbook/tiers/starter.just".source = ../justfiles/tiers/starter.just; }; # System state version (do not change) system.stateVersion = "24.11"; }