Compare commits

..

8 commits

Author SHA1 Message Date
99cdb697f1 WIP: WAITING FOR NIXPKS UPDATE
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2023-12-25 20:21:00 +01:00
8c932d159e hosts: nixos: porthos: services: enable pyload 2023-12-25 20:20:59 +01:00
cd96ffe5ee hosts: nixos: porthos: secrets: add pyload creds 2023-12-25 20:20:59 +01:00
e42d611eba nixos: services: add pyload 2023-12-25 20:20:59 +01:00
a3c2135c26 nixos: services: nginx: fix SSO subdomain 2023-12-25 20:20:50 +01:00
c2867b3483 nixos: services: remove redundant subdomains
See previous commit for the defaults.
2023-12-25 20:20:50 +01:00
5572b7b049 nixos: services: nginx: add default subdomain
In almost all cases, the subdomain should be the same as the attribute
name...
2023-12-25 20:20:50 +01:00
5d612efb6c nixos: services: nginx: use attrset for vhosts
Attribute sets compose better than lists, it was a mistake to use a list
in the first place...
2023-12-25 20:20:50 +01:00
11 changed files with 160 additions and 18 deletions

View file

@ -23,7 +23,6 @@
./gtk
./htop
./jq
./keyboard
./mail
./mpv
./nix

View file

@ -22,8 +22,8 @@ bind ;c hint -Jc [class*="expand"],[class*="togg"],[class="comment_folder"]
bindurl reddit.com gu urlparent 3
" Only hint search results on Google
bindurl www.google.com f hint -Jc #search a
bindurl www.google.com F hint -Jbc #search a
bindurl www.google.com f hint -Jc #search div:not(.action-menu) > a
bindurl www.google.com F hint -Jbc #search div:not(.action-menu) > a
" Only hint search results on DuckDuckGo
bindurl ^https://duckduckgo.com f hint -Jc [data-testid="result-title-a"]

View file

@ -13,7 +13,6 @@ in
scripts = [
pkgs.mpvScripts.mpris # Allow controlling using media keys
pkgs.mpvScripts.uosc # Nicer UI
];
};
};

View file

