NixOS config for jollywhoppers servers
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Pinned nixpkgs to 25.11, and wrote minimal machine configuration configured for @xan.lol

+167 -38
+1
.gitignore
··· 1 + .direnv
+110
configuration.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + inputs, 5 + hostname, 6 + ... 7 + }: 8 + let 9 + pkgsUnstable = import inputs.nixpkgs-unstable { 10 + inherit (pkgs.stdenv.hostPlatform) system; 11 + inherit (config.nixpkgs) config; 12 + }; 13 + in 14 + { 15 + imports = [ ]; 16 + 17 + nix.settings.experimental-features = [ 18 + "nix-command" 19 + "flakes" 20 + ]; 21 + 22 + # Bootloader. 23 + boot.loader.systemd-boot.enable = true; 24 + boot.loader.efi.canTouchEfiVariables = true; 25 + 26 + # Use latest kernel. 27 + boot.kernelPackages = pkgs.linuxPackages_latest; 28 + 29 + # Atomatically old derivations from the nix store that haven't been used 30 + nix.gc = { 31 + automatic = true; 32 + dates = "weekly"; 33 + options = "--delete-older-than 14d"; 34 + }; 35 + 36 + nix.settings.auto-optimise-store = true; 37 + 38 + # Define your hostname. 39 + networking.hostName = "${hostname}"; 40 + # Enable networking 41 + networking.networkmanager.enable = true; 42 + 43 + # Set your time zone. 44 + time.timeZone = "America/Los_Angeles"; 45 + 46 + # Select internationalisation properties. 47 + i18n.defaultLocale = "en_US.UTF-8"; 48 + 49 + nixpkgs.config = { 50 + # Allow unsupported systems 51 + allowUnsupportedSystem = true; 52 + # Allow unfree software 53 + allowUnfree = true; 54 + }; 55 + 56 + i18n.extraLocaleSettings = { 57 + LC_ADDRESS = "en_US.UTF-8"; 58 + LC_IDENTIFICATION = "en_US.UTF-8"; 59 + LC_MEASUREMENT = "en_US.UTF-8"; 60 + LC_MONETARY = "en_US.UTF-8"; 61 + LC_NAME = "en_US.UTF-8"; 62 + LC_NUMERIC = "en_US.UTF-8"; 63 + LC_PAPER = "en_US.UTF-8"; 64 + LC_TELEPHONE = "en_US.UTF-8"; 65 + LC_TIME = "en_US.UTF-8"; 66 + }; 67 + 68 + users.users.xan = { 69 + isNormalUser = true; 70 + extraGroups = [ 71 + # Enable ‘sudo’ for the user. 72 + "networkmanager" 73 + "wheel" 74 + ]; 75 + packages = with pkgs; [ 76 + tree 77 + ]; 78 + openssh.authorizedKeys.keys = [ 79 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILsq6xp3LtOL4iBF4+ehkGC8GFpbZLnyckgad8Fh5QKy xan.lol" 80 + ]; 81 + }; 82 + 83 + # networking.firewall.allowedTCPPorts = [ ]; 84 + # networking.firewall.allowedUDPPorts = [ ]; 85 + # networking.firewall.allowedTCPPortRanges = [ 86 + # { 87 + # from = 1714; 88 + # to = 1764; 89 + # } 90 + # ]; 91 + # networking.firewall.allowedUDPPortRanges = [ 92 + # { 93 + # from = 1714; 94 + # to = 1764; 95 + # } 96 + # ]; 97 + 98 + # Or disable the firewall altogether. 99 + # networking.firewall.enable = false; 100 + 101 + environment.systemPackages = with pkgs; [ ]; 102 + 103 + # This value determines the NixOS release from which the default 104 + # settings for stateful data, like file locations and database versions 105 + # on your system were taken. It‘s perfectly fine and recommended to leave 106 + # this value at the release version of the first install of this system. 107 + # Before changing this value read the documentation for this option 108 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 109 + system.stateVersion = "25.11"; # Did you read the comment? 110 + }
+27
flake.lock
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1768972518, 6 + "narHash": "sha256-gFNjU0ma/PlFzC1xhL8yEFR5tGjaUJuCQ1y0EL+tFRs=", 7 + "owner": "nixos", 8 + "repo": "nixpkgs", 9 + "rev": "0bc7d13e296b2e2f8cb9ef903484f735a1caf995", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "nixos", 14 + "ref": "release-25.11", 15 + "repo": "nixpkgs", 16 + "type": "github" 17 + } 18 + }, 19 + "root": { 20 + "inputs": { 21 + "nixpkgs": "nixpkgs" 22 + } 23 + } 24 + }, 25 + "root": "root", 26 + "version": 7 27 + }
+29 -38
flake.nix
··· 1 1 { 2 - description = "A basic flake for dev environments and packaging"; 2 + description = "nix flake for jollywhoppers servers"; 3 3 4 4 inputs = { 5 - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 6 - flake-utils.url = "github:numtide/flake-utils"; 5 + nixpkgs.url = "github:nixos/nixpkgs/release-25.11"; 7 6 }; 8 7 9 8 outputs = 10 9 { 11 10 self, 12 11 nixpkgs, 13 - flake-utils, 14 - }: 15 - flake-utils.lib.eachDefaultSystem ( 16 - system: 17 - let 18 - pkgs = import nixpkgs { inherit system; }; 19 - # TODO: Change package name 20 - pname = "foo"; 21 - src = ./.; 22 - in 23 - { 24 - devShells.default = pkgs.mkShell { 25 - buildInputs = with pkgs; [ 26 - # TODO: Place development dependencies in here 27 - # package managers, build tools, debuggers, etc 12 + }@inputs: 13 + let 14 + system = "x86_64-linux"; 15 + pkgs = import nixpkgs { inherit system; }; 16 + hostname = "placeholder_hostname"; 17 + in 18 + { 19 + devShells.${system}.default = pkgs.mkShell { 20 + packages = [ ]; 28 21 29 - # for example 30 - gnumake # this is a build tool, you just add the package name 31 - ]; 22 + # Run whatever commands you'd like when entering the shell 23 + shellHook = ''''; 24 + }; 32 25 33 - # Run whatever commands you'd like when entering the shell 34 - shellHook = '' 35 - echo "Entering nix shell!!"; 36 - ''; 26 + nixosConfigurations.${hostname} = pkgs.lib.nixosSystem { 27 + inherit system; 28 + specialArgs = { 29 + inherit 30 + inputs 31 + pkgs 32 + system 33 + hostname 34 + ; 37 35 }; 38 - 39 - packages.default = derivation { 40 - inherit system pname src; 41 - # TODO: Add package build step 42 - builder = with pkgs; "${bash}/bin/bash"; 43 - args = [ 44 - "-c" 45 - "echo foo > $out" 46 - ]; 47 - }; 36 + modules = [ 37 + ./configuration.nix 38 + ]; 39 + }; 48 40 49 - formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-tree; 50 - } 51 - ); 41 + formatter.${system} = pkgs.nixfmt-tree; 42 + }; 52 43 }