zaneyos/system.nix

72 lines
1.8 KiB
Nix
Raw Normal View History

{ inputs, config, pkgs,
username, hostname, ... }:
2023-12-14 00:09:39 +01:00
let
inherit (import ./options.nix)
theLocale theTimezone gitUsername
wallpaperDir wallpaperGit
theLCVariables theKBDLayout;
in {
2023-12-14 00:09:39 +01:00
imports =
[
inputs.nixvim.nixosModules.nixvim
./hardware.nix
./config/system
2023-12-14 00:09:39 +01:00
];
2024-01-09 23:50:24 +01:00
# Enable networking
networking.hostName = "${hostname}"; # Define your hostname
2024-01-09 23:50:24 +01:00
networking.networkmanager.enable = true;
# Set your time zone
2024-01-13 07:05:01 +01:00
time.timeZone = "${theTimezone}";
2023-12-14 00:09:39 +01:00
# Select internationalisation properties
2024-01-13 07:05:01 +01:00
i18n.defaultLocale = "${theLocale}";
2023-12-14 00:09:39 +01:00
i18n.extraLocaleSettings = {
LC_ADDRESS = "${theLCVariables}";
LC_IDENTIFICATION = "${theLCVariables}";
LC_MEASUREMENT = "${theLCVariables}";
LC_MONETARY = "${theLCVariables}";
LC_NAME = "${theLCVariables}";
LC_NUMERIC = "${theLCVariables}";
LC_PAPER = "${theLCVariables}";
LC_TELEPHONE = "${theLCVariables}";
LC_TIME = "${theLCVariables}";
2023-12-14 00:09:39 +01:00
};
console.keyMap = "${theKBDLayout}";
# Define a user account.
2024-01-12 09:00:46 +01:00
users.users."${username}" = {
2024-01-11 07:19:08 +01:00
homeMode = "755";
2023-12-14 00:09:39 +01:00
isNormalUser = true;
2024-01-13 07:05:01 +01:00
description = "${gitUsername}";
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
2023-12-14 00:09:39 +01:00
packages = with pkgs; [];
};
environment.variables = {
POLKIT_BIN = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
};
# Optimization settings and garbage collection automation
2023-12-14 00:09:39 +01:00
nix = {
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
2023-12-14 00:09:39 +01:00
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
system.stateVersion = "23.11";
2023-12-14 00:09:39 +01:00
}