2024-02-06 04:46:24 +01:00
|
|
|
{ inputs, config, pkgs,
|
|
|
|
username, hostname, ... }:
|
2023-12-14 00:09:39 +01:00
|
|
|
|
2024-02-06 04:46:24 +01:00
|
|
|
let
|
|
|
|
inherit (import ./options.nix)
|
|
|
|
theLocale theTimezone gitUsername
|
2024-02-09 05:32:21 +01:00
|
|
|
theShell wallpaperDir wallpaperGit
|
2024-02-17 19:57:15 +01:00
|
|
|
theLCVariables theKBDLayout flakeDir;
|
2024-02-06 04:46:24 +01:00
|
|
|
in {
|
2023-12-14 00:09:39 +01:00
|
|
|
imports =
|
2024-01-18 05:33:57 +01:00
|
|
|
[
|
2024-02-05 07:50:25 +01:00
|
|
|
inputs.nixvim.nixosModules.nixvim
|
2024-01-18 05:33:57 +01:00
|
|
|
./hardware.nix
|
2024-01-20 23:03:08 +01:00
|
|
|
./config/system
|
2023-12-14 00:09:39 +01:00
|
|
|
];
|
|
|
|
|
2024-01-09 23:50:24 +01:00
|
|
|
# Enable networking
|
2024-01-17 07:50:43 +01:00
|
|
|
networking.hostName = "${hostname}"; # Define your hostname
|
2024-01-09 23:50:24 +01:00
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
2024-01-17 07:50:43 +01:00
|
|
|
# Set your time zone
|
2024-01-13 07:05:01 +01:00
|
|
|
time.timeZone = "${theTimezone}";
|
2023-12-14 00:09:39 +01:00
|
|
|
|
2024-01-17 07:50:43 +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 = {
|
2024-01-23 03:02:48 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-02-04 19:07:07 +01:00
|
|
|
console.keyMap = "${theKBDLayout}";
|
|
|
|
|
2024-01-17 07:50:43 +01:00
|
|
|
# Define a user account.
|
2024-02-11 10:51:40 +01:00
|
|
|
users = {
|
|
|
|
mutableUsers = true;
|
|
|
|
users."${username}" = {
|
|
|
|
homeMode = "755";
|
|
|
|
hashedPassword = "$6$YdPBODxytqUWXCYL$AHW1U9C6Qqkf6PZJI54jxFcPVm2sm/XWq3Z1qa94PFYz0FF.za9gl5WZL/z/g4nFLQ94SSEzMg5GMzMjJ6Vd7.";
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "${gitUsername}";
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
|
|
|
|
shell = pkgs.${theShell};
|
|
|
|
ignoreShellProgramCheck = true;
|
|
|
|
packages = with pkgs; [];
|
|
|
|
};
|
2023-12-14 00:09:39 +01:00
|
|
|
};
|
|
|
|
|
2024-01-18 05:33:57 +01:00
|
|
|
environment.variables = {
|
2024-02-17 19:57:15 +01:00
|
|
|
FLAKE = "${flakeDir}";
|
2024-01-19 07:25:02 +01:00
|
|
|
POLKIT_BIN = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
2024-01-18 05:33:57 +01:00
|
|
|
};
|
|
|
|
|
2024-01-17 07:50:43 +01:00
|
|
|
# Optimization settings and garbage collection automation
|
2023-12-14 00:09:39 +01:00
|
|
|
nix = {
|
2024-01-23 23:07:04 +01:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-01-17 07:50:43 +01:00
|
|
|
system.stateVersion = "23.11";
|
2023-12-14 00:09:39 +01:00
|
|
|
}
|