init
This commit is contained in:
commit
498f3050d5
145 changed files with 2964 additions and 0 deletions
41
hosts/default.nix
Normal file
41
hosts/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
homeImports,
|
||||
...
|
||||
}: {
|
||||
flake.nixosConfigurations = let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
mod = "${self}/system";
|
||||
|
||||
# get the basic config to build on top of
|
||||
inherit (import "${self}/system") desktop laptop;
|
||||
|
||||
# get these into the module system
|
||||
specialArgs = {inherit inputs self;};
|
||||
in {
|
||||
nixdesk = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules =
|
||||
desktop
|
||||
++ [
|
||||
./nixdesk
|
||||
"${mod}/programs/gamemode.nix"
|
||||
"${self}/secrets"
|
||||
{
|
||||
home-manager = {
|
||||
users.xun.imports = homeImports."xun@nixdesk";
|
||||
extraSpecialArgs = specialArgs;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
hopper = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./core
|
||||
./core/boot.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
15
hosts/hopper/default.nix
Normal file
15
hosts/hopper/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{inputs}: {
|
||||
imports = with inputs.hardware.nixosModules; [
|
||||
common-cpu-intel
|
||||
common-pc-hdd
|
||||
common-gpu-nvidia
|
||||
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
networking.hostName = "hopper";
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
39
hosts/hopper/hardware.nix
Normal file
39
hosts/hopper/hardware.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{...}: {
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = ["ehci_pci" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
kernelModules = [];
|
||||
};
|
||||
kernelModules = ["kvm-intel"];
|
||||
extraModulePackages = [];
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/1297e638-f2ff-49a2-a362-314ac7eeaabc";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root" "compress=zstd"];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/1297e638-f2ff-49a2-a362-314ac7eeaabc";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd"];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/1297e638-f2ff-49a2-a362-314ac7eeaabc";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/8D4C-2F05";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
}
|
19
hosts/nixdesk/default.nix
Normal file
19
hosts/nixdesk/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
inputs.hardware.nixosModules.common-gpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
networking.hostName = "nixdesk";
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
47
hosts/nixdesk/hardware.nix
Normal file
47
hosts/nixdesk/hardware.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{pkgs, ...}: {
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = ["amdgpu"];
|
||||
};
|
||||
kernelModules = ["kvm-amd"];
|
||||
loader = {
|
||||
timeout = 10;
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "max";
|
||||
configurationLimit = 120;
|
||||
editor = false;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/0c080ce8-26f0-454b-a100-1ca9d5308931";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/D23A-89BF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
nixpkgs.hostPlatform.system = "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue