diff --git a/hosts/bocchi/configuration.nix b/hosts/bocchi/configuration.nix index b6f60ba..dd022a7 100644 --- a/hosts/bocchi/configuration.nix +++ b/hosts/bocchi/configuration.nix @@ -2,8 +2,7 @@ { imports = [ - ./disko.nix -# ./hardware-configuration.nix + ./hardware-configuration.nix ]; networking.hostName = "bocchi"; diff --git a/hosts/bocchi/disko.nix b/hosts/bocchi/disko.nix deleted file mode 100644 index 3c56014..0000000 --- a/hosts/bocchi/disko.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ ... }: - -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "1G"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - size = "100%"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; # Override existing partition - # Subvolumes must set a mountpoint in order to be mounted, - # unless their parent is mounted - subvolumes = { - # Subvolume name is different from mountpoint - "/root" = { - mountpoint = "/"; - }; - - # Subvolume name is the same as the mountpoint - "/home" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/home"; - }; - - "/nix" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/nix"; - }; - - "/media" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/media"; - }; - - "/media/shows" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/shows"; }; - "/media/movies" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/movies"; }; - "/media/music" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/music"; }; - "/media/books" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/books"; }; - "/media/repositories" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/repositories"; }; - "/media/torrents" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/torrents"; }; - - # Subvolume for the swapfile - "/swap" = { - mountpoint = "/.swapvol"; - swap = { - swapfile.size = "20M"; - swapfile2.size = "20M"; - swapfile2.path = "rel-path"; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/bocchi/hardware-configuration.nix b/hosts/bocchi/hardware-configuration.nix new file mode 100644 index 0000000..b7f7214 --- /dev/null +++ b/hosts/bocchi/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ff0cbf64-8bff-46a3-9bb2-8e314fcfda94"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/795C-AFC7"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # 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.enp0s20u1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0f0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}