83 lines
2.0 KiB
Nix
83 lines
2.0 KiB
Nix
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
{
|
|
# Setup hardware
|
|
imports = [ inputs.nixos-hardware.nixosModules.raspberry-pi-4 ];
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
fsType = "ext4";
|
|
options = [ "noatime" ];
|
|
};
|
|
};
|
|
# Sops setup for this machine
|
|
sops.secrets = {
|
|
# "borg-ssh-key" = {
|
|
# sopsFile = ../../secrets/tounge/borg.yaml;
|
|
# format = "yaml";
|
|
# };
|
|
# "borg-password" = {
|
|
# sopsFile = ../../secrets/tounge/borg.yaml;
|
|
# format = "yaml";
|
|
# };
|
|
"wifi" = {
|
|
sopsFile = ../../secrets/universe/wifi;
|
|
format = "binary";
|
|
};
|
|
};
|
|
# Setup system configuration
|
|
nathan = {
|
|
services = {
|
|
borg = {
|
|
enable = false;
|
|
extraExcludes = [ "/var/lib/docker" "/var/log" ];
|
|
passwordFile = config.sops.secrets."borg-password".path;
|
|
sshKey = config.sops.secrets."borg-ssh-key".path;
|
|
};
|
|
};
|
|
config = {
|
|
setupGrub = false;
|
|
userUid = "1001";
|
|
nix = {
|
|
autoUpdate = false;
|
|
autoGC = true;
|
|
};
|
|
harden = false;
|
|
};
|
|
};
|
|
# Use just normal ass linux, without zfs
|
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_4;
|
|
boot.supportedFilesystems =
|
|
lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "vfat" "xfs" ];
|
|
# Configure networking
|
|
networking = {
|
|
domain = "mccarty.io";
|
|
useDHCP = true;
|
|
wireless = {
|
|
environmentFile = config.sops.secrets."wifi".path;
|
|
networks = { "Apollo" = { psk = "@PSK_WIFI@"; }; };
|
|
enable = true;
|
|
interfaces = [ "wlan0" ];
|
|
};
|
|
# Open ports in firewall
|
|
firewall = {
|
|
allowedTCPPorts = [ ];
|
|
allowedUDPPorts = [ ];
|
|
};
|
|
};
|
|
|
|
# Setup home manager
|
|
home-manager.users.nathan = import ./home.nix;
|
|
|
|
# Printer firmware
|
|
services.klipper = {
|
|
package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.klipper;
|
|
enable = true;
|
|
};
|
|
services.moonraker = { enable = true; };
|
|
services.mainsail = {
|
|
package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mainsail;
|
|
enable = true;
|
|
};
|
|
}
|