nix/configuration.nix

144 lines
3.6 KiB
Nix
Raw Normal View History

{
config,
pkgs,
...
}: {
imports = [
./hardware.nix
];
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";
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono"];})
];
networking.hostName = "nixos-pulse";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LANG = "en_US.UTF-8";
LC_ADDRESS = "de_DE.UTF-8";
LC_COLLATE = "de_DE.UTF-8";
LC_CTYPE = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MESSAGES = "en_US.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";
};
};
services.xserver = {
enable = true;
layout = "us";
xkbVariant = "";
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
services.printing.enable = true;
sound.enable = true;
hardware.bluetooth.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
security.sudo.wheelNeedsPassword = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
# Enable automatic login for the user.
services.xserver.displayManager.defaultSession = "plasmawayland";
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "tristand";
environment.sessionVariables = {
MOZ_USE_XINPUT2 = "1";
};
environment.systemPackages = with pkgs; [
curl
fish
git
neovim
vim
virt-manager
wl-clipboard
wget
];
programs.dconf.enable = true;
programs.fish.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
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
};
services.openssh.enable = true;
networking.firewall.allowedTCPPorts = [22 80 443];
# networking.firewall.allowedUDPPorts = [ ... ];
virtualisation.libvirtd.enable = true;
powerManagement.powertop.enable = 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. Its 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?
}