2023-12-27 16:23:57 +01:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
outputs,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-12-06 19:42:52 +01:00
|
|
|
config,
|
2023-12-27 16:23:57 +01:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
#Jovian Nixos
|
2024-01-11 13:24:48 +01:00
|
|
|
inputs.jovian.nixosModules.jovian
|
2023-12-27 16:23:57 +01:00
|
|
|
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
|
|
# outputs.homeManagerModules.example
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
# Or modules exported from other flakes (such as nix-colors):
|
|
|
|
# inputs.nix-colors.homeManagerModules.default
|
|
|
|
|
2024-04-07 22:59:21 +02:00
|
|
|
# Import the shared settings
|
2024-02-07 13:50:03 +01:00
|
|
|
../../shared
|
2024-04-22 14:50:33 +02:00
|
|
|
../../desktop/package-configs/firefox
|
2024-01-09 13:19:42 +01:00
|
|
|
|
2023-12-27 16:23:57 +01:00
|
|
|
# You can also split up your configuration and import pieces of it here:
|
|
|
|
# ./nvim.nix
|
|
|
|
./hardware-configuration.nix
|
2024-03-18 14:46:37 +01:00
|
|
|
|
2024-03-20 21:07:22 +01:00
|
|
|
../../../disko/shodan
|
2024-03-18 22:30:27 +01:00
|
|
|
|
2024-06-28 23:18:11 +02:00
|
|
|
./auto-mount.nix
|
2023-12-27 16:23:57 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
boot.tmp.cleanOnBoot = true;
|
|
|
|
zramSwap.enable = false;
|
|
|
|
networking.domain = "";
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
# You can add overlays here
|
|
|
|
overlays = [
|
|
|
|
];
|
|
|
|
# Configure your nixpkgs instance
|
|
|
|
config = {
|
|
|
|
# Disable if you don't want unfree packages
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#Set up sops config, and configure where the keyfile is, then set the mode for the unencrypted keys
|
2023-12-28 22:22:39 +01:00
|
|
|
sops.defaultSopsFile = ./secrets/sops.yaml;
|
2023-12-27 16:23:57 +01:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-03-20 23:23:40 +01:00
|
|
|
# Custom tools
|
2024-06-28 23:20:37 +02:00
|
|
|
auto-mount
|
2024-03-20 23:23:40 +01:00
|
|
|
|
2023-12-27 16:23:57 +01:00
|
|
|
#System:
|
2023-12-30 19:50:53 +01:00
|
|
|
btrfs-progs
|
2024-04-27 13:52:50 +02:00
|
|
|
decky-loader
|
2024-03-20 16:55:00 +01:00
|
|
|
efitools
|
2024-03-18 21:10:06 +01:00
|
|
|
jq
|
2023-12-27 16:23:57 +01:00
|
|
|
noto-fonts
|
|
|
|
noto-fonts-emoji-blob-bin
|
|
|
|
noto-fonts-emoji
|
2024-11-14 21:41:27 +01:00
|
|
|
qjackctl
|
|
|
|
|
2024-08-17 20:09:13 +02:00
|
|
|
#rustdesk
|
2024-03-20 16:55:00 +01:00
|
|
|
sbctl
|
2024-03-21 14:19:08 +01:00
|
|
|
udisks
|
|
|
|
util-linux
|
2024-05-12 23:15:11 +02:00
|
|
|
waypipe
|
2024-05-20 22:03:32 +02:00
|
|
|
python3
|
2024-07-11 22:33:42 +02:00
|
|
|
protonup-qt
|
2023-12-27 16:23:57 +01:00
|
|
|
|
|
|
|
#KDE:
|
|
|
|
krunner-translator
|
2024-12-07 18:49:01 +01:00
|
|
|
# kdePackages.discover
|
2024-03-03 18:07:54 +01:00
|
|
|
kdePackages.kcalc
|
|
|
|
kdePackages.kdepim-addons
|
|
|
|
kdePackages.kirigami
|
|
|
|
kdePackages.kdeconnect-kde
|
|
|
|
# kdePackages.krunner-ssh
|
|
|
|
# kdePackages.krunner-symbols
|
|
|
|
kdePackages.qtvirtualkeyboard
|
|
|
|
kdePackages.packagekit-qt
|
2024-11-10 16:26:52 +01:00
|
|
|
kdePackages.krdc
|
|
|
|
kdePackages.krfb
|
2024-03-03 18:07:54 +01:00
|
|
|
libportal
|
2023-12-27 16:23:57 +01:00
|
|
|
|
|
|
|
#Gaming:
|
2024-01-05 12:39:37 +01:00
|
|
|
heroic
|
2024-01-05 11:24:45 +01:00
|
|
|
legendary-gl
|
2024-07-11 22:49:08 +02:00
|
|
|
protontricks
|
2024-01-05 11:29:45 +01:00
|
|
|
rare
|
2023-12-27 16:23:57 +01:00
|
|
|
];
|
|
|
|
|
2024-05-20 21:52:39 +02:00
|
|
|
jovian = {
|
|
|
|
steam = {
|
|
|
|
enable = true;
|
|
|
|
autoStart = true;
|
|
|
|
user = "lillian";
|
|
|
|
desktopSession = "plasma";
|
|
|
|
};
|
|
|
|
decky-loader = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.decky-loader-prerelease;
|
2024-05-20 22:08:37 +02:00
|
|
|
extraPackages = [pkgs.python3];
|
2024-05-20 21:52:39 +02:00
|
|
|
};
|
|
|
|
devices.steamdeck = {
|
|
|
|
enable = true;
|
|
|
|
autoUpdate = true;
|
|
|
|
enableGyroDsuService = true;
|
|
|
|
};
|
|
|
|
};
|
2024-02-05 17:44:05 +01:00
|
|
|
|
2024-03-25 18:34:33 +01:00
|
|
|
programs.steam = lib.mkForce {
|
2023-12-27 16:23:57 +01:00
|
|
|
enable = true;
|
|
|
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
|
|
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
2024-04-07 22:52:11 +02:00
|
|
|
extest.enable = true;
|
2023-12-27 16:23:57 +01:00
|
|
|
};
|
2024-06-25 17:10:27 +02:00
|
|
|
hardware.graphics.enable32Bit = true; # Enables support for 32bit libs that steam uses
|
2023-12-27 16:23:57 +01:00
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
|
|
# Enable the KDE Plasma Desktop Environment.
|
2024-03-14 13:50:43 +01:00
|
|
|
services.desktopManager.plasma6.enable = true;
|
2023-12-27 16:23:57 +01:00
|
|
|
programs.kdeconnect.enable = true;
|
|
|
|
|
2024-12-01 01:40:11 +01:00
|
|
|
services.avahi = {
|
2024-12-01 01:42:34 +01:00
|
|
|
nssmdns4 = true;
|
2024-12-01 01:40:11 +01:00
|
|
|
enable = true;
|
|
|
|
ipv4 = true;
|
|
|
|
ipv6 = true;
|
|
|
|
publish = {
|
|
|
|
enable = true;
|
|
|
|
addresses = true;
|
|
|
|
workstation = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-12 16:56:15 +02:00
|
|
|
services.displayManager.defaultSession = "plasma";
|
|
|
|
services.displayManager.sddm.wayland.enable = lib.mkForce true;
|
|
|
|
services.displayManager.sddm.settings = {
|
2024-02-06 20:21:41 +01:00
|
|
|
Autologin = {
|
2024-04-06 23:16:30 +02:00
|
|
|
Session = "plasma.desktop";
|
2024-02-06 20:21:41 +01:00
|
|
|
User = "lillian";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-12-27 16:23:57 +01:00
|
|
|
# Enable flatpak support
|
|
|
|
services.flatpak.enable = true;
|
|
|
|
services.packagekit.enable = true;
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
services.xserver = {
|
2024-02-05 18:23:09 +01:00
|
|
|
xkb.layout = "us";
|
|
|
|
xkb.variant = "";
|
2023-12-27 16:23:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Enable networking
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
networking.firewall.enable = true;
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [22];
|
|
|
|
|
2024-03-18 15:24:54 +01:00
|
|
|
# # Enable automounting of removable media
|
|
|
|
# services.udisks2.enable = true;
|
|
|
|
# services.devmon.enable = true;
|
|
|
|
# services.gvfs.enable = true;
|
|
|
|
# environment.variables.GIO_EXTRA_MODULES = lib.mkForce ["${pkgs.gvfs}/lib/gio/modules"];
|
2024-03-18 00:58:19 +01:00
|
|
|
|
2023-12-27 16:23:57 +01:00
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
# Enable bluetooth hardware
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
|
|
# Enable fwupd daemon and user space client
|
|
|
|
services.fwupd.enable = true;
|
|
|
|
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.noisetorch = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2024-03-25 19:33:58 +01:00
|
|
|
users.users.lillian.extraGroups = ["decky" "tss" "input"];
|
2023-12-27 16:23:57 +01:00
|
|
|
|
|
|
|
# Enable completion of system packages by zsh
|
|
|
|
environment.pathsToLink = ["/share/zsh"];
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
extraSpecialArgs = {inherit inputs outputs;};
|
|
|
|
users = {
|
|
|
|
# Import your home-manager configuration
|
2024-02-07 13:52:23 +01:00
|
|
|
lillian = import ../../../home-manager/hosts/shodan;
|
2023-12-27 16:23:57 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.hostName = "shodan";
|
|
|
|
|
2024-12-06 19:42:52 +01:00
|
|
|
sops.secrets."wg-private-key".mode = "0440";
|
|
|
|
sops.secrets."wg-private-key".owner = config.users.users.root.name;
|
|
|
|
|
|
|
|
networking.wireguard.enable = true;
|
|
|
|
|
|
|
|
networking.wg-quick.interfaces = {
|
|
|
|
wg0 = {
|
|
|
|
autostart = true;
|
2024-12-06 22:40:12 +01:00
|
|
|
address = ["10.0.0.4/24" "fdc9:281f:04d7:9ee9::4/64"];
|
|
|
|
dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
|
|
|
|
listenPort = 51821;
|
2024-12-06 19:42:52 +01:00
|
|
|
privateKeyFile = config.sops.secrets."wg-private-key".path;
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
publicKey = "A02sO7uLdgflhPIRd0cbJONIaPP4z8HTxDkmX4NegFg=";
|
2024-12-06 22:10:12 +01:00
|
|
|
endpoint = "84.87.146.85:51821";
|
2024-12-06 22:40:12 +01:00
|
|
|
allowedIPs = ["0.0.0.0/0" "::/0"];
|
|
|
|
persistentKeepalive = 25;
|
2024-12-06 19:42:52 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-18 22:30:27 +01:00
|
|
|
security.tpm2.enable = true;
|
|
|
|
security.tpm2.pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
|
|
|
|
security.tpm2.tctiEnvironment.enable = true; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
|
|
|
|
# tss group has access to TPM devices
|
|
|
|
|
2024-03-19 01:58:26 +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.
|
2024-09-11 14:18:22 +02:00
|
|
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
2024-03-19 01:58:26 +01:00
|
|
|
boot.initrd.systemd.enable = true;
|
|
|
|
|
2024-09-11 14:18:22 +02:00
|
|
|
boot.lanzaboote = {
|
|
|
|
enable = true;
|
|
|
|
pkiBundle = "/etc/secureboot";
|
|
|
|
};
|
2023-12-27 16:23:57 +01:00
|
|
|
boot.loader.systemd-boot.configurationLimit = 3;
|
2024-01-01 22:56:53 +01:00
|
|
|
boot.loader.timeout = 0;
|
2023-12-27 16:23:57 +01:00
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2024-03-21 01:15:07 +01:00
|
|
|
boot.consoleLogLevel = 0;
|
|
|
|
boot.kernelParams = ["quiet" "udev.log_priority=0" "fbcon=vc:2-6" "console=tty0"];
|
|
|
|
boot.plymouth.enable = true;
|
2023-12-27 16:23:57 +01:00
|
|
|
|
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
2024-05-25 16:30:53 +02:00
|
|
|
system.stateVersion = "24.11";
|
2023-12-27 16:23:57 +01:00
|
|
|
}
|