Add Detritus
This commit is contained in:
parent
822fa6eae2
commit
ca2d6e4091
14 changed files with 211 additions and 14 deletions
|
@ -67,6 +67,7 @@
|
|||
|
||||
hostChannels = {
|
||||
tower = stable;
|
||||
detritus = stable;
|
||||
|
||||
intuos = stable;
|
||||
jupiter = unstable;
|
||||
|
|
12
hosts/detritus/boot/default.nix
Normal file
12
hosts/detritus/boot/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [
|
||||
"amdgpu.cik_support=1"
|
||||
"radeon.cik_support=0"
|
||||
];
|
||||
loader.grub.enable = true;
|
||||
plymouth.enable = true;
|
||||
};
|
||||
}
|
18
hosts/detritus/default.nix
Normal file
18
hosts/detritus/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
./user
|
||||
../../modules/system
|
||||
];
|
||||
|
||||
networking.hostName = "detritus";
|
||||
|
||||
system = {
|
||||
desktop.enable = true;
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
}
|
106
hosts/detritus/disko/default.nix
Normal file
106
hosts/detritus/disko/default.nix
Normal file
|
@ -0,0 +1,106 @@
|
|||
{ config, disko, ... }:
|
||||
{
|
||||
imports = [ disko.nixosModules.disko ];
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "${config.networking.hostName}-disk";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noexec"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
"/persist/home" = { };
|
||||
"/persist/home/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Needed for impermanence
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
}
|
33
hosts/detritus/filesystems/default.nix
Normal file
33
hosts/detritus/filesystems/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
fileSystems = {
|
||||
# Network mounts
|
||||
"/home/${config.sysusers.main}/Network/Midas" = {
|
||||
device = "sv.nixfox.ca:/storage";
|
||||
fsType = "nfs4";
|
||||
options = [
|
||||
"noauto"
|
||||
"soft"
|
||||
"x-systemd.automount"
|
||||
];
|
||||
};
|
||||
"/home/${config.sysusers.main}/Network/Kitty" = {
|
||||
device = "sv.nixfox.ca:/storage/bun";
|
||||
fsType = "nfs4";
|
||||
options = [
|
||||
"noauto"
|
||||
"soft"
|
||||
"x-systemd.automount"
|
||||
];
|
||||
};
|
||||
"/home/${config.sysusers.main}/Network/Prophet" = {
|
||||
device = "mx.nixfox.ca:/storage";
|
||||
fsType = "nfs4";
|
||||
options = [
|
||||
"noauto"
|
||||
"soft"
|
||||
"x-systemd.automount"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
21
hosts/detritus/hardware/default.nix
Normal file
21
hosts/detritus/hardware/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"ehci_pci"
|
||||
"firewire_ohci"
|
||||
"sd_mod"
|
||||
"xhci_pci"
|
||||
];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
7
hosts/detritus/user/default.nix
Normal file
7
hosts/detritus/user/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
home-manager.users."${config.sysusers.main}".home = {
|
||||
guifull.enable = true;
|
||||
stateVersion = lib.mkForce config.system.stateVersion;
|
||||
};
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [
|
||||
"radeon.cik_support=0"
|
||||
"amdgpu.cik_support=1"
|
||||
"radeon.cik_support=0"
|
||||
];
|
||||
loader.systemd-boot.enable = true;
|
||||
plymouth.enable = true;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
imageSize = "32G";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
tower3 = "Eizo Nanao Corporation CG223W 23252050";
|
||||
tower4 = "Samsung Electric Company SAMSUNG Unknown";
|
||||
|
||||
estradiol1 = "Dell Inc. DELL P2214H KW14V4965YKS";
|
||||
estradiol2 = "HannStar Display Corp iP192A 051AW1WY03797";
|
||||
detritus1 = "Dell Inc. DELL P2214H KW14V4965YKS";
|
||||
detritus2 = "HannStar Display Corp iP192A 051AW1WY03797";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,14 +40,14 @@
|
|||
|
||||
{
|
||||
profile = {
|
||||
name = "estradiol";
|
||||
name = "detritus";
|
||||
outputs = [
|
||||
{
|
||||
criteria = config.displays.estradiol1;
|
||||
criteria = config.displays.detritus1;
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = config.displays.estradiol2;
|
||||
criteria = config.displays.detritus2;
|
||||
position = "1920,0";
|
||||
scale = 0.85;
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@
|
|||
output = [
|
||||
"!${config.displays.tower2}"
|
||||
"!${config.displays.tower3}"
|
||||
"!${config.displays.estradiol2}"
|
||||
"!${config.displays.detritus2}"
|
||||
"*"
|
||||
];
|
||||
modules-left = [
|
||||
|
@ -299,7 +299,7 @@
|
|||
output = [
|
||||
config.displays.tower2
|
||||
config.displays.tower3
|
||||
config.displays.estradiol2
|
||||
config.displays.detritus2
|
||||
];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
(assign "${config.displays.tower3}" workspaces3) ++
|
||||
(assign "${config.displays.tower4}" workspaces4) ++
|
||||
|
||||
(assign "${config.displays.estradiol1}" workspaces1) ++
|
||||
(assign "${config.displays.estradiol1}" workspaces2) ++
|
||||
(assign "${config.displays.estradiol2}" workspaces3) ++
|
||||
(assign "${config.displays.estradiol2}" workspaces4);
|
||||
(assign "${config.displays.detritus1}" workspaces1) ++
|
||||
(assign "${config.displays.detritus1}" workspaces2) ++
|
||||
(assign "${config.displays.detritus2}" workspaces3) ++
|
||||
(assign "${config.displays.detritus2}" workspaces4);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
"${config.displays.tower2}".bg = "${builtins.toString ./wallpapers/2.png} fill";
|
||||
"${config.displays.tower3}".bg = "${builtins.toString ./wallpapers/3.png} fill";
|
||||
|
||||
"${config.displays.estradiol2}".bg = "${builtins.toString ./wallpapers/2.png} fill";
|
||||
"${config.displays.detritus2}".bg = "${builtins.toString ./wallpapers/2.png} fill";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue