Files
nixos-config/modules/hosts/nixos.nix
T
2026-03-09 13:51:31 +00:00

81 lines
1.8 KiB
Nix

{ inputs, self, config, ... }: {
flake.nixosModules.nixos-host = {pkgs, ...}: {
imports = [
../../hardware-configuration.nix
];
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# Hostname
networking.hostName = "nixos";
# Networking
networking.networkmanager.enable = true;
# Time zone
time.timeZone = "Europe/Lisbon";
# Locale
i18n.defaultLocale = "en_GB.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";
};
# Printing
services.printing.enable = true;
# Audio
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# User account
users.users.${config.username} = {
isNormalUser = true;
description = "Thomas Gouveia Lopes";
extraGroups = [ "networkmanager" "wheel" ];
};
# Programs
# Allow unfree
nixpkgs.config.allowUnfree = true;
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Auto-unlock gnome-keyring on login
security.pam.services.login.enableGnomeKeyring = true;
security.pam.services.gdm.enableGnomeKeyring = true;
security.pam.services.gdm-password.enableGnomeKeyring = true;
# State version
system.stateVersion = "25.11";
fileSystems."/mnt/endeavour" = {
device = "/dev/disk/by-uuid/a32ca052-12a5-4355-bd3b-b4515d9ea4a5";
fsType = "ext4";
options = [ "defaults" "noatime" ];
};
};
}