nixos-config/machines/zero.nix
Christoph Heiss f9f7017442
All checks were successful
flake / build (push) Successful in 3m19s
machines: zero: add some secrets
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-08-17 01:24:36 +02:00

83 lines
2.1 KiB
Nix

{ my, pkgs, ... }:
{
imports = [
../secrets/desktop.nix
../secrets/machines/zero.nix
../system/automation-target.nix
../system/btrfs.nix
../system/desktop.nix
../system/ucode-amd.nix
];
system.stateVersion = "23.05";
boot.initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.blacklistedKernelModules = [ "acpi_cpufreq" ];
boot.kernelParams = [ "amd_pstate=active" ];
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 = [ "noatime" "subvol=@nix" ];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/5151f79a-fca4-45d4-8bd9-66f157a1d51f";
fsType = "btrfs";
options = [ "noatime" "subvol=@log" ];
};
services.btrfs.autoScrub.fileSystems = [ "/" ];
networking.interfaces.eno1.wakeOnLan.enable = true;
networking.networkmanager.connectionConfig."ipv6.dhcp-duid" =
my.machines.zero.duid;
home-manager.users.christoph = {
my = {
applications.personal.enable = true;
emails.personal.enable = true;
terminal.fontSize = 10.5;
};
home.packages = with pkgs; [ prismlauncher ];
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"; }];
};
};
}