All my system configs and packages in one repo

systems/pappardelle: init

pluie.me 92e2fab0 ac159b21

verified
+134 -7
+8 -1
flake.nix
··· 47 47 inherit (pkgs') callPackage; 48 48 directory = ./packages; 49 49 }; 50 + 51 + specialArgs = { inherit inputs; }; 50 52 in 51 53 inputs.flake-parts.lib.mkFlake { inherit inputs; } { 52 54 systems = lib.systems.flakeExposed; ··· 56 58 57 59 nixosConfigurations.fettuccine = lib.nixosSystem { 58 60 modules = [ ./systems/fettuccine ]; 59 - specialArgs = { inherit inputs; }; 61 + inherit specialArgs; 62 + }; 63 + 64 + nixosConfigurations.pappardelle = lib.nixosSystem { 65 + modules = [ ./systems/pappardelle ]; 66 + inherit specialArgs; 60 67 }; 61 68 62 69 hjemModules = {
+1 -6
systems/common.nix
··· 37 37 38 38 nixpkgs = { 39 39 # I'm not part of the FSF and I don't care 40 - config = { 41 - allowUnfree = true; 42 - cudaSupport = true; 43 - }; 44 - 40 + config.allowUnfree = true; 45 41 flake.setNixPath = true; 46 42 47 43 overlays = [ inputs.self.overlays.default ]; ··· 91 87 92 88 services = { 93 89 dbus.implementation = "broker"; 94 - fstrim.enable = true; 95 90 flatpak.enable = true; 96 91 udisks2.enable = true; 97 92
+2
systems/fettuccine/default.nix
··· 29 29 boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; 30 30 nix.settings.extra-platforms = [ "aarch64-linux" ]; 31 31 32 + nixpkgs.config.cudaSupport = true; 33 + 32 34 hardware = { 33 35 bluetooth.enable = true; 34 36
+57
systems/pappardelle/default.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + inputs, 6 + ... 7 + }: 8 + { 9 + imports = with inputs.nixos-hardware.nixosModules; [ 10 + ../common.nix 11 + ./hardware-configuration.nix 12 + ../../users/leah 13 + 14 + # nixos-hardware does not yet have a specific configuration 15 + # for the XiaoXin Pro 14 GT (= IdeaPad Slim 14, model 14IAH10), 16 + # but it's very easy to cobble together what upstream has provided 17 + common-cpu-intel 18 + common-pc-laptop 19 + common-pc-laptop-ssd 20 + ]; 21 + 22 + # Specific to Alder Lake 23 + hardware.intelgpu.vaapiDriver = "intel-media-driver"; 24 + 25 + networking.hostName = "pappardelle"; 26 + 27 + boot = { 28 + # FIXME: switch back to latest xanmod after 6.15.5 29 + kernelPackages = pkgs.linuxPackages_xanmod; 30 + }; 31 + 32 + # Enable building and testing aarch64 packages for Nixpkgs dev 33 + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; 34 + nix.settings.extra-platforms = [ "aarch64-linux" ]; 35 + 36 + hardware.bluetooth.enable = true; 37 + 38 + networking.firewall = { 39 + enable = true; 40 + 41 + # Allow previewing local Vite builds on other devices via LAN 42 + allowedTCPPorts = [ 5173 ]; 43 + }; 44 + 45 + specialisation.china.configuration = { 46 + # cache.nixos.org is *unbearably* slow when accessed from Mainland China. 47 + # Fortunately, mirror sites exist... Hooray(?) 48 + nix.settings.substituters = map (url: "${url}/nix-channels/store") [ 49 + "https://mirrors.ustc.edu.cn" 50 + "https://mirrors6.tuna.tsinghua.edu.cn" 51 + "https://mirrors.tuna.tsinghua.edu.cn" 52 + # "https://mirror.sjtu.edu.cn" # FIXME: buggy? 53 + ]; 54 + 55 + networking.proxy.allProxy = "http://127.0.0.1:2080"; 56 + }; 57 + }
+64
systems/pappardelle/hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-intel" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/2778be32-51a1-4ca4-957f-8135a387e01e"; 18 + fsType = "btrfs"; 19 + options = [ "subvol=root" "compress=zstd" "noatime" ]; 20 + }; 21 + 22 + fileSystems."/home" = 23 + { device = "/dev/disk/by-uuid/2778be32-51a1-4ca4-957f-8135a387e01e"; 24 + fsType = "btrfs"; 25 + options = [ "subvol=home" "compress=zstd" "noatime" ]; 26 + }; 27 + 28 + fileSystems."/nix" = 29 + { device = "/dev/disk/by-uuid/2778be32-51a1-4ca4-957f-8135a387e01e"; 30 + fsType = "btrfs"; 31 + options = [ "subvol=nix" "compress=zstd" "noatime" ]; 32 + }; 33 + 34 + fileSystems."/persist" = 35 + { device = "/dev/disk/by-uuid/2778be32-51a1-4ca4-957f-8135a387e01e"; 36 + fsType = "btrfs"; 37 + options = [ "subvol=persist" "compress=zstd" "noatime" ]; 38 + }; 39 + 40 + fileSystems."/var/log" = 41 + { device = "/dev/disk/by-uuid/2778be32-51a1-4ca4-957f-8135a387e01e"; 42 + fsType = "btrfs"; 43 + options = [ "subvol=log" "compress=zstd" "noatime" ]; 44 + }; 45 + 46 + fileSystems."/boot" = 47 + { device = "/dev/disk/by-uuid/91D9-266C"; 48 + fsType = "vfat"; 49 + options = [ "fmask=0022" "dmask=0022" ]; 50 + }; 51 + 52 + swapDevices = [ ]; 53 + 54 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 55 + # (the default) this is the recommended approach. When using systemd-networkd it's 56 + # still possible to use this option, but it's recommended to use it in conjunction 57 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 58 + networking.useDHCP = lib.mkDefault true; 59 + # networking.interfaces.nekoray-tun.useDHCP = lib.mkDefault true; 60 + # networking.interfaces.wlp1s0f0.useDHCP = lib.mkDefault true; 61 + 62 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 63 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 64 + }
+2
users/leah/programs/vcs.nix
··· 27 27 url."https://github.com/".insteadOf = "gh:"; 28 28 gpg.format = "ssh"; 29 29 30 + http.proxy = "http://127.0.0.1:2080"; 31 + 30 32 user = { 31 33 name = "Leah Amelia Chen"; 32 34 email = "hi@pluie.me";