@ -74,7 +74,7 @@ in
)
{
block = "net";
format = " $icon{| $ssid|}{| $ip|}{| $signal_strength|} ";
format = " $icon{| $ssid|} $ip{| $signal_strength|} ";
}
{
block = "backlight";

View file

@ -3,6 +3,10 @@ let
cfg = config.my.home.x;
in
{
imports = [
./keyboard
];
options.my.home.x = with lib; {
enable = mkEnableOption "X server configuration";
};

View file

@ -1,12 +1,8 @@
{ config, lib, ... }:
let
cfg = config.my.home.keyboard;
cfg = config.my.home.x;
in
{
options.my.home.keyboard = with lib; {
enable = my.mkDisableOption "keyboard configuration";
};
config = lib.mkIf cfg.enable {
home.keyboard = {
layout = "fr";

View file

@ -14,6 +14,8 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: {
drone-rsync = pkgs.callPackage ./drone-rsync { };
drone-scp = pkgs.callPackage ./drone-scp { };
i3-get-window-criteria = pkgs.callPackage ./i3-get-window-criteria { };
lohr = pkgs.callPackage ./lohr { };
@ -28,5 +30,9 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: {
unbound-zones-adblock = pkgs.callPackage ./unbound-zones-adblock { };
unified-hosts-lists = pkgs.callPackage ./unified-hosts-lists { };
wifi-qr = pkgs.callPackage ./wifi-qr { };
zsh-done = pkgs.callPackage ./zsh-done { };
})

View file

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "drone-scp";
version = "1.6.3";
src = fetchFromGitHub {
owner = "appleboy";
repo = "drone-scp";
rev = "v${version}";
hash = "sha256-ELjPqoRR4O6gmc/PgthQuSXuSTQNzBZoAUT80zVVbV0=";
};
vendorHash = "sha256-/c103hTJ/Qdz2KTkdl/ACvAaSSTKcl1DQY3+Us6OxaI=";
doCheck = false; # Needs a specific user...
meta = with lib; {
description = ''
Copy files and artifacts via SSH using a binary, docker or Drone CI
'';
homepage = "https://github.com/appleboy/drone-scp";
license = licenses.mit;
mainProgram = "drone-scp";
};
}

View file

@ -1,9 +1,9 @@
{ lib, gawk, stdenvNoCC, stevenblack-blocklist }:
{ lib, gawk, stdenvNoCC, unified-hosts-lists }:
stdenvNoCC.mkDerivation {
name = "unbound-zones-adblock";
version = stevenblack-blocklist.rev;
version = unified-hosts-lists.version;
src = stevenblack-blocklist;
src = unified-hosts-lists;
dontUnpack = true;
@ -18,11 +18,9 @@ stdenvNoCC.mkDerivation {
];
in
''
shopt -s globstar
for file in $src/**/hosts; do
outFile="$out/''${file#$src}"
mkdir -p "$(dirname "$outFile")"
${gawkCmd} $file | tr '[:upper:]' '[:lower:]' | sort -u > "$outFile"
mkdir -p $out
for file in $src/*; do
${gawkCmd} $file | tr '[:upper:]' '[:lower:]' | sort -u > $out/$(basename $file)
done
'';

View file

@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, stdenvNoCC }:
stdenvNoCC.mkDerivation rec {
pname = "unified-hosts-lists";
version = "3.14.37";
src = fetchFromGitHub {
owner = "StevenBlack";
repo = "hosts";
rev = version;
hash = "sha256-HoNX57lCoIr36B/7HMuazWSWeAPPfWY1oZf6dXnxYIE=";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out
cp -r $src/hosts $out
for file in $src/alternates/*/hosts; do
cp $file $out/$(basename $(dirname $file))
done
'';
meta = with lib; {
description = "Unified host lists";
longDescription = ''
Consolidating and extending hosts files from several well-curated sources.
Optionally pick extensions for porn, social media, and other categories.
'';
homepage = "https://github.com/StevenBlack/hosts";
license = licenses.mit;
maintainers = with maintainers; [ ambroisie ];
platforms = platforms.all;
};
}

81
pkgs/wifi-qr/default.nix Normal file
View file

@ -0,0 +1,81 @@
{ lib
, fetchFromGitHub
, gnome
, installShellFiles
, makeWrapper
, networkmanager
, qrencode
, stdenvNoCC
, xdg-utils
, zbar
}:
stdenvNoCC.mkDerivation rec {
pname = "wifi-qr";
version = "unstable-2023-04-19";
outputs = [ "out" "man" ];
src = fetchFromGitHub {
owner = "kokoye2007";
repo = "wifi-qr";
rev = "b81d4a44257252f07e745464879aa5618ae3d434";
hash = "sha256-oGTAr+raJGpK4PV4GdBxX8fIUE8gcbXw7W0SvQJAee0=";
};
nativeBuildInputs = [
installShellFiles
makeWrapper
];
dontBuild = true;
dontConfigure = true;
postPatch = ''
substituteInPlace wifi-qr.desktop \
--replace "Exec=sh -c 'wifi-qr g'" "Exec=$out/bin/wifi-qr g" \
--replace "Exec=sh -c 'wifi-qr q'" "Exec=$out/bin/wifi-qr q" \
--replace "Exec=sh -c 'wifi-qr p'" "Exec=$out/bin/wifi-qr p" \
--replace "Exec=sh -c 'wifi-qr c'" "Exec=$out/bin/wifi-qr c" \
--replace "Icon=wifi-qr.svg" "Icon=wifi-qr"
'';
installPhase = ''
runHook preInstall
install -Dm755 wifi-qr $out/bin/wifi-qr
install -Dm644 wifi-qr.desktop $out/share/applications/wifi-qr.desktop
install -Dm644 wifi-qr.svg $out/share/icons/hicolor/scalable/apps/wifi-qr.svg
installManPage wifi-qr.1
runHook postInstall
'';
wrapperPath = lib.makeBinPath [
gnome.zenity
networkmanager
qrencode
xdg-utils
zbar
];
fixupPhase = ''
runHook preFixup
patchShebangs $out/bin/wifi-qr
wrapProgram $out/bin/wifi-qr --suffix PATH : "${wrapperPath}"
runHook postFixup
'';
meta = with lib; {
description = "WiFi password sharing via QR codes";
homepage = "https://github.com/kokoye2007/wifi-qr";
license = with licenses; [ gpl3Plus ];
mainProgram = "wifi-qr";
maintainers = with maintainers; [ ambroisie ];
platforms = platforms.linux;
};
}