diff --git a/flake.lock b/flake.lock index e6dea1e..2a9066c 100644 --- a/flake.lock +++ b/flake.lock @@ -75,42 +75,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1672353432, - "narHash": "sha256-oZfgp/44/o2tWiylV30cR+DLyWTJ+5dhsdWZVpzs3e4=", + "lastModified": 1669546925, + "narHash": "sha256-Gvtk9agz88tBgqmCdHl5U7gYttTkiuEd8/Rq1Im0pTg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "913a47cd064cc06440ea84e5e0452039a85781f0", + "rev": "fecf05d4861f3985e8dee73f08bc82668ef75125", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-22.11", + "ref": "nixos-22.05", "type": "indirect" } }, - "nixpkgs-photoprism": { - "locked": { - "lastModified": 1671922246, - "narHash": "sha256-Xh/pWG2mdheCtJZFmuuZIsvR9PVgs15Rn6yt/G1lINc=", - "owner": "Stunkymonkey", - "repo": "nixpkgs", - "rev": "6805f176fcc4b3673f23df5ee67caccc24bfba8c", - "type": "github" - }, - "original": { - "owner": "Stunkymonkey", - "ref": "photoprism-module-init", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { - "lastModified": 1672262501, - "narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=", + "lastModified": 1669542132, + "narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f", + "rev": "a115bb9bd56831941be3776c8a94005867f316a7", "type": "github" }, "original": { @@ -124,7 +108,6 @@ "dogetipbot-telegram": "dogetipbot-telegram", "ipmihddtemp": "ipmihddtemp", "nixpkgs": "nixpkgs", - "nixpkgs-photoprism": "nixpkgs-photoprism", "nixpkgs-unstable": "nixpkgs-unstable", "simple-nixos-mailserver": "simple-nixos-mailserver", "utils": "utils_2" @@ -136,22 +119,22 @@ "nixpkgs": [ "nixpkgs-unstable" ], - "nixpkgs-22_11": [ + "nixpkgs-22_05": [ "nixpkgs" ], "utils": "utils" }, "locked": { - "lastModified": 1671659164, - "narHash": "sha256-DbpT+v1POwFOInbrDL+vMbYV3mVbTkMxmJ5j50QnOcA=", + "lastModified": 1655930346, + "narHash": "sha256-ht56HHOzEhjeIgAv5ZNFjSVX/in1YlUs0HG9c1EUXTM=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "bc667fb6afc45f6cc2d118ab77658faf2227cffd", + "rev": "f535d8123c4761b2ed8138f3d202ea710a334a1d", "type": "gitlab" }, "original": { "owner": "simple-nixos-mailserver", - "ref": "nixos-22.11", + "ref": "nixos-22.05", "repo": "nixos-mailserver", "type": "gitlab" } diff --git a/flake.nix b/flake.nix index fe8260a..c7c1cf6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,13 @@ { inputs = { - nixpkgs.url = "flake:nixpkgs/nixos-22.11"; + nixpkgs.url = "flake:nixpkgs/nixos-22.05"; nixpkgs-unstable.url = "flake:nixpkgs/nixos-unstable"; - nixpkgs-photoprism.url = "github:Stunkymonkey/nixpkgs/photoprism-module-init"; utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.3.1"; simple-nixos-mailserver = { - url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.11"; + url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.05"; inputs = { nixpkgs.follows = "nixpkgs-unstable"; - nixpkgs-22_11.follows = "nixpkgs"; + nixpkgs-22_05.follows = "nixpkgs"; }; }; dogetipbot-telegram = { @@ -21,7 +20,7 @@ }; }; - outputs = inputs@{ self, utils, nixpkgs, nixpkgs-unstable, nixpkgs-photoprism, simple-nixos-mailserver, dogetipbot-telegram, ipmihddtemp }: utils.lib.mkFlake { + outputs = inputs@{ self, utils, nixpkgs, nixpkgs-unstable, simple-nixos-mailserver, dogetipbot-telegram, ipmihddtemp }: utils.lib.mkFlake { inherit self inputs; @@ -33,7 +32,7 @@ # (nixpkgs-unstable.legacyPackages."x86_64-linux".fetchpatch { # name = "electron-cash.patch"; # url = "https://github.com/NixOS/nixpkgs/pull/160607.patch"; - # sha256 = nixpkgs.lib.fakeHash; + # sha256 = "sha256-oQbiyhVWYIkEuZEKqaPuIL00PNPnuTAw64wuqZ8YeDs="; # }) # ]; @@ -47,7 +46,6 @@ ]; hosts.loutreos.modules = [ - "${nixpkgs-photoprism}/nixos/modules/services/web-apps/photoprism.nix" simple-nixos-mailserver.nixosModule dogetipbot-telegram.nixosModule ipmihddtemp.nixosModule diff --git a/services/python-ci.nix b/services/python-ci.nix index ce957db..5a6a4c4 100644 --- a/services/python-ci.nix +++ b/services/python-ci.nix @@ -33,7 +33,7 @@ in RuntimeDirectoryPreserve = "yes"; ExecStart = with pkgs; let env = python3Packages.python.buildEnv.override { - extraLibs = with python3Packages;[ pyramid python-gitlab setuptools ]; + extraLibs = with python3Packages;[ pyramid python-gitlab ]; ignoreCollisions = true; }; in "${pkgs.writeShellScriptBin "run.sh" '' diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index d0adf48..9cf6d06 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -12,7 +12,7 @@ ./services.nix ]; - nix.settings.trusted-users = [ "root" "paul" ]; + nix.trustedUsers = [ "root" "paul" ]; boot = { loader = { diff --git a/systems/LoutreOS/hardware-configuration.nix b/systems/LoutreOS/hardware-configuration.nix index 2c3303b..4984718 100644 --- a/systems/LoutreOS/hardware-configuration.nix +++ b/systems/LoutreOS/hardware-configuration.nix @@ -176,6 +176,6 @@ } ]; - nix.settings.max-jobs = lib.mkDefault 4; + nix.maxJobs = lib.mkDefault 4; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; } diff --git a/systems/LoutreOS/monitoring.nix b/systems/LoutreOS/monitoring.nix index e02a4fa..9910068 100644 --- a/systems/LoutreOS/monitoring.nix +++ b/systems/LoutreOS/monitoring.nix @@ -87,27 +87,18 @@ in grafana = { enable = true; + addr = "127.0.0.1"; dataDir = "/var/lib/grafana"; - settings = { - server = { - http_addr = "127.0.0.1"; - root_url = "https://grafana.${domaine}"; - }; - smtp = { - enabled = true; - from_address = "grafana@${domaine}"; - skip_verify = true; - }; - auth = { - disable_signout_menu = true; - }; - "auth.basic" = { - enabled = false; - }; - "auth.proxy" = { - enabled = true; - header_name = "X-WEBAUTH-USER"; - }; + extraOptions = { + SERVER_ROOT_URL = "https://grafana.${domaine}"; + SMTP_ENABLED = "true"; + SMTP_FROM_ADDRESS = "grafana@${domaine}"; + SMTP_SKIP_VERIFY = "true"; + AUTH_DISABLE_LOGIN_FORM = "true"; + AUTH_DISABLE_SIGNOUT_MENU = "true"; + AUTH_ANONYMOUS_ENABLED = "true"; + AUTH_ANONYMOUS_ORG_ROLE = "Admin"; + AUTH_BASIC_ENABLED = "false"; }; }; diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index cb0cdfb..4d496d7 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -545,15 +545,6 @@ in #]; }; }; - - photoprism = { - enable = true; - originalsPath = "/mnt/backup_loutre/amandoleen/d/Users/Amand/Pictures"; - extraConfig = { - PHOTOPRISM_AUTH_MODE = "public"; - PHOTOPRISM_READONLY = true; - }; - }; }; systemd.services."borgbackup-job-loutre".serviceConfig.TemporaryFileSystem = ["/mnt/borgsnap"]; diff --git a/systems/LoutreOS/web.nix b/systems/LoutreOS/web.nix index c7f0169..9731dae 100644 --- a/systems/LoutreOS/web.nix +++ b/systems/LoutreOS/web.nix @@ -197,8 +197,6 @@ in proxyPass = "http://127.0.0.1:${toString(rport)}/"; extraConfig = '' auth_request_set $cookie $upstream_http_set_cookie; - auth_request_set $username $upstream_http_x_username; - proxy_set_header X-WEBAUTH-USER $username; add_header Set-Cookie $cookie; ''; }; @@ -245,7 +243,7 @@ in }; }; "login.nyanlout.re" = simpleReverse config.services.nginx.sso.configuration.listen.port; - "grafana.nyanlout.re" = authReverse config.services.grafana.settings.server.http_port; + "grafana.nyanlout.re" = authReverse config.services.grafana.port; "transmission.nyanlout.re" = authReverse config.services.transmission.settings.rpc-port; "radarr.nyanlout.re" = authReverse 7878; "sonarr.nyanlout.re" = authReverse 8989; @@ -260,11 +258,6 @@ in "ci.nyanlout.re" = simpleReverse 52350; "gitea.nyanlout.re" = simpleReverse config.services.gitea.httpPort; "musique.nyanlout.re" = simpleReverse config.services.navidrome.settings.Port; - "photo.nyanlout.re" = recursiveUpdate (authReverse config.services.photoprism.port) { - locations."/" = { - proxyWebsockets = true; - }; - }; "apart.nyanlout.re" = recursiveUpdate (simpleReverse config.services.home-assistant.config.http.server_port) { locations."/" = { proxyWebsockets = true; @@ -383,6 +376,7 @@ in gitea = { enable = true; + cookieSecure = true; httpPort = 3001; rootUrl = "https://gitea.nyanlout.re/"; database = { @@ -390,11 +384,10 @@ in port = 5432; passwordFile = "/var/lib/gitea/custom/conf/database_password"; }; + log.level = "Warn"; + disableRegistration = true; settings = { ui.DEFAULT_THEME = "arc-green"; - log.LEVEL = "Warn"; - service.DISABLE_REGISTRATION = true; - session.COOKIE_SECURE = true; }; }; diff --git a/systems/common-cli.nix b/systems/common-cli.nix index d8359d9..b0cdf52 100644 --- a/systems/common-cli.nix +++ b/systems/common-cli.nix @@ -11,13 +11,12 @@ vimAlias = true; configure = { customRC = '' - set tabstop=8 + set tabstop=8 set shiftwidth=4 set softtabstop=0 set expandtab - set smarttab + set smarttab set background=dark - set mouse= ''; packages.myVimPackage = with pkgs.vimPlugins; { start = [