2023-09-12 18:18:39 +02: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’).
|
|
|
|
|
{
|
2023-09-12 21:44:15 +02:00
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
imports = [
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
];
|
2023-09-12 18:18:39 +02:00
|
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
|
package = pkgs.nixFlakes;
|
|
|
|
|
extraOptions = ''
|
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Bootloader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
# Setup keyfile
|
|
|
|
|
boot.initrd.secrets = {
|
|
|
|
|
"/crypto_keyfile.bin" = null;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable swap on luks
|
|
|
|
|
boot.initrd.luks.devices."luks-fa1e760a-71a3-4a79-a791-684cd82d9c3c".device = "/dev/disk/by-uuid/fa1e760a-71a3-4a79-a791-684cd82d9c3c";
|
|
|
|
|
boot.initrd.luks.devices."luks-fa1e760a-71a3-4a79-a791-684cd82d9c3c".keyFile = "/crypto_keyfile.bin";
|
|
|
|
|
|
2023-09-13 01:05:03 +02:00
|
|
|
|
networking.hostName = "nixos-pulse";
|
2023-09-12 18:18:39 +02:00
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
2023-09-13 00:21:45 +02:00
|
|
|
|
time.timeZone = "Europe/Berlin";
|
2023-09-12 18:18:39 +02:00
|
|
|
|
|
2023-09-13 01:05:03 +02:00
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
2023-09-12 18:18:39 +02:00
|
|
|
|
|
|
|
|
|
i18n.extraLocaleSettings = {
|
2023-09-13 00:21:45 +02:00
|
|
|
|
LC_ADDRESS = "de_DE.UTF-8";
|
|
|
|
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
|
|
|
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
|
|
|
LC_MONETARY = "de_DE.UTF-8";
|
|
|
|
|
LC_NAME = "de_DE.UTF-8";
|
|
|
|
|
LC_NUMERIC = "de_DE.UTF-8";
|
|
|
|
|
LC_PAPER = "de_DE.UTF-8";
|
|
|
|
|
LC_TELEPHONE = "de_DE.UTF-8";
|
|
|
|
|
LC_TIME = "de_DE.UTF-8";
|
2023-09-12 18:18:39 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
|
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
|
|
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
|
layout = "us";
|
|
|
|
|
xkbVariant = "";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
|
|
sound.enable = true;
|
2023-09-12 23:32:42 +02:00
|
|
|
|
hardware.bluetooth.enable = true;
|
2023-09-12 18:18:39 +02:00
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
|
security.rtkit.enable = true;
|
2023-09-14 17:20:07 +02:00
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
2023-09-12 18:18:39 +02:00
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
2023-09-13 00:21:45 +02:00
|
|
|
|
jack.enable = true;
|
2023-09-12 18:18:39 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.tristand = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "Tristan Druyen";
|
2023-09-12 21:44:15 +02:00
|
|
|
|
extraGroups = ["networkmanager" "wheel" "libvirtd"];
|
2023-09-12 18:18:39 +02:00
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable automatic login for the user.
|
2023-09-14 17:20:27 +02:00
|
|
|
|
services.xserver.displayManager.defaultSession ="plasmawayland";
|
|
|
|
|
services.xserver.displayManager.autoLogin.enable = true;
|
|
|
|
|
services.xserver.displayManager.autoLogin.user = "tristand";
|
2023-09-12 18:18:39 +02:00
|
|
|
|
|
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
curl
|
|
|
|
|
emacs
|
|
|
|
|
fish
|
|
|
|
|
git
|
|
|
|
|
neovim
|
2023-09-12 18:49:36 +02:00
|
|
|
|
ripgrep
|
2023-09-12 18:18:39 +02:00
|
|
|
|
vim
|
|
|
|
|
virt-manager
|
|
|
|
|
wget
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
enable = true;
|
2023-09-12 21:44:15 +02:00
|
|
|
|
enableSSHSupport = true;
|
2023-09-12 18:18:39 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-09-13 22:20:54 +02:00
|
|
|
|
programs.steam = {
|
|
|
|
|
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
|
|
|
|
|
};
|
|
|
|
|
|
2023-09-12 18:18:39 +02:00
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
2023-09-12 21:44:15 +02:00
|
|
|
|
networking.firewall.allowedTCPPorts = [22 80 443];
|
2023-09-12 18:18:39 +02:00
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
2023-09-13 00:21:45 +02:00
|
|
|
|
|
|
|
|
|
virtualisation.libvirtd.enable = true;
|
2023-09-12 18:18:39 +02:00
|
|
|
|
|
2023-09-14 17:20:41 +02:00
|
|
|
|
powerManagement.powertop.enable = true;
|
|
|
|
|
|
2023-09-12 18:18:39 +02: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 = "23.05"; # Did you read the comment?
|
|
|
|
|
}
|