···1-{ ... }:
2-{
3 # Use the systemd-boot EFI boot loader.
4 boot.loader.systemd-boot.enable = true;
5 boot.loader.efi.canTouchEfiVariables = true;
···1+{ ... }: {
02 # Use the systemd-boot EFI boot loader.
3 boot.loader.systemd-boot.enable = true;
4 boot.loader.efi.canTouchEfiVariables = true;
+31
common.nix
···0000000000000000000000000000000
···1+{ ... }:
2+{
3+ # Set your time zone.
4+ time.timeZone = "America/Chicago";
5+6+ # Select internationalisation properties.
7+ i18n.defaultLocale = "en_US.UTF-8";
8+ # console = {
9+ # font = "Lat2-Terminus16";
10+ # keyMap = "us";
11+ # useXkbConfig = true; # use xkb.options in tty.
12+ # };
13+14+ # Automatic doc cache generation
15+ documentation.man.generateCaches = true;
16+17+ # Automatic system upgrades
18+ system.autoUpgrade = {
19+ enable = true;
20+ dates = "09:00";
21+ randomizedDelaySec = "45min";
22+ };
23+24+ # Automatic Garbage Collection
25+ nix.gc.automatic = true;
26+ nix.gc.options = "--delete-older-than 8d";
27+ nix.settings.trusted-users = [ "@wheel" ];
28+29+ # I don't care that much about free vs unfree
30+ nixpkgs.config.allowUnfree = true;
31+}
-63
configuration.nix
···1-# Edit this configuration file to define what should be installed on
2-## your system. Help is available in the configuration.nix(5) man page, on
3-# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
4-5-{ ... }:
6-{
7- imports = [
8- # Include the results of the hardware scan.
9- ./hardware-configuration.nix
10- ./boot.nix
11- ./networking.nix
12- #./gui.nix
13- ./users.nix
14- ./packages.nix
15- ./services.nix
16- ];
17-18- nixpkgs.config.allowUnfree = true;
19-20- # Set your time zone.
21- time.timeZone = "America/Chicago";
22-23- # Select internationalisation properties.
24- i18n.defaultLocale = "en_US.UTF-8";
25- # console = {
26- # font = "Lat2-Terminus16";
27- # keyMap = "us";
28- # useXkbConfig = true; # use xkb.options in tty.
29- # };
30-31- # Automatic doc cache generation
32- documentation.man.generateCaches = true;
33-34- # Automatic system upgrades
35- system.autoUpgrade = {
36- enable = true;
37- dates = "09:00";
38- randomizedDelaySec = "45min";
39- };
40-41- # Automatic Garbage Collection
42- nix.gc.automatic = true;
43- nix.gc.options = "--delete-older-than 8d";
44-45- # This option defines the first version of NixOS you have installed on this particular machine,
46- # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
47- #
48- # Most users should NEVER change this value after the initial install, for any reason,
49- # even if you've upgraded your system to a new NixOS release.
50- #
51- # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
52- # so changing it will NOT upgrade your system.
53- #
54- # This value being lower than the current NixOS release does NOT mean your system is
55- # out of date, out of support, or vulnerable.
56- #
57- # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
58- # and migrated your data accordingly.
59- #
60- # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
61- system.stateVersion = "23.11"; # Did you read the comment?
62-63-}
···1+# Edit this configuration file to define what should be installed on
2+# your system. Help is available in the configuration.nix(5) man page, on
3+# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
4+5+{
6+ config,
7+ lib,
8+ pkgs,
9+ inputs,
10+ ...
11+}:
12+let
13+ system = pkgs.stdenv.targetPlatform.system;
14+ agave = (builtins.getFlake "/home/noah/repos/agave");
15+in
16+{
17+ imports = [
18+ # Include the results of the hardware scan.
19+ ./hardware-configuration.nix
20+ agave.nixosModules.default
21+ ];
22+23+ nix.settings.experimental-features = [
24+ "nix-command"
25+ "flakes"
26+ ];
27+28+ # Use the systemd-boot EFI boot loader.
29+ boot.loader.systemd-boot.enable = true;
30+ #boot.loader.grub.device = "nodev";
31+ #boot.loader.grub.efiSupport = true;
32+ #boot.loader.grub.useOSProber = true;
33+ boot.loader.efi.canTouchEfiVariables = true;
34+35+ # Use latest kernel.
36+ boot.kernelPackages = pkgs.linuxPackages_latest;
37+38+ networking.hostName = "edge"; # Define your hostname.
39+40+ # Configure network connections interactively with nmcli or nmtui.
41+ networking.networkmanager.enable = true;
42+43+ # Set your time zone.
44+ # time.timeZone = "Europe/Amsterdam";
45+46+ # Configure network proxy if necessary
47+ # networking.proxy.default = "http://user:password@proxy:port/";
48+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
49+50+ # Select internationalisation properties.
51+ i18n.defaultLocale = "en_US.UTF-8";
52+ console = {
53+ font = "Lat2-Terminus16";
54+ keyMap = "us";
55+ #useXkbConfig = true; # use xkb.options in tty.
56+ };
57+58+ # Enable the X11 windowing system.
59+ # services.xserver.enable = true;
60+61+ # Configure keymap in X11
62+ # services.xserver.xkb.layout = "us";
63+ # services.xserver.xkb.options = "eurosign:e,caps:escape";
64+65+ # Enable CUPS to print documents.
66+ # services.printing.enable = true;
67+68+ # Enable sound.
69+ # services.pulseaudio.enable = true;
70+ # OR
71+ # services.pipewire = {
72+ # enable = true;
73+ # pulse.enable = true;
74+ # };
75+76+ # Enable touchpad support (enabled default in most desktopManager).
77+ # services.libinput.enable = true;
78+79+ # Define a user account. Don't forget to set a password with ‘passwd’.
80+ # users.users.alice = {
81+ # isNormalUser = true;
82+ # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
83+ # packages = with pkgs; [
84+ # tree
85+ # ];
86+ # };
87+88+ # programs.firefox.enable = true;
89+90+ # List packages installed in system profile.
91+ # You can use https://search.nixos.org/ to find more packages (and options).
92+ environment.systemPackages = with pkgs; [
93+ neovim
94+ wget
95+ git
96+ htop
97+ inputs.agenix.packages."${system}".agenix
98+ agave.packages.${system}.solana
99+ agave.packages.${system}.solana-keygen
100+ ];
101+102+ services.tailscale.useRoutingFeatures = "both";
103+104+ # Some programs need SUID wrappers, can be configured further or are
105+ # started in user sessions.
106+ # programs.mtr.enable = true;
107+ # programs.gnupg.agent = {
108+ # enable = true;
109+ # enableSSHSupport = true;
110+ # };
111+112+ # List services that you want to enable:
113+114+ # Enable the OpenSSH daemon.
115+ services.openssh.enable = true;
116+ services.openssh.openFirewall = true;
117+118+ # Open ports in the firewall.
119+ # networking.firewall.allowedTCPPorts = [ ... ];
120+ # networking.firewall.allowedUDPPorts = [ ... ];
121+ # Or disable the firewall altogether.
122+ networking.firewall.enable = true;
123+ networking.firewall = {
124+ allowPing = true;
125+ allowedUDPPorts = [ ];
126+ allowedUDPPortRanges = [
127+ # Agave
128+ {
129+ from = 8000;
130+ to = 8020;
131+ }
132+ ];
133+ allowedTCPPorts = [
134+ 2375
135+ 3000
136+ # Agave
137+ 8001
138+ 8899
139+ 8900
140+ 10000
141+ ];
142+ };
143+ security.pam.loginLimits = [
144+ {
145+ domain = "*";
146+ type = "soft";
147+ item = "nofile";
148+ value = "100000";
149+ }
150+ {
151+ domain = "*";
152+ type = "hard";
153+ item = "nofile";
154+ value = "1000000";
155+ }
156+ ];
157+158+ age.secrets.validator-identity = {
159+ file = ../../secrets/validator-identity.age;
160+ owner = "sol";
161+ group = "sol";
162+ };
163+ services.ambient-validator = {
164+ enable = true;
165+ package = agave.packages.${system}.ambient-validator;
166+ # this needs to be a secret
167+ identityKeypair = config.age.secrets.validator-identity.path;
168+ rpcBindAddress = "0.0.0.0";
169+ geyserPluginConfig = {
170+ libpath = "${agave.packages.${system}.yellowstone-geyser}/lib/libyellowstone_grpc_geyser.so";
171+ log = {
172+ level = "info";
173+ };
174+ tokio = {
175+ worker_threads = 4;
176+ affinity = null;
177+ };
178+ grpc = {
179+ address = "0.0.0.0:10000";
180+ };
181+ };
182+ };
183+ # Copy the NixOS configuration file and link it from the resulting system
184+ # (/run/current-system/configuration.nix). This is useful in case you
185+ # accidentally delete configuration.nix.
186+ # system.copySystemConfiguration = true;
187+188+ # This option defines the first version of NixOS you have installed on this particular machine,
189+ # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
190+ #
191+ # Most users should NEVER change this value after the initial install, for any reason,
192+ # even if you've upgraded your system to a new NixOS release.
193+ #
194+ # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
195+ # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
196+ # to actually do that.
197+ #
198+ # This value being lower than the current NixOS release does NOT mean your system is
199+ # out of date, out of support, or vulnerable.
200+ #
201+ # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
202+ # and migrated your data accordingly.
203+ #
204+ # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
205+ system.stateVersion = "25.11"; # Did you read the comment?
206+207+}
···1+# Edit this configuration file to define what should be installed on
2+## your system. Help is available in the configuration.nix(5) man page, on
3+# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
4+5+{ ... }:
6+{
7+ imports = [
8+ # Include the results of the hardware scan.
9+ ./hardware-configuration.nix
10+ ./boot.nix
11+ ./networking.nix
12+ #./gui.nix
13+ ./packages.nix
14+ ./services.nix
15+ ];
16+17+ nixpkgs.config.allowUnfree = true;
18+19+ # Set your time zone.
20+ time.timeZone = "America/Chicago";
21+22+ # Select internationalisation properties.
23+ i18n.defaultLocale = "en_US.UTF-8";
24+ # console = {
25+ # font = "Lat2-Terminus16";
26+ # keyMap = "us";
27+ # useXkbConfig = true; # use xkb.options in tty.
28+ # };
29+30+ # Automatic doc cache generation
31+ documentation.man.generateCaches = true;
32+33+ # Automatic system upgrades
34+ system.autoUpgrade = {
35+ enable = true;
36+ dates = "09:00";
37+ randomizedDelaySec = "45min";
38+ };
39+40+ # Automatic Garbage Collection
41+ nix.gc.automatic = true;
42+ nix.gc.options = "--delete-older-than 8d";
43+44+ # This option defines the first version of NixOS you have installed on this particular machine,
45+ # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
46+ #
47+ # Most users should NEVER change this value after the initial install, for any reason,
48+ # even if you've upgraded your system to a new NixOS release.
49+ #
50+ # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
51+ # so changing it will NOT upgrade your system.
52+ #
53+ # This value being lower than the current NixOS release does NOT mean your system is
54+ # out of date, out of support, or vulnerable.
55+ #
56+ # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
57+ # and migrated your data accordingly.
58+ #
59+ # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
60+ system.stateVersion = "23.11"; # Did you read the comment?
61+62+}
···7-- Config for Nord, which I usually use
8-- vim.g.nord_italic = false
9-- vim.g.nord_bold = false
10---vim.opt.background = "light"
11-vim.opt.background = "dark"
0000000001213-- Formatting and vim config
14vim.opt.expandtab = true
···7-- Config for Nord, which I usually use
8-- vim.g.nord_italic = false
9-- vim.g.nord_bold = false
10+local known_hosts = {
11+ ["aleister.packetlost.dev"] = "light",
12+ ["aleister.local"] = "light",
13+ ["accelerator"] = "light"
14+}
15+local background = known_hosts[vim.loop.os_gethostname()]
16+if not background then
17+ background = "dark"
18+end
19+vim.opt.background = background
20+--vim.opt.background = "dark"
2122-- Formatting and vim config
23vim.opt.expandtab = true
···2#workspace $ws1 output DP-6
3#workspace $ws2 output HDMI-A-1
45-output "Acer Technologies XV272U 0x8520810C" {
6 mode 2560x1440@143.999Hz
7 pos 440 0
8 transform normal
···17 transform normal
18 scale 1.0
19 scale_filter nearest
20- adaptive_sync off
21 dpms on
22}
···2#workspace $ws1 output DP-6
3#workspace $ws2 output HDMI-A-1
45+output "Acer Technologies XV272U 0x0000A50C" {
6 mode 2560x1440@143.999Hz
7 pos 440 0
8 transform normal
···17 transform normal
18 scale 1.0
19 scale_filter nearest
20+ adaptive_sync on
21 dpms on
22}
+11-5
users.nix
···1{
2 pkgs,
3 lib,
004 ...
5}:
6{
···9 # I don't want to allow ad-hoc modifying users on the system.
10 # Users must be declared either as part of a package or in this file.
11 users.mutableUsers = false;
0000001213 # Define a user account. Don't forget to set a password with ‘passwd’.
14 users.users.noah = {
···18 "wheel"
19 "video"
20 "nas"
21- "libvirtd"
22- "qemu-libvirtd"
23- "docker"
24- ]; # Enable ‘sudo’ for the user.
25- hashedPasswordFile = "/etc/nixos/noah-password";
26 openssh.authorizedKeys.keys = lib.strings.splitString "\n" (
27 builtins.readFile (
28 builtins.fetchurl {
···1{
2 pkgs,
3 lib,
4+ config,
5+ extraGroups ? [ ],
6 ...
7}:
8{
···11 # I don't want to allow ad-hoc modifying users on the system.
12 # Users must be declared either as part of a package or in this file.
13 users.mutableUsers = false;
14+15+ age.secrets.noah-password = {
16+ file = ./secrets/noah-hashed-password.age;
17+ owner = "root";
18+ group = "root";
19+ };
2021 # Define a user account. Don't forget to set a password with ‘passwd’.
22 users.users.noah = {
···26 "wheel"
27 "video"
28 "nas"
29+ ]
30+ ++ extraGroups; # Enable ‘sudo’ for the user.
31+ hashedPasswordFile = config.age.secrets.noah-password.path;
0032 openssh.authorizedKeys.keys = lib.strings.splitString "\n" (
33 builtins.readFile (
34 builtins.fetchurl {