This commit is contained in:
chayleaf 2024-03-19 15:30:38 +07:00
parent 9780a25072
commit dec44e52b7
Signed by: chayleaf
GPG key ID: 78171AD46227E68E
17 changed files with 986 additions and 7089 deletions

View file

@ -94,11 +94,11 @@
"flake-compat_3": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668681692, "lastModified": 1696426674,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -112,11 +112,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1704982712, "lastModified": 1709336216,
"narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "07f6395285469419cf9d078f59b5b49993198c00", "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -127,14 +127,14 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1705309234,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -150,11 +150,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1707204789, "lastModified": 1707205587,
"narHash": "sha256-S3QVfyUPa7zzeyk0TAqr9i9FLwnaO/6zPx4DVCNEeqA=", "narHash": "sha256-WzAIbYbflluERLdPC/5epdodjQbR5WiduYS3BjIiGis=",
"owner": "chayleaf", "owner": "chayleaf",
"repo": "home-manager", "repo": "home-manager",
"rev": "8abb90abf382972e8cd2f3c3b3cdc93c1502b067", "rev": "acc7c52f80f1aa33239272d786a6e9ba2ffef9f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -166,11 +166,11 @@
}, },
"impermanence": { "impermanence": {
"locked": { "locked": {
"lastModified": 1703656108, "lastModified": 1708968331,
"narHash": "sha256-hCSUqdFJKHHbER8Cenf5JRzjMlBjIdwdftGQsO0xoJs=", "narHash": "sha256-VUXLaPusCBvwM3zhGbRIJVeYluh2uWuqtj4WirQ1L9Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "impermanence", "repo": "impermanence",
"rev": "033643a45a4a920660ef91caa391fbffb14da466", "rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -204,11 +204,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706482802, "lastModified": 1710810847,
"narHash": "sha256-KXwKTfqFkoPpV8QqaVlpmO8w8rD/jHZL2315RL5QQ8w=", "narHash": "sha256-l1DacjuZny7i7YRbxIsa6DhXWoKJZEnM3Em8gt6Fsfk=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "8f354ef64cd18898b8980ecf7fe90118808b514b", "rev": "03d036f41beaa8c31b2b2261918d248f5c4d45c8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -224,11 +224,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706411424, "lastModified": 1710644923,
"narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", "narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", "rev": "e25efda85e39fcdc845e371971ac4384989c4295",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -239,11 +239,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1706182238, "lastModified": 1710783728,
"narHash": "sha256-Ti7CerGydU7xyrP/ow85lHsOpf+XMx98kQnPoQCSi1g=", "narHash": "sha256-eIsfu3c9JUBgm3cURSKTXLEI9Dlk1azo+MWKZVqrmkc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f84eaffc35d1a655e84749228cde19922fcf55f1", "rev": "1e679b9a9970780cd5d4dfe755a74a8f96d33388",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -259,20 +259,14 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-23_05": [
"nixpkgs"
],
"nixpkgs-23_11": [
"nixpkgs"
],
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1706219574, "lastModified": 1710449465,
"narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", "narHash": "sha256-2orO8nfplp6uQJBFqKkj1iyNMC6TysmwbWwbb4osTag=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", "rev": "79c8cfcd5873a85559da6201b116fb38b490d030",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -288,11 +282,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706386221, "lastModified": 1710972558,
"narHash": "sha256-fMBhmJqm6yihdweMmi+NPV4SFj2WXOQSpAwfKoLGyRE=", "narHash": "sha256-fA72ql4T4/KgSNxZwZJ1EoEHXjmwt7I/OukHC8NVVF0=",
"owner": "chayleaf", "owner": "chayleaf",
"repo": "nixos-router", "repo": "nixos-router",
"rev": "af7d975e755702b649a386c57b44665d56c80d7a", "rev": "061cf097417ed363b1e23d11daa7192e4b5f1994",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -303,15 +297,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1706628962, "lastModified": 1710918168,
"narHash": "sha256-BBbgY5OsYMxithcHtoulfAJHTmNxQ41Gr99cHZo4yOM=", "narHash": "sha256-T4cnIzAtHDIPlMkiooqv5xOCtE6y6b+KF2A/Iwfy5P4=",
"owner": "chayleaf", "owner": "chayleaf",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a98311cb973d73718e004461d57635b23f632af", "rev": "2b98d841ceb071e7297844f015dba0ff89fec931",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "chayleaf", "owner": "chayleaf",
"ref": "ci",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -319,11 +314,11 @@
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1703961334, "lastModified": 1709237383,
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -376,11 +371,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1706607970, "lastModified": 1710967499,
"narHash": "sha256-q5W32qx3HhozhAT75AerVqOnhgvNrSyFrjAlu4qNYCU=", "narHash": "sha256-f5Ro10NEDq+aZPrSO5f+Hg40iD4BOx2U8NJGomnCqi8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "d7e286c21530da5d6da54424d64e15de14f7c07a", "rev": "5ee15db66832970cf391e0c18392779a57a79605",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -416,11 +411,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706580650, "lastModified": 1710900660,
"narHash": "sha256-e6q4Pn1dp3NoQJdMYdyNdDHU5IRBW9i3bHSJ3jThEL0=", "narHash": "sha256-PcHmHQvKIOdvAxlqxZ/DPmUMhUUvfp16pRtyW148u/0=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "39e20b3c02caa91c9970beef325a04975d83d77f", "rev": "549f4db17b5c0c143b1308fcfe9620129c387472",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -444,13 +439,31 @@
"type": "github" "type": "github"
} }
}, },
"utils": { "systems_2": {
"locked": { "locked": {
"lastModified": 1605370193, "lastModified": 1681028828,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d", "rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,7 +4,7 @@
inputs = { inputs = {
#nixpkgs.url = "github:NixOS/nixpkgs/3dc2b4f8166f744c3b3e9ff8224e7c5d74a5424f"; #nixpkgs.url = "github:NixOS/nixpkgs/3dc2b4f8166f744c3b3e9ff8224e7c5d74a5424f";
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:chayleaf/nixpkgs"; nixpkgs.url = "github:chayleaf/nixpkgs/ci";
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
nix-index-database = { nix-index-database = {
url = "github:nix-community/nix-index-database"; url = "github:nix-community/nix-index-database";
@ -48,10 +48,6 @@
nixos-mailserver = { nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
# prevent extra input from being in flake.lock
# (this doesn't affect any behavior)
inputs.nixpkgs-23_05.follows = "nixpkgs";
inputs.nixpkgs-23_11.follows = "nixpkgs";
}; };
flake-compat = { flake-compat = {
url = "github:edolstra/flake-compat"; url = "github:edolstra/flake-compat";

View file

@ -185,17 +185,10 @@
input-default-bindings = false; input-default-bindings = false;
}; };
# profiles = { }; # profiles = { };
package = pkgs.wrapMpv ((pkgs.mpv-unwrapped.override { package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override {
# webp support # many features aren't supported by normal ffmpeg
ffmpeg = pkgs.ffmpeg-full; ffmpeg = pkgs.ffmpeg-full;
}).overrideAttrs (old: { }) {
patches = old.patches or [] ++ [
(pkgs.fetchpatch {
url = "https://github.com/mpv-player/mpv/pull/11648.patch";
hash = "sha256-rp5VxVD74dY3w5rKct1BwFbruxpHsGk8zwtkkhdJovM=";
})
];
})) {
scripts = with pkgs.mpvScripts; [ scripts = with pkgs.mpvScripts; [
thumbnail thumbnail
mpris mpris

View file

@ -1,5 +1,5 @@
diff --git a/include/sway/config.h b/include/sway/config.h diff --git a/include/sway/config.h b/include/sway/config.h
index aa58da53..223efae0 100644 index f9da1967..fa2d8858 100644
--- a/include/sway/config.h --- a/include/sway/config.h
+++ b/include/sway/config.h +++ b/include/sway/config.h
@@ -50,6 +50,7 @@ enum binding_flags { @@ -50,6 +50,7 @@ enum binding_flags {
@ -24,10 +24,10 @@ index 979e178f..d17458ea 100644
break; break;
} }
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index c3bf4fbb..78ef8e61 100644 index 8927287f..3faff953 100644
--- a/sway/input/keyboard.c --- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c +++ b/sway/input/keyboard.c
@@ -162,8 +162,9 @@ static void get_active_binding(const struct sway_shortcut_state *state, @@ -161,8 +161,9 @@ static void get_active_binding(const struct sway_shortcut_state *state,
bool binding_locked = (binding->flags & BINDING_LOCKED) != 0; bool binding_locked = (binding->flags & BINDING_LOCKED) != 0;
bool binding_inhibited = (binding->flags & BINDING_INHIBITED) != 0; bool binding_inhibited = (binding->flags & BINDING_INHIBITED) != 0;
bool binding_release = binding->flags & BINDING_RELEASE; bool binding_release = binding->flags & BINDING_RELEASE;
@ -38,7 +38,7 @@ index c3bf4fbb..78ef8e61 100644
release != binding_release || release != binding_release ||
locked > binding_locked || locked > binding_locked ||
inhibited > binding_inhibited || inhibited > binding_inhibited ||
@@ -175,7 +176,42 @@ static void get_active_binding(const struct sway_shortcut_state *state, @@ -174,7 +175,42 @@ static void get_active_binding(const struct sway_shortcut_state *state,
} }
bool match = false; bool match = false;
@ -83,21 +83,18 @@ index c3bf4fbb..78ef8e61 100644
for (size_t j = 0; j < state->npressed; j++) { for (size_t j = 0; j < state->npressed; j++) {
uint32_t key = *(uint32_t *)binding->keys->items[j]; uint32_t key = *(uint32_t *)binding->keys->items[j];
diff --git a/sway/sway.5.scd b/sway/sway.5.scd diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 25082c41..268e0526 100644 index 7e58b528..794965b9 100644
--- a/sway/sway.5.scd --- a/sway/sway.5.scd
+++ b/sway/sway.5.scd +++ b/sway/sway.5.scd
@@ -389,8 +389,8 @@ runtime. @@ -390,6 +390,7 @@ runtime.
for_window <criteria> move container to output <output>
*bindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \ *bindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \
-[--to-code] [--input-device=<device>] [--no-warn] [--no-repeat] [Group<1-4>+]<key combo> \ [--to-code] [--input-device=<device>] [--no-warn] [--no-repeat] [--inhibited] \
-<command> +[--allow-other] \
+[--to-code] [--input-device=<device>] [--no-warn] [--no-repeat] [--allow-other] \ [Group<1-4>+]<key combo> <command>
+[Group<1-4>+]<key combo> <command>
Binds _key combo_ to execute the sway command _command_ when pressed. You Binds _key combo_ to execute the sway command _command_ when pressed. You
may use XKB key names here (*wev*(1) is a good tool for discovering these). may use XKB key names here (*wev*(1) is a good tool for discovering these).
With the flag _--release_, the command is executed when the key combo is @@ -419,6 +420,11 @@ runtime.
@@ -419,6 +419,11 @@ runtime.
repeatedly when the key is held, according to the repeat repeatedly when the key is held, according to the repeat
settings specified in the input configuration. settings specified in the input configuration.

View file

@ -22,24 +22,24 @@
"pinned": false, "pinned": false,
"src": { "src": {
"name": null, "name": null,
"sha256": "sha256-5fEYhazqXcMENjp+37IcF5U81vZ9bPDkS0siUVi9mdg=", "sha256": "sha256-wCIffeayOy3kEwmIKB7e+NrliuSpKXoVYC334fxVB3U=",
"type": "url", "type": "url",
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-27/GE-Proton8-27.tar.gz" "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-1/GE-Proton9-1.tar.gz"
}, },
"version": "GE-Proton8-27" "version": "GE-Proton9-1"
}, },
"searxng": { "searxng": {
"cargoLocks": null, "cargoLocks": null,
"date": "2024-01-25", "date": "2024-03-15",
"extract": null, "extract": null,
"name": "searxng", "name": "searxng",
"passthru": null, "passthru": null,
"pinned": false, "pinned": false,
"src": { "src": {
"sha256": "sha256-QW1xC6RsHpn5P/QHjyc3O24tSmLvRCVIJwNqPyp1DV0=", "sha256": "sha256-BqVnp/lByAMr/LOCGkuXCYsomu9hRBGXK3DbBQX10TA=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/searxng/searxng/archive/8c73aa772b7d4446f77be82d8f9d9eef1e348deb.tar.gz" "url": "https://github.com/searxng/searxng/archive/e2af3e49702f6fb40e1614f826544dc3b03bca2f.tar.gz"
}, },
"version": "8c73aa772b7d4446f77be82d8f9d9eef1e348deb" "version": "e2af3e49702f6fb40e1614f826544dc3b03bca2f"
} }
} }

View file

@ -12,19 +12,19 @@
}; };
proton-ge = { proton-ge = {
pname = "proton-ge"; pname = "proton-ge";
version = "GE-Proton8-27"; version = "GE-Proton9-1";
src = fetchurl { src = fetchurl {
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-27/GE-Proton8-27.tar.gz"; url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-1/GE-Proton9-1.tar.gz";
sha256 = "sha256-5fEYhazqXcMENjp+37IcF5U81vZ9bPDkS0siUVi9mdg="; sha256 = "sha256-wCIffeayOy3kEwmIKB7e+NrliuSpKXoVYC334fxVB3U=";
}; };
}; };
searxng = { searxng = {
pname = "searxng"; pname = "searxng";
version = "8c73aa772b7d4446f77be82d8f9d9eef1e348deb"; version = "e2af3e49702f6fb40e1614f826544dc3b03bca2f";
src = fetchTarball { src = fetchTarball {
url = "https://github.com/searxng/searxng/archive/8c73aa772b7d4446f77be82d8f9d9eef1e348deb.tar.gz"; url = "https://github.com/searxng/searxng/archive/e2af3e49702f6fb40e1614f826544dc3b03bca2f.tar.gz";
sha256 = "sha256-QW1xC6RsHpn5P/QHjyc3O24tSmLvRCVIJwNqPyp1DV0="; sha256 = "sha256-BqVnp/lByAMr/LOCGkuXCYsomu9hRBGXK3DbBQX10TA=";
}; };
date = "2024-01-25"; date = "2024-03-15";
}; };
} }

View file

@ -17,16 +17,16 @@
"tabs" "tabs"
"declarativeNetRequestWithHostAccess" "declarativeNetRequestWithHostAccess"
"<all_urls>" "<all_urls>"
]; ];
platforms = platforms.all; platforms = platforms.all;
};
}; };
};
"rikaitan" = buildFirefoxXpiAddon { "rikaitan" = buildFirefoxXpiAddon {
pname = "rikaitan"; pname = "rikaitan";
version = "24.1.22.0"; version = "24.3.7.1";
addonId = "tatsu@autistici.org"; addonId = "tatsu@autistici.org";
url = "https://addons.mozilla.org/firefox/downloads/file/4224979/rikaitan-24.1.22.0.xpi"; url = "https://addons.mozilla.org/firefox/downloads/file/4246908/rikaitan-24.3.7.1.xpi";
sha256 = "7df217a68077d45b9f41fe0170193c9224abc2a543c121429ebef4e7e857b0df"; sha256 = "db849343b029b2f1b510cc66032157502e3fe9e6168072d27e8aad9867b6ec17";
meta = with lib; meta = with lib;
{ {
homepage = "https://github.com/Ajatt-Tools/rikaitan"; homepage = "https://github.com/Ajatt-Tools/rikaitan";
@ -41,10 +41,10 @@
"http://*/*" "http://*/*"
"https://*/*" "https://*/*"
"file://*/*" "file://*/*"
]; ];
platforms = platforms.all; platforms = platforms.all;
};
}; };
};
"youtube-nonstop" = buildFirefoxXpiAddon { "youtube-nonstop" = buildFirefoxXpiAddon {
pname = "youtube-nonstop"; pname = "youtube-nonstop";
version = "0.9.2"; version = "0.9.2";
@ -59,8 +59,8 @@
mozPermissions = [ mozPermissions = [
"https://www.youtube.com/*" "https://www.youtube.com/*"
"https://music.youtube.com/*" "https://music.youtube.com/*"
]; ];
platforms = platforms.all; platforms = platforms.all;
};
}; };
} };
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package] [package]
name = "home-daemon" name = "home-daemon"
version = "0.1.0" version = "0.2.0"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -9,6 +9,7 @@ edition = "2021"
zbus = { version = "3", features = ["tokio"] } zbus = { version = "3", features = ["tokio"] }
futures-util = "0.3" futures-util = "0.3"
swayipc-async = "2" swayipc-async = "2"
cpal = "0.15"
[dependencies.tokio] [dependencies.tokio]
version = "1" version = "1"

