-
Notifications
You must be signed in to change notification settings - Fork 1
/
system.nix
97 lines (87 loc) · 2.39 KB
/
system.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
inputs,
config,
pkgs,
username,
hostname,
...
}: let
inherit
(import ./options.nix)
theLocale
theTimezone
gitUsername
theShell
wallpaperDir
wallpaperGit
theLCVariables
theKBDLayout
flakeDir
theme
;
in {
imports = [
./hardware.nix
./config/system
];
# Enable networking
networking = {
hostName = "${hostname}"; # Define your hostname
networkmanager.enable = true;
#firewall.allowedTCPPorts = [80 8000 8080];
#firewall.enable = true;
};
# Set your time zone
time.timeZone = "${theTimezone}";
# Select internationalisation properties
i18n.defaultLocale = "${theLocale}";
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}";
};
console.keyMap = "${theKBDLayout}";
# Define a user account.
users = {
mutableUsers = true;
users."${username}" = {
homeMode = "755";
hashedPassword = "$6$YdPBODxytqUWXCYL$AHW1U9C6Qqkf6PZJI54jxFcPVm2sm/XWq3Z1qa94PFYz0FF.za9gl5WZL/z/g4nFLQ94SSEzMg5GMzMjJ6Vd7.";
isNormalUser = true;
description = "${gitUsername}";
extraGroups = ["networkmanager" "wheel" "libvirtd" "libvirt" "kvm" "qemu-libvirtd" "video" "render"];
shell = pkgs.${theShell};
ignoreShellProgramCheck = true;
packages = with pkgs; [];
};
};
environment.variables = {
VAGRANT_DEFAULT_PROVIDER = "libvirt";
FLAKE = "${flakeDir}";
POLKIT_BIN = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
};
# Optimization settings and garbage collection automation
nix = {
settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
substituters = ["https://hyprland.cachix.org" "https://cache.iog.io" "https://cache.nixos.org"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
system.stateVersion = "23.11";
}