-
Notifications
You must be signed in to change notification settings - Fork 3
/
nixos.nix
156 lines (155 loc) · 4.54 KB
/
nixos.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
hostName,
enableNvidia ? false,
buildJobs ? "auto",
gccarch ? null,
systemFeatures ? [ ],
}:
{
system = "x86_64-linux";
modules = [
(
{
pkgs,
lib,
modulesPath,
...
}:
{
nixpkgs.hostPlatform =
if gccarch == null then
{ system = "x86_64-linux"; }
else
{
gcc.arch = gccarch;
gcc.tune = gccarch;
system = "x86_64-linux";
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.initrd.availableKernelModules = [ "nvme" ];
boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
environment.variables = {
EDITOR = "nvim";
NEOVIDE_FORK = 1;
};
fileSystems."/" = {
device = "zroot/root";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/nvme0n1p3";
fsType = "vfat";
};
fonts.packages = with pkgs; [
kochi-substitute
font-awesome
cantarell-fonts
dejavu_fonts
source-code-pro
source-sans
];
hardware.nvidia.modesetting.enable = enableNvidia;
i18n.defaultLocale = "en_AU.UTF-8";
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
networking.firewall.enable = false;
networking.hostId = "00000000";
networking.hostName = hostName;
nix.extraOptions = ''
experimental-features = nix-command flakes
allow-import-from-derivation = false
'';
nix.settings.max-jobs = buildJobs;
nix.settings.system-features = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
] ++ systemFeatures;
#i18n.inputMethod = { enabled = "ibus"; ibus.engines = with pkgs.ibus-engines; [ mozc ]; };
nixpkgs.config.allowUnfree = true;
programs.git.config = {
user.name = "Kirill Radzikhovskyy";
user.email = "kirillrdy@gmail.com";
};
programs.git.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns4 = true;
services.avahi.publish.addresses = true;
services.avahi.publish.enable = true;
services.gnome.core-utilities.enable = false;
services.gnome.tracker-miners.enable = false;
services.gnome.tracker.enable = false;
services.logind.extraConfig = "RuntimeDirectorySize=10G";
services.openssh.enable = true;
services.tailscale.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.enable = true;
services.xserver.xkb.options = "caps:none";
services.xserver.videoDrivers = if enableNvidia then [ "nvidia" ] else [ "modesetting" ];
swapDevices = [ { device = "/dev/nvme0n1p2"; } ];
zramSwap.enable = true;
system.stateVersion = "24.11"; # I come from the future
time.timeZone = "Australia/Melbourne";
users.users.haru = {
isNormalUser = true;
extraGroups = [
"wheel"
"docker"
"vboxusers"
];
};
users.users.kirillvr = {
isNormalUser = true;
initialPassword = "password";
extraGroups = [
"wheel"
"docker"
"vboxusers"
];
};
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "zfs";
virtualisation.docker.enableNvidia = enableNvidia;
hardware.graphics.enable32Bit = enableNvidia;
environment.systemPackages = with pkgs; [
gnomeExtensions.system-monitor
gnomeExtensions.freon
(firefox.override { cfg.speechSynthesisSupport = false; })
(import ./neovim.nix pkgs)
acpi
awscli2
awsebcli
baobab
btop
file
gnome-console
gnome-text-editor
file-roller
gnome-system-monitor
nautilus
totem
go
golangci-lint
golangci-lint-langserver
gopls
loupe
neovide
nil
nix-tree
nix-update
nixfmt-rfc-style
nixpkgs-review
ripgrep
slack
tig
xclip
zig
zls
];
}
)
];
}