Files
setup-machines/nixos/configuration.nix
2025-05-19 21:25:06 +02:00

138 lines
3.4 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').
{ inputs, lib, config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./boot.nix
];
nixpkgs = {
overlays = [
];
config = {
allowUnfree = true;
};
};
nix = {
settings = {
experimental-features = "nix-command flakes";
flake-registry = "";
nix-path = config.nix.nixPath;
};
channel.enable = false;
};
networking = {
hostName = "NixOS_Desktop"; # Define your hostname.
networkmanager.enable = true;
firewall = {
allowedTCPPorts = [
# Allow discovery for spotify on the network
57621
];
allowedUDPPorts = [
# Allow discovery for spotify on the network
5353
];
};
};
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
# Configure X11
services.xserver = {
enable = true;
# XFCE
displayManager.lightdm.enable = true;
desktopManager.xfce.enable = true;
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
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;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
programs.zsh.enable = true;
# Define a user account. Don't forget to set a password with 'passwd'.
users.users.noahk = {
isNormalUser = true;
description = "Noah Knegt";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh;
};
# Install firefox.
programs.firefox.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
xclip
# GTK themes
matcha-gtk-theme
papirus-icon-theme
# Menu kind
xfce.xfce4-whiskermenu-plugin
];
virtualisation.podman.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. 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 = "25.05"; # Did you read the comment?
}