From efcfd09530904d3f1e824715151590a5b0142a5d Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 21 Jun 2022 01:52:34 +0200 Subject: [PATCH] misc small changes - make vscode linenumbers relative - add vscode-server - make gitea backup hourly - some changes in nginx vhosts - add disk to tsuki - update flake lock --- flake.lock | 49 +++++++++++++++++--------- hosts/tsuki/hardware-configuration.nix | 5 +++ hosts/tsuki/services/gitea/default.nix | 6 ++++ hosts/tsuki/services/nginx.nix | 6 ++-- hosts/tsuki/services/vscode-server.nix | 4 --- programs/vscode.nix | 2 +- 6 files changed, 48 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 8cdc260..4df7bc1 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "dotfiles": { "flake": false, "locked": { - "lastModified": 1646666700, - "narHash": "sha256-RYIWLAgxtVEwtHAETeQDzF84Sk2mWtyzLlli0MvWNG4=", + "lastModified": 1654179945, + "narHash": "sha256-vnD7vu/hRBPoqL6Wse9CELitW30a9P++QTPnNm1qHjE=", "owner": "h7x4abk3g", "repo": "dotfiles", - "rev": "678c83b1908fe37f8a3a9f2c8a3a91adb7a6c5aa", + "rev": "37bdd48de4bfa8e03a8ab5ef840b2509e193e6a1", "type": "github" }, "original": { @@ -34,7 +34,8 @@ "fonts": { "flake": false, "locked": { - "narHash": "sha256-bkloNC5QJvk/7u6YaPFzQ7uZJzO280lFZZ09iRvQUtY=", + "lastModified": 1649003599, + "narHash": "sha256-QtT+ansp3ombpdS2+jNWgZKSqpxhVq3cyrpAKkDzA9Y=", "path": "/home/h7x4/git/fonts", "type": "path" }, @@ -50,32 +51,32 @@ ] }, "locked": { - "lastModified": 1647175256, - "narHash": "sha256-7H+veXPM7IwdN1DoZqliwb9sghlN56koV5dnCu1kpsc=", + "lastModified": 1654113405, + "narHash": "sha256-VpK+0QaWG2JRgB00lw77N9TjkE3ec0iMYIX1TzGpxa4=", "owner": "nix-community", "repo": "home-manager", - "rev": "a8d00f5c038cf7ec54e7dac9c57b171c1217f008", + "rev": "ac2287df5a2d6f0a44bbcbd11701dbbf6ec43675", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-21.11", + "ref": "release-22.05", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1648203577, - "narHash": "sha256-CbXZkiVTA0ByV/yncFHCAGIa/AfcSb0cjqzEa56rO+Y=", + "lastModified": 1655456688, + "narHash": "sha256-j2trI5gv2fnHdfUQFBy957avCPxxzCqE8R+TOYHPSRE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d89f18a17e51532ed5f4d45297b0ddf11e46b9c8", + "rev": "d17a56d90ecbd1b8fc908d49598fb854ef188461", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-21.11", + "ref": "nixos-22.05", "type": "indirect" } }, @@ -86,6 +87,7 @@ "home-manager": "home-manager", "nixpkgs": "nixpkgs", "secrets": "secrets", + "vscode-server": "vscode-server", "website": "website" } }, @@ -96,11 +98,8 @@ ] }, "locked": { - "lastModified": 1648431323, - "narHash": "sha256-QfEh/IY3RodDhwt9ij4gzdU4cgQ/Ejk45PZMM1sNkoM=", - "ref": "main", - "rev": "d9728ee32a078ca67af897d951db007391857daa", - "revCount": 21, + "lastModified": 1649874484, + "narHash": "sha256-NM+o+vIZ91hLG+C9iJCuho0Zj8BqZRC0Ttrn6cn+qCQ=", "type": "git", "url": "file:///home/h7x4/git/nix-secrets" }, @@ -109,6 +108,22 @@ "url": "file:///home/h7x4/git/nix-secrets" } }, + "vscode-server": { + "flake": false, + "locked": { + "lastModified": 1648830510, + "narHash": "sha256-U+UGKbZajc2NqDvBL7hCYshAiaXgiBv5rNFIqLl0X7M=", + "owner": "msteen", + "repo": "nixos-vscode-server", + "rev": "d2343b5eb47b811856085f3eff4d899a32b2c136", + "type": "github" + }, + "original": { + "owner": "msteen", + "repo": "nixos-vscode-server", + "type": "github" + } + }, "website": { "inputs": { "flake-utils": "flake-utils", diff --git a/hosts/tsuki/hardware-configuration.nix b/hosts/tsuki/hardware-configuration.nix index 5cc02f9..89050e4 100644 --- a/hosts/tsuki/hardware-configuration.nix +++ b/hosts/tsuki/hardware-configuration.nix @@ -28,6 +28,11 @@ fsType = "btrfs"; }; + fileSystems."/data2" = + { device = "/dev/disk/by-uuid/c481da40-08dd-4d6d-abeb-f1976cb4271a"; + fsType = "btrfs"; + }; + swapDevices = [ { device = "/dev/disk/by-uuid/92a1a33f-89a8-45de-a45e-6c303172cd7f"; } ]; diff --git a/hosts/tsuki/services/gitea/default.nix b/hosts/tsuki/services/gitea/default.nix index 532d89b..d56b54c 100644 --- a/hosts/tsuki/services/gitea/default.nix +++ b/hosts/tsuki/services/gitea/default.nix @@ -17,6 +17,7 @@ in description = "Gitea service"; home = config.services.gitea.stateDir; useDefaultShell = true; + group = "gitea"; isSystemUser = true; uid = config.ids.uids.git; @@ -32,6 +33,11 @@ in httpPort = secrets.ports.gitea; disableRegistration = true; + dump = { + enable = true; + interval = "hourly"; + }; + database = { user = "git"; }; diff --git a/hosts/tsuki/services/nginx.nix b/hosts/tsuki/services/nginx.nix index 64d8dc0..06f7da6 100644 --- a/hosts/tsuki/services/nginx.nix +++ b/hosts/tsuki/services/nginx.nix @@ -10,7 +10,7 @@ { security.acme = { - email = "h7x4abk3g@protonmail.com"; + defaults.email = "h7x4abk3g@protonmail.com"; acceptTerms = true; }; @@ -106,14 +106,16 @@ (makeClientCertProxy ["idrac"] "https://${ips.idrac}" {}) (makeClientCertProxy ["searx"] "http://localhost:${s ports.searx}" {}) (makeACMEProxy ["dyn"] "http://${ips.crafty}:${s ports.dynmap}" { - basicAuthFile = keys.htpasswds.default; + # basicAuthFile = keys.htpasswds.default; }) (makeClientCertProxy ["log"] "http://localhost:${s ports.grafana}" { locations."/".proxyWebsockets = true; }) + (makeClientCertProxy ["pg"] "http://localhost:${s ports.postgres}" {}) # (makeProxy ["wiki"] "" {}) # (makeHost ["vpn"] "" {}) (makeClientCertProxy ["hydra"] "http://localhost:${s ports.hydra}" {}) + (makeClientCertProxy ["air"] "https://${ips.kansei}:${s ports.kansei}" {}) # (makePassProxy ["sync" "drive"] "" {}) # (makePassProxy ["music" "mpd"] "" {}) diff --git a/hosts/tsuki/services/vscode-server.nix b/hosts/tsuki/services/vscode-server.nix index 99ed43b..fb2a606 100644 --- a/hosts/tsuki/services/vscode-server.nix +++ b/hosts/tsuki/services/vscode-server.nix @@ -1,8 +1,4 @@ { ... }: { - imports = [ - (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") - ]; - services.vscode-server.enable = true; } diff --git a/programs/vscode.nix b/programs/vscode.nix index 0b9d2ba..c2e5fac 100644 --- a/programs/vscode.nix +++ b/programs/vscode.nix @@ -18,7 +18,7 @@ in editor = mapPrefixToSet "editor" { fontFamily = "Fira Code"; fontLigatures = true; - lineNumbers = "on"; + lineNumbers = "relative"; mouseWheelZoom = false; fontSize = 14; "minimap.enabled" = false;