machines: Add configuration for zero; new workstation
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
0dac676c51
commit
2e49ac3334
|
@ -20,4 +20,4 @@ in {
|
|||
pkgs = import pinnedPkgs { overlays = [ (import ./pkgs) ]; };
|
||||
description = "c8h4.io infrastructure";
|
||||
};
|
||||
} // (builtins.listToAttrs (map mkMachine [ "name" "serv" "trek" ]))
|
||||
} // (builtins.listToAttrs (map mkMachine [ "name" "serv" "trek" "zero" ]))
|
||||
|
|
78
machines/zero.nix
Normal file
78
machines/zero.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{ my, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../system/desktop.nix ../system/ucode-amd.nix ];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B369-D2FE";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5151f79a-fca4-45d4-8bd9-66f157a1d51f";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/5151f79a-fca4-45d4-8bd9-66f157a1d51f";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/5151f79a-fca4-45d4-8bd9-66f157a1d51f";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "/dev/disk/by-uuid/5151f79a-fca4-45d4-8bd9-66f157a1d51f";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@log" ];
|
||||
};
|
||||
|
||||
fileSystems."/storage/bunker" = {
|
||||
device = "tank.c8h4.io:/tank/bunker";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"noauto"
|
||||
"noexec"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.mount-timeout=10s"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
networking = my.homelab.networking // {
|
||||
interfaces.eno1 = my.machines.zero.eno1 // { wakeOnLan.enable = true; };
|
||||
};
|
||||
|
||||
home-manager.users.christoph = {
|
||||
my.emails.personal.enable = true;
|
||||
|
||||
wayland.windowManager.sway.config = let
|
||||
inherit (my.machines.zero) displays;
|
||||
# Assigns five workspaces, starting at `base`, to output `output`.
|
||||
makeWorkspaceOutputAssignList = base: output:
|
||||
builtins.genList (x: {
|
||||
inherit output;
|
||||
workspace = toString (base + x);
|
||||
}) 5;
|
||||
in {
|
||||
workspaceOutputAssign =
|
||||
(makeWorkspaceOutputAssignList 1 (builtins.elemAt displays 0))
|
||||
++ (makeWorkspaceOutputAssignList 6 (builtins.elemAt displays 1));
|
||||
|
||||
assigns = {
|
||||
"6" = [{ app_id = "firefox"; }];
|
||||
"7" = [{ class = "Spotify"; }];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
BIN
secrets/my.nix
BIN
secrets/my.nix
Binary file not shown.
6
system/ucode-amd.nix
Normal file
6
system/ucode-amd.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.microcodeAmd ];
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
}
|
Loading…
Reference in a new issue