Compare commits
4 commits
f2f4a01c6a
...
5062c28d4f
Author | SHA1 | Date | |
---|---|---|---|
5062c28d4f | |||
2a4f056aaa | |||
9828e1366d | |||
f246c31794 |
16
flake.lock
16
flake.lock
|
@ -469,6 +469,21 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1726937504,
|
||||
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"plymouth-themes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -512,6 +527,7 @@
|
|||
"nix-index-database": "nix-index-database",
|
||||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"plymouth-themes": "plymouth-themes",
|
||||
"ranger-icons": "ranger-icons",
|
||||
"tlauncher": "tlauncher",
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
description = "My system config";
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
@ -157,7 +159,10 @@
|
|||
};
|
||||
phantom = lib.nixosSystem {
|
||||
inherit system specialArgs;
|
||||
modules = [ ./hosts/phantom ];
|
||||
modules = [
|
||||
{ nixpkgs.pkgs = pkgs; }
|
||||
./hosts/phantom
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ in
|
|||
|
||||
hardware.opentabletdriver.enable = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [
|
||||
|
|
|
@ -1,12 +1,40 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Replace with unstable, since 24.05 does not have sig-helper
|
||||
disabledModules = [ "services/web-apps/invidious.nix" ];
|
||||
imports = [ (inputs.nixpkgs-unstable + "/nixos/modules/services/web-apps/invidious.nix") ];
|
||||
|
||||
services.invidious = {
|
||||
enable = true;
|
||||
domain = "invidious.lelgenio.com";
|
||||
nginx.enable = true;
|
||||
port = 10601;
|
||||
settings.db = {
|
||||
user = "invidious";
|
||||
dbname = "invidious";
|
||||
http3-ytproxy.enable = true;
|
||||
sig-helper = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.inv-sig-helper;
|
||||
};
|
||||
# {
|
||||
# "visitor_data": "...",
|
||||
# "po_token": "..."
|
||||
# }
|
||||
extraSettingsFile = config.age.secrets.phantom-invidious-settings.path;
|
||||
settings = {
|
||||
force_resolve = "ipv6";
|
||||
db = {
|
||||
user = "invidious";
|
||||
dbname = "invidious";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.phantom-invidious-settings = {
|
||||
file = ../../secrets/phantom-invidious-settings.age;
|
||||
mode = "666";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
rec {
|
||||
all = [
|
||||
scripts
|
||||
unstable
|
||||
themes
|
||||
new-packages
|
||||
patches
|
||||
|
@ -11,6 +12,10 @@ rec {
|
|||
|
||||
scripts = (import ../scripts);
|
||||
|
||||
unstable = final: prev: {
|
||||
unstable = import inputs.nixpkgs-unstable { inherit (final) system config; };
|
||||
};
|
||||
|
||||
themes = (
|
||||
final: prev: {
|
||||
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
libinput
|
||||
libratbag
|
||||
];
|
||||
vrr-fullscreen = [ ];
|
||||
}
|
||||
// lib.mapAttrs importScript {
|
||||
wdmenu = ./wdmenu.nix;
|
||||
|
|
28
scripts/vrr-fullscreen
Executable file
28
scripts/vrr-fullscreen
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# List of supported outputs for VRR
|
||||
output_vrr_whitelist=(
|
||||
"DP-1"
|
||||
"DP-2"
|
||||
)
|
||||
|
||||
# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop
|
||||
swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do
|
||||
window_event=$(echo ${window_json} | jq -r '.change')
|
||||
|
||||
# Process only focus change and fullscreen toggle
|
||||
if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then
|
||||
output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)')
|
||||
output_name=$(echo ${output_json} | jq -r '.name')
|
||||
|
||||
# Use only VRR in whitelisted outputs
|
||||
if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then
|
||||
output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status')
|
||||
window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode')
|
||||
|
||||
# Only update output if nesseccary to avoid flickering
|
||||
[[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1
|
||||
[[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0
|
||||
fi
|
||||
fi
|
||||
done
|
16
secrets/phantom-invidious-settings.age
Normal file
16
secrets/phantom-invidious-settings.age
Normal file
|
@ -0,0 +1,16 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-rsa BwwxHg
|
||||
iTcgtxF1IxopbtF+aw7V8IQfH7tWiMk9lE/eWlVHVjeaRvER5W6Y3xZNOFCjtbqY
|
||||
VwEyV6ibfZ4GJt1jRu2icEH/AnLUJFFGQnxu/K/rtoZ3tqSIk9WCBv3aPo4oZRiU
|
||||
uaaxi2gD8qo1RLyl/Ij7Djw4i/isUOO1EON5sgx1d39k6qUD4Mak0DSU4EtGdTsr
|
||||
OaxDAc0kAxhxZQOUH/QlKa0HLonaFcy1LHqvttOcw3UZuZnaYfZiPlcqe3USS9cm
|
||||
96aIC5cS9pHr4JFrqRYvfpla2TY5jlCB/xBGw3KjGEIQoBPXSsJZA6BCMZyp00++
|
||||
tdfS2aomt9HFmb1wZDS0jWAxkVF6nXXBbolFVih+58h0nYLljtHIQ3SizRoXY459
|
||||
x3JE9NReHp2OO3SlIeO03Kv8YMBvj7nSSd1C1PMpu+hJ/eCXi1WQxD6QY+40muk6
|
||||
KhqE3PZ8BCY2b+VpywUF5gVH28mo3jscqAzhf2dZ3SQlzldI+hFyKPxTdAqkfUOH
|
||||
|
||||
--- cinb+wzjVfTkpfm1CtFIFaepwoQVCj1MquB5rAC45Ew
|
||||
¾
|
||||
6
|
||||
ZCþHS07ïºÖóýE¼X*Àqb=üOßíÛÉwu¥¤³Pºþ¹Ùçǖѳ/£ómvòÞ×Ë2VœÄ«
|
||||
ÁŠxvç[“£‚µ£±”Ì‚A~ evdÓåÙ0¢Œni³1Ò›¹Qý„"í@Ù¹§ÞÔ{KpÐ:åϵuµsÊÎBñò(X…r[ÂQVg¢Tš¤°ðœîËï@Ä*ÇõÿíB«<>.§¯žhE鲟èÐë’÷½¥Žûzlz|kã`l8‘´8¼M›cch<63>îáZ`ƒ ?yeoƒ+ÈM-:/–À**ìè¦ÊcŸÎZD¡2Ñá¼é&·÷¾Ç¢¹£e¤ï*Hnç"Þ~+|ua(û6óËJ
|
|
@ -17,4 +17,5 @@ in
|
|||
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
||||
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
||||
"phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
||||
"phantom-invidious-settings.age".publicKeys = [ main_ssh_public_key ];
|
||||
}
|
||||
|
|
|
@ -69,9 +69,9 @@ in
|
|||
};
|
||||
output = {
|
||||
"*" = {
|
||||
adaptive_sync = "off";
|
||||
bg = "${theme.background} fill";
|
||||
mode = "1920x1080@144.000Hz";
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
|
@ -122,6 +122,21 @@ in
|
|||
indicator = true;
|
||||
};
|
||||
|
||||
systemd.user.services.vrr-fullscreen = {
|
||||
Unit = {
|
||||
Description = "Enable VRR for fullscreen windows";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe pkgs.vrr-fullscreen}";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "sway-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent.pinentryPackage = pkgs.pinentry-all;
|
||||
|
||||
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
|
||||
|
|
Loading…
Reference in a new issue