Add NixOS support

This commit is contained in:
2025-03-24 13:24:03 +00:00
parent a7c30f5e34
commit bdd61b9e37
5 changed files with 122 additions and 19 deletions

91
configuration.nix Normal file
View File

@@ -0,0 +1,91 @@
{ config, pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ];
nixpkgs.config.allowUnfree = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable networking
networking.hostName = "trudepc";
networking.networkmanager.enable = true;
# Select internationalisation properties.
time.timeZone = "Europe/Lisbon";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "pt_PT.UTF-8";
LC_IDENTIFICATION = "pt_PT.UTF-8";
LC_MEASUREMENT = "pt_PT.UTF-8";
LC_MONETARY = "pt_PT.UTF-8";
LC_NAME = "pt_PT.UTF-8";
LC_NUMERIC = "pt_PT.UTF-8";
LC_PAPER = "pt_PT.UTF-8";
LC_TELEPHONE = "pt_PT.UTF-8";
LC_TIME = "pt_PT.UTF-8";
};
# Enable the GNOME windowing system.
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.printing.enable = true; # CUPS
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;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "altgr-intl";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.trude = {
isNormalUser = true;
description = "TrudeEH";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ # GUI and user apps
vscode brave discord prismlauncher
];
};
# System packages
environment.systemPackages = with pkgs; [
git curl wget pass lynis bat
neovim tmux htop fzf
];
programs.gnupg.agent.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
# Firewall
networking.firewall.allowedTCPPorts = [ 22 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Allow running executables.
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
# Add any missing dynamic libraries for unpacked programs here.
];
};
system.stateVersion = "24.11"; # Don't change this value.
}