From 7c39f4e13e1bd9ccea2de811e15dbe31e3cf2a08 Mon Sep 17 00:00:00 2001 From: minco Date: Sat, 26 Jul 2025 00:22:44 +0900 Subject: [PATCH] sg --- .gitignore | 1 + flake.nix | 2 +- hardware-configuration.nix | 58 +++++++++++--------------------------- services/virtual.nix | 12 ++++---- 4 files changed, 25 insertions(+), 48 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..577b0a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +hardware-configuration.nix diff --git a/flake.nix b/flake.nix index efb45cf..51146d1 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ }; outputs = { self, nixpkgs, home-manager, ... }@inputs: { - nixosConfigurations.haskell = nixpkgs.lib.nixosSystem { + nixosConfigurations.monad = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 440a796..7e160d4 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -4,49 +4,27 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "uas" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelParams = [ "intel_iommu=on" ]; - boot.kernelModules = [ "kvm-intel" "vfio_pci" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - # 1050 passthrough - # boot.extraModprobeConfig = '' - # options vfio-pci ids=10de:1c81,10de:0fb9 - # ''; + fileSystems."/" = + { device = "/dev/disk/by-uuid/f4bf5b26-3959-4087-ad60-b5eaaf9c7cd5"; + fsType = "ext4"; + }; - fileSystems."/" = { - device = "/dev/disk/by-uuid/4e08142c-1b09-4265-a497-822e4a83d4c8"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + boot.initrd.luks.devices."luks-28e5a617-073a-4385-9fc2-f0620a8ead08".device = "/dev/disk/by-uuid/28e5a617-073a-4385-9fc2-f0620a8ead08"; - fileSystems."/home" = { - device = "/dev/disk/by-uuid/4e08142c-1b09-4265-a497-822e4a83d4c8"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; - - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/4e08142c-1b09-4265-a497-822e4a83d4c8"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/E808-5876"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - fileSystems."/mnt/hdd1" = { - device = "/dev/disk/by-uuid/EC40940C4093DC20"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=1000" "umask=0022" ]; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/40B6-4877"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; swapDevices = [ ]; @@ -55,10 +33,8 @@ # 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.enp5s0.useDHCP = lib.mkDefault true; - # networking.interfaces.eth0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/services/virtual.nix b/services/virtual.nix index ed32e92..ad40cdc 100644 --- a/services/virtual.nix +++ b/services/virtual.nix @@ -14,10 +14,10 @@ programs.virt-manager.enable = true; - services.k3s = { - enable = true; - clusterInit = true; - extraFlags = - "--cluster-cidr=10.42.0.0/16,2a10:3781:25ac:2::/64 --service-cidr=10.43.0.0/16,2a10:3781:25ac:3::/112 --flannel-iface enp5s0"; - }; +# services.k3s = { +# enable = true; +# clusterInit = true; +# extraFlags = +# "--cluster-cidr=10.42.0.0/16,2a10:3781:25ac:2::/64 --service-cidr=10.43.0.0/16,2a10:3781:25ac:3::/112 --flannel-iface enp5s0"; +# }; }