Compare commits

...

9 commits

10 changed files with 174 additions and 46 deletions

107
flake.lock generated
View file

@ -178,11 +178,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780894562, "lastModified": 1781152676,
"narHash": "sha256-c3430xwxwhHipl3jigUGMMBfpaMylDqytW/kdmB3ZGs=", "narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "24fed06cac83bcc44ac8efbb57cab1a82fa0bedc", "rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -457,11 +457,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780883961, "lastModified": 1783221248,
"narHash": "sha256-WU6SUrESuPiEXEUvX4D51AgWrXRJty+sLJBwBaDBGqE=", "narHash": "sha256-ESQnuNHEDChsB4IxoLRhscVahqkDWkTb+qdIz8euYt4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4eb4fec41674d5b059aa2eedf0f98453890546fa", "rev": "af2beae5f0fae0a4310cc0e6aef2572f56090353",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -552,6 +552,22 @@
"url": "https://git.lelgenio.com/lelgenio/made-you-look" "url": "https://git.lelgenio.com/lelgenio/made-you-look"
} }
}, },
"netlinkrb": {
"flake": false,
"locked": {
"lastModified": 1562850306,
"narHash": "sha256-0bXTWUdUDr2XP+bEIfIbxXap8Niva/IoPXTxFeXXImg=",
"owner": "vpsfreecz",
"repo": "netlinkrb",
"rev": "d9de53d843d2586ffa5b7b404887fa801c697ddf",
"type": "github"
},
"original": {
"owner": "vpsfreecz",
"repo": "netlinkrb",
"type": "github"
}
},
"nix-index-database": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -559,11 +575,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780816331, "lastModified": 1783233851,
"narHash": "sha256-0BYqs8yKWkOz2Q7+SP18N5E5gmDKSo6LSxIVIa0wWes=", "narHash": "sha256-jzisD+3wWZPC4QvAsKtYguiGsmlH2SN3Mjx5LWd68Ok=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "1a2ea89c917781e88508d9fd2b507f2d2a0e173c", "rev": "fab14c7b63499d57cb6673d5690168c3ec42b99a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -582,11 +598,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780704867, "lastModified": 1781301671,
"narHash": "sha256-JuatomIQeXXZhdfEnBid9VoWyh6IfQgTE/FsM94UsRk=", "narHash": "sha256-rq6WOopxq3U2AGEWO80o9LIJDYcYIdgw6jyl+y+19w8=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "da29f6cc3d7e15eb7bfdae599918851cbd5ea142", "rev": "661ec59a97ccee13a63f79280b282eb6f7d3f817",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -614,12 +630,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1780749050, "lastModified": 1783224372,
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=", "narHash": "sha256-FGQ8TfSm9WviNE/fQAWsKs+y4GkX8fU4EScewpw54Y8=",
"owner": "NixOS", "rev": "d407951447dcd00442e97087bf374aad70c04cea",
"repo": "nixpkgs", "type": "tarball",
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb", "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1027867.d407951447dc/nixexprs.tar.xz"
"type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
@ -629,11 +644,11 @@
}, },
"nixpkgsUnstable": { "nixpkgsUnstable": {
"locked": { "locked": {
"lastModified": 1780749050, "lastModified": 1783224372,
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=", "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb", "rev": "d407951447dcd00442e97087bf374aad70c04cea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -707,12 +722,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1780902259, "lastModified": 1783148766,
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=", "narHash": "sha256-H9+N+GFtsbVC8ZniHliChM7ndizxtqVZs6bnGOLM3WQ=",
"owner": "NixOS", "rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030",
"repo": "nixpkgs", "type": "tarball",
"rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca", "url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.4193.a50de1b7d8a5/nixexprs.tar.xz"
"type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
@ -754,11 +768,11 @@
}, },
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1780734595, "lastModified": 1783148766,
"narHash": "sha256-DmTfP92QFYRLOGXlMIE54MAgxSJjDWocl3gRNOu72Os=", "narHash": "sha256-uslt2pqShTIXDdAHRHv2QkYLsVdY8Oqwz0EA48/RSM8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9b696460ac78b5ccfc17c854d8c976f20456e943", "rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -844,6 +858,23 @@
"youre-wrong": "youre-wrong" "youre-wrong": "youre-wrong"
} }
}, },
"ruby-lxc": {
"flake": false,
"locked": {
"lastModified": 1780499941,
"narHash": "sha256-guAdOSP9MyCL3BQ1LGXAhcCoXgEU1fUE69d2ATMqUGE=",
"owner": "vpsfreecz",
"repo": "ruby-lxc",
"rev": "004bf35eb90d41ba60b347b5b1e73d868a4f95d9",
"type": "github"
},
"original": {
"owner": "vpsfreecz",
"ref": "2026-06-03-nixos-26-05-port",
"repo": "ruby-lxc",
"type": "github"
}
},
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -895,11 +926,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1783174389,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1056,15 +1087,17 @@
"vpsadminos": { "vpsadminos": {
"inputs": { "inputs": {
"impermanence": "impermanence", "impermanence": "impermanence",
"netlinkrb": "netlinkrb",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"nixpkgsUnstable": "nixpkgsUnstable" "nixpkgsUnstable": "nixpkgsUnstable",
"ruby-lxc": "ruby-lxc"
}, },
"locked": { "locked": {
"lastModified": 1780902784, "lastModified": 1783331081,
"narHash": "sha256-xqY+ApLpKx8/sVGx6a6Tt1NUqU8FPaNlitR3R396HFo=", "narHash": "sha256-sJS1tI/SqjOGBm/8RqEIi7M/rSFVtzTIshYdZYmPqWA=",
"owner": "vpsfreecz", "owner": "vpsfreecz",
"repo": "vpsadminos", "repo": "vpsadminos",
"rev": "a791e6b372bb0fb6c9ffd65383517c140f510f8b", "rev": "849282e6be436743a47fb0e592041e6fba9ad41f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -63,6 +63,8 @@ in
"zenpower" "zenpower"
]; ];
boot.kernelPackages = pkgs.linuxPackages_7_1;
systemd.sleep.settings.Sleep = { systemd.sleep.settings.Sleep = {
HibernateDelaySec = "30s"; HibernateDelaySec = "30s";
SuspendState = "mem"; SuspendState = "mem";
@ -120,9 +122,14 @@ in
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
services.udev.extraRules = '' services.udev.extraRules = ''
# Arm all USB root hubs (vendor 1d6b) so any USB device can wake the system.
# Wakeup only fires if the device on the end also has wakeup enabled, so we still
# disable it individually for devices that must NOT wake the system (see below).
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="1d6b" ATTR{power/wakeup}="enabled"
# Fix broken suspend with Logitech USB dongle # Fix broken suspend with Logitech USB dongle
# The mouse/mousepad receiver wakes the system right after suspend, so disable its wakeup.
# `lsusb | grep Logitech` will return "vendor:product" # `lsusb | grep Logitech` will return "vendor:product"
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled" ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c53a" ATTR{power/wakeup}="disabled"
# Force all disks to use kyber scheduler # Force all disks to use kyber scheduler
# For some reason "noop" is used by default which is kinda bad when io is saturated # For some reason "noop" is used by default which is kinda bad when io is saturated
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="kyber" ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="kyber"

View file

@ -71,11 +71,6 @@ rec {
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ]; patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
}); });
}; };
deluge = prev.deluge.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [
prev.libappindicator-gtk3
];
});
} }
); );

