# Shared configuration across all machines # Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running 'nixos-help'). # man configuration.nix { config, pkgs, inputs, ... }: { imports = [ inputs.home-manager.nixosModules.default ]; # Bootloader boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; # Use latest kernel boot.kernelPackages = pkgs.linuxPackages_latest; # Networking networking.networkmanager.enable = true; 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 Wayland services.xserver.enable = true; services.displayManager.gdm.enable = true; services.desktopManager.gnome.enable = true; # Keymap services.xserver.xkb = { layout = "us"; variant = "altgr-intl"; options = "terminate:ctrl_alt_bksp"; }; # 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; #jack.enable = true; }; # Define a user account. users.users.trude = { isNormalUser = true; description = "TrudeEH"; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; [ ]; }; home-manager = { useUserPackages = true; useGlobalPkgs = true; backupFileExtension = "~"; extraSpecialArgs = { inherit inputs; }; users = { "trude" = import ./home.nix; }; }; # Packages nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ git ]; system.autoUpgrade = { enable = true; flake = inputs.self.outPath; flags = [ "--update-input" "nixpkgs" "-L" ]; dates = "09:00"; randomizedDelaySec = "45min"; }; # Allow running executables programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; [ # Add missing dynamic libraries for unpackaged executables here. ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Steam and VR 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.wivrn = { enable = true; openFirewall = true; # Write information to /etc/xdg/openxr/1/active_runtime.json, VR applications # will automatically read this and work with WiVRn (Note: This does not currently # apply for games run in Valve's Proton) defaultRuntime = true; autoStart = true; }; # Kernel patch for SteamVR performance issues on AMD GPUs (recompiles the kernel) boot.kernelPatches = [ { name = "amdgpu-ignore-ctx-privileges"; patch = pkgs.fetchpatch { name = "cap_sys_nice_begone.patch"; url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch"; hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo="; }; } ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; # }; # List services that you want to enable: # Enable the OpenSSH daemon. # services.openssh.enable = true; # Open ports in the firewall. networking.firewall.enable = true; # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; system.stateVersion = "25.11"; # Don't change after initial installation. }