-
Notifications
You must be signed in to change notification settings - Fork 3
/
nixos.nix
130 lines (129 loc) · 3.9 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
{
hostName,
enableNvidia ? false,
}:
{
system = "x86_64-linux";
modules = [
(
{
pkgs,
lib,
modulesPath,
...
}:
{
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.initrd.availableKernelModules = [ "nvme" ];
#boot.kernelPackages = pkgs.linuxPackages_6_10;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
environment.variables = {
EDITOR = "nvim";
NEOVIDE_FORK = 1;
NIXOS_OZONE_WL = 1; # fixes slack
};
fileSystems."/" = {
device = "zroot/root";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/nvme0n1p3";
fsType = "vfat";
};
fonts.packages = with pkgs; [
kochi-substitute
font-awesome
roboto
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.networkmanager.enable = true;
networking.networkmanager.plugins = lib.mkForce [];
networking.hostName = hostName;
nix.extraOptions = ''
experimental-features = nix-command flakes
allow-import-from-derivation = false
'';
nix.settings.max-jobs = 1;
nix.settings.trusted-users = [ "kirillvr" ];
#i18n.inputMethod = { enabled = "ibus"; ibus.engines = with pkgs.ibus-engines; [ mozc ]; };
nixpkgs.config.allowUnfree = true;
programs.git.config = {
user.name = "Kirill Radzikhovskyy";
user.email = "[email protected]";
};
hardware.nvidia.open = true;
programs.git.enable = true;
programs.niri.enable = true;
programs.ssh.startAgent = true;
services.avahi.enable = true;
services.avahi.nssmdns4 = true;
services.avahi.publish.addresses = true;
services.avahi.publish.enable = true;
services.displayManager.sessionPackages = [ pkgs.niri ];
services.logind.extraConfig = "RuntimeDirectorySize=10G";
services.openssh.enable = true;
services.power-profiles-daemon.enable = true;
services.tailscale.enable = true;
services.xserver.enable = true;
services.xserver.excludePackages = [ pkgs.xterm ];
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.kirillvr = {
isNormalUser = true;
initialPassword = "password";
extraGroups = [
"wheel"
"docker"
];
};
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "zfs";
hardware.nvidia-container-toolkit.enable = enableNvidia;
hardware.graphics.enable32Bit = enableNvidia;
environment.systemPackages = with pkgs; [
(import ./neovim.nix pkgs)
alacritty
btop
file
firefox
fuzzel
go
golangci-lint
golangci-lint-langserver
gopls
imv
lua-language-server
mako
neovide
nil
nix-tree
nix-update
nixfmt-rfc-style
nixpkgs-review
pavucontrol
ripgrep
slack
swaynotificationcenter
swayosd
tig
waybar
wl-clipboard
zig
zls
];
}
)
];
}