Compare commits

..

1 commit

Author SHA1 Message Date
e58d613d13
wip: caffeinated 2025-06-17 13:04:57 -03:00
41 changed files with 345 additions and 677 deletions

1
.gitattributes vendored
View file

@ -1,2 +1 @@
flake.lock binary
*.gpg binary

View file

@ -5,21 +5,21 @@ keys:
- &phantom-ssh age1m4mqcd2kmuhfr8a22rvh02c68jkakhdfmuqgtusuv0czk4jvna7sz79p3y
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini|gpg)$
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *lelgenio-gpg
age:
- *lelgenio-ssh
- *monolith-ssh
- path_regex: secrets/monolith/[^/]+\.(yaml|json|env|ini|gpg)$
- path_regex: secrets/monolith/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *lelgenio-gpg
age:
- *lelgenio-ssh
- *monolith-ssh
- path_regex: secrets/phantom/[^/]+\.(yaml|json|env|ini|gpg)$
- path_regex: secrets/phantom/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *lelgenio-gpg

102
flake.lock generated
View file

@ -28,11 +28,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1754433428,
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
"lastModified": 1747575206,
"narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=",
"owner": "ryantm",
"repo": "agenix",
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
"rev": "4835b1dc898959d8547a871ef484930675cb47f1",
"type": "github"
},
"original": {
@ -225,11 +225,11 @@
]
},
"locked": {
"lastModified": 1753140376,
"narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=",
"lastModified": 1749436314,
"narHash": "sha256-CqmqU5FRg5AadtIkxwu8ulDSOSoIisUMZRLlcED3Q5w=",
"owner": "nix-community",
"repo": "disko",
"rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c",
"rev": "dfa4d1b9c39c0342ef133795127a3af14598017a",
"type": "github"
},
"original": {
@ -504,11 +504,11 @@
]
},
"locked": {
"lastModified": 1753592768,
"narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=",
"lastModified": 1749154018,
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fc3add429f21450359369af74c2375cb34a2d204",
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111",
"type": "github"
},
"original": {
@ -518,26 +518,6 @@
"type": "github"
}
},
"lsfg-vk-flake": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1753938292,
"narHash": "sha256-akeUWgvIIi163s/femzvTOuqqOiOB/8US5ioHsNqhYY=",
"owner": "pabloaul",
"repo": "lsfg-vk-flake",
"rev": "081cd66b1369188777ea146a759d35e99ea6b031",
"type": "github"
},
"original": {
"owner": "pabloaul",
"repo": "lsfg-vk-flake",
"type": "github"
}
},
"made-you-look": {
"inputs": {
"crane": "crane_2",
@ -565,11 +545,11 @@
]
},
"locked": {
"lastModified": 1754195341,
"narHash": "sha256-YL71IEf2OugH3gmAsxQox6BJI0KOcHKtW2QqT/+s2SA=",
"lastModified": 1749355504,
"narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "b7fcd4e26d67fca48e77de9b0d0f954b18ae9562",
"rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94",
"type": "github"
},
"original": {
@ -635,29 +615,13 @@
"type": "github"
}
},
"nixpkgs-pre-broken-waybar": {
"locked": {
"lastModified": 1750069205,
"narHash": "sha256-ALOBI3nTUFOX0A2bpFZqtsEZfH82icS9r9L/y3XA+2s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c1c9b3f5ec0421eaa0f22746295466ee6a8d48f",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c1c9b3f5ec0421eaa0f22746295466ee6a8d48f",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1754214453,
"narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=",
"lastModified": 1749285348,
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376",
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "github"
},
"original": {
@ -714,11 +678,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1754292888,
"narHash": "sha256-1ziydHSiDuSnaiPzCQh1mRFBsM2d2yRX9I+5OPGEmIE=",
"lastModified": 1749727998,
"narHash": "sha256-mHv/yeUbmL91/TvV95p+mBVahm9mdQMJoqaTVTALaFw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ce01daebf8489ba97bd1609d185ea276efdeb121",
"rev": "fd487183437963a59ba763c0cc4f27e3447dd6dd",
"type": "github"
},
"original": {
@ -818,12 +782,10 @@
"dzgui-nix": "dzgui-nix",
"hello-fonts": "hello-fonts",
"home-manager": "home-manager",
"lsfg-vk-flake": "lsfg-vk-flake",
"made-you-look": "made-you-look",
"nix-index-database": "nix-index-database",
"nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs_5",
"nixpkgs-pre-broken-waybar": "nixpkgs-pre-broken-waybar",
"nixpkgs-unstable": "nixpkgs-unstable",
"plymouth-themes": "plymouth-themes",
"ranger-icons": "ranger-icons",
@ -888,11 +850,11 @@
]
},
"locked": {
"lastModified": 1754328224,
"narHash": "sha256-glPK8DF329/dXtosV7YSzRlF4n35WDjaVwdOMEoEXHA=",
"lastModified": 1749592509,
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "49021900e69812ba7ddb9e40f9170218a7eca9f4",
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
"type": "github"
},
"original": {
@ -1020,11 +982,11 @@
"rev": "6a68f2cda0aa2fbb399a4c43b445e8c1a2df0634",
"revCount": 4,
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/tlauncher-nix"
"url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix"
},
"original": {
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/tlauncher-nix"
"url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix"
}
},
"tomater": {
@ -1048,11 +1010,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1754061284,
"narHash": "sha256-ONcNxdSiPyJ9qavMPJYAXDNBzYobHRxw0WbT38lKbwU=",
"lastModified": 1749194973,
"narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "58bd4da459f0a39e506847109a2a5cfceb837796",
"rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
"type": "github"
},
"original": {
@ -1063,11 +1025,11 @@
},
"vpsadminos": {
"locked": {
"lastModified": 1754243274,
"narHash": "sha256-gVTM1eIYzHx/Z/2WVhhf3Eov3JuARF5fuIrWjvc73wo=",
"lastModified": 1749716966,
"narHash": "sha256-aF+YOXv07qI7Q267gqapUcAsoQkI3+EcmZczatq6wkg=",
"owner": "vpsfreecz",
"repo": "vpsadminos",
"rev": "483e04c5556e7a42a0dcd176caab7ad450244515",
"rev": "2d991bb5109350801a381bff097809b76ee962f5",
"type": "github"
},
"original": {
@ -1102,11 +1064,11 @@
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1752343846,
"narHash": "sha256-tm2iycSAzbomHfOqmpQ21ozmS84OXfKIu/ZJant0Vfk=",
"lastModified": 1715216838,
"narHash": "sha256-q5key9BWJjJQqECrhflso9ZTzULBeScvromo0S4fjqE=",
"owner": "lelgenio",
"repo": "wl-crosshair",
"rev": "940acb43e753cfbe0afd0478370778e1bf2d3d55",
"rev": "39b716cf410a1b45006f50f32f8d63de5c43aedb",
"type": "github"
},
"original": {

View file

@ -4,9 +4,6 @@
nixpkgs.url = "nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
# TODO: remove after waybar >0.13.0
nixpkgs-pre-broken-waybar.url = "github:nixos/nixpkgs/1c1c9b3f5ec0421eaa0f22746295466ee6a8d48f";
home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -42,12 +39,7 @@
dzgui-nix.url = "github:lelgenio/dzgui-nix";
tlauncher = {
url = "git+https://git.lelgenio.com/lelgenio/tlauncher-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
lsfg-vk-flake = {
url = "github:pabloaul/lsfg-vk-flake";
url = "git+https://git.lelgenio.xyz/lelgenio/tlauncher-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -108,7 +100,8 @@
specialArgs = {
inherit inputs;
};
common_modules = [
common_modules =
[
{ nixpkgs.pkgs = pkgs; }
./system/configuration.nix
./system/secrets.nix
@ -129,7 +122,6 @@
my = config.my;
imports = [
./user/home.nix
inputs.sops-nix.homeManagerModules.sops
];
};
home-manager.backupFileExtension = "bkp";
@ -158,23 +150,21 @@
modules = [
./hosts/monolith
./system/monolith-gitlab-runner.nix
./system/monolith-bitbucket-runner.nix
./system/monolith-forgejo-runner.nix
./system/nix-serve.nix
]
++ common_modules;
] ++ common_modules;
};
double-rainbow = lib.nixosSystem {
inherit system specialArgs;
modules = [
./hosts/double-rainbow.nix
]
++ common_modules;
] ++ common_modules;
};
pixie = lib.nixosSystem {
inherit system specialArgs;
modules = [
./hosts/pixie.nix
]
modules =
[ ./hosts/pixie.nix ]
++ common_modules
++ [
{

View file

@ -27,13 +27,6 @@ in
wantedBy = [ "multi-user.target" ];
};
hardware.amdgpu = {
overdrive = {
enable = true;
ppfeaturemask = "0xffffffff";
};
};
hardware.graphics.enable32Bit = true;
hardware.graphics.extraPackages = with pkgs; [

View file

@ -94,8 +94,7 @@ in
options = [
"subvol=@games"
"nofail"
]
++ btrfs_options;
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/Downloads/Torrents" = {
device = "/dev/disk/by-label/BTRFS_DATA";
@ -103,8 +102,7 @@ in
options = [
"subvol=@torrents"
"nofail"
]
++ btrfs_options;
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/Música" = {
device = "/dev/disk/by-label/BTRFS_DATA";
@ -112,8 +110,7 @@ in
options = [
"subvol=@music"
"nofail"
]
++ btrfs_options;
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/.local/mount/data" = {
device = "/dev/disk/by-label/BTRFS_DATA";
@ -121,8 +118,7 @@ in
options = [
"subvol=@data"
"nofail"
]
++ btrfs_options;
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/.local/mount/old" = {
device = "/dev/disk/by-label/BTRFS_ROOT";

View file

@ -7,7 +7,7 @@
{
services.factorio = {
enable = true;
package = pkgs.my-factorio-headless;
package = pkgs.factorio-headless; # I override this in ./pkgs
public = true;
lan = true;
openFirewall = true;

View file

@ -36,8 +36,6 @@
hashedPassword = "$2b$05$DcA9xMdvHqqQMZw2.zybI.vfKsQAJtaQ/JB.t9AHu6psstWq97m2C";
};
};
enableManageSieve = true;
};
# Prefer ipv4 and use main ipv6 to avoid reverse DNS issues
@ -54,7 +52,7 @@
$config['smtp_host'] = "tls://${config.mailserver.fqdn}:587";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
$config['plugins'] = [ "carddav", "archive", "managesieve" ];
$config['plugins'] = [ "carddav", "archive" ];
'';
};
}

View file

@ -35,8 +35,6 @@ rec {
final: prev:
packages
// {
lsfg-vk = inputs.lsfg-vk-flake.packages.${prev.system}.lsfg-vk;
lsfg-vk-ui = inputs.lsfg-vk-flake.packages.${prev.system}.lsfg-vk-ui;
dhist = inputs.dhist.packages.${prev.system}.dhist;
demoji = inputs.demoji.packages.${prev.system}.default;
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
@ -46,10 +44,6 @@ rec {
patches = (
final: prev: {
waybar =
assert prev.waybar.version == "0.13.0";
inputs.nixpkgs-pre-broken-waybar.legacyPackages.${prev.system}.waybar;
mySway = prev.sway.override {
withBaseWrapper = true;
withGtkWrapper = true;

View file

@ -1,6 +1,5 @@
{
stdenv,
lib,
fetchFromGitHub,
pkgconf,
@ -40,12 +39,4 @@ stdenv.mkDerivation {
makeFlags = [ "WAYLAND=1" ];
installFlags = [ "PREFIX=$(out)" ];
meta = {
description = "Utility to prevent the system from entering an idle state";
homepage = "https://github.com/electrickite/caffeinated";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ lelgenio ];
};
}

View file

@ -9,7 +9,7 @@ rec {
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { };
my-factorio-headless = pkgs.callPackage ./factorio-headless {
factorio-headless = pkgs.callPackage ./factorio-headless {
inherit (pkgs.unstable) factorio-headless;
};
}

View file

@ -1,10 +1,10 @@
{ factorio-headless, pkgs }:
factorio-headless.overrideAttrs (_: rec {
version = "2.0.60";
version = "2.0.47";
src = pkgs.fetchurl {
name = "factorio_headless_x64-${version}.tar.xz";
url = "https://www.factorio.com/get-download/${version}/headless/linux64";
hash = "sha256-abW+GoZ/2ZUk+ZFN/ukAoaw4bPTnTEpjdowF3E0rKws=";
hash = "sha256-8PMgx3YWpHlCJ+tjenC1VxCPMUGkYzJ2WTIgp2j0miY=";
};
})

11
scripts/_sway_idle_toggle Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
swayidlectl() {
systemctl --user $1 swayidle.service
}
if swayidlectl status > /dev/null; then
swayidlectl stop
else
swayidlectl start
fi

View file

@ -2,144 +2,85 @@
set -e
DEVICE="$1" # eg: /sys/class/drm/card1/device
HWMON=$(echo "$DEVICE"/hwmon/hwmon*)
exit() {
echo "Setting controll to auto" >&2
echo 2 > "$HWMON/pwm1_enable"
}
trap exit EXIT INT
bail() {
echo "Error: $@" >&2
echo "Exiting..." >&2
exit 1
}
map_range() {
VALUE="$1"
MIN_INPUT="$2"
MAX_INPUT="$3"
INPUT_RANGE=$(( $MAX_INPUT - $MIN_INPUT ))
MIN_OUTPUT="$4"
MAX_OUTPUT="$5"
OUTPUT_RANGE=$(( $MAX_OUTPUT - $MIN_OUTPUT ))
if ! [ -d "$HWMON" ]; then
bail "Invalid HWMON"
fi
echo $(( ($VALUE - $MIN_INPUT) * $OUTPUT_RANGE / $INPUT_RANGE + $MIN_OUTPUT ))
}
TEMP_INPUT="$HWMON/temp2_input"
clamp() {
VALUE="$1"
if ! [ -f $TEMP_INPUT ]; then
bail "Invalid TEMP_INPUT"
fi
MIN="$2"
MAX="$3"
TEMP_MIN="$2"
TEMP_MAX="$3"
VALUE=$VALUE
if [ "$VALUE" -gt $MAX ]; then
VALUE=$MAX
elif [ "$VALUE" -lt $MIN ]; then
VALUE=$MIN
fi
if [ -z "$TEMP_MIN" ];then
bail "No minimum temperature provided"
fi
echo $VALUE
}
if [ -z "$TEMP_MAX" ];then
bail "No maximum temperature provided"
fi
cleanup() {
echo "Setting controll to auto" >&2
if test -f "$HWMON/pwm1_enable"; then
echo 2 > "$HWMON/pwm1_enable"
fi
}
trap cleanup EXIT INT
PWM_MIN_PCT="$4"
PWM_MAX_PCT="$5"
usage() {
echo "Usage: $0 <device> <min-temp> <max-temp> <min-fan> <max-fan>" >&2
echo "Example: $0 /sys/class/drm/card1/device 60 100 10 80" >&2
exit 1
}
if [ -z "$PWM_MIN_PCT" ];then
bail "No minimum fan speed % not provided"
fi
parse_cli() {
if test -n "$AMDGPU_FAN_CRONTROL_DEBUG"; then
echo parse_cli "$@" >&2
fi
if [ -z "$PWM_MAX_PCT" ];then
bail "No maximum fan speed % not provided"
fi
DEVICE="$1" # eg: /sys/class/drm/card1/device
HWMON=$(echo "$DEVICE"/hwmon/hwmon*)
TEMP_INPUT="$HWMON/temp2_input"
PWM_MIN="$(( $PWM_MIN_PCT * 255 / 100))"
PWM_MAX="$(( $PWM_MAX_PCT * 255 / 100))"
TEMP_MIN="$2"
TEMP_MAX="$3"
echo "Running..." >&2
PWM_MIN_PCT="$4"
PWM_MAX_PCT="$5"
}
echo "TEMP_MIN=$TEMP_MIN°C"
echo "TEMP_MAX=$TEMP_MAX°C"
echo "FAN_MIN=$PWM_MIN_PCT%"
echo "FAN_MAX=$PWM_MAX_PCT%"
validate_variables() {
if ! [ -d "$HWMON" ]; then
bail "Invalid drm-device: '$HWMON' is not a directory"
fi
echo 1 > "$HWMON/pwm1_enable"
if ! [ -f "$TEMP_INPUT" ]; then
bail "Error: Could not find hotspot temperature at '$TEMP_INPUT'"
fi
PREV=0
if [ -z "$TEMP_MIN" -o -z "$TEMP_MAX" -o -z "$PWM_MIN_PCT" -o -z "$PWM_MAX_PCT" ];then
usage
fi
}
setup() {
PWM_MIN=$(map_range $PWM_MIN_PCT 0 100 0 255)
PWM_MAX=$(map_range $PWM_MAX_PCT 0 100 0 255)
echo "Running..." >&2
if test -n "$AMDGPU_FAN_CRONTROL_DEBUG"; then
echo "TEMP_MIN=$TEMP_MIN°C" >&2
echo "TEMP_MAX=$TEMP_MAX°C" >&2
echo "FAN_MIN=$PWM_MIN_PCT% (PWM=$PWM_MIN)" >&2
echo "FAN_MAX=$PWM_MAX_PCT% (PWM=$PWM_MAX)" >&2
fi
# Set fan control mode to manual, this will be reverted in the cleanup trap
echo 1 > "$HWMON/pwm1_enable"
PREV_PWM=0
}
main_loop() {
while true; do
TEMPERATURE_RAW=$(cat "$TEMP_INPUT")
TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" # 60_000 = 60°C
TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))"
# Remap from a number between 60_000..90_000 to 0..255
PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) ))
# Calculate the fan speed we would want to reach given infinite time
TARGET_PWM=$(map_range $TEMPERATURE $TEMP_MIN $TEMP_MAX $PWM_MIN $PWM_MAX)
# Calculate an appropriate amount to "walk" in the direction of target fan speed
DIFFERENCE=$(( $TARGET_PWM - $PREV_PWM ))
ADJUSTMENT=$(( $DIFFERENCE * 20 / 100 ))
NEXT_PWM=$(( $PREV_PWM + $ADJUSTMENT ))
NEXT_PWM=$(clamp $NEXT_PWM $PWM_MIN $PWM_MAX)
NEXT_PWM_PCT=$(map_range $NEXT_PWM 0 255 0 100 )
if test -n "$AMDGPU_FAN_CRONTROL_DEBUG"; then
for var in \
"Temperature=$TEMPERATURE°C" \
"Fan speed=$NEXT_PWM_PCT%" \
; do
echo -en "$var\t"
done
echo
if [ "$PWM" -gt $PWM_MAX ]; then
PWM=$PWM_MAX
elif [ "$PWM" -lt $PWM_MIN ]; then
PWM=$PWM_MIN
fi
# Apply the new fan speed
echo "$NEXT_PWM" > "$HWMON/pwm1"
AVG="$(( ($PWM * 20 + $PREV * 80) / 100 ))"
# Wait for next iteratino
PREV_PWM="$NEXT_PWM"
echo "$AVG"
echo "$AVG" > "$HWMON/pwm1"
PREV="$AVG"
sleep .1s
}
main() {
parse_cli "$@"
validate_variables
setup
while true; do
main_loop
done
}
main "$@"
done

View file

@ -44,6 +44,7 @@
];
_diffr = [ diffr ];
_thunar-terminal = [ terminal ];
_sway_idle_toggle = [ swayidle ];
kak-pager = [
fish
_diffr
@ -73,7 +74,6 @@
];
wpass = [
wdmenu
ripgrep
fd
myPass
sd

View file

@ -29,8 +29,8 @@ main() {
test -n "$entry" || exit 0
username=`pass show "$entry" 2>/dev/null | rg -m1 '(login|user|email): (.*)' -r '$2'` || true
password=`pass show "$entry" 2>/dev/null | head -n 1` || true
username=`pass show "$entry" 2>/dev/null | perl -ne 'print $2 if /^(login|user|email): (.*)/'`
password=`pass show "$entry" 2>/dev/null | head -n 1`
otp=`pass otp "$entry" 2>/dev/null` || true
action="$(print_actions_for_entry | wdmenu -p Action)"
@ -50,10 +50,8 @@ main() {
}
autotype(){
if test -n "$username"; then
env wtype -s 100 "$username"
env wtype -s 100 -k tab
fi
env wtype -s 100 "$password"
}

File diff suppressed because one or more lines are too long

View file

@ -5,8 +5,11 @@ gitlab-runners:
thoreb-itinerario-nix: ENC[AES256_GCM,data:UdAAD0V895sFoEYR56sCG2LlpZugJ0K/nwkTygzWOnbTSmBRAcIQ8qVFPZGw+K+XMSLiCyio6Jp7k8AYP0K1VYm+6aEP3OkqR9FCLQTJgXo=,iv:UGUby50BYkn13OzItk6zZmxc5+SnbZZa4bebQHIow2A=,tag:LjDg3deWwdH2T71EtPo6jA==,type:str]
docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str]
wopus-gitlab-nix: ENC[AES256_GCM,data:asE7J0d58x9VfQFWc07f5T4s5NZ+/VqMQo66EX93J0LbJ4iI5YjvrrIE4pSI1e4Nz/SRQhltaJ0DfSH0+qgjD4wnAONPRi3UlFbSdGWS2bwwRtWe+Nci2krrUFxV2i/ZVE3CwCkNe4mqtII=,iv:gKrD/LhzI+jnDnX6CdxoHfjpiRdrsuRYJF9rTc8SffM=,tag:TczDGSU3gdKmERjBJ7tP/A==,type:str]
wopus-ssh-nix-cache-pk: ENC[AES256_GCM,data:MtYDK6P7nwBzr6p+lRX/dkosBfeDUAj/slf/a5SgVXNIbQlkEk7gvfW5iL+C2HgMwowqWx4F+3q2W+kGweqEYzEYAoZ9pR08a7Jci3Szyy49hkamxJXF+Qwhb5VQKxDppESne7DARCF0iYeUjgeXxCYyuWlGpisnkN3HCWrIYCqbk0LS+yqgkNhDxtxMaThGYztfPnLMEV/P5vuge9sRKu3Xi3iX2uDKtx4FTBsX30Lmd8kngOVnP/GaEHDa5ECO+/yW6ZRg3fIaqJ4RV+Vz79ovFUuZV/VE8eY3JOdK5tKIBWb31YUOjP7ccBes7mMhFLO3ceNeh+a6KAJbQ4pCojJwf/cLz663FKr5f/uWDicOBbL64l3+zV5zvSDzFls0ImXMNL6Fe3SaKP7ZcC5rVrRD8P+UN/OSFmbN5LM7uYY8nNsLxTH7MYsRHgTBUmTsFEhLGJIUjtf6J3/NWIlxjBq1MmpgxN0bD6gwVAxDPP489v918tsZtKdG8SJhLUPE4LWKsU7LHpgUBroKlbGE,iv:1jnF2TTlyTR59xM8Bgaz6bubDOwFexHBJipNVa0VPXY=,tag:VsDb6C6wYa9p4Yey3iG4eA==,type:str]
wopus-ssh-nix-cache-pub: ENC[AES256_GCM,data:F+QHv9wwgyQYobKwyG13tS2OKCZuBPKLe7RLkhxsqYmVEtkCnli9jG+unMp7MC5L0i3puNqfoXP2IC6g4ESHq1yE0ksUpUCHzps4oMZBQK9b5JcqXQs+c//hskTQ/sFmTfGPpdnQ7wAifnQf5Mx2E4RwiRznMgJGQ3RDDjg9xfWUyvw6PlslZH65aGrq3P/iURvj,iv:u34+rXKLcZjBlVJmdbf60I82Fb621lUjOBmR4CTJWGk=,tag:ToPtBIz3bgzAUKc6hh4Oxg==,type:str]
bitbucket-runners:
wopus-runner-1: ENC[AES256_GCM,data:gtH0T5n8qMYpvSv5ciN8+ScGlFDf9xE0FTxNP97vT/qsOCcaItTE+5P+DFcWw46onLED+1c+u0sArFbEsT3f8lyco9b+0l99uOQAxLZQzAXYH8zGye1UnwUtytkci2PHu5c8kTpIWHXyZ1IOYNGWkermeab57ANzOkM1LbkHyAjS6VTh0I60LfAOdHOw5FDFL8d1d9oWxLloOe9USLPqHjC023EpCUT2YuyHoPCTpBu8Kb/2HfV0wkAKaB3dvVrKwXCj+bfP6+bjQ3uMzVO/7jxPmnSGBfvyZ+Hlg5goJ6bSAqQWmnPPnQ96FgQfe8su5ML9qNIp9/7eNiL6Rv6Vhxe0hHbE5wsZ/58grcg/LrugeWJvUJ9THhwcTwO8Pkvwlq0XM9seUY2NV+LCK3bLQ4IWDjWkU1IHg6+nihTcvl1iD6UIGMgqGoB/v05WVzHb+GcE2fFuSuhVHfa5RMyboELOJoFrqZiXGhY=,iv:ZakLafxYQCDd1Zw8T83Xfj+YwAQKna9LC6ognJqtifA=,tag:bwBObfdMIvJfRrOG04NtxA==,type:str]
wopus-runner-2: ENC[AES256_GCM,data:gg8merZMFbf396hdJY7zmKQndT3GzB7NeGZAs3C0au8Zd7OFAg9vcQcFcxNA3kZGJZqmFTR/ycWJwhYr9fhlfFuPhDynVvgJAqoYtvC2MUDiOMD/d3DlfwFjQ6cOGTrvFuY1kkgSFb4OFdrVC1eiTDrGygFmYnYcqTKn/t5Ttqi+cHZNzFzVzdVLvaLCYxltM5g45zn+fXYxYwCfqyb32/M1XTnnwIGiataGxEX5oWhVV4zqeLO4ZIYPSby5AVvIMJ/zqvqaeVVY52GLDcTKrj3thbZxMQLWN3/lOA0uYhi3L/WM8Gx+JMEIbSICcuT7QXu4w4PA+opcx9GnsMCK2/egzS+cNPJ4vGZCdVD/jh6A9zVEJAgXdsHXNXFHmMPt7DcgrCQiub62og4kBY4G/Rcg4UN7sb3v3qyBpGbCGHGRjCFc+wdHpom0yDOG2cwcqfN49pC2R7Ag2BisFQ/5A+DPmKnvGG3kt9s=,iv:5g5XiDecYqi4JNRkZubgPJECBQdZ6rBeojgFe6Etebk=,tag:HRy5bFSbfxKTb5e13lGtgg==,type:str]
wopus-runner-3: ENC[AES256_GCM,data:f9pLYR8t51HtPpLyXysIVaDAhxDrmktJH93E7rb7imtKwK7hRhR8usnvHTcknLfD7BMvStAIYefdGt19u7PrQu6vqc19bEcNbnK5OH4KBP6+X47oMgBYtbIGXH+t3dSDt22fSIoppTwdX7/Kf4vqesfN8K7EunETvFR86oyyKdy15mvXr0XUO4us4HZjnIOBEnOm1P/V8hk5JcCpRuo+8ZYmBe5gzq5pTnqnYlPE1EovM7eDMg72J7ev07h50qvySrAqmNiqDcXfTPQ2TzuHx3XxAYqFybf1L6P9OnLB6RDAlpoFJ0h8dSg2tzC2+amYsBP0UIBK/ZhWvvAjpX+MZrTASjenh/tefDcNdbsXDOr7A4i/261z4rC0r+97INglCN1N/SZg51iBHiRAVV1zibDLfioR5+eBIykWAtjILMoYU+zOcr0E8K0I9jQGMtpnYmvHJqV0DVcdfZpJptrPUUy+lQ/iZVcPpLs=,iv:grzvVsfpUzywjNE4jvTxXKG3TYajrvSsQgfOgtafvIo=,tag:K1B6crN0ckLk0EYBtGHDkw==,type:str]
wopus-runner-4: ENC[AES256_GCM,data:D1Zq0BtPuACnutAbUcj3gYSMLuIZcMuqc/1mEFmitEG0tBFMWhkabS+8lXcp8sb1DM0LTDMEwgMB9FVyFb670MKQNEncqQtaNJtY1BxS3SolovDAM/I+i6YGvd4X8jX99d+7ZNR6xGBWJ/dW8rz4QnIM8Eh3FDOqaFa/ltfyPKP9IZ2uZi67C/n8Q/OSdgMQkt+QxhgJfSghE1iruPwxyGlqv+E4SZNI/fQQMjX0Lh7z02ms58yyMtjO71YbukV/JXFRsdJrqY2wfH/6NlZbsKideoSxluBRVqmbW6KQd7dUT819KbOSu9CFdgThtVCU8qiv3jbAbn8D5xRy4AAOEfSqRLXJoj7otCqr47R/8+0BdS3aztFBjL3lDmprMWZ4+LD55fvczfpxUF9ox1mhcjIvCvZJJL06XsST1XRXa7i2fr4/a/XhCmQgIzar5IYxSC9OjuHp6jLsTaY3ZUgid5W1L1n8uWSmA98=,iv:O9caRG//brERiIhuMrsFdTz6TnPY0rdQnvHEu0P42yM=,tag:hrmwLX/CRhZfammJ2nfTPw==,type:str]
sops:
age:
- recipient: age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h
@ -27,8 +30,8 @@ sops:
aFVxcDFhaGdYekRWRVFIWnRsZndtZFkKgsvxOFHOcO306Z9FkucA1fDOpZA8N1/h
jYmIgcKTFgWoSCvux67lK30jFsYp7sm5z6WxxDYsGcoQ/+pxoUX2jQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-07-16T15:17:16Z"
mac: ENC[AES256_GCM,data:UKIJFzABE0vr7vSYL85iZdTvd0y3dN/MaBUoKf6OpcDtRphM8/yY5J0Xq6XM5f28WFN1GlSKUekQz+DkA6aR6aCI2SICVOJpFb/eXKQ3Y7Td+PGcBr07hFOGCSu2vAzgYB1ZnajfI659FcWmdOoJSYgHUz3G7iRTHHCRVcoaVVk=,iv:jmKwn9bkqvPa0dGge4FFW2uT4Oa1LlFpFMUlnqUgkAA=,tag:CL+0+frQMt2TmgYv9yZeuw==,type:str]
lastmodified: "2025-06-16T13:05:35Z"
mac: ENC[AES256_GCM,data:i8HOA7JSVSkxpoXJpFYrENodySyEEupYLNjuezRpd+PQWmxE7igonFyweUblmkSyBgy1FpmN+llwoP0Cokka5QyJse9jq9hR6dFATpZC9qPzSlAb+RpdSzp4QXjryOzP/23RJ7WhhBOC2DRw8OkDBPDJINBnCtu1ticpiuXKoHs=,iv:WEEdZDbrrkhip0ZkpqQfg6fwV+OzP/bBBrExyvOhqng=,tag:6iLMsJtenKdU/lJU/+HnCg==,type:str]
pgp:
- created_at: "2025-03-07T22:49:16Z"
enc: |-

View file

@ -33,18 +33,6 @@
networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections;
# Docker punches holes in your firewall
systemd.services.docker-update-firewall = {
script = lib.getExe pkgs._docker-block-external-connections;
};
systemd.timers.docker-update-firewall = {
timerConfig = {
OnCalendar = "minutely";
Unit = "docker-update-firewall.service";
};
wantedBy = [ "multi-user.target" ];
};
programs.extra-container.enable = true;
programs.firejail.enable = true;

View file

@ -60,6 +60,12 @@
};
};
programs.corectrl.enable = true;
programs.corectrl = {
enable = true;
gpuOverclock = {
enable = true;
ppfeaturemask = "0xffffffff";
};
};
};
}

View file

@ -1,13 +1,6 @@
{ pkgs, lib, ... }:
let
installNixScript =
{
authenticationTokenConfigFile,
nixCacheSshPrivateKeyPath ? null,
nixCacheSshPublicKeyPath ? null,
...
}:
pkgs.writeScriptBin "install-nix" ''
installNixScript = pkgs.writeScriptBin "install-nix" ''
mkdir -p -m 0755 /nix/var/log/nix/drvs
mkdir -p -m 0755 /nix/var/nix/gcroots
mkdir -p -m 0755 /nix/var/nix/profiles
@ -32,29 +25,15 @@ let
]
)
}
${lib.optionalString (nixCacheSshPrivateKeyPath != null && nixCacheSshPublicKeyPath != null) ''
NIX_CACHE_SSH_PRIVATE_KEY_PATH="${nixCacheSshPrivateKeyPath}"
NIX_CACHE_SSH_PUBLIC_KEY_PATH="${nixCacheSshPublicKeyPath}"
. ${./gitlab-runner/nix-cache-start}
''}
'';
in
rec {
mkNixRunnerFull =
{
authenticationTokenConfigFile,
nixCacheSshPrivateKeyPath ? null,
nixCacheSshPublicKeyPath ? null,
...
}@args:
{
{
mkNixRunner = authenticationTokenConfigFile: {
# File should contain at least these two variables:
# `CI_SERVER_URL`
# `REGISTRATION_TOKEN`
inherit authenticationTokenConfigFile; # 2
dockerImage = "alpine:3.18.2";
dockerPullPolicy = "if-not-present";
dockerVolumes = [
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
"/nix/store:/nix/store:ro"
@ -63,16 +42,9 @@ rec {
"/tmp:/tmp"
"/var/run/docker.sock:/var/run/docker.sock"
"/var/lib/docker/containers:/var/lib/docker/containers"
"/cache"
]
++ lib.optionals (nixCacheSshPrivateKeyPath != null) [
"${nixCacheSshPrivateKeyPath}:${nixCacheSshPrivateKeyPath}"
]
++ lib.optionals (nixCacheSshPublicKeyPath != null) [
"${nixCacheSshPublicKeyPath}:${nixCacheSshPublicKeyPath}"
];
# dockerDisableCache = true;
preBuildScript = "\". ${lib.getExe (installNixScript args)}\"";
dockerDisableCache = true;
preBuildScript = "\". ${lib.getExe installNixScript}\"";
environmentVariables = {
ENV = "/etc/profile";
USER = "root";
@ -80,10 +52,4 @@ rec {
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
};
};
mkNixRunner =
authenticationTokenConfigFile:
mkNixRunnerFull {
inherit authenticationTokenConfigFile;
};
}

View file

@ -1,49 +0,0 @@
#!/bin/sh
echo "nix-cache: Setting up ssh key and host" >&2
STORE_HOST_PUB_KEY="$(cat "$NIX_CACHE_SSH_PUBLIC_KEY_PATH" | base64 | tr -d '\n')"
STORE_URL="ssh://nix-ssh@nix-cache.wopus.dev?trusted=true&compress=true&ssh-key=$NIX_CACHE_SSH_PRIVATE_KEY_PATH&base64-ssh-public-host-key=$STORE_HOST_PUB_KEY"
echo STORE_URL="$STORE_URL" >&2
NIX_EXTRA_CONFIG_FILE=$(mktemp)
cat > "$NIX_EXTRA_CONFIG_FILE" <<EOF
extra-substituters = $STORE_URL
EOF
echo "nix-cache: Adding remote cache as substituter" >&2
export NIX_USER_CONF_FILES="$NIX_EXTRA_CONFIG_FILE:$NIX_USER_CONF_FILES"
echo "nix-cache: Setting up nix hook" >&2
nix() {
echo "nix-cache: executing nix hook" >&2
command nix "$@"
local STATUS="$?"
local BUILD=no
if test "$STATUS" = "0"; then
for arg in "$@"; do
echo "nix-cache: evaluating arg '$arg'" >&2
case "$arg" in
build)
echo "nix-cache: enablig upload" >&2
BUILD=yes
;;
-*)
echo "nix-cache: ignoring argument '$arg'" >&2
;;
*)
if test "$BUILD" = yes; then
echo "nix-cache: Sending path $arg" >&2
command nix copy --to "$STORE_URL" "$arg" || true
else
echo "nix-cache: not building, ignoring argument '$arg'" >&2
fi
;;
esac
done
else
echo "nix-cache: nix exited with code '$STATUS', ignoring" >&2
fi
return "$STATUS"
}

View file

@ -0,0 +1,50 @@
{
config,
pkgs,
...
}:
let
mkRunner = secret: {
image = "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:latest";
volumes = [
"/tmp:/tmp"
"/var/run/docker.sock:/var/run/docker.sock"
"/var/lib/docker/containers:/var/lib/docker/containers:ro"
];
environmentFiles = [ secret ];
};
secretConf = {
sopsFile = ../secrets/monolith/default.yaml;
};
in
{
virtualisation.docker = {
enable = true;
daemon.settings = {
# needed by bitbucket runner ???
log-driver = "json-file";
log-opts = {
max-size = "10m";
max-file = "3";
};
};
};
virtualisation.oci-containers.backend = "docker";
virtualisation.oci-containers.containers = {
bitbucket-runner-1 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-1".path;
bitbucket-runner-2 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-2".path;
bitbucket-runner-3 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-3".path;
bitbucket-runner-4 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-4".path;
};
sops.secrets = {
"bitbucket-runners/wopus-runner-1" = secretConf;
"bitbucket-runners/wopus-runner-2" = secretConf;
"bitbucket-runners/wopus-runner-3" = secretConf;
"bitbucket-runners/wopus-runner-4" = secretConf;
};
}

View file

@ -4,25 +4,21 @@
...
}:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner mkNixRunnerFull;
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
{
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
virtualisation.docker.enable = true;
services.gitlab-runner = {
enable = true;
settings.concurrent = 4;
settings.concurrent = 12;
services = {
# runner for building in docker via host's nix-daemon
# nix store will be readable in runner, might be insecure
thoreb-telemetria-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-telemetria-nix".path;
thoreb-itinerario-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-itinerario-nix".path;
wopus-gitlab-nix = mkNixRunnerFull {
authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/wopus-gitlab-nix".path;
nixCacheSshPrivateKeyPath = config.sops.secrets."gitlab-runners/wopus-ssh-nix-cache-pk".path;
nixCacheSshPublicKeyPath = config.sops.secrets."gitlab-runners/wopus-ssh-nix-cache-pub".path;
};
wopus-gitlab-nix = mkNixRunner config.sops.secrets."gitlab-runners/wopus-gitlab-nix".path;
default = {
# File should contain at least these two variables:
@ -30,7 +26,6 @@ in
# `CI_SERVER_TOKEN`
authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/docker-images-token".path;
dockerImage = "debian:stable";
dockerPullPolicy = "if-not-present";
};
};
};
@ -49,11 +44,5 @@ in
"gitlab-runners/wopus-gitlab-nix" = {
sopsFile = ../secrets/monolith/default.yaml;
};
"gitlab-runners/wopus-ssh-nix-cache-pk" = {
sopsFile = ../secrets/monolith/default.yaml;
};
"gitlab-runners/wopus-ssh-nix-cache-pub" = {
sopsFile = ../secrets/monolith/default.yaml;
};
};
}

