From 11ba75e40728e8b5735c9c7cefc7af1631c942af Mon Sep 17 00:00:00 2001 From: "Henry J. Webster" Date: Thu, 30 Jul 2026 10:38:54 -0500 Subject: Restructure into a multi-machine flake and add the enzo laptop Split the single-host config into a shared minimal base plus opt-in profiles, and add a second machine (enzo laptop) alongside kusanagi. - flake: add mkMachine helper; declare nixosConfigurations.kusanagi and .enzo; add the disko input; move overlays per-machine. - common/: minimal base only (boot, networking, tailscale, locale, nix settings, neovim editor). Old configuration.nix/programs.nix removed. - profiles/: coarse opt-in bundles (desktop, dev, apps). kusanagi imports all three and stays byte-for-byte identical to the running system. - machines/kusanagi/: all workstation-only config (ROCm, Scarlett audio, optical-disc archiving, NAS mounts, kavita/immich/ollama); hardware config moved here unchanged. User stays 'henz'. - machines/enzo/: new laptop. Declarative LUKS+btrfs via disko (LVM-on-LUKS, TPM2+PIN unlock, zram + encrypted swap for suspend-then-hibernate); its own minimal niri desktop with playback-only audio (no rtkit/jack); user 'hwebs'. Assisted-by: Claude:claude-opus-4-8 --- common/core.nix | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 common/core.nix (limited to 'common/core.nix') diff --git a/common/core.nix b/common/core.nix new file mode 100644 index 0000000..5d36646 --- /dev/null +++ b/common/core.nix @@ -0,0 +1,53 @@ +# Boot, networking, locale, and Nix settings shared by all machines. +{ pkgs, ... }: + +{ + # Editor available on every machine (even a headless one). + environment.systemPackages = [ pkgs.neovim ]; + programs.neovim = { + enable = true; + defaultEditor = true; + }; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + + # for tailscale + networking.firewall.trustedInterfaces = [ "tailscale0" ]; + networking.firewall.allowedUDPPorts = [ 41641 ]; + services.tailscale.enable = true; + + # Set your time zone. + time.timeZone = "America/Chicago"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # trusted-users is set per-machine (see machines//default.nix). + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + environment.localBinInPath = true; +} -- cgit v1.3