nixos-config/hosts/cave/configuration.nix

302 lines
7.7 KiB
Nix
Raw Normal View History

2024-04-11 13:16:26 +02:00
{
pkgs,
lib,
2024-04-23 17:29:48 +02:00
inputs,
config,
2024-04-11 13:16:26 +02:00
...
2024-04-22 05:51:31 +02:00
}: let
sshKeys = import ../../crypto/ssh-keys.nix;
in {
2024-04-11 13:16:26 +02:00
imports = [
2024-06-07 18:06:59 +02:00
# Defaults
2024-04-11 13:16:26 +02:00
./hardware-configuration.nix
2024-04-22 20:48:35 +02:00
../../common/base.nix
2024-04-17 20:39:12 +02:00
../../common/full-install.nix
2024-04-11 13:16:26 +02:00
2024-06-07 18:06:59 +02:00
# Localization
2024-04-11 13:16:26 +02:00
../../common/locales/en.nix
2024-04-18 21:10:13 +02:00
../../common/locales/fr-keymap.nix
2024-04-22 06:39:13 +02:00
2024-06-07 18:06:59 +02:00
# Hardware
2025-01-23 20:22:39 +01:00
#../../common/hardware/intel-cpu.nix
# ../../common/hardware/tpm2.nix
2024-04-22 21:24:54 +02:00
../../common/hardware/wireless.nix
2025-01-24 11:31:28 +01:00
# ../../common/hardware/nvidia-gpu.nix
2025-01-23 20:22:39 +01:00
#../../common/hardware/nvidia-gpu-offload.nix
2024-04-17 22:28:27 +02:00
../../common/hardware/ssd.nix
2024-04-22 05:51:31 +02:00
../../common/hardware/btrfs.nix
2024-04-11 13:16:26 +02:00
2024-06-07 18:06:59 +02:00
# Software components
2025-01-24 11:31:28 +01:00
# ../../common/components/de/sddm.nix
2024-04-22 21:24:54 +02:00
../../common/components/de/plasma6.nix
2024-05-24 12:57:53 +02:00
# ../../common/components/de/hyprland.nix
2024-04-11 13:16:26 +02:00
2024-06-07 18:06:59 +02:00
# Programs
2024-04-22 20:48:35 +02:00
../../common/programs/steam.nix
2024-05-24 12:57:53 +02:00
2024-06-07 18:06:59 +02:00
# Services
2024-08-10 19:23:59 +02:00
# ../../common/services/auditd.nix
2025-01-23 20:22:39 +01:00
# ../../common/services/nix-gc.nix
2024-06-26 10:40:08 +02:00
../../common/services/opensnitch.nix
2024-08-10 19:23:59 +02:00
# ../../common/services/adguardhome.nix
2024-04-22 20:48:35 +02:00
../../common/services/syncthing.nix
../../common/services/usbguard.nix
2024-05-24 12:51:50 +02:00
../../common/services/autoupgrade.nix
2024-04-18 21:10:13 +02:00
2024-06-07 18:06:59 +02:00
# Home-manager
2024-04-23 17:29:48 +02:00
../../home/tasia/home.nix
2024-06-07 18:06:59 +02:00
2024-08-10 19:23:59 +02:00
inputs.agenix.nixosModules.default
../../common/components/wifi-secrets.nix
2025-01-23 20:22:39 +01:00
# inputs.thymis.nixosModules.thymis-controller
2024-06-07 18:06:59 +02:00
# Personal modules
2024-06-07 18:14:47 +02:00
# ../../modules/nixos/tildefriends.nix
2024-10-04 20:25:54 +02:00
./yubikey.nix
2025-01-28 10:01:00 +01:00
inputs.lanzaboote.nixosModules.lanzaboote
];
2024-06-07 18:06:59 +02:00
2024-04-11 13:16:26 +02:00
networking = {
2025-01-24 11:31:28 +01:00
hostName = "cave";
2024-04-11 13:16:26 +02:00
2024-04-18 21:10:13 +02:00
firewall = {
allowedTCPPorts = [
2024-06-01 00:29:03 +02:00
# 8080 # ?
2024-10-03 12:50:40 +02:00
80
443
3001
8000
2024-06-07 18:06:59 +02:00
# 8008 # ssb
# 12345 # tildefriends
# 13378 # audiobookshelf
2024-04-18 21:10:13 +02:00
];
allowedUDPPorts = [
2024-06-07 18:06:59 +02:00
# 8080 # ?
2024-04-18 21:10:13 +02:00
];
};
2024-04-11 13:16:26 +02:00
};
2024-04-23 17:29:48 +02:00
users.users.tasia.openssh.authorizedKeys.keys = [
2025-01-24 11:31:28 +01:00
sshKeys.tasia.cave
2024-04-23 17:29:48 +02:00
];
2024-04-11 13:16:26 +02:00
2024-04-18 21:10:13 +02:00
virtualisation.docker.enable = true;
2024-05-23 13:45:32 +02:00
services.flatpak.enable = true;
2024-04-11 13:16:26 +02:00
2024-04-11 17:08:50 +02:00
services.syncthing = {
2024-04-22 06:39:13 +02:00
user = "tasia";
dataDir = lib.mkForce "/home/tasia/Sync/data";
configDir = lib.mkForce "/home/tasia/Sync/configuration";
2024-04-11 17:08:50 +02:00
};
2024-04-11 13:16:26 +02:00
2024-04-18 21:10:13 +02:00
# Needed to build enry
2025-01-23 20:22:39 +01:00
#boot.binfmt.emulatedSystems = ["aarch64-linux"];
2024-04-18 21:10:13 +02:00
2024-04-11 13:16:26 +02:00
environment.systemPackages = with pkgs; [
inputs.tildefriends.packages.${system}.default
2024-04-23 18:26:19 +02:00
osu-lazer-bin
prismlauncher
2024-06-07 18:14:47 +02:00
2024-06-24 10:16:41 +02:00
sherlock
whois
android-tools
2024-06-28 10:53:34 +02:00
ripgrep
lsd
viu
logseq
2024-07-31 16:27:07 +02:00
nix-tree
2024-06-28 10:53:34 +02:00
android-studio
2024-08-06 18:44:43 +02:00
lutris
2024-10-03 12:50:40 +02:00
# nheko
iamb
ladybird
lynx
chirp
2024-10-04 20:25:54 +02:00
yubikey-manager
2024-10-03 12:50:40 +02:00
2024-08-06 18:44:43 +02:00
inputs.agenix.packages.x86_64-linux.default
2025-01-23 20:22:39 +01:00
sdrpp
gqrx
rtl-sdr
grim # screenshot functionality
slurp # screenshot functionality
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
mako # notification system developed by swaywm maintainer
2025-01-28 10:01:00 +01:00
sbctl
sway-launcher-desktop
foot
waybar
wayshot
2024-06-28 10:53:34 +02:00
];
2025-01-28 10:01:00 +01:00
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway -r";
user = "greeter";
};
};
};
2025-01-24 11:31:28 +01:00
# Enable the gnome-keyring secrets vault.
2025-01-23 20:22:39 +01:00
# Will be exposed through DBus to programs willing to store secrets.
services.gnome.gnome-keyring.enable = true;
# enable sway window manager
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
2025-01-28 10:01:25 +01:00
# services.radicle.enable = true;
# services.radicle.privateKeyFile = /home/tasia/.radicle/keys/radicle;
# services.radicle.publicKey = /home/tasia/.radicle/keys/radicle.pub;
# services.radicle.settings = {
# web.pinned.repositories = [
# "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5" # heartwood
# "rad:z3trNYnLWS11cJWC6BbxDs5niGo82" # rips
# ];
# };
2025-01-24 11:31:28 +01:00
hardware.rtl-sdr.enable = true;
users.users.tasia.extraGroups = ["plugdev"];
2025-01-23 20:22:39 +01:00
2025-01-24 11:31:28 +01:00
boot.kernelParams = ["modprobe.blacklist=dvb_usb_rtl28xxu"]; # blacklist this module
2025-01-23 20:22:39 +01:00
2025-01-24 11:31:28 +01:00
services.udev.packages = [pkgs.rtl-sdr];
2025-01-23 20:22:39 +01:00
2024-06-28 10:53:34 +02:00
fonts.packages = with pkgs; [
2025-01-28 10:01:00 +01:00
(nerdfonts.override {fonts = ["CascadiaCode" "JetBrainsMono"];})
2024-04-11 13:16:26 +02:00
];
2024-04-27 13:56:15 +02:00
2025-01-23 20:22:39 +01:00
# programs.adb.enable = true;
2024-10-03 12:50:40 +02:00
# services.nginx.enable = true;
# services.nginx.virtualHosts."test.vulpecula.zone" = {
# # addSSL = true;
# # enableACME = true;
# root = "/www";
# };
# security.acme = {
# acceptTerms = true;
# defaults.email = "tasiaiso@proton.me";
# };
2024-08-06 18:44:43 +02:00
services.printing.drivers = [pkgs.cnijfilter2];
2024-07-31 16:26:45 +02:00
2024-10-05 09:59:58 +02:00
# services.uptime-kuma.enable = true;
2024-10-03 12:50:40 +02:00
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
2024-10-03 13:12:13 +02:00
"electron-27.3.11"
2024-10-03 12:50:40 +02:00
];
2024-09-05 20:49:12 +02:00
# services.mattermost = {
# enable = true;
# siteUrl = "https://mattermost.example.com"; # Set this to the URL you will be hosting the site on.
# };
2024-10-03 12:50:40 +02:00
# todo: ci runner
2024-09-05 20:49:12 +02:00
# services.ollama = {
# enable = true;
# # acceleration = "cuda";
# };
# services.gotosocial = {
# enable = true;
# setupPostgresqlDB = true;
# settings = {
# application-name = "My GoToSocial";
# host = "gotosocial.example.com";
# protocol = "http";
# bind-address = "127.0.0.1";
# port = 8080;
# };
# };
# environment.etc."nextcloud-admin-pass".text = "Devdevdev10!";
# services.nextcloud = {
# enable = true;
# package = pkgs.nextcloud29;
# hostName = "localhost";
# config.adminpassFile = "/etc/nextcloud-admin-pass";
# };
2024-06-24 10:16:41 +02:00
2025-01-24 11:31:28 +01:00
# services.rustdesk-server = {
# enable = true;
# openFirewall = true;
# relayIP = "100.91.88.2";
# };
2024-08-10 19:23:59 +02:00
2024-08-07 16:33:11 +02:00
# users.users.lol = {
# isNormalUser = true;
# description = "lol";
# extraGroups = [
# "networkmanager"
# # "wheel"
# # "syncthing"
# # "tss"
# # "dialout"
# # "vboxusers"
# # "adbusers"
# ];
# initialPassword = "password123";
# };
# netwobking
# ipvx dns-search = "";
# wifi mac-address-blacklist = "";
# wifisec auth-alg = "open";
2024-10-13 18:49:45 +02:00
# services.thymis-controller = {
# enable = true;
# system-binfmt-aarch64-enable = true; # enables emulation of aarch64 binaries, default is true on x86_64, needed for building aarch64 images on x86_64
# system-binfmt-x86_64-enable = false; # enables emulation of x86_64 binaries, default is false
# repo-path = "/var/lib/thymis/repository"; # directory where the controller will store the repository holding the project
# database-url = "sqlite:////var/lib/thymis/thymis.sqlite"; # URL of the database
2025-01-24 11:31:28 +01:00
# base-url = "https://cave/"; # base URL of the controller, how it will be accessed from the outside
2024-10-13 18:49:45 +02:00
# auth-basic = true; # whether to enable authentication using a basic username/password
# auth-basic-username = "admin"; # username for basic authentication
# auth-basic-password-file = "/var/lib/thymis/auth-basic-password"; # file containing the password for basic authentication
# # content will be automatically generated if it does not exist
# listen-host = "127.0.0.1"; # host on which the controller listens for incoming connections
# listen-port = 33100; # port on which the controller listens for incoming connections
# nginx-vhost-enable = false; # whether to enable the Nginx virtual host
# nginx-vhost-name = "thymis"; # name of the Nginx virtual host
# };
# # Configure the Nginx virtual host
# services.nginx = {
# enable = true;
# virtualHosts."thymis" = {
2025-01-24 11:31:28 +01:00
# serverName = "cave";
2024-10-13 18:49:45 +02:00
# enableACME = true;
# forceSSL = true;
# };
# };
# security.acme.defaults.email = "tasiaiso@proton.me";
security.acme.acceptTerms = true;
2024-04-11 13:16:26 +02:00
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
2024-04-18 21:10:13 +02:00
system.stateVersion = "23.11";
2024-04-11 13:16:26 +02:00
}