From c0bea92f77b61e373be91d79ba1dc6abae11d9cf Mon Sep 17 00:00:00 2001 From: Lander Van den Bulcke Date: Mon, 23 Dec 2024 23:28:29 +0100 Subject: [PATCH] feat: add widar Signed-off-by: Lander Van den Bulcke --- flake.nix | 6 +++ home/lander/widar.nix | 13 +++++ hosts/widar/default.nix | 69 ++++++++++++++++++++++++++ hosts/widar/hardware-configuration.nix | 47 ++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 home/lander/widar.nix create mode 100644 hosts/widar/default.nix create mode 100644 hosts/widar/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 48784dc..c7f2727 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,12 @@ ./hosts/wodan ]; }; + widar = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; + modules = [ + ./hosts/widar + ]; + }; }; }; } diff --git a/home/lander/widar.nix b/home/lander/widar.nix new file mode 100644 index 0000000..d5d0196 --- /dev/null +++ b/home/lander/widar.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + imports = [ + ./global + ./features/workstation + ]; + + home.packages = with pkgs; [ + thunderbird + darktable + rawtherapee + mixxx + ]; +} diff --git a/hosts/widar/default.nix b/hosts/widar/default.nix new file mode 100644 index 0000000..6432c32 --- /dev/null +++ b/hosts/widar/default.nix @@ -0,0 +1,69 @@ +{pkgs, ...}: { + imports = [ + ./hardware-configuration.nix + + ../common/global + ../common/users/lander + + ../common/optional/fonts.nix + ../common/optional/yubikey-gpg.nix + ../common/optional/virt.nix + ../common/optional/steam.nix + ]; + + networking = { + hostName = "widar1"; + networkmanager.enable = true; + }; + + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + initrd.luks.devices."luks-ed2282ac-fd73-4d82-9224-b7596b5b7cac".device = "/dev/disk/by-uuid/ed2282ac-fd73-4d82-9224-b7596b5b7cac"; + }; + + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + (firefox.override {extraNativeMessagingHosts = [passff-host];}) + vim + wget + git + texliveFull + terraform + tf-summarize + awscli2 + libreoffice + x32edit + ]; + + nix.settings.experimental-features = ["nix-command" "flakes"]; + + services.tailscale.enable = true; + + services.printing.enable = true; + services.printing.drivers = [pkgs.brlaser]; + + system.stateVersion = "24.10"; +} diff --git a/hosts/widar/hardware-configuration.nix b/hosts/widar/hardware-configuration.nix new file mode 100644 index 0000000..9861136 --- /dev/null +++ b/hosts/widar/hardware-configuration.nix @@ -0,0 +1,47 @@ +# 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" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/1f43e0d1-65c6-4954-a943-968152e40a5e"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-a9fe90af-2f6b-41ad-a086-d1b9df2db5d2".device = "/dev/disk/by-uuid/a9fe90af-2f6b-41ad-a086-d1b9df2db5d2"; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0EB6-0E42"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/d7432008-bd3e-4bd5-b6d7-0fcd7df00c54";} + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}