Add `lime` system

This commit is contained in:
Riley Apeldoorn 2023-06-17 07:53:58 +02:00
parent 2e288c1a03
commit 4395628eac
3 changed files with 82 additions and 0 deletions

View File

@ -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.

59
system/lime/core.nix Normal file
View File

@ -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";
}

10
system/lime/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ ... }:
{
custom.gui = {
enable = true;
bar = {
network.wifi = "wlp0s20f3";
};
};
}