dotfiles/nixos/kalle-pc/configuration.nix

153 lines
3.6 KiB
Nix
Raw Normal View History

2024-01-10 11:54:07 +01:00
{ inputs
, config
, pkgs
, ...
}:
2023-10-31 12:20:02 +01:00
{
imports =
2024-01-10 11:54:07 +01:00
[
# Include the results of the hardware scan.
2023-10-31 12:20:02 +01:00
./hardware-configuration.nix
./hardware-configuration.override.nix
];
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
services.btrfs.autoScrub.enable = true;
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "kalle-pc";
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
2024-01-10 11:54:07 +01:00
2023-10-31 12:20:02 +01:00
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable the X11 windowing system.
2024-01-10 11:54:07 +01:00
services.xserver = {
enable = true;
2023-10-31 12:20:02 +01:00
2024-01-10 11:54:07 +01:00
displayManager.sddm.enable = true;
2023-10-31 12:20:02 +01:00
2024-01-10 11:54:07 +01:00
# Configure keymap in X11
2024-02-29 10:34:02 +01:00
xkb.layout = "us";
2024-01-10 11:54:07 +01:00
# xkbVariant = "dvorak";
# xkbOptions = "eurosign:e,caps:escape";
};
2023-10-31 12:20:02 +01:00
2024-01-10 11:54:07 +01:00
# Allow flashing ZSA keyboards
hardware.keyboard.zsa.enable = true;
programs.hyprland = {
enable = true;
portalPackage = inputs.xdg-desktop-portal-hyprland.packages.x86_64-linux.xdg-desktop-portal-hyprland;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
2023-10-31 12:20:02 +01:00
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.kalle = {
isNormalUser = true;
group = "kalle";
2024-03-06 10:04:30 +01:00
extraGroups = [ "wheel" "dialout" ]; # Enable sudo for the user.
2023-10-31 12:20:02 +01:00
};
users.groups.kalle.gid = 1000;
environment.systemPackages = with pkgs; [
xdg-user-dirs
2024-01-10 11:54:07 +01:00
grim # For xdg-desktop-portal-hyprland which does not declare this dependency
slurp # Some for this one
gamescope
2023-10-31 12:20:02 +01:00
];
2024-01-10 11:54:07 +01:00
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-color-emoji
fira-code
fira-code-symbols
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
fontconfig = {
defaultFonts = {
serif = [ "Noto Serif" "Symbols Nerd Font" ];
sansSerif = [ "Noto Sans" "Symbols Nerd Font" ];
monospace = [ "Fira Code" "Symbols Nerd Font Mono" ];
};
};
};
2023-10-31 12:20:02 +01:00
# Steam needs to be installed on system level, because reasons
2024-01-10 11:54:07 +01:00
programs.steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
];
};
};
2023-10-31 12:20:02 +01:00
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Disable firewall.
networking.firewall.enable = false;
# 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?
}