2023-02-26 16:42:49 +01:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
let
|
|
|
|
|
|
definedInPersonalDotNix = lib.mkDefault (throw "Configuration option missing from personal.nix");
|
|
|
|
|
|
in
|
|
|
|
|
|
{
|
|
|
|
|
|
imports = [
|
|
|
|
|
|
./nextcloud.nix
|
|
|
|
|
|
./dyndns.nix
|
|
|
|
|
|
./adguard.nix
|
|
|
|
|
|
./mpd.nix
|
|
|
|
|
|
./burp-server.nix
|
|
|
|
|
|
./hedgedoc.nix
|
|
|
|
|
|
./transcode.nix
|
|
|
|
|
|
./development.nix
|
|
|
|
|
|
./bspwm.nix
|
|
|
|
|
|
|
|
|
|
|
|
# ./open-pgsql.nix
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2023-03-03 15:19:58 +01:00
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2023-08-26 10:52:00 +02:00
|
|
|
|
boot.kernelParams = [ "acpi=force" "reboot=bios" ];
|
2023-03-03 15:19:58 +01:00
|
|
|
|
|
2023-12-02 21:35:50 +01:00
|
|
|
|
boot.initrd.kernelModules = [ "i915" ];
|
|
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
|
|
|
|
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
|
|
|
|
|
};
|
|
|
|
|
|
hardware.opengl = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
|
|
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
|
|
|
|
|
libvdpau-va-gl
|
|
|
|
|
|
vaapiVdpau
|
|
|
|
|
|
# intel-media-driver
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
environment.variables = {
|
|
|
|
|
|
VDPAU_DRIVER = "va_gl";
|
|
|
|
|
|
};
|
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
|
|
|
2023-03-03 15:19:58 +01:00
|
|
|
|
networking.hostName = "Rupert";
|
|
|
|
|
|
|
2023-02-26 16:42:49 +01:00
|
|
|
|
users.users = {
|
|
|
|
|
|
waldi = {
|
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
|
extraGroups = [ "audio" ];
|
|
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
|
openssh.authorizedKeys.keys = definedInPersonalDotNix;
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
users.extraGroups = {
|
|
|
|
|
|
pulse-access = {
|
|
|
|
|
|
members = [ "waldi" "fruchti" ];
|
|
|
|
|
|
};
|
|
|
|
|
|
music = {
|
|
|
|
|
|
members = [ "fruchti" ];
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
|
ntfsprogs
|
|
|
|
|
|
texlive.combined.scheme-full
|
|
|
|
|
|
ncmpcpp
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
services.burp.client = {
|
|
|
|
|
|
enable = true;
|
2023-03-12 15:41:36 +01:00
|
|
|
|
passwordFile = "/secrets/burp_client_passwords/${config.networking.hostName}";
|
|
|
|
|
|
sslKeyPasswordFile = "/secrets/burp_client_ssl_key_password";
|
2023-02-26 16:42:49 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Flatpak
|
|
|
|
|
|
services.flatpak.enable = true;
|
|
|
|
|
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
|
|
|
|
xdg.portal.enable = true;
|
2023-12-02 21:36:19 +01:00
|
|
|
|
xdg.portal.config.common.default = "*";
|
2023-02-26 16:42:49 +01:00
|
|
|
|
|
|
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
|
# programs.mtr.enable = true;
|
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
enableSSHSupport = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
|
services.openssh = {
|
|
|
|
|
|
enable = true;
|
2023-06-23 19:55:52 +02:00
|
|
|
|
settings = {
|
|
|
|
|
|
# ForwardX11 = true;
|
|
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
|
|
};
|
2023-02-26 16:42:49 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
services.avahi.enable = true;
|
2023-03-12 12:53:33 +01:00
|
|
|
|
networking.firewall.enable = true;
|
2023-02-26 16:42:49 +01:00
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
|
|
22
|
|
|
|
|
|
1935 # RTMP
|
|
|
|
|
|
4971 # BURP
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
|
|
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
|
|
|
|
# accidentally delete configuration.nix.
|
|
|
|
|
|
# system.copySystemConfiguration = true;
|
|
|
|
|
|
|
2023-03-09 15:24:22 +01:00
|
|
|
|
system.autoUpgrade = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
allowReboot = true;
|
|
|
|
|
|
sendEmail = true;
|
|
|
|
|
|
gitPull = true;
|
|
|
|
|
|
gitDeploymentKeyFile = "/secrets/ssh_id_gitea_nixos_configuration";
|
2023-03-09 16:01:31 +01:00
|
|
|
|
gitUser = "fruchti";
|
2023-03-09 15:24:22 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
2023-02-26 16:42:49 +01:00
|
|
|
|
# systemd.services.nixos-upgrade.onFailure = lib.mkIf config.system.autoUpgrade.enable [ "status-email@%n.service" ];
|
|
|
|
|
|
|
|
|
|
|
|
services.btrfsScrub = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
paths = {
|
|
|
|
|
|
"/" = {
|
|
|
|
|
|
onCalendar = "*-*-* 02:00:00";
|
|
|
|
|
|
};
|
|
|
|
|
|
"/data" = {
|
|
|
|
|
|
onCalendar = "Thu *-*-* 02:00:00";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
|
|
defaults = {
|
|
|
|
|
|
email = config.email.adminEmail;
|
|
|
|
|
|
};
|
|
|
|
|
|
acceptTerms = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
|
|
SUBSYSTEM=="video4linux", ATTRS{idProduct}=="0002", ATTRS{idVendor}=="1d6b", SYMLINK+="hdmi_capture"
|
|
|
|
|
|
'';
|
2023-03-03 15:19:58 +01:00
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
2023-02-26 16:42:49 +01:00
|
|
|
|
}
|