nixconfig/configuration.nix

278 lines
7.3 KiB
Nix
Raw Normal View History

2023-11-15 16:09:47 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
2024-08-22 16:04:26 +00:00
{ config, inputs, pkgs, lib, ... }:
2023-11-15 16:09:47 +00:00
{
imports =
[ # Include the results of the hardware scan.
2024-07-05 13:54:30 +00:00
# NOTE: Required bevuta config is part of this file here, and not bevuta specific.
# ./bevuta-config/bevuta.nix
2023-11-15 16:09:47 +00:00
./hardware-configuration.nix
2024-07-10 13:09:38 +00:00
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
2023-11-17 21:09:42 +00:00
./disko-config.nix
2023-11-15 16:09:47 +00:00
];
# Use the systemd-boot EFI boot loader.
2024-07-04 12:24:58 +00:00
boot = {
2024-07-05 13:54:30 +00:00
kernel.sysctl."kernel.sysrq" = 0;
2024-07-04 12:24:58 +00:00
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
2024-07-04 12:46:01 +00:00
# https://nixos.org/manual/nixos/stable/#sec-luks-file-systems-fido2-systemd
2024-07-04 12:24:58 +00:00
initrd = {
systemd.enable = true;
luks.devices."crypted" = {
crypttabExtraOpts = [ "fido2-device=auto" ];
2024-07-09 12:35:09 +00:00
device = "/dev/disk/by-partlabel/disk-main-luks";
2024-07-04 12:24:58 +00:00
};
};
};
#networking.hostName = "ziltis-desktop"; # Define your hostname.
2023-11-15 16:09:47 +00:00
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
# keyMap = "de";
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable the X11 windowing system.
# services.xserver.enable = true;
2024-08-21 16:18:08 +00:00
# services.xserver = {
# enable = true;
# xkb.layout = "de";
# xkb.options = "eurosign;e,caps:escape";
# };
2024-07-09 18:35:03 +00:00
2024-08-21 16:18:08 +00:00
services.greetd = {
enable = true;
settings = {
default_session = {
command = "Hyprland";
user = "zilti";
2024-08-21 15:30:52 +00:00
};
};
2024-08-21 16:18:08 +00:00
vt = 7;
2024-07-04 12:24:58 +00:00
};
2024-08-21 16:18:08 +00:00
# services.displayManager = {
# sddm = {
# enable = true;
# wayland.enable = true;
# settings = {
# Autologin = {
# User = "zilti";
# Session = "Hyprland";
# };
# };
# };
# };
2023-11-15 16:09:47 +00:00
2024-07-09 18:35:03 +00:00
services.libinput.enable = true;
2024-08-22 16:04:26 +00:00
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
};
2023-11-15 16:09:47 +00:00
services.flatpak.enable = true;
nixpkgs.config.allowUnfree = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# rtkit is optional but recommended
2024-07-05 13:54:30 +00:00
security = {
rtkit.enable = true;
apparmor = {
enable = true;
policies.dummy.profile = ''
/dummy {
}
'';
};
# This blacklist is from bevuta
pki.caCertificateBlacklist = [
"certSIGN ROOT CA"
"certSIGN Root CA G2"
"CFCA EV ROOT"
"ePKI Root Certification Authority"
"SecureSign RootCA11"
"GDCA TrustAUTH R5 ROOT"
"Hongkong Post Root CA 3"
"TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1"
"Hellenic Academic and Research Institutions ECC RootCA 2015"
"Hellenic Academic and Research Institutions RootCA 2015"
"NAVER Global Root Certification Authority"
"UCA Extended Validation Root"
"UCA Global G2 Root"
"TWCA Global Root CA"
"TWCA Root Certification Authority"
];
};
2023-11-15 16:09:47 +00:00
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
# users.users.alice = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable sudo for the user.
# packages = with pkgs; [
# firefox
# tree
# ];
# };
users.users.zilti = {
isNormalUser = true;
2023-11-27 10:24:47 +00:00
extraGroups = [ "wheel" "libvirtd" ];
2023-11-15 16:09:47 +00:00
};
2024-07-12 19:37:05 +00:00
services.fprintd = {
enable = true;
2024-07-12 19:55:09 +00:00
};
# Start the driver at boot
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
2024-07-12 19:37:05 +00:00
};
2024-07-12 20:48:19 +00:00
services.fwupd.enable = true;
2023-11-15 16:09:47 +00:00
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
2023-11-17 21:09:42 +00:00
gnumake
2024-07-10 09:33:51 +00:00
fido2luks
2023-11-15 16:09:47 +00:00
];
2023-11-27 10:24:47 +00:00
programs.virt-manager.enable = true;
2023-11-15 16:09:47 +00:00
virtualisation = {
2023-11-27 10:24:47 +00:00
libvirtd = {
enable = true;
};
2024-07-04 12:24:58 +00:00
# podman = {
# enable = true;
# dockerCompat = true;
# defaultNetwork.settings.dns_enabled = true;
# };
# containers.storage.settings = {
# storage = {
# driver = "btrfs";
# };
# };
2023-11-15 16:09:47 +00:00
};
# 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;
services.hardware.bolt.enable = true;
hardware.tuxedo-keyboard.enable = true;
2023-11-17 21:35:23 +00:00
# hardware.tuxedo-rs = {
# enable = true;
# tailor-gui.enable = true;
# };
2023-11-15 16:09:47 +00:00
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
2024-08-25 19:38:33 +00:00
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; }
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; }
];
};
2024-07-04 12:24:58 +00:00
# networking.extraHosts = ''
# 127.0.0.1 l.redsky.io
# ::1 l.redsky.io
# '';
2023-11-15 16:09:47 +00:00
2024-07-04 12:24:58 +00:00
# security.pam.services.swaylock = {};
2023-11-15 16:09:47 +00:00
services.btrfs = {
autoScrub = {
enable = true;
interval = "weekly";
fileSystems = [ "/" ];
};
};
2024-07-10 09:33:51 +00:00
system.autoUpgrade = {
enable = true;
2024-07-10 13:18:38 +00:00
# flake = inputs.self.outPath;
2024-07-10 09:33:51 +00:00
flags = [
"--update-input"
"nixpkgs"
"-L" # print build logs
];
dates = "11:00";
randomizedDelaySec = "45min";
};
2023-11-15 16:09:47 +00:00
# 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;
# 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).
2024-07-04 12:24:58 +00:00
system.stateVersion = "24.05"; # Did you read the comment?
2023-11-15 16:09:47 +00:00
2024-08-21 15:30:52 +00:00
# The following line is completely useless. I am leaving it here just to document
# the idiocy of all the people who keep recommending it online.
nix.settings.experimental-features = "nix-command flakes";
2023-11-15 16:09:47 +00:00
}