1
0
Fork 0

Compare commits

..

No commits in common. "e3b7fe55cfd924c98b7a204d31f00ee8b11419d8" and "502407e3c19d9aabd91f55427faa43bdec912c10" have entirely different histories.

6 changed files with 112 additions and 32 deletions

View file

@ -12,13 +12,16 @@
aux.system = {
apps.tmux.enable = true;
bootloader.enable = false; # Bootloader configured in hardware-configuration.nix
boot = {
enable = true;
secureboot.enable = false;
};
packages = with pkgs; [
libraspberrypi
raspberrypifw
raspberrypi-eeprom
linuxKernel.kernels.linux_rpi4
];
libraspberrypi
raspberrypifw
raspberrypi-eeprom
linuxKernel.kernels.linux_rpi4
];
services.ssh = {
enable = true;
ports = [ config.secrets.hosts.haven.ssh.port ];

View file

@ -5,9 +5,6 @@
...
}:
let
# Do not change this value! This tracks when NixOS was installed on your system.
stateVersion = "24.05";
# Copy bluetooth device configs
shure-aonic-bluetooth = pkgs.writeText "info" (
builtins.readFile ./bluetooth/shure-aonic-bluetooth-params
@ -29,7 +26,7 @@ in
{
imports = [ ./hardware-configuration.nix ];
system.stateVersion = stateVersion;
system.stateVersion = "24.05";
aux.system = {
apps = {
@ -45,28 +42,9 @@ in
languagetool.enable = true;
};
};
# Configure the bootloader.
bootloader = {
enable = true;
secureboot.enable = true;
tpm2.enable = true;
};
# Change the default text editor. Options are "emacs", "nano", or "vim".
editor = "nano";
# Enable GPU support.
gpu.amd.enable = true;
packages = with pkgs; [
boinc # Boinc client
];
# Keep old generations for one week.
packages = with pkgs; [ boinc ];
retentionPeriod = "7d";
# Run daily automatic updates.
services.autoUpgrade = {
enable = true;
configDir = config.secrets.nixConfigFolder;

View file

@ -0,0 +1,35 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.aux.system.apps.kdeconnect;
in
with lib;
{
options = {
aux.system.apps.kdeconnect.enable = mkEnableOption (mdDoc "Enables KDE Connect");
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ gnomeExtensions.gsconnect ];
networking.firewall = {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
};
};
}

View file

@ -26,7 +26,11 @@ in
{
options = {
aux.system.services.autoUpgrade = {
enable = lib.mkEnableOption (lib.mdDoc "Enables automatic system updates.");
enable = lib.mkOption {
default = true;
type = lib.types.bool;
description = "Enables automatic system updates.";
};
branches = lib.mkOption {
type = lib.types.attrs;
description = "Which local and remote branches to compare.";

60
modules/services/k3s.nix Normal file
View file

@ -0,0 +1,60 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.aux.system.services.k3s;
in
with lib;
{
options = {
aux.system.services.k3s = {
enable = mkEnableOption (mdDoc "Enables K3s");
role = mkOption {
default = "server";
type = types.enum [
"agent"
"server"
];
description = "Which K3s role to use";
};
serverAddr = mkOption {
default = "";
type = types.str;
description = "If an agent, this is the address of the server.";
};
};
};
config = mkIf cfg.enable {
# Add packages for developing with K3s.
# For details, see https://nixos.wiki/wiki/K3s
environment.systemPackages = with pkgs; [ k3s ];
networking.firewall = {
allowedTCPPorts = [
6443 # k3s: required so that pods can reach the API server (running on port 6443 by default)
# 2379 # k3s, etcd clients: required if using a "High Availability Embedded etcd" configuration
# 2380 # k3s, etcd peers: required if using a "High Availability Embedded etcd" configuration
];
allowedUDPPorts = [
# 8472 # k3s, flannel: required if using multi-node for inter-node networking
];
};
services.k3s = {
enable = true;
inherit (cfg) role;
extraFlags = toString [
# "--kubelet-arg=v=4" # Optionally add additional args to k3s
];
} // optionalAttrs (cfg.role == "agent") { inherit (cfg) serverAddr; };
# Increase number of open file handlers so K3s doesn't exhaust them...again.
systemd.extraConfig = ''
DefaultLimitNOFILE=8192:1048576
'';
};
}

View file

@ -12,7 +12,7 @@ in
{
options = {
aux.system.services.virtualization = {
enable = lib.mkEnableOption (lib.mdDoc "Enables virtualization hosting tools on this host.");
enable = lib.mkEnableOption (lib.mdDoc "Enables virtualization hosting tools on this aux.system.");
user = lib.mkOption {
default = "";
type = lib.types.str;