View file

@ -26,8 +26,6 @@
};
};
services.fail2ban.enable = true;
# Workaround for nm-wait-online hanging??
# Ref: https://github.com/NixOS/nixpkgs/issues/180175
systemd.services.NetworkManager-wait-online = {

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{
services.pulseaudio.enable = false;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;

View file

@ -59,11 +59,6 @@ in
url = "https://addons.mozilla.org/firefox/downloads/file/4263531/youtube_recommended_videos-1.6.7.xpi";
hash = "sha256-u21ouN9IyOzkTkFSeDz+QBp9psJ1F2Nmsvqp6nh0DRU=";
})
(pkgs.fetchFirefoxAddon {
name = "youtube_no_translation";
url = "https://addons.mozilla.org/firefox/downloads/file/4529979/youtube_no_translation-2.7.1.xpi";
hash = "sha256-HOLeSWt0phsR/l3FcCRUUFCurU2zyBuZBlynlxPbGqs=";
})
# (pkgs.fetchFirefoxAddon {
# name = "invidious_redirect";
# url = "https://addons.mozilla.org/firefox/downloads/file/4292924/invidious_redirect_2-1.16.xpi";

View file

@ -16,6 +16,7 @@ in
user = {
name = username;
email = mail.personal.user;
signingkey = "2F8F21CE8721456B";
};
init.defaultBranch = "main";
core = {
@ -24,6 +25,7 @@ in
};
commit = {
verbose = true;
gpgsign = true;
};
fetch = {
prune = true;

View file

@ -43,7 +43,7 @@ lib.mkIf (config.my.desktop == "gnome") {
qt6Packages.qtstyleplugin-kvantum
];
services.gpg-agent.pinentry.package = pkgs.pinentry-gnome;
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome;
xdg.defaultApplications = {
enable = lib.mkForce false;

View file

@ -24,7 +24,6 @@
./mpv.nix
./mangohud.nix
./gaming.nix
./lsfg-vk
./pipewire.nix
./mimeapps.nix
./desktop-entries.nix
@ -37,14 +36,13 @@
./pass.nix
./pqiv.nix
./zathura.nix
./satty
./man.nix
./mpd.nix
./sway
./gnome.nix
./thunar.nix
./xdg-dirs.nix
inputs.nix-index-database.homeModules.nix-index
inputs.nix-index-database.hmModules.nix-index
../settings
./powerplay-led-idle.nix
./rm-target.nix
@ -149,8 +147,6 @@
enable = true;
};
sops.age.keyFile = config.home.homeDirectory + "/.ssh/id_ed25519";
xdg.defaultApplications = {
enable = true;
text-editor = lib.mkDefault "kak.desktop";

View file

@ -135,6 +135,7 @@ args = [
[language_server.rust-analyzer.settings.rust-analyzer]
# See https://rust-analyzer.github.io/manual.html#configuration
# cargo.features = []
cargo.buildScripts.useRustcWrapper = false
checkOnSave.command = "clippy"
hoverActions.enable = false # kak-lsp doesn't support this at the moment

View file

@ -1,40 +0,0 @@
{ pkgs, config, ... }:
let
LosslessDllPath = config.home.homeDirectory + "/.local/lib/Lossless.dll";
in
{
home.file = {
".local/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source =
"${pkgs.lsfg-vk}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
".local/lib/liblsfg-vk.so".source = "${pkgs.lsfg-vk}/lib/liblsfg-vk.so";
};
home.sessionVariables = {
# ENABLE_LSFG = 1; # Don't enable session wide, to avoid bugs
LSFG_DLL_PATH = LosslessDllPath;
};
home.packages = with pkgs; [
lsfg-vk
lsfg-vk-ui
];
# Put the dll in a reachable location for steam games
# Secrets normally are a symlink to /run/user/1000/secrets.d/
# Every time sops-nix.service runs, we copy the dll
systemd.user.services.copy-lsfg-dll = {
Service = {
ExecStart = pkgs.writeShellScript "copy-lsfg-dll" ''
cp -fv "${config.sops.secrets."lsfg.dll".path}" "${LosslessDllPath}"
'';
Type = "oneshot";
};
Unit.After = [ "sops-nix.service" ];
Install.WantedBy = [ "sops-nix.service" ];
};
sops.secrets."lsfg.dll" = {
sopsFile = ../../secrets/lsfg.dll.gpg;
format = "binary";
};
}

View file

@ -17,9 +17,6 @@ in
toggle_preset = "Control_R+F9";
fps_metrics = "Control_R+F8";
media_player = false;
battery = false;
# legacy_layout = "false";
# gpu_stats = true;
# gpu_temp = true;

View file

@ -1,63 +0,0 @@
[general]
# Start Satty in fullscreen mode
fullscreen = true
# Exit directly after copy/save action
early-exit = true
# Draw corners of rectangles round if the value is greater than 0 (0 disables rounded corners)
corner-roundness = 12
# Select the tool on startup [possible values: pointer, crop, line, arrow, rectangle, text, marker, blur, brush]
initial-tool = "brush"
# Configure the command to be called on copy, for example `wl-copy`
copy-command = "wl-copy"
# Increase or decrease the size of the annotations
# annotation-size-factor = 2
# Filename to use for saving action. Omit to disable saving to file. Might contain format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
# output-filename = "/tmp/test-%Y-%m-%d_%H:%M:%S.png"
# After copying the screenshot, save it to a file as well
# save-after-copy = false
# Hide toolbars by default
# default-hide-toolbars = false
# Experimental: whether window focus shows/hides toolbars. This does not affect initial state of toolbars, see default-hide-toolbars.
# focus-toggles-toolbars = false
# The primary highlighter to use, the other is accessible by holding CTRL at the start of a highlight [possible values: block, freehand]
primary-highlighter = "block"
# Disable notifications
disable-notifications = true
# Actions to trigger on right click (order is important)
# [possible values: save-to-clipboard, save-to-file, exit]
# actions-on-right-click = []
# Actions to trigger on Enter key (order is important)
# [possible values: save-to-clipboard, save-to-file, exit]
# actions-on-enter = ["save-to-clipboard"]
# Actions to trigger on Escape key (order is important)
# [possible values: save-to-clipboard, save-to-file, exit]
# actions-on-escape = ["exit"]
# Action to perform when the Enter key is pressed [possible values: save-to-clipboard, save-to-file]
# Deprecated: use actions-on-enter instead
action-on-enter = "save-to-clipboard"
# Right click to copy
# Deprecated: use actions-on-right-click instead
# right-click-copy = false
# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1.
# no-window-decoration = true
# experimental feature: adjust history size for brush input smooting (0: disabled, default: 0, try e.g. 5 or 10)
# brush-smooth-history-size = 10
# Font to use for text annotations
[font]
family = "Roboto"
style = "Bold"
# Custom colours for the colour palette
[color-palette]
# These will be shown in the toolbar for quick selection
palette = [
"#ff0000",
"#00ffff",
"#a52a2a",
"#dc143c",
"#ff1493",
"#ffd700",
"#008000",
]

View file

@ -1,22 +0,0 @@
{
pkgs,
lib,
config,
...
}:
let
cfg = config.my.satty;
in
{
options.my.satty.enable = lib.mkEnableOption { };
config = lib.mkIf cfg.enable {
xdg.configFile."satty/config.toml" = {
source = ./config.toml;
};
home.packages = with pkgs; [
satty
];
};
}

View file

@ -32,7 +32,6 @@ in
my.swaylock.enable = true;
my.mpd.enable = true;
my.zathura.enable = true;
my.satty.enable = true;
my.waybar.enable = true;
my.gammastep.enable = true;
@ -124,7 +123,7 @@ in
indicator = true;
};
services.gpg-agent.pinentry.package = pkgs.pinentry-all;
services.gpg-agent.pinentryPackage = pkgs.pinentry-all;
xdg.configFile."OpenTabletDriver/settings.json" = {
force = true;
@ -154,7 +153,6 @@ in
wl-clipboard
wtype
wl-crosshair
caffeinated
grim
satty

View file

@ -20,22 +20,21 @@ in
config = lib.mkIf cfg.enable {
services.mako = {
enable = true;
settings = {
border-size = 2;
borderSize = 2;
padding = "5";
margin = "15";
layer = "overlay";
font = "${font.interface} ${toString font.size.small}";
text-color = color.txt;
textColor = color.txt;
background-color = color.bg;
border-color = accent.color;
progress-color = "over ${accent.color}88";
backgroundColor = color.bg;
borderColor = accent.color;
progressColor = "over ${accent.color}88";
default-timeout = 10000;
defaultTimeout = 10000;
settings = {
"app-name=volumesh" = {
"default-timeout" = "5000";
"group-by" = "app-name";

View file

@ -19,7 +19,7 @@ let
'';
_suspend = pkgs.writeShellScriptBin "_suspend" ''
${pkgs.sway}/bin/swaymsg mode default
pkill caffeinated || true
systemctl --user start swayidle.service
systemctl suspend
'';
@ -143,7 +143,7 @@ let
system_binds = {
"--locked Ctrl+${mod}+z" = "exec ${_suspend}/bin/_suspend";
"${mod}+Alt+c" = "exec pkill caffeinated || exec caffeinated";
"${mod}+Alt+c" = "exec ${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
};
screenshot_binds = {
@ -172,7 +172,7 @@ let
"${mod}+Return" = "exec ${terminal}";
"${mod}+Ctrl+Return" = "exec thunar";
"${mod}+Shift+s" = ''
exec grim - | satty --filename - --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png
exec grim - | satty --filename - --fullscreen --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png
'';
"${mod}+Ctrl+v" = "exec wl-paste | tesseract -l por - - | wl-copy";
"${mod}+k" = "exec showkeys";

View file

@ -21,7 +21,8 @@ lib.mkIf (desktop == "sway") {
package = pkgs.bibata-cursors;
gtk.enable = true;
};
gtk = {
gtk =
{
enable = true;
font = {
name = font.interface;

View file

@ -4,7 +4,7 @@
programs.vscode = {
enable = true;
package = pkgs.vscodium;
profiles.default.extensions = with pkgs.vscode-extensions; [
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
github.github-vscode-theme
rust-lang.rust-analyzer

View file

@ -3,10 +3,12 @@
osConfig,
pkgs,
lib,
font,
...
}:
let
inherit (config.my)
key
theme
accent
font
@ -168,8 +170,8 @@ in
};
"custom/caffeine" = {
format = "{}";
exec = "pgrep caffeinated > /dev/null && echo '󰒳' || echo '󰒲' ";
on-click = "pkill caffeinated || exec caffeinated";
exec = "systemctl --user status swayidle > /dev/null && echo 󰒲 || echo 󰒳";
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
interval = 1;
tooltip = false;
};
@ -232,7 +234,10 @@ in
};
}
];
style = pkgs.replaceVars ./style.css {
style = builtins.readFile (
pkgs.substituteAll {
src = ./style.css;
accent_color = accent.color;
color_bg = color.bg;
@ -244,7 +249,8 @@ in
font_size_big = "${toString font.size.big}px";
font_size_medium = "${toString font.size.medium}px";
};
}
);
};
home.packages = with pkgs; [ waybar ];
};