refactor: move host-specific modules to hosts/
This commit is contained in:
parent
d859e671f9
commit
de6d9a42b2
5 changed files with 6 additions and 5 deletions
|
|
@ -5,18 +5,19 @@
|
|||
imports = with modules.system; [
|
||||
audio
|
||||
base
|
||||
filesystem-winter
|
||||
gui
|
||||
input
|
||||
kernel
|
||||
kernel-winter
|
||||
networking
|
||||
nix
|
||||
packages
|
||||
security
|
||||
snapper
|
||||
|
||||
../users/rin.nix
|
||||
./filesystem.nix
|
||||
./kernel.nix
|
||||
./networking.nix
|
||||
|
||||
../../users/rin.nix
|
||||
];
|
||||
}
|
||||
|
||||
35
hosts/winter/filesystem.nix
Normal file
35
hosts/winter/filesystem.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
mkMount = uuid: type: {
|
||||
device = "/dev/disk/by-uuid/${uuid}";
|
||||
fsType = type;
|
||||
options = [ "defaults" "relatime" ];
|
||||
};
|
||||
mkBtrfsMount = subvolid: atime: mkMount "8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d" "btrfs" // {
|
||||
options = [ "autodefrag" "compress=zstd:3" "defaults" "nossd" "nossd_spread" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime")];
|
||||
};
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=4G" "mode=755" ];
|
||||
};
|
||||
"/boot" = mkMount "E8E8-E570" "vfat";
|
||||
"/mnt/hdd" = mkMount "d5e3cfe5-c73a-4695-b81b-fc0215d4cefe" "ext4";
|
||||
|
||||
"/mnt/butter" = mkBtrfsMount 5 true;
|
||||
"/nix" = mkBtrfsMount 258 false;
|
||||
"/home" = mkBtrfsMount 260 true;
|
||||
"/home/.snapshots" = mkBtrfsMount 319 false;
|
||||
"/root" = mkBtrfsMount 261 false;
|
||||
"/var" = mkBtrfsMount 259 false;
|
||||
|
||||
# "/mnt/nfs" = {
|
||||
# device = "192.168.100.11:/srv/nfs";
|
||||
# fsType = "nfs";
|
||||
# options = [ "defaults" ];
|
||||
# };
|
||||
};
|
||||
}
|
||||
22
hosts/winter/kernel.nix
Normal file
22
hosts/winter/kernel.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
initrd.kernelModules = [ "i915" ];
|
||||
kernelParams = [
|
||||
"amdgpu.gpu_recovery=1"
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.si_support=0"
|
||||
"intel_pstate=passive"
|
||||
"msr.allow_writes=on"
|
||||
];
|
||||
kernelPackages = pkgs.lib.mkForce (pkgs.linuxPackagesFor pkgs.linux-lava);
|
||||
};
|
||||
}
|
||||
23
hosts/winter/networking.nix
Normal file
23
hosts/winter/networking.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, ... }: {
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = [ "wlp3s0" ];
|
||||
};
|
||||
|
||||
useDHCP = false;
|
||||
interfaces.eno1.useDHCP = false;
|
||||
interfaces.wlp3s0.useDHCP = false;
|
||||
|
||||
interfaces.eno1.ipv4.addresses = [{
|
||||
address = "10.0.0.2";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
interfaces.wlp3s0.ipv4.addresses = [{
|
||||
address = "192.168.100.13";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
defaultGateway = "192.168.100.1";
|
||||
nameservers = [ "192.168.100.11" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue