dotfiles/nixos/kalle-pc/configuration.nix

158 lines
3.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{ inputs
, config
, pkgs
, ...
}:
{
imports =
[
# Include the results of the hardware scan.
./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;
# Allow me to use cachix
trusted-users = [ "root" "kalle" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
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";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable the X11 windowing system.
services.displayManager.sddm.enable = true;
services.xserver = {
enable = true;
xkb.layout = "us";
};
# Allow flashing ZSA keyboards
hardware.keyboard.zsa.enable = true;
programs.hyprland = {
enable = true;
# package = inputs.hyprland.packages.x86_64-linux.hyprland;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# 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";
extraGroups = [ "wheel" "dialout" ]; # Enable sudo for the user.
};
users.groups.kalle.gid = 1000;
environment.systemPackages = with pkgs; [
xdg-user-dirs
grim # For xdg-desktop-portal-hyprland which does not declare this dependency
slurp # Some for this one
gamescope
pkgsi686Linux.gperftools # Needed for tf2
];
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" ];
};
};
};
# Steam needs to be installed on system level, because reasons
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
];
extraLibraries = pkgs: with pkgs; [
gperftools # Needed for tf2 to work
];
};
};
services.gvfs.enable = true;
# 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?
}