{ config, pkgs, inputs, ... }: { # Define a user account. Don't forget to set a password with ‘passwd’. users.users.alex = { isNormalUser = true; description = "Alexander Wainwright"; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; [ # thunderbird ]; shell = pkgs.fish; }; # enable zram. not totally sure if this does it in physical ram or just swap zramSwap.enable = true; # enable earlyoom to stop the system becoming unresponsive when out of ram services.earlyoom.enable = true; networking.firewall.allowedTCPPorts = [ 8000 8080 ]; # Set your time zone. time.timeZone = "Australia/Brisbane"; # Select internationalisation properties. i18n.defaultLocale = "en_GB.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_AU.UTF-8"; LC_IDENTIFICATION = "en_AU.UTF-8"; LC_MEASUREMENT = "en_AU.UTF-8"; LC_MONETARY = "en_AU.UTF-8"; LC_NAME = "en_AU.UTF-8"; LC_NUMERIC = "en_AU.UTF-8"; LC_PAPER = "en_AU.UTF-8"; LC_TELEPHONE = "en_AU.UTF-8"; LC_TIME = "en_AU.UTF-8"; }; # Configure console keymap console.keyMap = "dvorak"; # fish shell programs.fish.enable = true; # Create a library path that only applies to unpackaged programs by using # nix-ldo # https://nix.dev/guides/faq#how-to-run-non-nix-executables programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; [ # Add any missing dynamic libraries for unpackaged programs # here, NOT in environment.systemPackages ]; # Allow unfree packages nixpkgs.config.allowUnfree = true; # Enable the Flakes feature and the accompanying new nix command-line tool nix.settings.experimental-features = [ "nix-command" "flakes" ]; # some nix tidy up stuff nix.settings.auto-optimise-store = true; nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 60d"; }; # Enable zeroconf services.avahi = { enable = true; nssmdns4 = true; # Enables Avahi for name service lookups (e.g., in /etc/nsswitch.conf) publish = { enable = true; addresses = true; # Publish your laptop's IP addresses workstation = true; # Publish your laptop as a workstation # You might also want: # domain = true; # Announce the locally used domain name (usually .local) # userServices = true; # Publish services advertised by users }; # If you're using systemd-resolved alongside Avahi, ensure mDNS is also enabled there: # services.resolved.enable = true; # services.resolved.extraConfig = "MulticastDNS=yes"; }; environment.variables.EDITOR = "nvim"; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; # }; # Enable the OpenSSH daemon. services.openssh.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # Packages environment.systemPackages = with pkgs; [ avahi bat borgbackup cifs-utils duf dust entr fd git gocryptfs man-pages mosh neovim python314 ripgrep rsync silver-searcher sqlite tldr unzip uv wget wireguard-tools zip # build tools binutils cmake gcc clang gnumake libtool nodejs_24 # rust cargo rustc ]; }