2024-04-14 00:44:46 -05:00
|
|
|
{ config, lib, pkgs, imports, boot, self, inputs, ... }:
|
2024-03-24 07:21:13 -05:00
|
|
|
# Role for workstations
|
|
|
|
# Covers desktops/laptops, expected to have a GUI and do worloads
|
|
|
|
# Will have home-manager installs
|
|
|
|
|
2024-03-26 05:11:56 -05:00
|
|
|
with config;
|
2024-03-24 07:21:13 -05:00
|
|
|
{
|
2024-03-30 19:37:57 -05:00
|
|
|
|
|
|
|
|
2024-03-26 05:11:59 -05:00
|
|
|
mySystem = {
|
2024-03-25 06:51:18 -05:00
|
|
|
|
2024-03-26 05:11:59 -05:00
|
|
|
de.gnome.enable = true;
|
|
|
|
editor.vscodium.enable = true;
|
2024-03-31 05:40:20 -05:00
|
|
|
|
2024-03-29 05:20:57 -05:00
|
|
|
# Lets see if fish everywhere is OK on the pi's
|
|
|
|
# TODO decide if i drop to bash on pis?
|
|
|
|
shell.fish.enable = true;
|
|
|
|
|
2024-05-05 01:05:59 -05:00
|
|
|
nfs.nas = {
|
|
|
|
enable = true;
|
|
|
|
lazy = true;
|
|
|
|
};
|
2024-04-16 00:14:06 -05:00
|
|
|
system.resticBackup.local.enable = false;
|
|
|
|
system.resticBackup.remote.enable = false;
|
|
|
|
|
2024-03-26 05:11:59 -05:00
|
|
|
};
|
2024-03-26 05:11:56 -05:00
|
|
|
|
|
|
|
boot = {
|
2024-03-24 07:21:13 -05:00
|
|
|
|
|
|
|
binfmt.emulatedSystems = [ "aarch64-linux" ]; # Enabled for raspi4 compilation
|
2024-03-25 06:51:18 -05:00
|
|
|
plymouth.enable = true; # hide console with splash screen
|
2024-04-06 01:24:47 -05:00
|
|
|
|
2024-03-24 07:21:13 -05:00
|
|
|
};
|
|
|
|
|
2024-03-26 05:11:56 -05:00
|
|
|
nix.settings = {
|
2024-03-24 07:21:13 -05:00
|
|
|
# TODO factor out into mySystem
|
|
|
|
# Avoid disk full issues
|
|
|
|
max-free = lib.mkDefault (1000 * 1000 * 1000);
|
|
|
|
min-free = lib.mkDefault (128 * 1000 * 1000);
|
|
|
|
};
|
|
|
|
|
2024-03-24 17:23:35 -05:00
|
|
|
# set xserver videodrivers if used
|
2024-03-26 05:11:56 -05:00
|
|
|
services.xserver.enable = true;
|
2024-03-24 07:21:13 -05:00
|
|
|
|
2024-04-06 01:24:47 -05:00
|
|
|
services = {
|
|
|
|
fwupd.enable = config.boot.loader.systemd-boot.enable; # fwupd does not work in BIOS mode
|
|
|
|
thermald.enable = true;
|
|
|
|
smartd.enable = true;
|
|
|
|
|
|
|
|
# required for yubikey
|
|
|
|
udev.packages = [ pkgs.yubikey-personalization ];
|
|
|
|
pcscd.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
enableAllFirmware = true;
|
|
|
|
sensor.hddtemp = {
|
|
|
|
enable = true;
|
|
|
|
drives = [ "/dev/disk/by-id/*" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-29 05:20:57 -05:00
|
|
|
|
2024-03-30 19:37:57 -05:00
|
|
|
|
2024-03-29 05:20:57 -05:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
jq
|
|
|
|
yq
|
|
|
|
btop
|
2024-03-30 19:37:57 -05:00
|
|
|
vim
|
2024-03-29 05:20:57 -05:00
|
|
|
git
|
|
|
|
dnsutils
|
|
|
|
nix
|
|
|
|
|
2024-04-16 07:59:57 -05:00
|
|
|
# nix dev
|
|
|
|
dnscontrol # for updating internal DNS servers with homelab services
|
|
|
|
|
2024-04-06 01:24:47 -05:00
|
|
|
# Sensors etc
|
|
|
|
lm_sensors
|
|
|
|
cpufrequtils
|
|
|
|
cpupower-gui
|
|
|
|
|
2024-03-29 05:20:57 -05:00
|
|
|
# TODO Move
|
|
|
|
nil
|
|
|
|
nixpkgs-fmt
|
|
|
|
statix
|
|
|
|
nvd
|
|
|
|
gh
|
2024-04-06 01:24:47 -05:00
|
|
|
|
|
|
|
bind # for dns utils like named-checkconf
|
2024-04-14 00:44:46 -05:00
|
|
|
inputs.nix-inspect.packages.${pkgs.system}.default
|
2024-03-29 05:20:57 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
i18n = {
|
|
|
|
defaultLocale = lib.mkDefault "en_AU.UTF-8";
|
|
|
|
};
|
2024-03-24 07:21:13 -05:00
|
|
|
|
|
|
|
|
2024-03-29 05:20:57 -05:00
|
|
|
programs.direnv = {
|
|
|
|
# TODO move to home-manager
|
|
|
|
enable = true;
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
|
|
|
programs.mtr.enable = true;
|
2024-03-24 07:21:13 -05:00
|
|
|
}
|