View file

@ -1,9 +1,18 @@
{ lib, rustPlatform, nix-gitignore }: { lib
, rustPlatform
, nix-gitignore
, pkg-config
, alsa-lib
}:
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
pname = "home-daemon"; pname = "home-daemon";
version = "0.1"; version = "0.2.0";
src = nix-gitignore.gitignoreSource ["/target" "default.nix"] (lib.cleanSource ./.); nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib ];
src = nix-gitignore.gitignoreSource [ "/target" "default.nix" ] ./.;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;

View file

@ -1,8 +1,8 @@
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {}, lib ? pkgs.lib }:
pkgs.mkShell { pkgs.mkShell rec {
name = "shell-rust"; name = "shell-rust";
buildInputs = [ nativeBuildInputs = with pkgs; [ pkg-config rustc cargo ];
pkgs.rustc pkgs.cargo buildInputs = with pkgs; [ alsa-lib ];
]; LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
} }

View file

@ -1,3 +1,4 @@
use cpal::{traits::{DeviceTrait, HostTrait, StreamTrait}, SampleFormat};
use futures_util::stream::StreamExt; use futures_util::stream::StreamExt;
use std::collections::HashSet; use std::collections::HashSet;
use swayipc_async::{Connection, Event, EventType, WindowChange}; use swayipc_async::{Connection, Event, EventType, WindowChange};
@ -8,14 +9,26 @@ async fn main() {
let _ses_dbus = Box::leak(Box::new(zbus::Connection::session().await.unwrap())); let _ses_dbus = Box::leak(Box::new(zbus::Connection::session().await.unwrap()));
let mut handlers = Vec::<Box<dyn SwayIpcHandler>>::new(); let mut handlers = Vec::<Box<dyn SwayIpcHandler>>::new();
let mut panic = true;
for args in std::env::args().skip(1) { for args in std::env::args().skip(1) {
handlers.push(match args.as_str() { handlers.push(match args.as_str() {
"system76-scheduler" => Box::new(System76::new(sys_dbus).await), "system76-scheduler" => Box::new(System76::new(sys_dbus).await),
"empty-sound" => {
panic = false;
tokio::spawn(async {
play_empty_sound().await;
});
continue;
}
_ => panic!("handler not supported"), _ => panic!("handler not supported"),
}) })
} }
if handlers.is_empty() { if handlers.is_empty() {
panic!("no handlers set up"); if panic {
panic!("no handlers set up");
} else {
futures_util::future::pending::<()>().await;
}
} }
let mut subs = HashSet::new(); let mut subs = HashSet::new();
@ -29,11 +42,11 @@ async fn main() {
} }
} }
async fn start(subs: &[EventType], handlers: &mut [Box<dyn SwayIpcHandler>]) -> Result<(), swayipc_async::Error> { async fn start(
let mut events = Connection::new() subs: &[EventType],
.await? handlers: &mut [Box<dyn SwayIpcHandler>],
.subscribe(&subs) ) -> Result<(), swayipc_async::Error> {
.await?; let mut events = Connection::new().await?.subscribe(&subs).await?;
while let Some(event) = events.next().await { while let Some(event) = events.next().await {
match event { match event {
Ok(event) => { Ok(event) => {
@ -44,15 +57,48 @@ async fn start(subs: &[EventType], handlers: &mut [Box<dyn SwayIpcHandler>]) ->
Err(err) => match err { Err(err) => match err {
swayipc_async::Error::Io(_) swayipc_async::Error::Io(_)
| swayipc_async::Error::InvalidMagic(_) | swayipc_async::Error::InvalidMagic(_)
| swayipc_async::Error::SubscriptionFailed(_) | swayipc_async::Error::SubscriptionFailed(_) => return Err(err),
=> return Err(err),
_ => {} _ => {}
} },
} }
} }
Ok(()) Ok(())
} }
async fn play_empty_sound() {
let device = cpal::default_host()
.default_output_device()
.expect("no output device available");
let supported_config = device
.supported_output_configs()
.unwrap()
.find(|config| {
config.sample_format() == SampleFormat::F32
&& (config.min_sample_rate()..=config.max_sample_rate())
.contains(&cpal::SampleRate(44100))
&& config.channels() == 1
})
.unwrap()
.with_sample_rate(cpal::SampleRate(44100));
let config = supported_config.into();
let stream = Box::leak(Box::new(
device
.build_output_stream(
&config,
|data: &mut [f32], _: &cpal::OutputCallbackInfo| {
for sample in data.iter_mut() {
*sample = 1.0 / 1985.0;
}
},
|err| eprintln!("an error occurred on the output audio stream: {}", err),
None,
)
.unwrap(),
));
stream.play().unwrap();
futures_util::future::pending::<()>().await;
}
trait SwayIpcHandler { trait SwayIpcHandler {
fn register(&mut self, subs: &mut HashSet<EventType>); fn register(&mut self, subs: &mut HashSet<EventType>);
fn handle(&mut self, event: &Event); fn handle(&mut self, event: &Event);
@ -97,4 +143,3 @@ impl SwayIpcHandler for System76<'static> {
} }
} }
} }

