added initial config for thinkpad to save time later
This commit is contained in:
parent
c353f076b3
commit
40641b275a
3 changed files with 94 additions and 0 deletions
65
devices/inkvine/default.nix
Normal file
65
devices/inkvine/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./options.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
networking = {
|
||||
hostName = "inkvine";
|
||||
};
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "ahci" "xhci_pci" "ums_realtek" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/";
|
||||
fsType = "vfat";
|
||||
};
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/swap" = {
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" "noatime" ];
|
||||
};
|
||||
};
|
||||
swapDevices = [ { device = "/swap/swapfile"; } ];
|
||||
|
||||
services.thermald.enable = true;
|
||||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
enableAllFirmware = true;
|
||||
cpu.intel.updateMicrocode = true;
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
}
|
14
devices/inkvine/options.nix
Normal file
14
devices/inkvine/options.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }: {
|
||||
minimalHome = true;
|
||||
|
||||
withAudio = true;
|
||||
withBluetooth = true;
|
||||
withNvidia = false;
|
||||
|
||||
withNiri = false;
|
||||
withGnome = false;
|
||||
|
||||
withVM = false;
|
||||
withContainers = false;
|
||||
withGames = false;
|
||||
}
|
15
outputs.nix
15
outputs.nix
|
@ -34,5 +34,20 @@
|
|||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
# Lenovo Thinkpad
|
||||
inkvine = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./devices/inkvine
|
||||
./modules
|
||||
./options.nix
|
||||
niri.nixosModules.niri
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue