From 64e219597065e6e572e851e8e8f85572d2555d5d Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 25 Aug 2022 20:42:40 +0200 Subject: [PATCH] feat: add yoga machine config --- flake.nix | 24 ++++++++++++ machines/yoga/configuration.nix | 8 ++++ machines/yoga/hardware-configuration.nix | 49 ++++++++++++++++++++++++ machines/yoga/home-mandlm.nix | 5 +++ 4 files changed, 86 insertions(+) create mode 100644 machines/yoga/configuration.nix create mode 100644 machines/yoga/hardware-configuration.nix create mode 100644 machines/yoga/home-mandlm.nix diff --git a/flake.nix b/flake.nix index 7afdb8c..fd62266 100644 --- a/flake.nix +++ b/flake.nix @@ -83,6 +83,30 @@ } ]; }; + + yoga = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./configuration.nix + ./users.nix + ./machines/yoga/configuration.nix + ./machines/yoga/hardware-configuration.nix + + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit user theme; }; + home-manager.users.${user} = { + imports = [ + ./home-${user}.nix + ./machines/yoga/home-${user}.nix + ]; + }; + } + ]; + }; }; }; } diff --git a/machines/yoga/configuration.nix b/machines/yoga/configuration.nix new file mode 100644 index 0000000..fc7274e --- /dev/null +++ b/machines/yoga/configuration.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: + +{ + networking.hostName = "yoga"; + boot.loader.grub.enableCryptodisk = true; + services.xserver.videoDrivers = [ "intel" ]; +} + diff --git a/machines/yoga/hardware-configuration.nix b/machines/yoga/hardware-configuration.nix new file mode 100644 index 0000000..6d8a18a --- /dev/null +++ b/machines/yoga/hardware-configuration.nix @@ -0,0 +1,49 @@ +# 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" "ehci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + boot.initrd.luks.devices = { + crypted = { + device = "/dev/disk/by-uuid/78f0c3c6-08b0-4a2b-9b97-dd57fb14f61d"; + preLVM = true; + }; + }; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/286570e7-eba1-4afc-8c6e-9e474782aa01"; + fsType = "ext4"; + }; + + fileSystems."/home" = + { + device = "/dev/disk/by-uuid/689222b0-bd7b-48d9-a7d9-14fa857a2bf8"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/0F90-4035"; + fsType = "vfat"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/3c6f1190-f324-4343-9b79-23b89940b7d3"; }]; + + networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/machines/yoga/home-mandlm.nix b/machines/yoga/home-mandlm.nix new file mode 100644 index 0000000..d93b753 --- /dev/null +++ b/machines/yoga/home-mandlm.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, user, ... }: + +{ + programs.kitty.font.size = 13; +}