From 1cbf2463946f1ec139b8d9973d133099cca79fa9 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 16 Apr 2020 09:12:30 +0200 Subject: [PATCH 1/2] web: fix config --- systems/LoutreOS/web.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/systems/LoutreOS/web.nix b/systems/LoutreOS/web.nix index b639fc7..a8f3399 100644 --- a/systems/LoutreOS/web.nix +++ b/systems/LoutreOS/web.nix @@ -161,10 +161,10 @@ in alias = "/var/www/site-musique/media/"; }; }; - "maxspiegel.fr" = base { "/" = { root = "/run/python-ci/nyanloutre/site-max"; }; + "maxspiegel.fr" = base { "/" = { root = "/run/python-ci/nyanloutre/site-max"; }; }; "stream.nyanlout.re" = base { "/" = { - root = "/var/www/hls/" + root = "/var/www/hls/"; extraConfig = '' add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; @@ -185,7 +185,9 @@ in "ci.nyanlout.re" = simpleReverse 52350; "gitea.nyanlout.re" = simpleReverse config.services.gitea.httpPort; }; - appendConfig = '' + appendConfig = let + rootLocation = config.services.nginx.virtualHosts."stream.nyanlout.re".locations."/".root; + in '' rtmp { server { listen 1935; @@ -196,14 +198,14 @@ in exec_push ${pkgs.ffmpeg}/bin/ffmpeg -i rtmp://localhost/$app/$name -async 1 -vsync -1 -c:v libx264 -c:a aac -b:v 768k -b:a 96k -vf "scale=720:trunc(ow/a/2)*2" -tune zerolatency -preset ultrafast -crf 28 -f flv rtmp://localhost/show/$name_mid -c:v libx264 -c:a aac -b:v 1024k -b:a 128k -vf "scale=960:trunc(ow/a/2)*2" -tune zerolatency -preset ultrafast -crf 28 -f flv rtmp://localhost/show/$name_high - -c copy -f flv rtmp://localhost/show/$name_src 2>>${config.services.nginx.virtualHosts."stream.nyanlout.re".root}/ffmpeg-$name.log; + -c copy -f flv rtmp://localhost/show/$name_src 2>>${rootLocation}/ffmpeg-$name.log; } application show { live on; hls on; - hls_path ${config.services.nginx.virtualHosts."stream.nyanlout.re".root}; + hls_path ${rootLocation}; hls_fragment 3s; hls_playlist_length 60s; From 7f4611feefea8662210b16a705241afa3d31f075 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 16 Apr 2020 09:14:37 +0200 Subject: [PATCH 2/2] overlays: remove custom sudo --- overlays/neovim.nix | 22 ---------------------- overlays/sudo.nix | 6 ------ systems/common-cli.nix | 25 +++++++++++++++++++------ 3 files changed, 19 insertions(+), 34 deletions(-) delete mode 100644 overlays/neovim.nix delete mode 100644 overlays/sudo.nix diff --git a/overlays/neovim.nix b/overlays/neovim.nix deleted file mode 100644 index 48d8531..0000000 --- a/overlays/neovim.nix +++ /dev/null @@ -1,22 +0,0 @@ -self: super: -{ - neovim = super.neovim.override { - viAlias = true; - vimAlias = true; - configure = { - customRC = '' - set shiftwidth=2 - set softtabstop=2 - set expandtab - set background=dark - ''; - packages.myVimPackage = with super.vimPlugins; { - start = [ - vim-startify airline sensible - polyglot ale fugitive - ]; - opt = [ ]; - }; - }; - }; -} diff --git a/overlays/sudo.nix b/overlays/sudo.nix deleted file mode 100644 index 229ad6e..0000000 --- a/overlays/sudo.nix +++ /dev/null @@ -1,6 +0,0 @@ -self: super: -{ - sudo = super.sudo.override { - withInsults = true; - }; -} diff --git a/systems/common-cli.nix b/systems/common-cli.nix index 9d8317b..adf9ad8 100644 --- a/systems/common-cli.nix +++ b/systems/common-cli.nix @@ -4,14 +4,27 @@ time.timeZone = "Europe/Paris"; - nixpkgs.overlays = [ - (import ../overlays/sudo.nix) - (import ../overlays/neovim.nix) - ]; - environment.systemPackages = with pkgs; [ # Editeurs - neovim + (neovim.override { + viAlias = true; + vimAlias = true; + configure = { + customRC = '' + set shiftwidth=2 + set softtabstop=2 + set expandtab + set background=dark + ''; + packages.myVimPackage = with pkgs.vimPlugins; { + start = [ + vim-startify airline sensible + polyglot ale fugitive + ]; + opt = [ ]; + }; + }; + }) # Gestionnaires de version gitFull