View file

@ -1,10 +1,10 @@
{ factorio-headless, pkgs }: { factorio-headless, pkgs }:
factorio-headless.overrideAttrs (_: rec { factorio-headless.overrideAttrs (_: rec {
version = "2.0.76"; version = "2.0.77";
src = pkgs.fetchurl { src = pkgs.fetchurl {
name = "factorio_headless_x64-${version}.tar.xz"; name = "factorio_headless_x64-${version}.tar.xz";
url = "https://www.factorio.com/get-download/${version}/headless/linux64"; url = "https://www.factorio.com/get-download/${version}/headless/linux64";
hash = "sha256-7zZj9mFG12NC98CaP3Q3kmNvjNlcOeomz8pb0uDpJDA="; hash = "sha256-xO/BFSn3TTfJaTPikeDbc/2fWqRziRPZMBskaAs+lH8=";
}; };
}) })

View file

@ -146,6 +146,16 @@
xorg.setxkbmap xorg.setxkbmap
jq jq
]; ];
kde-sync-xkbmap = [
xorg.setxkbmap
dbus
gnugrep
gnused
gawk
];
obs-studio-autostart = [
obs-studio
];
print-battery-icon = [ ]; print-battery-icon = [ ];
controller-battery = [ print-battery-icon ]; controller-battery = [ print-battery-icon ];
mouse-battery = [ print-battery-icon ]; mouse-battery = [ print-battery-icon ];

