do things

This commit is contained in:
zack 2025-01-09 13:33:20 -05:00
parent 0dc849ff14
commit 5c08802127
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
14 changed files with 503 additions and 457 deletions

View file

@ -6,7 +6,7 @@
config,
...
}: {
imports = [./hardware-configuration.nix (import ./disko.nix {device = "/dev/nvme0n1";})];
imports = [./hardware-configuration.nix];
nix.settings = {
trusted-users = ["zoey"];
@ -46,11 +46,11 @@
services.fstrim.enable = true;
services.vpn.enable = true;
services.xserver.enable = true;
services.vpn.mullvad = true;
services.vpn.mullvad = false;
services.lorri.enable = true;
services.udisks2.enable = true;
services.transmission = {
enable = true;
enable = false;
package = pkgs.transmission_4;
settings = {
download-dir = "/home/zoey/dl";
@ -66,64 +66,13 @@
};
# Bootloader.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.systemd-boot.enable = true;
boot.lanzaboote = {
enable = true;
enable = false;
pkiBundle = "/etc/secureboot";
};
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/root_vg/root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
{
directory = "/var/lib/colord";
user = "colord";
group = "colord";
mode = "u=rwx,g=rx,o=";
}
];
files = [
"/etc/machine-id"
{
file = "/var/keys/secret_file";
parentDirectory = {mode = "u=rwx,g=,o=";};
}
];
};
networking.hostName = "earth"; # Define your hostname.
networking.extraHosts = "127.0.0.1 local-cald.io";
@ -149,18 +98,23 @@
pkgs.sbctl
pkgs.vesktop
pkgs.mangohud
pkgs.lutris
pkgs.podman-tui
pkgs.dive
pkgs.docker-compose
pkgs.podman-compose
pkgs.transmission_4
inputs.agenix.packages.${system}.agenix
inputs.awsvpnclient.packages."${pkgs.system}".awsvpnclient
];
programs.fish.enable = true;
programs.zsh.enable = true;
programs.fuse.userAllowOther = true;
users.users.zoey = {
isNormalUser = true;
description = "zoey";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
shell = pkgs.fish;
shell = pkgs.zsh;
initialHashedPassword = "$6$rounds=2000000$rFBJH7LwdEHvv.0i$HdHorWqp8REPdWPk5fEgZXX1TujRJkMxumGK0f0elFN0KRPlBjJMW2.35A.ID/o3eC/hGTwbSJAcJcwVN2zyV/";
};
@ -180,7 +134,12 @@
sites.jellyfin.enable = true;
virtualisation.docker.enable = true;
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.libvirtd.enable = true;
system.stateVersion = "24.05";