# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running 'nixos-help'). { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ./disko.nix ]; # No systemd emergency mode (can't reliably be accessed over SSH) systemd.enableEmergencyMode = false; # ZFS requires a hostId networking.hostId = "bb7d707a"; # Boot configuration for LUKS + ZFS boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot"; boot.loader.systemd-boot.enable = true; # ZFS support boot.supportedFilesystems = [ "zfs" ]; boot.zfs = { requestEncryptionCredentials = [ "tank" ]; # Load key for tank pool forceImportRoot = false; }; # ZFS services services.zfs = { autoScrub = { enable = true; interval = "weekly"; }; autoSnapshot = { enable = true; frequent = 4; # 15-minute snapshots hourly = 24; daily = 7; weekly = 4; monthly = 12; }; trim.enable = true; }; networking.interfaces.enp2s0 = { ipv4.addresses = [ { address = "192.168.1.240"; prefixLength = 24; } ]; ipv6.addresses = [ { address = "fd7d:587a:4300:1::240"; prefixLength = 64; } ]; ipv4.routes = [ { address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; } ]; useDHCP = false; }; networking.nameservers = [ "192.168.1.1" ]; networking.defaultGateway = { address = "192.168.1.1"; interface = "enp2s0"; }; networking.hostName = "box"; # Define your hostname. # The global useDHCP flag is deprecated, therefore explicitly set to false here. networking.useDHCP = false; networking.interfaces.wlp3s0.useDHCP = true; # Enable the OpenSSH daemon. services.openssh.enable = true; programs.gnupg.agent.enable = true; programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses; programs.gnupg.agent.enableSSHSupport = true; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you # should. system.stateVersion = "19.09"; # Did you read the comment? }