diff --git a/flake.lock b/flake.lock index 1cacdce..21f2164 100644 --- a/flake.lock +++ b/flake.lock @@ -336,6 +336,27 @@ "type": "github" } }, + "openstreetmap": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708706677, + "narHash": "sha256-fUIT9v5FGy9KbbPKBVcxw2rwxqLZUVElqTtZWM7FiNI=", + "owner": "b12f", + "repo": "nixos-openstreetmap", + "rev": "9057f546a5762a6b1645a8d4c22f818e29908144", + "type": "github" + }, + "original": { + "owner": "b12f", + "ref": "flake-nixosmodule", + "repo": "nixos-openstreetmap", + "type": "github" + } + }, "root": { "inputs": { "adblock-unbound": "adblock-unbound", @@ -351,7 +372,8 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-master": "nixpkgs-master", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "openstreetmap": "openstreetmap" } }, "utils": { diff --git a/flake.nix b/flake.nix index e67fe18..04060a7 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,9 @@ adblock-unbound.url = "github:MayNiklas/nixos-adblock-unbound"; adblock-unbound.inputs.nixpkgs.follows = "nixpkgs"; + + openstreetmap.url = "github:b12f/nixos-openstreetmap/flake-nixosmodule"; + openstreetmap.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ self, ... }: diff --git a/hosts/default.nix b/hosts/default.nix index 07d8cb1..03f28ad 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,6 +6,7 @@ nixpkgs.hostPlatform = "x86_64-linux"; imports = [ inputs.impermanence.nixosModules.impermanence + inputs.openstreetmap.nixosModules.openstreetmap self.nixosModules.base ./stroopwafel self.nixosModules.b12f diff --git a/hosts/stroopwafel/configuration.nix b/hosts/stroopwafel/configuration.nix index 5a0c4d0..705a583 100644 --- a/hosts/stroopwafel/configuration.nix +++ b/hosts/stroopwafel/configuration.nix @@ -41,5 +41,5 @@ ARRAY /dev/md/nixos:root metadata=1.2 name=nixos:root UUID=67d1aa81:1b348887:c17 # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "20.09"; # Did you read the comment? + system.stateVersion = "23.11"; # Did you read the comment? } diff --git a/hosts/stroopwafel/default.nix b/hosts/stroopwafel/default.nix index 8fa27a6..b7f5e9c 100644 --- a/hosts/stroopwafel/default.nix +++ b/hosts/stroopwafel/default.nix @@ -4,5 +4,6 @@ ./hardware-configuration.nix ./networking.nix + ./openstreetmap.nix ]; } diff --git a/hosts/stroopwafel/openstreetmap.nix b/hosts/stroopwafel/openstreetmap.nix new file mode 100644 index 0000000..855b419 --- /dev/null +++ b/hosts/stroopwafel/openstreetmap.nix @@ -0,0 +1,24 @@ +{ + flake, + config, + pkgs, + lib, + ... +}: { + services.openstreetmap = { + enable = true; + debug = true; + totalRamGb = 14; + }; + + environment.persistence."/persist" = { + directories = [ + "/var/lib/renderd" + "/var/lib/postgresql" + ]; + }; + + systemd.tmpfiles.rules = [ + "d /persist/var/lib/renderd 0700 renderd renderd" + ]; +}