51
scripts/kde-sync-xkbmap Executable file
View file

@ -0,0 +1,51 @@
#!/bin/sh
set -euo pipefail
get_layout_display_name() {
idx="$1"
dbus-send --session --print-reply --dest=org.kde.keyboard /Layouts org.kde.KeyboardLayouts.getLayoutsList 2>/dev/null \
| grep 'string "' \
| sed 's/.*string "\([^"]*\)".*/\1/' \
| awk -v idx="$idx" 'NR%3==0 { if (c++ == idx) { print; exit } }'
}
get_layout_index() {
dbus-send --session --print-reply --dest=org.kde.keyboard /Layouts org.kde.KeyboardLayouts.getLayout 2>/dev/null \
| awk '/uint32/ { print $2; exit }'
}
LAST_LAYOUT=""
apply_layout() {
idx="$1"
CURRENT_LAYOUT=$(get_layout_display_name "$idx")
if test "$LAST_LAYOUT" = "$CURRENT_LAYOUT"; then
return 0
elif test "$CURRENT_LAYOUT" = "English (Colemak)"; then
echo "Setting layout to colemak"
setxkbmap us colemak
elif test "$CURRENT_LAYOUT" = "Portuguese (Brazil)"; then
echo "Setting layout to br"
setxkbmap br
fi
LAST_LAYOUT="$CURRENT_LAYOUT"
}
update_layout() {
INDEX=$(get_layout_index)
apply_layout "$INDEX"
}
while ! get_layout_index; do
sleep 1s
done
update_layout
dbus-monitor --session \
"type='signal',interface='org.kde.KeyboardLayouts',member='layoutChanged',path='/Layouts'" \
| while read -r line; do
update_layout
done

6
scripts/obs-studio-autostart Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
# The --disable-shutdown-check has been removed apparently
rm -rf "$HOME/.config/obs-studio/.sentinel"
exec obs --startreplaybuffer "$@"

View file

@ -17,6 +17,7 @@ in
unstable.yt-dlp unstable.yt-dlp
ffmpeg ffmpeg
obs-studio obs-studio
obs-studio-autostart
imagemagick imagemagick
mpc mpc
crosspipe crosspipe

View file

@ -4,6 +4,9 @@
config, config,
... ...
}: }:
lib.mkIf (config.my.desktop == "kde") { {
imports = [ ./kde/kde-sync-xkbmap.nix ];
}
// lib.mkIf (config.my.desktop == "kde") {
services.gpg-agent.pinentry.package = lib.mkForce pkgs.pinentry-qt; services.gpg-agent.pinentry.package = lib.mkForce pkgs.pinentry-qt;
} }

View file

@ -0,0 +1,22 @@
{
config,
pkgs,
lib,
...
}:
lib.mkIf (config.my.desktop == "kde") {
systemd.user.services.kde-sync-xkbmap = {
Unit = {
Description = "Sync xkbmap with KDE keyboard layout";
PartOf = [ "plasma-workspace.target" ];
After = [ "plasma-workspace.target" ];
};
Service = {
ExecStart = lib.getExe pkgs.kde-sync-xkbmap;
Restart = "on-failure";
};
Install = {
WantedBy = [ "plasma-workspace.target" ];
};
};
}