From 0a5ebc1cc372af2098d4919fbac2a4f09b1d134d Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 10 Feb 2026 00:09:45 +1100 Subject: [PATCH] seika: init --- flake.nix | 28 +++++++++++++ hosts/seika/configuration.nix | 19 +++++++++ hosts/seika/hardware-configuration.nix | 58 ++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 hosts/seika/configuration.nix create mode 100644 hosts/seika/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 08350b0..9749912 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,34 @@ ]; }; + nixosConfigurations.seika = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/nixos-common.nix + + ./modules/services/uptime-kuma.nix + ./modules/services/auth/kanidm.nix + ./modules/services/auth/tinyauth.nix + ./modules/services/caddy.nix + ./modules/services/forgejo.nix + ./modules/services/miniflux.nix + ./modules/services/karakeep.nix + ./modules/services/media/arr.nix + ./modules/services/media/jellyfin.nix + ./modules/services/archiveteam-warrior.nix + + ./modules/network/avahi.nix + ./modules/services/ssh.nix + ./modules/network/vpn/tailscale.nix + + ./modules/nix/linux.nix + ./modules/shell.nix + ./modules/users/nico.nix + ./modules/hardware/bootloader/systemd-boot.nix + ./hosts/seika/configuration.nix + ]; + }; + nixosConfigurations.miki = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ diff --git a/hosts/seika/configuration.nix b/hosts/seika/configuration.nix new file mode 100644 index 0000000..25f3c8f --- /dev/null +++ b/hosts/seika/configuration.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + networking.hostName = "seika"; + + hardware.graphics.enable = true; + environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD"; + hardware.graphics.extraPackages = with pkgs; [ + intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD + libva-vdpau-driver # Previously vaapiVdpau + intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) + ]; + + services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore"; +} diff --git a/hosts/seika/hardware-configuration.nix b/hosts/seika/hardware-configuration.nix new file mode 100644 index 0000000..d2c34e8 --- /dev/null +++ b/hosts/seika/hardware-configuration.nix @@ -0,0 +1,58 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=root@nix" ]; + }; + + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/8e9f6249-65c4-415a-a82f-321215024956"; + + fileSystems."/swap" = + { device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=@swap" ]; + }; + + fileSystems."/media" = + { device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=@media" ]; + }; + + fileSystems."/nix" = + { device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + + fileSystems."/home" = + { device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/E89A-EECA"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}