From a3d7fdaea4ab6084a1fb24c2b509d8b103b5f4b7 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 22 Apr 2023 17:38:18 +0200 Subject: [PATCH] set up eevee --- nixos/hosts/olympus/default.nix | 1 + nixos/hosts/olympus/eevee/hardware.nix | 20 --------- nixos/hosts/thalassa/default.nix | 1 + .../eevee/configuration.nix | 3 -- .../eevee/desktop-env.nix | 3 +- .../thalassa/eevee/hardware-configuration.nix | 41 +++++++++++++++++++ nixos/hosts/thalassa/eevee/hardware.nix | 14 +++++++ .../eevee/home/.gitignore | 0 .../eevee/home/dconf.nix | 4 ++ .../eevee/home/default.nix | 3 +- .../eevee/home/neovim.nix | 0 .../{olympus => thalassa}/eevee/home/nvim.lua | 0 .../eevee/home/theme.nix | 0 .../eevee/networking.nix | 0 14 files changed, 64 insertions(+), 26 deletions(-) delete mode 100644 nixos/hosts/olympus/eevee/hardware.nix rename nixos/hosts/{olympus => thalassa}/eevee/configuration.nix (97%) rename nixos/hosts/{olympus => thalassa}/eevee/desktop-env.nix (94%) create mode 100644 nixos/hosts/thalassa/eevee/hardware-configuration.nix create mode 100644 nixos/hosts/thalassa/eevee/hardware.nix rename nixos/hosts/{olympus => thalassa}/eevee/home/.gitignore (100%) rename nixos/hosts/{olympus => thalassa}/eevee/home/dconf.nix (96%) rename nixos/hosts/{olympus => thalassa}/eevee/home/default.nix (99%) rename nixos/hosts/{olympus => thalassa}/eevee/home/neovim.nix (100%) rename nixos/hosts/{olympus => thalassa}/eevee/home/nvim.lua (100%) rename nixos/hosts/{olympus => thalassa}/eevee/home/theme.nix (100%) rename nixos/hosts/{olympus => thalassa}/eevee/networking.nix (100%) diff --git a/nixos/hosts/olympus/default.nix b/nixos/hosts/olympus/default.nix index 1a6322f..0d9992e 100644 --- a/nixos/hosts/olympus/default.nix +++ b/nixos/hosts/olympus/default.nix @@ -162,5 +162,6 @@ ip = "10.42.42.69"; ip6 = "2001:41f0:9639:1:a83:e416:dc99:5ed3"; mac = "34:97:f6:93:9A:AA"; + nix = false; }; } diff --git a/nixos/hosts/olympus/eevee/hardware.nix b/nixos/hosts/olympus/eevee/hardware.nix deleted file mode 100644 index b7fe6ce..0000000 --- a/nixos/hosts/olympus/eevee/hardware.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, ... }: { - hardware.enableAllFirmware = true; - - hardware.bluetooth.enable = true; - - services.hardware.bolt.enable = true; - - # Vulkan - # hardware.opengl.driSupport = true; - # hardware.opengl.extraPackages = with pkgs; [ - # amdvlk - # rocm-opencl-icd - # rocm-opencl-runtime - # ]; - # systemd.tmpfiles.rules = - # [ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ]; - - # SSD Trim - services.fstrim.enable = true; -} diff --git a/nixos/hosts/thalassa/default.nix b/nixos/hosts/thalassa/default.nix index 44e6cfb..68de75d 100644 --- a/nixos/hosts/thalassa/default.nix +++ b/nixos/hosts/thalassa/default.nix @@ -1,4 +1,5 @@ { # "null" = { type = "local"; }; "aoife" = { type = "local"; }; + "eevee" = { type = "local"; }; } diff --git a/nixos/hosts/olympus/eevee/configuration.nix b/nixos/hosts/thalassa/eevee/configuration.nix similarity index 97% rename from nixos/hosts/olympus/eevee/configuration.nix rename to nixos/hosts/thalassa/eevee/configuration.nix index 1029b60..18acb8a 100644 --- a/nixos/hosts/olympus/eevee/configuration.nix +++ b/nixos/hosts/thalassa/eevee/configuration.nix @@ -107,7 +107,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; # Did you read the comment? - - nix.settings.extra-sandbox-paths = - [ (toString config.programs.ccache.cacheDir) ]; } diff --git a/nixos/hosts/olympus/eevee/desktop-env.nix b/nixos/hosts/thalassa/eevee/desktop-env.nix similarity index 94% rename from nixos/hosts/olympus/eevee/desktop-env.nix rename to nixos/hosts/thalassa/eevee/desktop-env.nix index 0e2dee2..515325a 100644 --- a/nixos/hosts/olympus/eevee/desktop-env.nix +++ b/nixos/hosts/thalassa/eevee/desktop-env.nix @@ -1,8 +1,7 @@ { pkgs, ... }: { # Enable the X11 windowing system. services.xserver.enable = true; - # TODO: Nvidia - # services.xserver.videoDrivers = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.excludePackages = [ pkgs.xterm ]; # Configure keymap in X11 diff --git a/nixos/hosts/thalassa/eevee/hardware-configuration.nix b/nixos/hosts/thalassa/eevee/hardware-configuration.nix new file mode 100644 index 0000000..1e1afb2 --- /dev/null +++ b/nixos/hosts/thalassa/eevee/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/947a98af-9a4e-4811-a2ca-9aa00b319e9c"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/D883-F146"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a99402e1-6f2a-4c4b-b69f-aae2fd13ffc0"; } + ]; + + # 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/nixos/hosts/thalassa/eevee/hardware.nix b/nixos/hosts/thalassa/eevee/hardware.nix new file mode 100644 index 0000000..65d17ad --- /dev/null +++ b/nixos/hosts/thalassa/eevee/hardware.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + hardware.enableAllFirmware = true; + + hardware.bluetooth.enable = true; + + services.hardware.bolt.enable = true; + + hardware.opengl.enable = true; + + services.udev.packages = with pkgs; [ wooting-udev-rules ]; + + # SSD Trim + services.fstrim.enable = true; +} diff --git a/nixos/hosts/olympus/eevee/home/.gitignore b/nixos/hosts/thalassa/eevee/home/.gitignore similarity index 100% rename from nixos/hosts/olympus/eevee/home/.gitignore rename to nixos/hosts/thalassa/eevee/home/.gitignore diff --git a/nixos/hosts/olympus/eevee/home/dconf.nix b/nixos/hosts/thalassa/eevee/home/dconf.nix similarity index 96% rename from nixos/hosts/olympus/eevee/home/dconf.nix rename to nixos/hosts/thalassa/eevee/home/dconf.nix index fcc2714..32c102d 100644 --- a/nixos/hosts/olympus/eevee/home/dconf.nix +++ b/nixos/hosts/thalassa/eevee/home/dconf.nix @@ -21,6 +21,10 @@ in { sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ]; }; + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + "org/gnome/desktop/peripherals/touchpad" = { tap-to-click = true; two-finger-scrolling-enabled = true; diff --git a/nixos/hosts/olympus/eevee/home/default.nix b/nixos/hosts/thalassa/eevee/home/default.nix similarity index 99% rename from nixos/hosts/olympus/eevee/home/default.nix rename to nixos/hosts/thalassa/eevee/home/default.nix index 855fe91..4aaf26f 100644 --- a/nixos/hosts/olympus/eevee/home/default.nix +++ b/nixos/hosts/thalassa/eevee/home/default.nix @@ -14,7 +14,7 @@ in { imports = [ ./dconf.nix ./theme.nix - ./neovim.nix + ./neovim.nix ]; home.packages = with pkgs; [ @@ -38,6 +38,7 @@ in { solo2-cli tex yt-dlp + wootility ]; programs.riff = { diff --git a/nixos/hosts/olympus/eevee/home/neovim.nix b/nixos/hosts/thalassa/eevee/home/neovim.nix similarity index 100% rename from nixos/hosts/olympus/eevee/home/neovim.nix rename to nixos/hosts/thalassa/eevee/home/neovim.nix diff --git a/nixos/hosts/olympus/eevee/home/nvim.lua b/nixos/hosts/thalassa/eevee/home/nvim.lua similarity index 100% rename from nixos/hosts/olympus/eevee/home/nvim.lua rename to nixos/hosts/thalassa/eevee/home/nvim.lua diff --git a/nixos/hosts/olympus/eevee/home/theme.nix b/nixos/hosts/thalassa/eevee/home/theme.nix similarity index 100% rename from nixos/hosts/olympus/eevee/home/theme.nix rename to nixos/hosts/thalassa/eevee/home/theme.nix diff --git a/nixos/hosts/olympus/eevee/networking.nix b/nixos/hosts/thalassa/eevee/networking.nix similarity index 100% rename from nixos/hosts/olympus/eevee/networking.nix rename to nixos/hosts/thalassa/eevee/networking.nix