From 483d9abc84d1c9383f932e8c232d58adc19374fc Mon Sep 17 00:00:00 2001 From: Anish L Date: Tue, 19 Jul 2022 16:52:41 +1000 Subject: [PATCH] update heaps of shit --- flake.nix | 2 +- hosts/box/configuration.nix | 1 - hosts/helix/default.nix | 8 +++++++- profiles/cachix/nrdxp.nix | 2 -- profiles/desktop/default.nix | 1 + profiles/gitea/default.nix | 8 ++++---- profiles/mimetypes/default.nix | 8 ++++++++ profiles/server/default.nix | 6 +++++- profiles/shaarli/default.nix | 1 - users/profiles/cli/default.nix | 2 +- 10 files changed, 27 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index 4858615c..0904d7bc 100644 --- a/flake.nix +++ b/flake.nix @@ -130,7 +130,7 @@ }; suites = with profiles; rec { base = [ core users.root users.anish ]; - sealight = [ base server wireguard-server metrics ]; # rss-bridge gitea sealight-website matrix backup + sealight = [ base server wireguard-server metrics gitea sealight-website matrix backup ]; # rss-bridge gitea sealight-website matrix backup mossnet = [ base server taskd shaarli wallabag dns monitoring nfs rss-bridge gonic headphones radicale seafile syncthing dhyan ]; # hpi sync.music cube = [ base site server ]; graphical = [ base bluetooth music sync.kitaab sync.website sync.cal wifi desktop mimetypes ]; diff --git a/hosts/box/configuration.nix b/hosts/box/configuration.nix index 00122ff3..fff7bb0e 100644 --- a/hosts/box/configuration.nix +++ b/hosts/box/configuration.nix @@ -78,7 +78,6 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; - services.openssh.permitRootLogin = "yes"; networking.firewall.allowedTCPPorts = [ 22 ]; sound.enable = false; diff --git a/hosts/helix/default.nix b/hosts/helix/default.nix index faf16e70..8cd0102d 100644 --- a/hosts/helix/default.nix +++ b/hosts/helix/default.nix @@ -8,6 +8,12 @@ imports = [ ] ++ suites.hmBase; }; + # Capsul specific + users.users.cyberian = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + }; + mossnet.backup = { enable = false; name = "sealight"; @@ -17,7 +23,7 @@ age.secrets.borg-password.file = "${self}/secrets/borg-password.age"; services.postgresqlBackup = { enable = false; - databases = [ "matrix" "gitea" ]; + databases = [ "matrix-synapse" "gitea" ]; location = "/var/backup/postgresql"; }; } diff --git a/profiles/cachix/nrdxp.nix b/profiles/cachix/nrdxp.nix index c1917269..bb3b4a59 100644 --- a/profiles/cachix/nrdxp.nix +++ b/profiles/cachix/nrdxp.nix @@ -2,11 +2,9 @@ nix = { binaryCaches = [ "https://nrdxp.cachix.org" - "https://nix-community.cachix.org" ]; binaryCachePublicKeys = [ "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; } diff --git a/profiles/desktop/default.nix b/profiles/desktop/default.nix index 5f684546..4de11673 100644 --- a/profiles/desktop/default.nix +++ b/profiles/desktop/default.nix @@ -44,6 +44,7 @@ in scrot ripcord feh + sxiv xkblayout-state sublime-music vcv-rack diff --git a/profiles/gitea/default.nix b/profiles/gitea/default.nix index c34c7056..95ed9bb3 100644 --- a/profiles/gitea/default.nix +++ b/profiles/gitea/default.nix @@ -32,10 +32,10 @@ '' gitea-users gitea gitea ''; - # ensureDatabases = [ "gitea" ]; - # ensureUsers = [ - # { name = "gitea"; ensurePermissions."DATABASE gitea" = "ALLPRIVLEGES"; } - # ]; + ensureDatabases = [ "gitea" ]; + ensureUsers = [ + { name = "gitea"; ensurePermissions."DATABASE gitea" = "ALLPRIVLEGES"; } + ]; }; services.nginx = { diff --git a/profiles/mimetypes/default.nix b/profiles/mimetypes/default.nix index e5216a14..6e6e61ee 100644 --- a/profiles/mimetypes/default.nix +++ b/profiles/mimetypes/default.nix @@ -7,5 +7,13 @@ "sxiv.desktop" "feh.desktop" ]; + "image/jpg" = [ + "sxiv.desktop" + "feh.desktop" + ]; + "image/jpeg" = [ + "sxiv.desktop" + "feh.desktop" + ]; }; } diff --git a/profiles/server/default.nix b/profiles/server/default.nix index 563d696d..34ea2db8 100644 --- a/profiles/server/default.nix +++ b/profiles/server/default.nix @@ -1,6 +1,10 @@ { config, ... }: { - services.openssh.enable = true; + services.openssh = { + enable = true; + passwordAuthentication = false; + permitRootLogin = "no"; + }; networking.firewall.allowedTCPPorts = [ 80 433 22 ]; # ssh and website security.sudo.wheelNeedsPassword = false; # needed for deploy-rs } diff --git a/profiles/shaarli/default.nix b/profiles/shaarli/default.nix index c9ec3625..517314de 100644 --- a/profiles/shaarli/default.nix +++ b/profiles/shaarli/default.nix @@ -110,6 +110,5 @@ in find ${dataDir} -type f ! -perm 0600 -exec chmod 0600 {} \; ''; }; - # TODO: Write the configuration file here? #networking.firewall.allowedTCPPorts = [ 80 ]; } diff --git a/users/profiles/cli/default.nix b/users/profiles/cli/default.nix index 4e657437..9bcbad39 100644 --- a/users/profiles/cli/default.nix +++ b/users/profiles/cli/default.nix @@ -256,6 +256,6 @@ sm = "ssh 10.0.69.4"; # box over wireguard smm = "ssh mossnet.lan"; # box regular ss = "ssh sealight.xyz"; # helix - sc = "ssh lakhwara.com"; # cube + sl = "ssh 69.61.38.225"; # lituus }; }