From 11629eb2e3d19326d624eaccec3a2307cf466816 Mon Sep 17 00:00:00 2001 From: CherryKitten Date: Sat, 4 May 2024 15:03:05 +0200 Subject: [PATCH] dinictis --- hive.nix | 1 + hosts/dinictis/default.nix | 15 +++++ hosts/dinictis/hardware-configuration.nix | 70 +++++++++++++++++++++++ profiles/base/default.nix | 2 +- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 hosts/dinictis/hardware-configuration.nix diff --git a/hive.nix b/hive.nix index c28356c..23ccfda 100644 --- a/hive.nix +++ b/hive.nix @@ -52,6 +52,7 @@ in networking.domain = "cherrykitten.xyz"; deployment = { + allowLocalDeployment = true; targetUser = lib.mkDefault "sammy"; tags = [ pkgs.stdenv.hostPlatform.system ]; }; diff --git a/hosts/dinictis/default.nix b/hosts/dinictis/default.nix index ceee349..ad0de6a 100644 --- a/hosts/dinictis/default.nix +++ b/hosts/dinictis/default.nix @@ -1,7 +1,22 @@ { ... }: { imports = [ ../../profiles/desktop + ./hardware-configuration.nix ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "dinictis"; # Define your hostname. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound. + # sound.enable = true; + hardware.pulseaudio.enable = true; + system.stateVersion = "23.11"; # Did you read the comment? + } diff --git a/hosts/dinictis/hardware-configuration.nix b/hosts/dinictis/hardware-configuration.nix new file mode 100644 index 0000000..6f7bedc --- /dev/null +++ b/hosts/dinictis/hardware-configuration.nix @@ -0,0 +1,70 @@ +# 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" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/73e8faf4-a250-4edb-9583-a16dcfff621b"; + boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/4bd4ac67-74a8-4a67-b5eb-e8ebf814d5d7"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/persist" = + { device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646"; + fsType = "btrfs"; + options = [ "subvol=persist" ]; + }; + + fileSystems."/var/log" = + { device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646"; + fsType = "btrfs"; + options = [ "subvol=log" ]; + neededForBoot = true; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6891-5A39"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/65f4c4dd-57e7-4709-a017-2277874d3917"; } + ]; + + # 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; + # networking.interfaces.wwp0s20f0u2.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/profiles/base/default.nix b/profiles/base/default.nix index 8266fc8..4befe53 100644 --- a/profiles/base/default.nix +++ b/profiles/base/default.nix @@ -16,7 +16,7 @@ }; }; - users.mutableUsers = false; + users.mutableUsers = true; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; nixpkgs.config.allowUnfree = true;