From ad5d0b0e2c9da416da55f0497fdb8263e91cc7e6 Mon Sep 17 00:00:00 2001 From: rotterdam Date: Fri, 10 Feb 2023 23:00:16 +0100 Subject: [PATCH] Started migration of rotterdam to flake --- flake.nix | 12 ++++++ hosts/common/packages.nix | 1 - hosts/desktops/common/packages.nix | 2 + hosts/desktops/common/services.nix | 15 ------- hosts/desktops/rotterdam.nix | 32 +++++++++++++++ hosts/desktops/rotterdam/default.nix | 7 ++++ .../rotterdam/hardware-configuration.nix | 41 +++++++++++++++++++ 7 files changed, 94 insertions(+), 16 deletions(-) create mode 100644 hosts/desktops/rotterdam.nix create mode 100644 hosts/desktops/rotterdam/default.nix create mode 100644 hosts/desktops/rotterdam/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index c6921ad..7fbe5a8 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,18 @@ outputs = inputs @ { self, nixpkgs, home-manager, baduhai-nur, kmonad, nixpkgs-stable, home-manager-stable, deploy-rs, agenix, nixos-generators, homepage, dotfiles, ... }: { nixosConfigurations = { + rotterdam = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/desktops/rotterdam.nix + agenix.nixosModules.default + kmonad.nixosModules.default + home-manager.nixosModules.default + { nixpkgs.overlays = [ baduhai-nur.overlay agenix.overlays.default ]; } + ]; + }; + io = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/common/packages.nix b/hosts/common/packages.nix index 7d8b320..65e605d 100644 --- a/hosts/common/packages.nix +++ b/hosts/common/packages.nix @@ -9,7 +9,6 @@ btop comma git - lazydocker micro neofetch sysz diff --git a/hosts/desktops/common/packages.nix b/hosts/desktops/common/packages.nix index 9cda717..35eacca 100644 --- a/hosts/desktops/common/packages.nix +++ b/hosts/desktops/common/packages.nix @@ -45,6 +45,7 @@ rpcs3 signal-desktop solvespace + space-cadet-pinball steam-run streamlink-twitch-gui-bin tdesktop @@ -56,6 +57,7 @@ ventoy-bin virt-manager wezterm + yubikey-personalization-gui # Package overrides (appimage-run.override { extraPkgs = pkgs: [ libthai ]; diff --git a/hosts/desktops/common/services.nix b/hosts/desktops/common/services.nix index 0ca1a48..21d75f5 100644 --- a/hosts/desktops/common/services.nix +++ b/hosts/desktops/common/services.nix @@ -27,21 +27,6 @@ in enable = true; excludePackages = ( with pkgs.plasma5Packages; [ elisa oxygen khelpcenter ]); }; -# displayManager = { -# defaultSession = "plasmawayland"; -# sddm = { -# enable = true; -# autoNumlock = true; -# settings = { -# Theme = { -# CursorTheme = "breeze_cursors"; -# }; -# X11 = { -# UserAuthFile = ".local/share/sddm/Xauthority"; -# }; -# }; -# }; -# }; }; greetd = { enable = true; diff --git a/hosts/desktops/rotterdam.nix b/hosts/desktops/rotterdam.nix new file mode 100644 index 0000000..d9cb46e --- /dev/null +++ b/hosts/desktops/rotterdam.nix @@ -0,0 +1,32 @@ +{ specialArgs, inputs, config, pkgs, lib, ... }: + +{ + imports = [ + # Host-common imports + ../common + # Desktop-common imports + ./common + # Host-specific imports + ./rotterdam + ]; + + networking.hostName = "rotterdam"; + + nix.nixPath = [ "nixos-config=${./rotterdam.nix}" ]; + + boot.kernelParams = [ + "processor.max_cstate=1" # Fixes bug where ryzen cpus freeze when in highest C state + ]; + + services.hardware.openrgb.enable = true; + + environment.systemPackages = with pkgs; [ + yuzu-ea + ]; + + programs.corectrl.enable = true; + + users.users.user.extraGroups = [ + "corectrl" + ]; +} diff --git a/hosts/desktops/rotterdam/default.nix b/hosts/desktops/rotterdam/default.nix new file mode 100644 index 0000000..a166058 --- /dev/null +++ b/hosts/desktops/rotterdam/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; +} diff --git a/hosts/desktops/rotterdam/hardware-configuration.nix b/hosts/desktops/rotterdam/hardware-configuration.nix new file mode 100644 index 0000000..f9d66b8 --- /dev/null +++ b/hosts/desktops/rotterdam/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" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9ccbb9e3-addc-42a3-b5d8-1e81eed37548"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/7707-0E25"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/39005453-0ac9-4fee-bdd3-7ea9bb6f9ca6"; } + ]; + + # 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.enp34s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + # high-resolution display + hardware.video.hidpi.enable = lib.mkDefault true; +}