I should commit more frequently

This commit is contained in:
Andrea Ciceri 2023-12-07 23:07:36 +01:00
parent aa8003f5b4
commit e82241b8b0
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
70 changed files with 1091 additions and 2018 deletions

94
hosts/picard/default.nix Normal file
View file

@ -0,0 +1,94 @@
{
fleetModules,
lib,
config,
...
}: {
imports =
fleetModules [
"common"
"ssh"
"ccr"
"nix"
"networkmanager"
"bluetooth"
"dbus"
"docker"
"fonts"
"qmk-udev"
"mosh"
"udisks2"
"xdg"
"pipewire"
"nix-development"
"waydroid"
"virt-manager"
"ssh-initrd"
"hercules-ci"
]
++ [
./disko.nix
];
ccr = {
enable = true;
autologin = true;
modules = [
"git"
"git-workspace"
"helix"
"shell"
"element"
"emacs"
"firefox"
"gpg"
"mpv"
"password-store"
"slack"
"hyprland"
"udiskie"
"xdg"
"spotify"
"lutris"
"wine"
"cura"
];
extraGroups = [];
};
boot.kernelParams = ["ip=dhcp"];
boot.initrd.kernelModules = ["amdgpu"];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"r8169"
];
boot.kernelModules = ["kvm-amd"];
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot = {
enable = true;
configurationLimit = 20;
};
networking.hostId = "5b02e763";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.enableRedistributableFirmware = lib.mkDefault true;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
# TODO move away from here (how can the interface name be retrieved programmatically?)
networking.interfaces.enp11s0.wakeOnLan = {
enable = true;
policy = ["broadcast" "magic"];
};
}

72
hosts/picard/disko.nix Normal file
View file

@ -0,0 +1,72 @@
{
disko.devices = {
disk = {
nvme = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "zroot";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
rootFsOptions = {
compression = "lz4";
acltype = "posixacl";
xattr = "sa";
"com.sun:auto-snapshot" = "true";
mountpoint = "none";
};
datasets = {
"root" = {
type = "zfs_fs";
options = {
mountpoint = "none";
encryption = "aes-256-gcm";
keyformat = "passphrase";
keylocation = "prompt";
};
};
"root/nixos" = {
type = "zfs_fs";
options.mountpoint = "/";
mountpoint = "/";
};
"root/home" = {
type = "zfs_fs";
options.mountpoint = "/home";
mountpoint = "/home";
};
"root/tmp" = {
type = "zfs_fs";
mountpoint = "/tmp";
options = {
mountpoint = "/tmp";
sync = "disabled";
};
};
};
};
};
};
}