Files
dotfiles/nixos/configuration.nix

129 lines
3.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 = [
./hardware-configuration.nix
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.hostName = "TrudePC";
#networking.wireless.enable = true;
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 = {
backupFileExtension = "~";
extraSpecialArgs = { inherit inputs; };
useGlobalPkgs = true;
useUserPackages = true;
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" ];
# 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.
}