-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
105 lines (91 loc) · 2.85 KB
/
default.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
98
99
100
101
102
103
104
105
{
inputs,
config,
lib,
pkgs,
...
}: let
inherit (builtins) toString;
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
inherit (lib.my) mapModulesRec';
in {
# disables Nixpkgs Hyprland module to avoid conflicts
#disabledModules = [ "programs/hyprland.nix" ];
imports =
[
inputs.home-manager.nixosModules.home-manager
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
inputs.nix-colors.homeManagerModules.default
#inputs.hyprland.nixosModules.default
#inputs.lix-module.nixosModules.default
]
++ (mapModulesRec' (toString ./modules) import);
hm.imports = [
#inputs.hyprland.homeManagerModules.default
];
# Common config for all nixos machines;
environment.variables = {
NIXPKGS_ALLOW_UNFREE = "1";
};
nix = {
package = pkgs.nixVersions.stable;
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # Enables use of `nix-shell -p ...` etc
registry.nixpkgs.flake = inputs.nixpkgs; # Make `nix shell` etc use pinned nixpkgs
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
keep-outputs = true;
keep-derivations = true;
substituters = [
"https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://hyprland.cachix.org"
"https://cache.lix.systems"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
];
};
};
system = {
stateVersion = "23.11";
configurationRevision = with inputs; mkIf (self ? rev) self.rev;
};
hm.home.stateVersion = config.system.stateVersion;
# Mods, release the spores into his body. thank you
hm.home.enableNixpkgsReleaseCheck = false;
boot = {
kernelPackages = mkDefault pkgs.unstable.linuxPackages_latest;
kernelParams = ["pcie_aspm.policy=performance"];
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "workman";
};
console = {
useXkbConfig = mkDefault true;
};
time.timeZone = mkDefault "Europe/Moscow";
i18n.defaultLocale = mkDefault "en_GB.UTF-8";
hardware.enableRedistributableFirmware = true;
environment.systemPackages = with pkgs; [
unrar unzip
micro
curl wget
desktop-file-utils
shared-mime-info
xdg-user-dirs
xdg-utils
# fun fact! when using flakes not having
# git available as a global package while operating
# on a git repository makes nixos-rebuild break,
# rendering your system unable to rebuild.
# nix is really cool
git
];
documentation.nixos.enable = false;
}