From 5467d45d11c2da543c579289a8e21a642b7ba857 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 3 Oct 2023 15:10:09 +0100 Subject: [PATCH] Add additional config for Scorch --- home/hyprland/config.nix | 1 - hosts/Scorch/configuration.nix | 30 ++++++++++++++++++ hosts/Scorch/hardware-configuration.nix | 42 +++++++++++++++++++++++++ hosts/Scorch/home.nix | 6 ++-- 4 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 hosts/Scorch/configuration.nix create mode 100644 hosts/Scorch/hardware-configuration.nix diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index d045b4d5..2b804642 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -266,5 +266,4 @@ in '' exec-once = ${pkgs.dex}/bin/dex --autostart exec-once = ferdium exec-once = kidex - exec = pkill -HUP kanshi '' diff --git a/hosts/Scorch/configuration.nix b/hosts/Scorch/configuration.nix new file mode 100644 index 00000000..69a3a3fa --- /dev/null +++ b/hosts/Scorch/configuration.nix @@ -0,0 +1,30 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; + + # Setup keyfile + boot.initrd.secrets = { "/crypto_keyfile.bin" = null; }; + + # Enable swap on luks + boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".device = + "/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb"; + boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".keyFile = + "/crypto_keyfile.bin"; + + services.syncthing.settings.folders = { + "Archive".enable = false; + "Books".enable = false; + "Comics".enable = false; + "Documents".enable = false; + "Exports".enable = false; + "Pictures".enable = false; + }; +} diff --git a/hosts/Scorch/hardware-configuration.nix b/hosts/Scorch/hardware-configuration.nix new file mode 100644 index 00000000..49a4b082 --- /dev/null +++ b/hosts/Scorch/hardware-configuration.nix @@ -0,0 +1,42 @@ +# 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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/0c6931d0-50c3-47b0-98c8-d295ddeb2004"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device = + "/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d"; + + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/6009-89FC"; + fsType = "vfat"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/ff9627a7-820c-4628-a040-2b665688b893"; }]; + + # 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; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/Scorch/home.nix b/hosts/Scorch/home.nix index afc2bf94..7c9b0d3e 100644 --- a/hosts/Scorch/home.nix +++ b/hosts/Scorch/home.nix @@ -28,9 +28,7 @@ disable_splash_rendering = true } - # monitor=eDP-1,preferred,auto,1 - # monitor=desc:Iiyama North America PLB2403WS 0574281251316,preferred,0x185,1 - # monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,preferred,1920x0,1,transform,1 - # monitor=desc:Acer Technologies ED270R TJMEE0043W01,highrr,0x0,1 + monitor=desc:Iiyama North America PLB2403WS 0574281251316,preferred,0x185,1 + monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,preferred,1920x0,1,transform,1 ''; }