1
0
Fork 0

Create config for Khanda (Surface Pro 7)

This commit is contained in:
Andre Newman 2024-04-23 14:46:17 -04:00
parent 8f0669e03e
commit adde0fd2a6
4 changed files with 104 additions and 0 deletions

View file

@ -58,6 +58,7 @@
}; };
in { in {
nixosConfigurations = { nixosConfigurations = {
# Microsoft Surface Laptop Go
Dimaga = nixpkgs.lib.nixosSystem { Dimaga = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = defaultModules.base ++ [ modules = defaultModules.base ++ [
@ -66,6 +67,7 @@
]; ];
}; };
# Home server
Haven = nixpkgs.lib.nixosSystem { Haven = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = defaultModules.base ++ [ modules = defaultModules.base ++ [
@ -74,6 +76,16 @@
]; ];
}; };
# Microsoft Surface Pro 7
Khanda = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = defaultModules.base ++ [
nixos-hardware.nixosModules.microsoft-surface-pro-intel
./hosts/Khanda
];
};
# Raspberry Pi
Pihole = nixpkgs.lib.nixosSystem { Pihole = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = defaultModules.base ++ [ modules = defaultModules.base ++ [
@ -82,6 +94,7 @@
]; ];
}; };
# Lenovo Legion Slim 7 Gen 7 AMD
Shura = nixpkgs.lib.nixosSystem { Shura = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = defaultModules.base ++ [ modules = defaultModules.base ++ [

46
hosts/Khanda/default.nix Normal file
View file

@ -0,0 +1,46 @@
{ pkgs, ... }:
# Settings specific to Dimaga
{
imports = [
./hardware-configuration.nix
../common
];
system.stateVersion = "24.05";
host = {
role = "workstation";
apps = {
development.enable = true;
kdeconnect.enable = true;
media.enable = true;
office.enable = true;
pandoc.enable = true;
};
ui = {
flatpak.enable = true;
gnome.enable = true;
};
users = {
aires = {
enable = true;
autologin = true;
services = {
syncthing = {
enable = true;
autostart = true;
enableTray = false;
};
};
};
};
};
# Configure the virtual machine created by nixos-rebuild build-vm
virtualisation.vmVariant.virtualisation = {
memorySize = 2048;
cores = 2;
};
}

View file

@ -0,0 +1,44 @@
# Surface Pro 7
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
/*
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
kernelModules = [ ];
luks.devices."luks-5a91100b-8ed9-4090-b1d8-d8291000fe38".device = "/dev/disk/by-uuid/5a91100b-8ed9-4090-b1d8-d8291000fe38";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/76d67291-5aed-4f2a-b71f-1c2871cefe24";
fsType = "btrfs";
options = [ "subvol=@,compress=zstd" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/0C53-A645";
fsType = "vfat";
};
};
*/
swapDevices = [{
device = "/swapfile";
size = 4096;
}];
networking = {
useDHCP = lib.mkDefault true;
hostName = "Khanda";
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./Dimaga ./Dimaga
./Haven ./Haven
./Khanda
./Pihole ./Pihole
./Shura ./Shura
]; ];