View file

@ -1,10 +1,10 @@
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index b60aa1f8934..0e3191950d5 100644 index e6cf3e5d63c..54d5d7c10e4 100644
--- a/arch/arm64/configs/defconfig --- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig
@@ -1317,8 +1317,9 @@ CONFIG_QCOM_AOSS_QMP=y @@ -1351,8 +1351,9 @@ CONFIG_MTK_SVS=m
CONFIG_QCOM_AOSS_QMP=y
CONFIG_QCOM_COMMAND_DB=y CONFIG_QCOM_COMMAND_DB=y
CONFIG_QCOM_CPR=y
CONFIG_QCOM_GENI_SE=y CONFIG_QCOM_GENI_SE=y
-CONFIG_QCOM_LLCC=m -CONFIG_QCOM_LLCC=m
-CONFIG_QCOM_OCMEM=m -CONFIG_QCOM_OCMEM=m

View file

@ -124,8 +124,8 @@ in {
# ignoreConfigErrors = false; # ignoreConfigErrors = false;
kernelPatches = [ kernelPatches = [
{ {
name = "linux_6_7"; name = "linux_6_8";
patch = ./linux_6_7.patch; patch = ./linux_6_8.patch;
} }
{ {
name = "config_fixes"; name = "config_fixes";
@ -582,6 +582,9 @@ in {
# keys that are unused in this case # keys that are unused in this case
# (builtin aarch64-linux config is unused too, but i cant disable it) # (builtin aarch64-linux config is unused too, but i cant disable it)
ACPI_HOTPLUG_CPU.tristate = lib.mkForce null; CEPH_FSCACHE.tristate = lib.mkForce null;
CIFS_FSCACHE.tristate = lib.mkForce null; DRM_NOUVEAU_GSP_DEFAULT.tristate = lib.mkForce null; FSCACHE_STATS.tristate = lib.mkForce null;
SND_AC97_POWER_SAVE_DEFAULT.tristate = lib.mkForce null; SND_HDA_POWER_SAVE_DEFAULT.tristate = lib.mkForce null;
ACPI_HOTPLUG_MEMORY.tristate = lib.mkForce null; BCM2835_MBOX.tristate = lib.mkForce null; BCM2835_WDT.tristate = lib.mkForce null; ACPI_HOTPLUG_MEMORY.tristate = lib.mkForce null; BCM2835_MBOX.tristate = lib.mkForce null; BCM2835_WDT.tristate = lib.mkForce null;
CHROMEOS_TBMC.tristate = lib.mkForce null; CROS_EC.tristate = lib.mkForce null; CROS_EC_I2C.tristate = lib.mkForce null; CHROMEOS_TBMC.tristate = lib.mkForce null; CROS_EC.tristate = lib.mkForce null; CROS_EC_I2C.tristate = lib.mkForce null;
CROS_EC_SPI.tristate = lib.mkForce null; CROS_KBD_LED_BACKLIGHT.tristate = lib.mkForce null; CROS_EC_SPI.tristate = lib.mkForce null; CROS_KBD_LED_BACKLIGHT.tristate = lib.mkForce null;

View file

@ -948,6 +948,6 @@ in {
{ directory = /secrets; mode = "0000"; } { directory = /secrets; mode = "0000"; }
# my custom impermanence module doesnt detect it # my custom impermanence module doesnt detect it
{ directory = /var/db/dhcpcd; mode = "0755"; } { directory = /var/db/dhcpcd; mode = "0755"; }
{ directory = /var/lib/private/kea; mode = "0750"; parentDirectory.mode = "0700"; } { directory = /var/lib/private/kea; mode = "0750"; defaultPerms.mode = "0700"; }
]; ];
} }

View file

@ -70,14 +70,14 @@ in {
] ++ lib.optionals config.services.akkoma.enable [ ] ++ lib.optionals config.services.akkoma.enable [
{ directory = /var/lib/akkoma; user = "akkoma"; group = "akkoma"; mode = "0700"; } { directory = /var/lib/akkoma; user = "akkoma"; group = "akkoma"; mode = "0700"; }
] ++ lib.optionals config.services.botamusique.enable [ ] ++ lib.optionals config.services.botamusique.enable [
{ directory = /var/lib/private/botamusique; user = "root"; group = "root"; mode = "0750"; parentDirectory.mode = "0700"; } { directory = /var/lib/private/botamusique; user = "root"; group = "root"; mode = "0750"; defaultPerms.mode = "0700"; }
] ++ lib.optionals config.programs.ccache.enable [ ] ++ lib.optionals config.programs.ccache.enable [
{ directory = config.programs.ccache.cacheDir; user = "root"; group = "nixbld"; mode = "0770"; } { directory = config.programs.ccache.cacheDir; user = "root"; group = "nixbld"; mode = "0770"; }
{ directory = /var/cache/sccache; user = "root"; group = "nixbld"; mode = "0770"; } { directory = /var/cache/sccache; user = "root"; group = "nixbld"; mode = "0770"; }
] ++ lib.optionals config.services.certspotter.enable [ ] ++ lib.optionals config.services.certspotter.enable [
{ directory = /var/lib/certspotter; user = "certspotter"; group = "certspotter"; mode = "0755"; } { directory = /var/lib/certspotter; user = "certspotter"; group = "certspotter"; mode = "0755"; }
] ++ lib.optionals (config.services.coop-ofd.enable or false) [ ] ++ lib.optionals (config.services.coop-ofd.enable or false) [
{ directory = /var/lib/private/coop-ofd; mode = "0750"; parentDirectory.mode = "0700"; } { directory = /var/lib/private/coop-ofd; mode = "0750"; defaultPerms.mode = "0700"; }
] ++ lib.optionals config.services.dovecot2.enable [ ] ++ lib.optionals config.services.dovecot2.enable [
{ directory = /var/lib/dhparams; user = "root"; group = "root"; mode = "0755"; } { directory = /var/lib/dhparams; user = "root"; group = "root"; mode = "0755"; }
{ directory = /var/lib/dovecot; user = "root"; group = "root"; mode = "0755"; } { directory = /var/lib/dovecot; user = "root"; group = "root"; mode = "0755"; }