From 8de0eb092fc9053b082c1e3f6d3339f91367eb65 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 9 Sep 2023 22:20:37 +0200 Subject: [PATCH] Add Morty host --- flake.nix | 18 +++++++++++ hosts/morty/hardware-configuration.nix | 45 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 hosts/morty/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index d6db5e4..14bf36d 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,24 @@ let stateVersion = "23.05"; in rec { nixosConfigurations = { + + morty = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit stateVersion; + hostname = "morty"; + username = "ephase"; + hostConfig = { + gaming = true; + desktop = true; + laptop = true; + }; + }; + modules = [ + ./nixos/default.nix + home-manager.nixosModule + ]; + }; mrmeeseeks = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { diff --git a/hosts/morty/hardware-configuration.nix b/hosts/morty/hardware-configuration.nix new file mode 100644 index 0000000..97dc4eb --- /dev/null +++ b/hosts/morty/hardware-configuration.nix @@ -0,0 +1,45 @@ +# 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" "usb_storage" "usbhid" "sd_mod" "i915" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "i915" ]; + boot.extraModulePackages = [ ]; + boot.kernelParams = ["fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up"]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ad4fa799-214c-4e5e-996a-8776e010fb2f"; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/E83D-CDFE"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +}