277 lines
7.3 KiB
Nix
277 lines
7.3 KiB
Nix
# 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`).
|
||
|
||
{ config, inputs, pkgs, lib, ... }:
|
||
|
||
{
|
||
imports =
|
||
[ # Include the results of the hardware scan.
|
||
# NOTE: Required bevuta config is part of this file here, and not bevuta specific.
|
||
# ./bevuta-config/bevuta.nix
|
||
./hardware-configuration.nix
|
||
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
|
||
./disko-config.nix
|
||
];
|
||
|
||
# Use the systemd-boot EFI boot loader.
|
||
|
||
boot = {
|
||
kernel.sysctl."kernel.sysrq" = 0;
|
||
loader = {
|
||
systemd-boot.enable = true;
|
||
efi.canTouchEfiVariables = true;
|
||
};
|
||
# https://nixos.org/manual/nixos/stable/#sec-luks-file-systems-fido2-systemd
|
||
initrd = {
|
||
systemd.enable = true;
|
||
luks.devices."crypted" = {
|
||
crypttabExtraOpts = [ "fido2-device=auto" ];
|
||
device = "/dev/disk/by-partlabel/disk-main-luks";
|
||
};
|
||
};
|
||
};
|
||
|
||
#networking.hostName = "ziltis-desktop"; # Define your hostname.
|
||
# 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;
|
||
# services.xserver = {
|
||
# enable = true;
|
||
# xkb.layout = "de";
|
||
# xkb.options = "eurosign;e,caps:escape";
|
||
# };
|
||
|
||
services.greetd = {
|
||
enable = true;
|
||
settings = {
|
||
default_session = {
|
||
command = "Hyprland";
|
||
user = "zilti";
|
||
};
|
||
};
|
||
vt = 7;
|
||
};
|
||
# services.displayManager = {
|
||
# sddm = {
|
||
# enable = true;
|
||
# wayland.enable = true;
|
||
# settings = {
|
||
# Autologin = {
|
||
# User = "zilti";
|
||
# Session = "Hyprland";
|
||
# };
|
||
# };
|
||
# };
|
||
# };
|
||
|
||
services.libinput.enable = true;
|
||
|
||
programs.hyprland = {
|
||
enable = true;
|
||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||
};
|
||
|
||
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
|
||
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"
|
||
];
|
||
};
|
||
|
||
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;
|
||
extraGroups = [ "wheel" "libvirtd" ];
|
||
};
|
||
|
||
services.fprintd = {
|
||
enable = true;
|
||
};
|
||
|
||
# Start the driver at boot
|
||
systemd.services.fprintd = {
|
||
wantedBy = [ "multi-user.target" ];
|
||
serviceConfig.Type = "simple";
|
||
};
|
||
|
||
services.fwupd.enable = true;
|
||
|
||
# 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
|
||
gnumake
|
||
fido2luks
|
||
];
|
||
|
||
programs.virt-manager.enable = true;
|
||
|
||
virtualisation = {
|
||
libvirtd = {
|
||
enable = true;
|
||
};
|
||
# podman = {
|
||
# enable = true;
|
||
# dockerCompat = true;
|
||
# defaultNetwork.settings.dns_enabled = true;
|
||
# };
|
||
# containers.storage.settings = {
|
||
# storage = {
|
||
# driver = "btrfs";
|
||
# };
|
||
# };
|
||
};
|
||
|
||
# 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;
|
||
# hardware.tuxedo-rs = {
|
||
# enable = true;
|
||
# tailor-gui.enable = true;
|
||
# };
|
||
|
||
# Open ports in the firewall.
|
||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
networking.firewall = {
|
||
enable = true;
|
||
allowedTCPPortRanges = [
|
||
{ from = 1714; to = 1764; }
|
||
];
|
||
allowedUDPPortRanges = [
|
||
{ from = 1714; to = 1764; }
|
||
];
|
||
};
|
||
|
||
# networking.extraHosts = ''
|
||
# 127.0.0.1 l.redsky.io
|
||
# ::1 l.redsky.io
|
||
# '';
|
||
|
||
# security.pam.services.swaylock = {};
|
||
|
||
services.btrfs = {
|
||
autoScrub = {
|
||
enable = true;
|
||
interval = "weekly";
|
||
fileSystems = [ "/" ];
|
||
};
|
||
};
|
||
|
||
system.autoUpgrade = {
|
||
enable = true;
|
||
# flake = inputs.self.outPath;
|
||
flags = [
|
||
"--update-input"
|
||
"nixpkgs"
|
||
"-L" # print build logs
|
||
];
|
||
dates = "11:00";
|
||
randomizedDelaySec = "45min";
|
||
};
|
||
|
||
# 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).
|
||
system.stateVersion = "24.05"; # Did you read the comment?
|
||
|
||
# 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";
|
||
}
|
||
|