diff --git a/flake.nix b/flake.nix index 1e19955..64db92e 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,19 @@ specialArgs = args; }; + # Thinkpad + "lime" = lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (mkUserConfig ./system/lime) + agenix.nixosModules.default + ./system/lime/core.nix + ./shared/core + ./shared/secrets.nix + ]; + specialArgs = args; + }; + }; # Configurations for non-NixOS machines. diff --git a/system/lime/core.nix b/system/lime/core.nix new file mode 100644 index 0000000..1c79c33 --- /dev/null +++ b/system/lime/core.nix @@ -0,0 +1,59 @@ +{ lib, ... }: { + + custom = { + gui.enable = true; + backups.enable = true; + }; + + system.stateVersion = "22.11"; + home-manager.users.riley.home.stateVersion = "22.11"; + + networking = { + hostName = "lime"; + interfaces."wlp0s20f3".useDHCP = true; + interfaces."enp0s31f6".useDHCP = true; + }; + + boot = { + initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + kernelModules = [ "kvm-intel" ]; + loader.systemd-boot = { + enable = true; + editor = false; + configurationLimit = 10; + }; + loader.efi.canTouchEfiVariables = true; + initrd.luks.devices.root.device = "/dev/disk/by-uuid/bd5edcc6-35b7-4829-901f-8593c16f0324"; + resumeDevice = "/dev/disk/by-label/NIXOS-ROOT"; + kernelParams = [ + # btrfs inspect-internal map-swapfile -r /swap/swapfile + "resume_offset=2630912" + ]; + }; + + fileSystems."/" = { + device = "/dev/disk/by-label/NIXOS-ROOT"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/2745-1284"; + fsType = "vfat"; + }; + + swapDevices = [{ + device = "/swap/swapfile"; + size = 16 * 1024; + }]; + + nixpkgs.hostPlatform = "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + +} diff --git a/system/lime/home.nix b/system/lime/home.nix new file mode 100644 index 0000000..4076320 --- /dev/null +++ b/system/lime/home.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + custom.gui = { + enable = true; + bar = { + network.wifi = "wlp0s20f3"; + }; + }; +} \ No newline at end of file