···11+{ ... }:
22+{
33+ # Set your time zone.
44+ time.timeZone = "America/Chicago";
55+66+ # Select internationalisation properties.
77+ i18n.defaultLocale = "en_US.UTF-8";
88+ # console = {
99+ # font = "Lat2-Terminus16";
1010+ # keyMap = "us";
1111+ # useXkbConfig = true; # use xkb.options in tty.
1212+ # };
1313+1414+ # Automatic doc cache generation
1515+ documentation.man.generateCaches = true;
1616+1717+ # Automatic system upgrades
1818+ system.autoUpgrade = {
1919+ enable = true;
2020+ dates = "09:00";
2121+ randomizedDelaySec = "45min";
2222+ };
2323+2424+ # Automatic Garbage Collection
2525+ nix.gc.automatic = true;
2626+ nix.gc.options = "--delete-older-than 8d";
2727+ nix.settings.trusted-users = [ "@wheel" ];
2828+2929+ # I don't care that much about free vs unfree
3030+ nixpkgs.config.allowUnfree = true;
3131+}
-60
configuration.nix
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page, on
33-# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
44-55-# NixOS-WSL specific options are documented on the NixOS-WSL repository:
66-# https://github.com/nix-community/NixOS-WSL
77-88-{ ... }: {
99- imports = [
1010- # WSL has no hardware configuration
1111- #./hardware-configuration.nix
1212- #./boot.nix
1313- ./networking.nix
1414- #./gui.nix
1515- ./users.nix
1616- ./packages.nix
1717- ./services.nix
1818- # include NixOS-WSL modules
1919- <nixos-wsl/modules>
2020- ];
2121- wsl = {
2222- enable = true;
2323- defaultUser = "noah";
2424- wslConf.network.hostname = "touma-wsl-nixos";
2525- };
2626-2727- # Set your time zone.
2828- time.timeZone = "America/Chicago";
2929-3030- # Select internationalisation properties.
3131- i18n.defaultLocale = "en_US.UTF-8";
3232- # console = {
3333- # font = "Lat2-Terminus16";
3434- # keyMap = "us";
3535- # useXkbConfig = true; # use xkb.options in tty.
3636- # };
3737-3838- # Copy the NixOS configuration file and link it from the resulting system
3939- # (/run/current-system/configuration.nix). This is useful in case you
4040- # accidentally delete configuration.nix.
4141- system.copySystemConfiguration = true;
4242-4343- # Automatic doc cache generation
4444- documentation.man.generateCaches = true;
4545-4646- # Automatic system upgrades
4747- system.autoUpgrade = {
4848- enable = true;
4949- dates = "09:00";
5050- randomizedDelaySec = "45min";
5151- };
5252-5353- # This value determines the NixOS release from which the default
5454- # settings for stateful data, like file locations and database versions
5555- # on your system were taken. It's perfectly fine and recommended to leave
5656- # this value at the release version of the first install of this system.
5757- # Before changing this value read the documentation for this option
5858- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
5959- system.stateVersion = "23.11"; # Did you read the comment?
6060-}
···11+# Edit this configuration file to define what should be installed on
22+# your system. Help is available in the configuration.nix(5) man page, on
33+# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
44+55+{
66+ config,
77+ lib,
88+ pkgs,
99+ inputs,
1010+ ...
1111+}:
1212+let
1313+ system = pkgs.stdenv.targetPlatform.system;
1414+ agave = (builtins.getFlake "/home/noah/repos/agave");
1515+in
1616+{
1717+ imports = [
1818+ # Include the results of the hardware scan.
1919+ ./hardware-configuration.nix
2020+ agave.nixosModules.default
2121+ ];
2222+2323+ nix.settings.experimental-features = [
2424+ "nix-command"
2525+ "flakes"
2626+ ];
2727+2828+ # Use the systemd-boot EFI boot loader.
2929+ boot.loader.systemd-boot.enable = true;
3030+ #boot.loader.grub.device = "nodev";
3131+ #boot.loader.grub.efiSupport = true;
3232+ #boot.loader.grub.useOSProber = true;
3333+ boot.loader.efi.canTouchEfiVariables = true;
3434+3535+ # Use latest kernel.
3636+ boot.kernelPackages = pkgs.linuxPackages_latest;
3737+3838+ networking.hostName = "edge"; # Define your hostname.
3939+4040+ # Configure network connections interactively with nmcli or nmtui.
4141+ networking.networkmanager.enable = true;
4242+4343+ # Set your time zone.
4444+ # time.timeZone = "Europe/Amsterdam";
4545+4646+ # Configure network proxy if necessary
4747+ # networking.proxy.default = "http://user:password@proxy:port/";
4848+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
4949+5050+ # Select internationalisation properties.
5151+ i18n.defaultLocale = "en_US.UTF-8";
5252+ console = {
5353+ font = "Lat2-Terminus16";
5454+ keyMap = "us";
5555+ #useXkbConfig = true; # use xkb.options in tty.
5656+ };
5757+5858+ # Enable the X11 windowing system.
5959+ # services.xserver.enable = true;
6060+6161+ # Configure keymap in X11
6262+ # services.xserver.xkb.layout = "us";
6363+ # services.xserver.xkb.options = "eurosign:e,caps:escape";
6464+6565+ # Enable CUPS to print documents.
6666+ # services.printing.enable = true;
6767+6868+ # Enable sound.
6969+ # services.pulseaudio.enable = true;
7070+ # OR
7171+ # services.pipewire = {
7272+ # enable = true;
7373+ # pulse.enable = true;
7474+ # };
7575+7676+ # Enable touchpad support (enabled default in most desktopManager).
7777+ # services.libinput.enable = true;
7878+7979+ # Define a user account. Don't forget to set a password with ‘passwd’.
8080+ # users.users.alice = {
8181+ # isNormalUser = true;
8282+ # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
8383+ # packages = with pkgs; [
8484+ # tree
8585+ # ];
8686+ # };
8787+8888+ # programs.firefox.enable = true;
8989+9090+ # List packages installed in system profile.
9191+ # You can use https://search.nixos.org/ to find more packages (and options).
9292+ environment.systemPackages = with pkgs; [
9393+ neovim
9494+ wget
9595+ git
9696+ htop
9797+ inputs.agenix.packages."${system}".agenix
9898+ agave.packages.${system}.solana
9999+ agave.packages.${system}.solana-keygen
100100+ ];
101101+102102+ services.tailscale.useRoutingFeatures = "both";
103103+104104+ # Some programs need SUID wrappers, can be configured further or are
105105+ # started in user sessions.
106106+ # programs.mtr.enable = true;
107107+ # programs.gnupg.agent = {
108108+ # enable = true;
109109+ # enableSSHSupport = true;
110110+ # };
111111+112112+ # List services that you want to enable:
113113+114114+ # Enable the OpenSSH daemon.
115115+ services.openssh.enable = true;
116116+ services.openssh.openFirewall = true;
117117+118118+ # Open ports in the firewall.
119119+ # networking.firewall.allowedTCPPorts = [ ... ];
120120+ # networking.firewall.allowedUDPPorts = [ ... ];
121121+ # Or disable the firewall altogether.
122122+ networking.firewall.enable = true;
123123+ networking.firewall = {
124124+ allowPing = true;
125125+ allowedUDPPorts = [ ];
126126+ allowedUDPPortRanges = [
127127+ # Agave
128128+ {
129129+ from = 8000;
130130+ to = 8020;
131131+ }
132132+ ];
133133+ allowedTCPPorts = [
134134+ 2375
135135+ 3000
136136+ # Agave
137137+ 8001
138138+ 8899
139139+ 8900
140140+ 10000
141141+ ];
142142+ };
143143+ security.pam.loginLimits = [
144144+ {
145145+ domain = "*";
146146+ type = "soft";
147147+ item = "nofile";
148148+ value = "100000";
149149+ }
150150+ {
151151+ domain = "*";
152152+ type = "hard";
153153+ item = "nofile";
154154+ value = "1000000";
155155+ }
156156+ ];
157157+158158+ age.secrets.validator-identity = {
159159+ file = ../../secrets/validator-identity.age;
160160+ owner = "sol";
161161+ group = "sol";
162162+ };
163163+ services.ambient-validator = {
164164+ enable = true;
165165+ package = agave.packages.${system}.ambient-validator;
166166+ # this needs to be a secret
167167+ identityKeypair = config.age.secrets.validator-identity.path;
168168+ rpcBindAddress = "0.0.0.0";
169169+ geyserPluginConfig = {
170170+ libpath = "${agave.packages.${system}.yellowstone-geyser}/lib/libyellowstone_grpc_geyser.so";
171171+ log = {
172172+ level = "info";
173173+ };
174174+ tokio = {
175175+ worker_threads = 4;
176176+ affinity = null;
177177+ };
178178+ grpc = {
179179+ address = "0.0.0.0:10000";
180180+ };
181181+ };
182182+ };
183183+ # Copy the NixOS configuration file and link it from the resulting system
184184+ # (/run/current-system/configuration.nix). This is useful in case you
185185+ # accidentally delete configuration.nix.
186186+ # system.copySystemConfiguration = true;
187187+188188+ # This option defines the first version of NixOS you have installed on this particular machine,
189189+ # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
190190+ #
191191+ # Most users should NEVER change this value after the initial install, for any reason,
192192+ # even if you've upgraded your system to a new NixOS release.
193193+ #
194194+ # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
195195+ # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
196196+ # to actually do that.
197197+ #
198198+ # This value being lower than the current NixOS release does NOT mean your system is
199199+ # out of date, out of support, or vulnerable.
200200+ #
201201+ # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
202202+ # and migrated your data accordingly.
203203+ #
204204+ # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
205205+ system.stateVersion = "25.11"; # Did you read the comment?
206206+207207+}
···11+# Edit this configuration file to define what should be installed on
22+## your system. Help is available in the configuration.nix(5) man page, on
33+# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
44+55+{ ... }:
66+{
77+ imports = [
88+ # Include the results of the hardware scan.
99+ ./hardware-configuration.nix
1010+ ./boot.nix
1111+ ./networking.nix
1212+ #./gui.nix
1313+ ./packages.nix
1414+ ./services.nix
1515+ ];
1616+1717+ nixpkgs.config.allowUnfree = true;
1818+1919+ # Set your time zone.
2020+ time.timeZone = "America/Chicago";
2121+2222+ # Select internationalisation properties.
2323+ i18n.defaultLocale = "en_US.UTF-8";
2424+ # console = {
2525+ # font = "Lat2-Terminus16";
2626+ # keyMap = "us";
2727+ # useXkbConfig = true; # use xkb.options in tty.
2828+ # };
2929+3030+ # Automatic doc cache generation
3131+ documentation.man.generateCaches = true;
3232+3333+ # Automatic system upgrades
3434+ system.autoUpgrade = {
3535+ enable = true;
3636+ dates = "09:00";
3737+ randomizedDelaySec = "45min";
3838+ };
3939+4040+ # Automatic Garbage Collection
4141+ nix.gc.automatic = true;
4242+ nix.gc.options = "--delete-older-than 8d";
4343+4444+ # This option defines the first version of NixOS you have installed on this particular machine,
4545+ # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
4646+ #
4747+ # Most users should NEVER change this value after the initial install, for any reason,
4848+ # even if you've upgraded your system to a new NixOS release.
4949+ #
5050+ # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
5151+ # so changing it will NOT upgrade your system.
5252+ #
5353+ # This value being lower than the current NixOS release does NOT mean your system is
5454+ # out of date, out of support, or vulnerable.
5555+ #
5656+ # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
5757+ # and migrated your data accordingly.
5858+ #
5959+ # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
6060+ system.stateVersion = "23.11"; # Did you read the comment?
6161+6262+}