···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-}