From 6ab48f27d3059dfca4e6ee17d5a7f1d5497fec9f Mon Sep 17 00:00:00 2001 From: Noon van der Silk Date: Mon, 18 Nov 2024 12:21:40 +0000 Subject: [PATCH] Add nix flakes by default; firewall on; use correct port for ssh --- flake.lock | 72 ++++++++++++++-------------- nix/hydra-explorer-configuration.nix | 14 ++++-- 2 files changed, 47 insertions(+), 39 deletions(-) diff --git a/flake.lock b/flake.lock index 027ffd5..0e8b11d 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1728953092, - "narHash": "sha256-DBqT9uexf/yoZjtEP3263ltnhP/o7iBl8IZdJRfPjJs=", + "lastModified": 1731401651, + "narHash": "sha256-tXaUck9+0Ob4h6GBlbhYMI4ekW5e8biVJU5jPT/rjus=", "owner": "IntersectMBO", "repo": "cardano-haskell-packages", - "rev": "fd5e5cf056090977ecbd661ad07f602eb7e2614d", + "rev": "82b295d6147a566c28dbcf038c54040f06f7e6b4", "type": "github" }, "original": { @@ -1731,11 +1731,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1729039425, - "narHash": "sha256-sIglYcw8Dacj4n0bRlUWo+NLkDMcVi6vtmKvUyG+ZrQ=", + "lastModified": 1731889834, + "narHash": "sha256-1kG5KbsGCBehC1rqOdo3qJe4OYv3QVP62ZlZ084TQUc=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "6dc43e5e01f113ce151056a8f94bce7bb2f13eb9", + "rev": "ecad25be07e23e736b54cb801de19c0d84a4f4bf", "type": "github" }, "original": { @@ -1834,11 +1834,11 @@ "stackage": "stackage_2" }, "locked": { - "lastModified": 1729068074, - "narHash": "sha256-sxbi1kOBNfy3ZhEdfCApdRmtQzyNYhCRQP8O2uX22oY=", + "lastModified": 1731891108, + "narHash": "sha256-BDp0PymWSFIhz23ErBBgv7W5W/i/CcM36i7dM7UFNvI=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "82d4d2042de1f1fc2231690add3e9cdadfe88416", + "rev": "c2f22dbca2eed4166864c013c25f473d3e520ab8", "type": "github" }, "original": { @@ -3045,11 +3045,11 @@ "sphinxcontrib-haddock": "sphinxcontrib-haddock" }, "locked": { - "lastModified": 1728426320, - "narHash": "sha256-QzAp7Q9wU0quZe6zhYd02FZlPc2gLrxloVPMAz5lFPA=", + "lastModified": 1731138327, + "narHash": "sha256-1KzZwYHPUdjGGLE1M1w7diVMru7Q0ziWKGIhsCk5gWA=", "owner": "input-output-hk", "repo": "iogx", - "rev": "b938d477101397afb2b9bae8aeaaaea310bc72d1", + "rev": "621cb9de0099f59ad4c98ef093577cdf489387a9", "type": "github" }, "original": { @@ -3090,11 +3090,11 @@ "sodium": "sodium_4" }, "locked": { - "lastModified": 1721825987, - "narHash": "sha256-PPcma4tjozwXJAWf+YtHUQUulmxwulVlwSQzKItx/n8=", + "lastModified": 1730297014, + "narHash": "sha256-n3f1iAmltKnorHWx7FrdbGIF/FmEG8SsZshS16vnpz0=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "eb61f2c14e1f610ec59117ad40f8690cddbf80cb", + "rev": "d407eedd4995e88d08e83ef75844a8a9c2e29b36", "type": "github" }, "original": { @@ -3622,11 +3622,11 @@ "nixpkgs": "nixpkgs_21" }, "locked": { - "lastModified": 1724996935, - "narHash": "sha256-njRK9vvZ1JJsP8oV2OgkBrpJhgQezI03S7gzskCcHos=", + "lastModified": 1730479402, + "narHash": "sha256-79NLeNjpCa4mSasmFsE3QA6obURezF0TUO5Pm+1daog=", "owner": "nlewo", "repo": "nix2container", - "rev": "fa6bb0a1159f55d071ba99331355955ae30b3401", + "rev": "5fb215a1564baa74ce04ad7f903d94ad6617e17a", "type": "github" }, "original": { @@ -3797,11 +3797,11 @@ }, "nixlib": { "locked": { - "lastModified": 1729386149, - "narHash": "sha256-hUP9oxmnOmNnKcDOf5Y55HQ+NnoT0+bLWHLQWLLw9Ks=", + "lastModified": 1731805462, + "narHash": "sha256-yhEMW4MBi+IAyEJyiKbnFvY1uARyMKJpLUhkczI49wk=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "cce4521b6df014e79a7b7afc58c703ed683c916e", + "rev": "b9f04e3cf71c23bea21d2768051e6b3068d44734", "type": "github" }, "original": { @@ -3818,11 +3818,11 @@ ] }, "locked": { - "lastModified": 1729472750, - "narHash": "sha256-s93LPHi5BN7I2xSGNAFWiYb8WRsPvT1LE9ZjZBrpFlg=", + "lastModified": 1731892054, + "narHash": "sha256-BJtD9NGUWaBe4OZ1JO77w8qBP9yHDJJUjsxkG/milFc=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "7c60ba4bc8d6aa2ba3e5b0f6ceb9fc07bc261565", + "rev": "15a87ccb45e06d24a9fd5f99a49782efe11b23f0", "type": "github" }, "original": { @@ -4297,11 +4297,11 @@ }, "nixpkgs-2405": { "locked": { - "lastModified": 1726447378, - "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", + "lastModified": 1729242558, + "narHash": "sha256-VgcLDu4igNT0eYua6OAl9pWCI0cYXhDbR+pWP44tte0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", + "rev": "4a3f2d3195b60d07530574988df92e049372c10e", "type": "github" }, "original": { @@ -4477,11 +4477,11 @@ }, "nixpkgs-unstable_2": { "locked": { - "lastModified": 1726583932, - "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", + "lastModified": 1729980323, + "narHash": "sha256-eWPRZAlhf446bKSmzw6x7RWEE4IuZgAp8NW3eXZwRAY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "658e7223191d2598641d50ee4e898126768fe847", + "rev": "86e78d3d2084ff87688da662cf78c2af085d8e73", "type": "github" }, "original": { @@ -5129,11 +5129,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1728092656, - "narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=", + "lastModified": 1730302582, + "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1211305a5b237771e13fcca0c51e60ad47326a9a", + "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", "type": "github" }, "original": { @@ -5363,11 +5363,11 @@ "stackage_2": { "flake": false, "locked": { - "lastModified": 1729039017, - "narHash": "sha256-fGExfgG+7UNSOV8YfOrWPpOHWrCjA02gQkeSBhaAzjQ=", + "lastModified": 1731456685, + "narHash": "sha256-R0XG54ymDUUaQ8TprY9UuBnJ0UabRFQkwCt838JA56M=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "df1d8f0960407551fea7af7af75a9c2f9e18de97", + "rev": "ad774845ced6cda5a29966f13703332636d6cea8", "type": "github" }, "original": { diff --git a/nix/hydra-explorer-configuration.nix b/nix/hydra-explorer-configuration.nix index 206e823..8dda8e5 100644 --- a/nix/hydra-explorer-configuration.nix +++ b/nix/hydra-explorer-configuration.nix @@ -13,11 +13,20 @@ networking = { hostName = "hydra-explorer"; firewall = { - allowedTCPPorts = [ 25 80 443 ]; - enable = false; + allowedTCPPorts = [ 22 80 443 ]; + enable = true; }; }; + nix = { + settings.trusted-users = [ "root" ]; + extraOptions = '' + experimental-features = nix-command flakes recursive-nix ca-derivations + log-lines = 300 + warn-dirty = false + ''; + }; + users.users.root = { initialPassword = ""; # No password openssh.authorizedKeys.keys = [ @@ -30,7 +39,6 @@ services.getty.autologinUser = "root"; - nix.settings.trusted-users = [ "root" ]; services.cardano-node = { enable = true;