From 2b0898b80999aaac99efd714beacb6ff5f0fdcdc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 11 Jun 2024 12:49:07 +0200 Subject: [PATCH 01/13] CI/CD: update dependencies on distros --- PKGBUILD | 5 +- debian/DEBIAN/control | 4 + flatpak/cargo-sources.json | 98 +++++-------------- flatpak/generated-sources.json | 98 +++++-------------- ...lease.json => org.Xetibo.ReSet-debug.json} | 11 +-- flatpak/org.Xetibo.ReSet.json | 8 +- flatpak/org.Xetibo.ReSet.json.wip | 50 ---------- 7 files changed, 63 insertions(+), 211 deletions(-) rename flatpak/{org.Xetibo.ReSet-release.json => org.Xetibo.ReSet-debug.json} (83%) delete mode 100644 flatpak/org.Xetibo.ReSet.json.wip diff --git a/PKGBUILD b/PKGBUILD index 58b8b58..2742c7c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,7 +6,10 @@ pkgrel=0 arch=('x86_64') pkgdir="/usr/bin/${pkgname}" pkgdesc="A wip universal Linux settings application." -depends=('rust' 'gtk4' 'dbus') +depends=('gtk4' 'dbus' 'libadwaita') +optdepends=('pipewire-pulse' 'networkmanager' 'bluez') +makedepends=('rust') + build() { cargo build --release diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control index 0759152..7274ccd 100644 --- a/debian/DEBIAN/control +++ b/debian/DEBIAN/control @@ -3,3 +3,7 @@ Version: 1.2.6 Maintainer: DashieTM Architecture: all Description: A wip universal Linux settings application. +Homepage: https://github.com/Xetibo/ReSet +Build-Depends: rust +Depends: libadwaita, gtk, dbus +Recommends: pipewire-pulse, networkmanager, bluez diff --git a/flatpak/cargo-sources.json b/flatpak/cargo-sources.json index 85c2bce..506ad9b 100644 --- a/flatpak/cargo-sources.json +++ b/flatpak/cargo-sources.json @@ -285,32 +285,6 @@ "dest": "cargo/vendor/dbus-tokio-0.7.6", "dest-filename": ".cargo-checksum.json" }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/directories-next/directories-next-2.0.0.crate", - "sha256": "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc", - "dest": "cargo/vendor/directories-next-2.0.0" - }, - { - "type": "inline", - "contents": "{\"package\": \"339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc\", \"files\": {}}", - "dest": "cargo/vendor/directories-next-2.0.0", - "dest-filename": ".cargo-checksum.json" - }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/dirs-sys-next/dirs-sys-next-0.1.2.crate", - "sha256": "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d", - "dest": "cargo/vendor/dirs-sys-next-0.1.2" - }, - { - "type": "inline", - "contents": "{\"package\": \"4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d\", \"files\": {}}", - "dest": "cargo/vendor/dirs-sys-next-0.1.2", - "dest-filename": ".cargo-checksum.json" - }, { "type": "archive", "archive-type": "tar-gzip", @@ -519,19 +493,6 @@ "dest": "cargo/vendor/gdk4-sys-0.8.1", "dest-filename": ".cargo-checksum.json" }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/getrandom/getrandom-0.2.14.crate", - "sha256": "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c", - "dest": "cargo/vendor/getrandom-0.2.14" - }, - { - "type": "inline", - "contents": "{\"package\": \"94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c\", \"files\": {}}", - "dest": "cargo/vendor/getrandom-0.2.14", - "dest-filename": ".cargo-checksum.json" - }, { "type": "archive", "archive-type": "tar-gzip", @@ -896,19 +857,6 @@ "dest": "cargo/vendor/libpulse-sys-1.21.0", "dest-filename": ".cargo-checksum.json" }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/libredox/libredox-0.1.3.crate", - "sha256": "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d", - "dest": "cargo/vendor/libredox-0.1.3" - }, - { - "type": "inline", - "contents": "{\"package\": \"c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d\", \"files\": {}}", - "dest": "cargo/vendor/libredox-0.1.3", - "dest-filename": ".cargo-checksum.json" - }, { "type": "archive", "archive-type": "tar-gzip", @@ -1211,14 +1159,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/re_set-lib/re_set-lib-4.0.1.crate", - "sha256": "06cb3803fff21953f1c17a685ae01e92b6b4d3231b99726d389520c48fbc1310", - "dest": "cargo/vendor/re_set-lib-4.0.1" + "url": "https://static.crates.io/crates/re_set-lib/re_set-lib-5.2.4.crate", + "sha256": "f1f1aa52c35d115b4efc5de2d41d0288f20705dd7f3ca6a49a68f2bab9c31a8e", + "dest": "cargo/vendor/re_set-lib-5.2.4" }, { "type": "inline", - "contents": "{\"package\": \"06cb3803fff21953f1c17a685ae01e92b6b4d3231b99726d389520c48fbc1310\", \"files\": {}}", - "dest": "cargo/vendor/re_set-lib-4.0.1", + "contents": "{\"package\": \"f1f1aa52c35d115b4efc5de2d41d0288f20705dd7f3ca6a49a68f2bab9c31a8e\", \"files\": {}}", + "dest": "cargo/vendor/re_set-lib-5.2.4", "dest-filename": ".cargo-checksum.json" }, { @@ -1237,27 +1185,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/redox_users/redox_users-0.4.5.crate", - "sha256": "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891", - "dest": "cargo/vendor/redox_users-0.4.5" + "url": "https://static.crates.io/crates/reset_daemon/reset_daemon-2.1.3.crate", + "sha256": "aa3666f8d12729c489f0d5d60fa8f03299da80859d72507c9e4ae6d56e61fe79", + "dest": "cargo/vendor/reset_daemon-2.1.3" }, { "type": "inline", - "contents": "{\"package\": \"bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891\", \"files\": {}}", - "dest": "cargo/vendor/redox_users-0.4.5", - "dest-filename": ".cargo-checksum.json" - }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/reset_daemon/reset_daemon-1.4.0.crate", - "sha256": "4c9858fdb8b54d8d81a2e0c16f5f2f16837c627da54ea9f3e7a27a888c0ef1fa", - "dest": "cargo/vendor/reset_daemon-1.4.0" - }, - { - "type": "inline", - "contents": "{\"package\": \"4c9858fdb8b54d8d81a2e0c16f5f2f16837c627da54ea9f3e7a27a888c0ef1fa\", \"files\": {}}", - "dest": "cargo/vendor/reset_daemon-1.4.0", + "contents": "{\"package\": \"aa3666f8d12729c489f0d5d60fa8f03299da80859d72507c9e4ae6d56e61fe79\", \"files\": {}}", + "dest": "cargo/vendor/reset_daemon-2.1.3", "dest-filename": ".cargo-checksum.json" }, { @@ -1936,6 +1871,19 @@ "dest": "cargo/vendor/winnow-0.6.6", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/xdg/xdg-2.5.2.crate", + "sha256": "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546", + "dest": "cargo/vendor/xdg-2.5.2" + }, + { + "type": "inline", + "contents": "{\"package\": \"213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546\", \"files\": {}}", + "dest": "cargo/vendor/xdg-2.5.2", + "dest-filename": ".cargo-checksum.json" + }, { "type": "inline", "contents": "[source.vendored-sources]\ndirectory = \"cargo/vendor\"\n\n[source.crates-io]\nreplace-with = \"vendored-sources\"\n", diff --git a/flatpak/generated-sources.json b/flatpak/generated-sources.json index 85c2bce..506ad9b 100644 --- a/flatpak/generated-sources.json +++ b/flatpak/generated-sources.json @@ -285,32 +285,6 @@ "dest": "cargo/vendor/dbus-tokio-0.7.6", "dest-filename": ".cargo-checksum.json" }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/directories-next/directories-next-2.0.0.crate", - "sha256": "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc", - "dest": "cargo/vendor/directories-next-2.0.0" - }, - { - "type": "inline", - "contents": "{\"package\": \"339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc\", \"files\": {}}", - "dest": "cargo/vendor/directories-next-2.0.0", - "dest-filename": ".cargo-checksum.json" - }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/dirs-sys-next/dirs-sys-next-0.1.2.crate", - "sha256": "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d", - "dest": "cargo/vendor/dirs-sys-next-0.1.2" - }, - { - "type": "inline", - "contents": "{\"package\": \"4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d\", \"files\": {}}", - "dest": "cargo/vendor/dirs-sys-next-0.1.2", - "dest-filename": ".cargo-checksum.json" - }, { "type": "archive", "archive-type": "tar-gzip", @@ -519,19 +493,6 @@ "dest": "cargo/vendor/gdk4-sys-0.8.1", "dest-filename": ".cargo-checksum.json" }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/getrandom/getrandom-0.2.14.crate", - "sha256": "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c", - "dest": "cargo/vendor/getrandom-0.2.14" - }, - { - "type": "inline", - "contents": "{\"package\": \"94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c\", \"files\": {}}", - "dest": "cargo/vendor/getrandom-0.2.14", - "dest-filename": ".cargo-checksum.json" - }, { "type": "archive", "archive-type": "tar-gzip", @@ -896,19 +857,6 @@ "dest": "cargo/vendor/libpulse-sys-1.21.0", "dest-filename": ".cargo-checksum.json" }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/libredox/libredox-0.1.3.crate", - "sha256": "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d", - "dest": "cargo/vendor/libredox-0.1.3" - }, - { - "type": "inline", - "contents": "{\"package\": \"c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d\", \"files\": {}}", - "dest": "cargo/vendor/libredox-0.1.3", - "dest-filename": ".cargo-checksum.json" - }, { "type": "archive", "archive-type": "tar-gzip", @@ -1211,14 +1159,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/re_set-lib/re_set-lib-4.0.1.crate", - "sha256": "06cb3803fff21953f1c17a685ae01e92b6b4d3231b99726d389520c48fbc1310", - "dest": "cargo/vendor/re_set-lib-4.0.1" + "url": "https://static.crates.io/crates/re_set-lib/re_set-lib-5.2.4.crate", + "sha256": "f1f1aa52c35d115b4efc5de2d41d0288f20705dd7f3ca6a49a68f2bab9c31a8e", + "dest": "cargo/vendor/re_set-lib-5.2.4" }, { "type": "inline", - "contents": "{\"package\": \"06cb3803fff21953f1c17a685ae01e92b6b4d3231b99726d389520c48fbc1310\", \"files\": {}}", - "dest": "cargo/vendor/re_set-lib-4.0.1", + "contents": "{\"package\": \"f1f1aa52c35d115b4efc5de2d41d0288f20705dd7f3ca6a49a68f2bab9c31a8e\", \"files\": {}}", + "dest": "cargo/vendor/re_set-lib-5.2.4", "dest-filename": ".cargo-checksum.json" }, { @@ -1237,27 +1185,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/redox_users/redox_users-0.4.5.crate", - "sha256": "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891", - "dest": "cargo/vendor/redox_users-0.4.5" + "url": "https://static.crates.io/crates/reset_daemon/reset_daemon-2.1.3.crate", + "sha256": "aa3666f8d12729c489f0d5d60fa8f03299da80859d72507c9e4ae6d56e61fe79", + "dest": "cargo/vendor/reset_daemon-2.1.3" }, { "type": "inline", - "contents": "{\"package\": \"bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891\", \"files\": {}}", - "dest": "cargo/vendor/redox_users-0.4.5", - "dest-filename": ".cargo-checksum.json" - }, - { - "type": "archive", - "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/reset_daemon/reset_daemon-1.4.0.crate", - "sha256": "4c9858fdb8b54d8d81a2e0c16f5f2f16837c627da54ea9f3e7a27a888c0ef1fa", - "dest": "cargo/vendor/reset_daemon-1.4.0" - }, - { - "type": "inline", - "contents": "{\"package\": \"4c9858fdb8b54d8d81a2e0c16f5f2f16837c627da54ea9f3e7a27a888c0ef1fa\", \"files\": {}}", - "dest": "cargo/vendor/reset_daemon-1.4.0", + "contents": "{\"package\": \"aa3666f8d12729c489f0d5d60fa8f03299da80859d72507c9e4ae6d56e61fe79\", \"files\": {}}", + "dest": "cargo/vendor/reset_daemon-2.1.3", "dest-filename": ".cargo-checksum.json" }, { @@ -1936,6 +1871,19 @@ "dest": "cargo/vendor/winnow-0.6.6", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/xdg/xdg-2.5.2.crate", + "sha256": "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546", + "dest": "cargo/vendor/xdg-2.5.2" + }, + { + "type": "inline", + "contents": "{\"package\": \"213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546\", \"files\": {}}", + "dest": "cargo/vendor/xdg-2.5.2", + "dest-filename": ".cargo-checksum.json" + }, { "type": "inline", "contents": "[source.vendored-sources]\ndirectory = \"cargo/vendor\"\n\n[source.crates-io]\nreplace-with = \"vendored-sources\"\n", diff --git a/flatpak/org.Xetibo.ReSet-release.json b/flatpak/org.Xetibo.ReSet-debug.json similarity index 83% rename from flatpak/org.Xetibo.ReSet-release.json rename to flatpak/org.Xetibo.ReSet-debug.json index 25fd747..93a6c48 100644 --- a/flatpak/org.Xetibo.ReSet-release.json +++ b/flatpak/org.Xetibo.ReSet-debug.json @@ -1,12 +1,12 @@ { "app-id": "org.Xetibo.ReSet", "runtime": "org.gnome.Platform", - "runtime-version": "45", + "runtime-version": "46", "sdk": "org.gnome.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust-nightly" ], - "command": "reset", + "command": "ReSet", "finish-args": [ "--socket=pulseaudio", "--share=network", @@ -17,8 +17,7 @@ "--device=all", "--allow=bluetooth", "--socket=system-bus", - "--socket=session-bus", - "--persist=~/.config/reset:create" + "--socket=session-bus" ], "build-options": { "append-path": "/usr/lib/sdk/rust-nightly/bin" @@ -34,8 +33,8 @@ }, "build-commands": [ "cargo --offline fetch --manifest-path Cargo.toml --verbose", - "cargo --offline build --release --verbose", - "install -Dm755 ./target/release/reset -t /app/bin/", + "cargo --offline build --verbose", + "install -Dm755 ./target/debug/ReSet -t /app/bin/", "install -Dm644 ./src/resources/icons/ReSet.svg /app/share/icons/hicolor/scalable/apps/org.Xetibo.ReSet.svg", "install -Dm644 ./flatpak/org.Xetibo.ReSet.desktop /app/share/applications/org.Xetibo.ReSet.desktop" ], diff --git a/flatpak/org.Xetibo.ReSet.json b/flatpak/org.Xetibo.ReSet.json index a2b6ead..0a74814 100644 --- a/flatpak/org.Xetibo.ReSet.json +++ b/flatpak/org.Xetibo.ReSet.json @@ -1,12 +1,12 @@ { "app-id": "org.Xetibo.ReSet", "runtime": "org.gnome.Platform", - "runtime-version": "45", + "runtime-version": "46", "sdk": "org.gnome.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust-nightly" ], - "command": "ReSet", + "command": "reset", "finish-args": [ "--socket=pulseaudio", "--share=network", @@ -34,8 +34,8 @@ }, "build-commands": [ "cargo --offline fetch --manifest-path Cargo.toml --verbose", - "cargo --offline build --verbose", - "install -Dm755 ./target/release/ReSet -t /app/bin/", + "cargo --offline build --release --verbose", + "install -Dm755 ./target/release/reset -t /app/bin/", "install -Dm644 ./src/resources/icons/ReSet.svg /app/share/icons/hicolor/scalable/apps/org.Xetibo.ReSet.svg", "install -Dm644 ./flatpak/org.Xetibo.ReSet.desktop /app/share/applications/org.Xetibo.ReSet.desktop" ], diff --git a/flatpak/org.Xetibo.ReSet.json.wip b/flatpak/org.Xetibo.ReSet.json.wip deleted file mode 100644 index cd01a11..0000000 --- a/flatpak/org.Xetibo.ReSet.json.wip +++ /dev/null @@ -1,50 +0,0 @@ -{ - "app-id": "org.Xetibo.ReSet", - "runtime": "org.gnome.Platform", - "runtime-version": "45", - "sdk": "org.gnome.Sdk", - "sdk-extensions": [ - "org.freedesktop.Sdk.Extension.rust-stable" - ], - "command": "reset", - "finish-args": [ - "--system-talk-name=org.freedesktop.NetworkManager", - "--system-talk-name=org.bluez", - "--socket=pulseaudio", - "--share=network", - "--share=ipc", - "--socket=fallback-x11", - "--socket=wayland", - "--device=dri", - "--device=all", - "--allow=bluetooth" - ], - "build-options": { - "append-path": "/usr/lib/sdk/rust-stable/bin" - }, - "modules": [ - { - "name": "reset", - "buildsystem": "simple", - "build-options": { - "env": { - "CARGO_HOME": "/run/build/reset/cargo" - } - }, - "build-commands": [ - "cargo --offline fetch --manifest-path Cargo.toml --verbose", - "cargo --offline build --release --verbose", - "install -Dm755 ./target/release/reset -t /app/bin/", - "install -Dm644 ./src/resources/icons/ReSet.svg /app/share/icons/hicolor/scalable/apps/org.Xetibo.ReSet.svg", - "install -Dm644 ./flatpak/org.Xetibo.ReSet.desktop /app/share/applications/org.Xetibo.ReSet.desktop" - ], - "sources": [ - { - "type": "dir", - "path": ".." - }, - "cargo-sources.json" - ] - } - ] -} From 77c53a3efcfb6cbe3bddb1c2181b5953ce24a97a Mon Sep 17 00:00:00 2001 From: takotori Date: Tue, 11 Jun 2024 13:09:33 +0200 Subject: [PATCH 02/13] change active language color --- src/resources/style/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/style/style.css b/src/resources/style/style.css index f011375..4de5961 100644 --- a/src/resources/style/style.css +++ b/src/resources/style/style.css @@ -38,5 +38,5 @@ row.selectedLanguage { } row.activeLanguage { - background-color: darker(darker(darker(@window_fg_color))); + background-color: @blue_2; } \ No newline at end of file From a9ee1b7bc3cc4dfa7949237f6a7e490dc0358250 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 11 Jun 2024 15:09:34 +0200 Subject: [PATCH 03/13] flatpak: Change name to ReSet case --- flatpak/org.Xetibo.ReSet.json | 4 ++-- src/tests.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/flatpak/org.Xetibo.ReSet.json b/flatpak/org.Xetibo.ReSet.json index 0a74814..532a4d4 100644 --- a/flatpak/org.Xetibo.ReSet.json +++ b/flatpak/org.Xetibo.ReSet.json @@ -6,7 +6,7 @@ "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust-nightly" ], - "command": "reset", + "command": "ReSet", "finish-args": [ "--socket=pulseaudio", "--share=network", @@ -35,7 +35,7 @@ "build-commands": [ "cargo --offline fetch --manifest-path Cargo.toml --verbose", "cargo --offline build --release --verbose", - "install -Dm755 ./target/release/reset -t /app/bin/", + "install -Dm755 ./target/release/ReSet -t /app/bin/", "install -Dm644 ./src/resources/icons/ReSet.svg /app/share/icons/hicolor/scalable/apps/org.Xetibo.ReSet.svg", "install -Dm644 ./flatpak/org.Xetibo.ReSet.desktop /app/share/applications/org.Xetibo.ReSet.desktop" ], diff --git a/src/tests.rs b/src/tests.rs index 12dadc6..2818142 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -14,7 +14,6 @@ async fn test_plugins() { hint::spin_loop(); } unsafe { - println!("pang"); for plugin in FRONTEND_PLUGINS.iter() { let name = (plugin.frontend_name)(); let tests = (plugin.frontend_tests)(); From 7532c1e065d430379f578b351d1980ea47b252dc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 11 Jun 2024 20:32:22 +0200 Subject: [PATCH 04/13] chore: Bump version in all files --- Cargo.lock | 2 +- Cargo.toml | 2 +- PKGBUILD | 2 +- debian/DEBIAN/control | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1b8892..4009e45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -952,7 +952,7 @@ dependencies = [ [[package]] name = "reset" -version = "1.2.6" +version = "1.2.7" dependencies = [ "dbus", "fork", diff --git a/Cargo.toml b/Cargo.toml index a4c19d9..07c7409 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reset" -version = "1.2.6" +version = "1.2.7" edition = "2021" description = "A wip universal Linux settings application." repository = "https://github.com/Xetibo/ReSet" diff --git a/PKGBUILD b/PKGBUILD index 2742c7c..9b8c0d0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Fabio Lenherr pkgname=ReSet -pkgver=1.2.6 +pkgver=1.2.7 pkgrel=0 arch=('x86_64') pkgdir="/usr/bin/${pkgname}" diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control index 7274ccd..7e907e2 100644 --- a/debian/DEBIAN/control +++ b/debian/DEBIAN/control @@ -1,5 +1,5 @@ Package: ReSet -Version: 1.2.6 +Version: 1.2.7 Maintainer: DashieTM Architecture: all Description: A wip universal Linux settings application. From d36e79614c1d8e6d43e47cb5f19d6633bd2bec55 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Jun 2024 10:38:48 +0200 Subject: [PATCH 05/13] readme: Add exact binary names --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a31199c..8699f73 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ We are currently not published on flatpak due to issues with permissions. This is being worked on... Installation: -Download the flatpak package from the release and install with the terminal. +Download the flatpak package (reset.flatpak) from the release and install with the terminal. ``` flatpak install --user reset.flatpak @@ -59,7 +59,7 @@ flatpak install --user reset.flatpak Manually: -Download the package from the releases tab and install it with pacman. +Download the package (ReSet-version-x86_64.pkg.tar.zst) from the releases tab and install it with pacman. ``` sudo pacman -U /path/to/reset @@ -67,7 +67,7 @@ sudo pacman -U /path/to/reset ### Debian Package(Ubuntu 23.04 dependencies) -Download the package from the releases tab and install it with apt. +Download the package (ReSet.deb) from the releases tab and install it with apt. ``` sudo apt install ./path/to/reset From e4971391be4bc0de64546ee6e9b7880277a0d0e3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Jun 2024 10:50:24 +0200 Subject: [PATCH 06/13] readme: Add installation guide mention --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8699f73..fa549e3 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ A window manager/compositor agnostic settings application for Linux written in r ## Plugins ReSet features a plugin system by loading dynamic libraries for both the daemon and the ReSet graphical user interface. -A list of official plugins and their documentation can be found at [ReSet-Plugins](https://github.com/Xetibo/ReSet-Plugins). +A list of official plugins, installation guides and their documentation can be found at [ReSet-Plugins](https://github.com/Xetibo/ReSet-Plugins). ## Packaging From 0b12d95c83d876ea6c8a281b2667a3bb496740a5 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Jun 2024 17:21:02 +0200 Subject: [PATCH 07/13] readme: Add plugin confirmation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index fa549e3..86fc77b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,15 @@ A window manager/compositor agnostic settings application for Linux written in r ReSet features a plugin system by loading dynamic libraries for both the daemon and the ReSet graphical user interface. A list of official plugins, installation guides and their documentation can be found at [ReSet-Plugins](https://github.com/Xetibo/ReSet-Plugins). +### Confirmation + +In order for your plugins to load, you have to define them in `.config/reset/ReSet.toml`. +This is done to avoid loading of arbitrary plugins that might be placed within this folder by accident. + +```toml +plugins = ["libreset_monitors.so", "libreset_keyboard_plugin.so"] +``` + ## Packaging ReSet is available with the following packaging solutions: From e7c0995aa301e54fc5b5d586e800ce624bab6ea5 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Jun 2024 19:46:11 +0200 Subject: [PATCH 08/13] init: store true if daemon is already started --- README.md | 6 ++++++ src/components/utils.rs | 10 ++++++++++ src/main.rs | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 86fc77b..2165d9c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,12 @@ A window manager/compositor agnostic settings application for Linux written in r ReSet features a plugin system by loading dynamic libraries for both the daemon and the ReSet graphical user interface. A list of official plugins, installation guides and their documentation can be found at [ReSet-Plugins](https://github.com/Xetibo/ReSet-Plugins). +### Installation + +Plugins are loaded either from `/usr/lib/reset` or `~/.config/reset/plugins`. In order to install the plugin, either install a distribution specific package that places the library into the specified system folder, or place the library in the plugins folder in your config directory. + +Note, after installation, please move to confirmation. + ### Confirmation In order for your plugins to load, you have to define them in `.config/reset/ReSet.toml`. diff --git a/src/components/utils.rs b/src/components/utils.rs index 11d0894..1b4bdd5 100644 --- a/src/components/utils.rs +++ b/src/components/utils.rs @@ -10,6 +10,9 @@ use glib::prelude::Cast; use glib::Object; use gtk::prelude::{GObjectPropertyExpressionExt, ListBoxRowExt, ListItemExt, WidgetExt}; use gtk::{Align, SignalListItemFactory, StringObject}; +use re_set_lib::ERROR; +#[cfg(debug_assertions)] +use re_set_lib::{utils::macros::ErrorLevel, write_log_to_file}; pub const DBUS_PATH: &str = "/org/Xetibo/ReSet/Daemon"; pub const WIRELESS: &str = "org.Xetibo.ReSet.Network"; @@ -93,5 +96,12 @@ pub fn get_capabilities() -> Vec { let conn = Connection::new_session().unwrap(); let proxy = conn.with_proxy(BASE, DBUS_PATH, Duration::from_millis(10000)); let res: Result<(Vec,), Error> = proxy.method_call(BASE, "GetCapabilities", ()); + if res.is_err() { + ERROR!( + "Could not call capabilities from daemon", + ErrorLevel::Critical + ); + return Vec::new(); + } res.unwrap().0 } diff --git a/src/main.rs b/src/main.rs index d1f6f63..c78b505 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use std::hint::{self}; -use std::sync::atomic::AtomicBool; +use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::thread; use std::time::Duration; @@ -81,5 +81,7 @@ async fn daemon_check(ready: Arc) { let res = handle.join(); if res.unwrap().is_err() { run_daemon(Some(ready)).await; + } else { + ready.store(true, Ordering::SeqCst); } } From ee7129009af72c4452c1e8699d6d49f3b368a119 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Jun 2024 23:52:09 +0200 Subject: [PATCH 09/13] chore: Update todos --- src/components/audio/audio_box_utils.rs | 2 +- src/components/audio/audio_entry.rs | 2 +- src/components/audio/audio_functions.rs | 2 +- src/components/base/error_impl.rs | 2 +- src/components/bluetooth/bluetooth_box.rs | 3 +-- src/components/bluetooth/bluetooth_entry.rs | 2 +- src/components/bluetooth/bluetooth_event_handlers.rs | 2 +- src/components/wifi/saved_wifi_entry.rs | 2 +- src/components/wifi/wifi_box.rs | 2 +- src/components/wifi/wifi_entry.rs | 6 +++--- src/components/wifi/wifi_event_handlers.rs | 2 +- src/components/window/reset_window.rs | 1 - src/components/window/sidebar_entry_impl.rs | 2 +- 13 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/components/audio/audio_box_utils.rs b/src/components/audio/audio_box_utils.rs index a1ef8bc..90ae2b8 100644 --- a/src/components/audio/audio_box_utils.rs +++ b/src/components/audio/audio_box_utils.rs @@ -334,7 +334,7 @@ pub fn start_audio_box_listener< get_default_name_function: &'static DBusFunction, dummy_name: &'static str, ) -> Connection { - // TODO: make the failed logs generically sound -> deynamic output for both + // FUTURE TODO: make the failed logs generically sound -> deynamic output for both let object_added = ObjectAdded::match_rule(Some(&BASE.into()), Some(&Path::from(DBUS_PATH))).static_clone(); let object_changed = diff --git a/src/components/audio/audio_entry.rs b/src/components/audio/audio_entry.rs index f93541f..dafe884 100644 --- a/src/components/audio/audio_entry.rs +++ b/src/components/audio/audio_entry.rs @@ -117,7 +117,7 @@ pub fn new_entry< reset_box: Arc, ) -> Arc { let obj: Arc = Arc::new(Object::builder().build()); - // TODO use event callback for progress bar -> this is the "im speaking" indicator + // FUTURE TODO: use event callback for progress bar -> this is the "im speaking" indicator { let imp = obj.entry_imp(); let slider_obj_ref = obj.clone(); diff --git a/src/components/audio/audio_functions.rs b/src/components/audio/audio_functions.rs index d634100..3ad9f1e 100644 --- a/src/components/audio/audio_functions.rs +++ b/src/components/audio/audio_functions.rs @@ -91,7 +91,7 @@ pub fn new_stream_entry< stream: StreamObject, ) -> Arc { let obj: Arc = Arc::new(Object::builder().build()); - // TODO use event callback for progress bar -> this is the "im speaking" indicator + // FUTURE TODO: use event callback for progress bar -> this is the "im speaking" indicator let output_box_mute_ref = audio_box.clone(); let output_box_volume_ref = audio_box.clone(); let output_box_sink_ref = audio_box.clone(); diff --git a/src/components/base/error_impl.rs b/src/components/base/error_impl.rs index 9830b3c..5840055 100644 --- a/src/components/base/error_impl.rs +++ b/src/components/base/error_impl.rs @@ -54,7 +54,7 @@ pub fn show_error( parent: Arc, message: &'static str, ) { - // TODO: Add error to log + // FUTURE TODO: Add error to log glib::spawn_future(async move { glib::idle_add_once(move || { let error = parent.error(); diff --git a/src/components/bluetooth/bluetooth_box.rs b/src/components/bluetooth/bluetooth_box.rs index 4f41cf9..d299908 100644 --- a/src/components/bluetooth/bluetooth_box.rs +++ b/src/components/bluetooth/bluetooth_box.rs @@ -57,7 +57,7 @@ impl BluetoothBox { } } -// TODO +// FUTURE TODO: // handle bonded -> this means saved but not connected // handle rssi below x -> don't show device @@ -185,7 +185,6 @@ pub fn populate_connected_bluetooth_devices( listeners: Arc, bluetooth_box: Arc, ) { - // TODO handle saved devices -> they also exist gio::spawn_blocking(move || { let ref_box = bluetooth_box.clone(); let adapters = get_bluetooth_adapters(ref_box.clone()); diff --git a/src/components/bluetooth/bluetooth_entry.rs b/src/components/bluetooth/bluetooth_entry.rs index 87323c3..94a9099 100644 --- a/src/components/bluetooth/bluetooth_entry.rs +++ b/src/components/bluetooth/bluetooth_entry.rs @@ -70,7 +70,7 @@ impl BluetoothEntry { }); let gesture = GestureClick::new(); // paired is not what we think - // TODO implement paired + // FUTURE TODO: implement paired gesture.connect_released(move |_, _, _, _| { let imp = entry_ref.imp(); let borrow = imp.bluetooth_device.borrow(); diff --git a/src/components/bluetooth/bluetooth_event_handlers.rs b/src/components/bluetooth/bluetooth_event_handlers.rs index f29892b..c32d103 100644 --- a/src/components/bluetooth/bluetooth_event_handlers.rs +++ b/src/components/bluetooth/bluetooth_event_handlers.rs @@ -69,7 +69,7 @@ pub fn device_removed_handler( if list_entry.imp().bluetooth_device.borrow().connected { imp.reset_bluetooth_connected_devices.remove(&*list_entry); } else { - // TODO: is there a better way for this? + // FUTURE TODO: is there a better way for this? imp.reset_bluetooth_available_devices.remove(&*list_entry); imp.reset_bluetooth_saved_devices.remove(&*list_entry); } diff --git a/src/components/wifi/saved_wifi_entry.rs b/src/components/wifi/saved_wifi_entry.rs index 5059a32..985edbd 100644 --- a/src/components/wifi/saved_wifi_entry.rs +++ b/src/components/wifi/saved_wifi_entry.rs @@ -55,7 +55,7 @@ impl SavedWifiEntry { let entry_ref = entry.clone(); delete_button.connect_clicked(clone!(@weak wifi_box => move |_| { delete_connection(entry_ref.imp().reset_connection_path.take()); - // TODO handle error + // FUTURE TODO: handle error wifi_box.reset_stored_wifi_list.remove(&*entry_ref); })); diff --git a/src/components/wifi/wifi_box.rs b/src/components/wifi/wifi_box.rs index ff06ca6..5f4ab7b 100644 --- a/src/components/wifi/wifi_box.rs +++ b/src/components/wifi/wifi_box.rs @@ -209,7 +209,7 @@ pub fn show_stored_connections(wifi_box: Arc) { glib::idle_add_once(move || { let self_imp = wifibox_ref.imp(); for connection in connections { - // TODO include button for settings + // FUTURE TODO: include button for settings let name = &String::from_utf8(connection.1).unwrap_or_else(|_| String::from("")); let entry = SavedWifiEntry::new(name, connection.0, self_imp); diff --git a/src/components/wifi/wifi_entry.rs b/src/components/wifi/wifi_entry.rs index 07779d9..54d42de 100644 --- a/src/components/wifi/wifi_entry.rs +++ b/src/components/wifi/wifi_entry.rs @@ -48,7 +48,7 @@ impl WifiEntry { .build(), ); - // TODO handle encryption thing + // FUTURE TODO: handle encryption let wifi_strength = Image::builder() .icon_name(match strength { WifiStrength::Excellent => "network-wireless-signal-excellent-symbolic", @@ -177,7 +177,7 @@ pub fn click_stored_network(entry: Arc) { }); }); }); - // TODO crate spinner animation and block UI + // FUTURE TODO: crate spinner animation and block UI } pub fn click_new_network(entry: Arc) { @@ -228,7 +228,7 @@ pub fn click_new_network(entry: Arc) { }); }); }); - // TODO crate spinner animation and block UI + // FUTURE TODO: crate spinner animation and block UI }; let entry_imp = entry.imp(); diff --git a/src/components/wifi/wifi_event_handlers.rs b/src/components/wifi/wifi_event_handlers.rs index 6cea57c..9bf42b1 100644 --- a/src/components/wifi/wifi_event_handlers.rs +++ b/src/components/wifi/wifi_event_handlers.rs @@ -72,7 +72,7 @@ pub fn access_point_changed_handler(wifi_box: Arc, ir: AccessPointChang let name = name_opt.as_str(); entry_imp.wifi_strength.set(strength); entry.set_title(name); - // TODO handle encryption thing + // FUTURE TODO: handle encryption thing entry_imp .reset_wifi_strength .borrow() diff --git a/src/components/window/reset_window.rs b/src/components/window/reset_window.rs index 9ac8b90..f72d552 100644 --- a/src/components/window/reset_window.rs +++ b/src/components/window/reset_window.rs @@ -207,7 +207,6 @@ impl ReSetWindow { .connect_row_activated(clone!(@ weak self_imp => move |_, _| { self_imp.reset_search_entry.set_text(""); })); - // TODO: refactor this let mut i = 0; for info in sidebar_list { if info.parent.is_none() && i != 0 { diff --git a/src/components/window/sidebar_entry_impl.rs b/src/components/window/sidebar_entry_impl.rs index 0064ea5..349c203 100644 --- a/src/components/window/sidebar_entry_impl.rs +++ b/src/components/window/sidebar_entry_impl.rs @@ -11,7 +11,7 @@ use crate::components::window::sidebar_entry; #[derive(Default)] pub enum Categories { - // TODO: are these ever used ? + // FUTURE TODO: are these ever used ? // Connectivity, // Audio, // Peripherals, From a369356b497c512c08e5d47e6402e8cd167d3e8e Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 13 Jun 2024 14:38:16 +0200 Subject: [PATCH 10/13] chore: Bump version --- Cargo.lock | 10 +++++----- Cargo.toml | 6 +++--- PKGBUILD | 2 +- debian/DEBIAN/control | 2 +- test_plugin/src/lib.rs | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4009e45..0530042 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -926,9 +926,9 @@ dependencies = [ [[package]] name = "re_set-lib" -version = "5.2.4" +version = "5.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f1aa52c35d115b4efc5de2d41d0288f20705dd7f3ca6a49a68f2bab9c31a8e" +checksum = "69ec9fc4d9e919feb030e5382de1aa49447404a57ecc19361bf7710f1cf9063e" dependencies = [ "dbus", "dbus-crossroads", @@ -952,7 +952,7 @@ dependencies = [ [[package]] name = "reset" -version = "1.2.7" +version = "2.0.0" dependencies = [ "dbus", "fork", @@ -968,9 +968,9 @@ dependencies = [ [[package]] name = "reset_daemon" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa3666f8d12729c489f0d5d60fa8f03299da80859d72507c9e4ae6d56e61fe79" +checksum = "f72dd51da41c2fc3ac37ae55fbdeb2670d32cad39cc85cc95a9ea25fc02b6086" dependencies = [ "crossbeam", "dbus", diff --git a/Cargo.toml b/Cargo.toml index 07c7409..6c37d34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reset" -version = "1.2.7" +version = "2.0.0" edition = "2021" description = "A wip universal Linux settings application." repository = "https://github.com/Xetibo/ReSet" @@ -11,8 +11,8 @@ name = "ReSet" path = "src/main.rs" [dependencies] -reset_daemon = "2.1.3" -re_set-lib = "5.2.4" +reset_daemon = "2.2.0" +re_set-lib = "5.2.5" adw = { version = "0.6.0", package = "libadwaita", features = ["v1_4"] } dbus = "0.9.7" gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] } diff --git a/PKGBUILD b/PKGBUILD index 9b8c0d0..b3c6119 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Fabio Lenherr pkgname=ReSet -pkgver=1.2.7 +pkgver=2.0.0 pkgrel=0 arch=('x86_64') pkgdir="/usr/bin/${pkgname}" diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control index 7e907e2..75cb6fe 100644 --- a/debian/DEBIAN/control +++ b/debian/DEBIAN/control @@ -1,5 +1,5 @@ Package: ReSet -Version: 1.2.7 +Version: 2.0.0 Maintainer: DashieTM Architecture: all Description: A wip universal Linux settings application. diff --git a/test_plugin/src/lib.rs b/test_plugin/src/lib.rs index f993869..5ea673d 100644 --- a/test_plugin/src/lib.rs +++ b/test_plugin/src/lib.rs @@ -8,7 +8,7 @@ use gtk::prelude::{BoxExt, ButtonExt}; use re_set_lib::utils::plugin::{PluginCapabilities, PluginImplementation, PluginTestFunc, SidebarInfo}; pub const BASE: &str = "org.Xetibo.ReSet.Daemon"; -pub const DBUS_PATH: &str = "/org/Xebito/ReSet/Plugins/test"; +pub const DBUS_PATH: &str = "/org/Xetibo/ReSet/Plugins/test"; pub const INTERFACE: &str = "org.Xetibo.ReSet.TestPlugin"; #[no_mangle] From 6c1291bd19383ea45d0610dcdc17e8491b8e20ea Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 13 Jun 2024 15:14:29 +0200 Subject: [PATCH 11/13] debian: fix recommendations and dependencies --- debian/DEBIAN/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control index 75cb6fe..dc7e71a 100644 --- a/debian/DEBIAN/control +++ b/debian/DEBIAN/control @@ -5,5 +5,5 @@ Architecture: all Description: A wip universal Linux settings application. Homepage: https://github.com/Xetibo/ReSet Build-Depends: rust -Depends: libadwaita, gtk, dbus -Recommends: pipewire-pulse, networkmanager, bluez +Depends: libadwaita-1-0, libgtk-4-1, dbus +Recommends: pipewire-pulse, network-manager, bluez From f09ed7558107a2bb5334c02305646af8e4bcebcb Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 3 Dec 2024 23:31:22 +0100 Subject: [PATCH 12/13] Use nix CI --- .direnv/flake-profile | 2 +- .direnv/flake-profile-1-link | 1 + .direnv/flake-profile-11-link | 1 - .github/workflows/rust.yml | 42 +++++++++++++++---------- flake.lock | 58 ++++++++--------------------------- 5 files changed, 39 insertions(+), 65 deletions(-) create mode 120000 .direnv/flake-profile-1-link delete mode 120000 .direnv/flake-profile-11-link diff --git a/.direnv/flake-profile b/.direnv/flake-profile index c7ae88b..0c05709 120000 --- a/.direnv/flake-profile +++ b/.direnv/flake-profile @@ -1 +1 @@ -flake-profile-11-link \ No newline at end of file +flake-profile-1-link \ No newline at end of file diff --git a/.direnv/flake-profile-1-link b/.direnv/flake-profile-1-link new file mode 120000 index 0000000..122cb0c --- /dev/null +++ b/.direnv/flake-profile-1-link @@ -0,0 +1 @@ +/nix/store/bfq0hy0fwh0hpm6rivbrrjyb4x902pha-nix-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile-11-link b/.direnv/flake-profile-11-link deleted file mode 120000 index 52e7a78..0000000 --- a/.direnv/flake-profile-11-link +++ /dev/null @@ -1 +0,0 @@ -/nix/store/51yb1yhqssknlmxvvscvj0cqbvs0z915-nix-shell-env \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 089fbcf..a9a14db 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,25 +1,33 @@ -name: Rust - +# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml +name: Rust-build on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - + branches: ["main"] jobs: build: - runs-on: [self-hosted, ubuntu] + name: Build + permissions: + contents: read + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: nightly-rust - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main with: - profile: minimal - toolchain: nightly + github-token: ${{ secrets.GITHUB_TOKEN }} + extra-conf: | + extra-experimental-features = nix-command flakes + - name: Set up cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: action + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: cache + uses: cachix/cachix-action@v14 + with: + name: reset + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Build - run: cargo build --verbose - - name: Run clippy - run: cargo clippy --fix + run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file diff --git a/flake.lock b/flake.lock index 1b9d765..64a3a5f 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -20,31 +20,13 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "lastModified": 1729256560, + "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "type": "github" }, "original": { @@ -56,11 +38,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", "type": "github" }, "original": { @@ -79,15 +61,14 @@ }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1716171463, - "narHash": "sha256-lc7wOh5BjYUoxdhcPkeUY8BmuL2qtRaHlW1403RW48E=", + "lastModified": 1729564184, + "narHash": "sha256-dP764PQ6YhjY7C84Txnrb2vf0H2YdQlp5c6a7G18fgw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "04d61d14803854fd8453ec43c5c53a471e5407a8", + "rev": "d687672b4541496408068bc273d94c643005d4c9", "type": "github" }, "original": { @@ -95,21 +76,6 @@ "repo": "rust-overlay", "type": "github" } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", From f229ed7dea514bc7307cea8682553afd9584eaaa Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 15 Feb 2025 16:17:06 +0100 Subject: [PATCH 13/13] Update nix packages --- .direnv/flake-profile | 2 +- .direnv/flake-profile-1-link | 1 - .direnv/flake-profile-4-link | 1 + flake.lock | 24 +++---- nix/default.nix | 118 +++++++++++++++++------------------ 5 files changed, 73 insertions(+), 73 deletions(-) delete mode 120000 .direnv/flake-profile-1-link create mode 120000 .direnv/flake-profile-4-link diff --git a/.direnv/flake-profile b/.direnv/flake-profile index 0c05709..e289079 120000 --- a/.direnv/flake-profile +++ b/.direnv/flake-profile @@ -1 +1 @@ -flake-profile-1-link \ No newline at end of file +flake-profile-4-link \ No newline at end of file diff --git a/.direnv/flake-profile-1-link b/.direnv/flake-profile-1-link deleted file mode 120000 index 122cb0c..0000000 --- a/.direnv/flake-profile-1-link +++ /dev/null @@ -1 +0,0 @@ -/nix/store/bfq0hy0fwh0hpm6rivbrrjyb4x902pha-nix-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile-4-link b/.direnv/flake-profile-4-link new file mode 120000 index 0000000..fcbff45 --- /dev/null +++ b/.direnv/flake-profile-4-link @@ -0,0 +1 @@ +/nix/store/30prmd5nyydss0bcs7d578grjav6i7x3-nix-shell-env \ No newline at end of file diff --git a/flake.lock b/flake.lock index 64a3a5f..6a9af7f 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729256560, - "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1728538411, - "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", "type": "github" }, "original": { @@ -64,11 +64,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1729564184, - "narHash": "sha256-dP764PQ6YhjY7C84Txnrb2vf0H2YdQlp5c6a7G18fgw=", + "lastModified": 1739586408, + "narHash": "sha256-UN9hRKRE1eLU8C0cioTZubaCZQTA8NDc8/4vCpS5pS0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "d687672b4541496408068bc273d94c643005d4c9", + "rev": "3dbc0ce1c0690b83cfb9a9a51fbe90c3bc8f9916", "type": "github" }, "original": { diff --git a/nix/default.nix b/nix/default.nix index 3b19743..80fdbe5 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,69 +1,69 @@ -{ rustPlatform -, rust-bin -, pulseaudio -, dbus -, gdk-pixbuf -, gnome -, pkg-config -, wrapGAppsHook4 -, gtk4 -, libadwaita -, python312Packages -, flatpak -, flatpak-builder -, lib -, lockFile -, ... -}: -let +{ + rustPlatform, + rust-bin, + pulseaudio, + dbus, + gdk-pixbuf, + adwaita-icon-theme, + pkg-config, + wrapGAppsHook4, + gtk4, + libadwaita, + python312Packages, + flatpak, + flatpak-builder, + lib, + lockFile, + ... +}: let cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml); in -rustPlatform.buildRustPackage rec { - pname = "ReSet"; - version = cargoToml.package.version; + rustPlatform.buildRustPackage rec { + pname = "ReSet"; + version = cargoToml.package.version; - src = ../.; + src = ../.; - buildInputs = [ - gtk4 - libadwaita - pulseaudio - dbus - gdk-pixbuf - gnome.adwaita-icon-theme - python312Packages.aiohttp - python312Packages.toml - flatpak - flatpak-builder - ]; + buildInputs = [ + gtk4 + libadwaita + pulseaudio + dbus + gdk-pixbuf + adwaita-icon-theme + python312Packages.aiohttp + python312Packages.toml + flatpak + flatpak-builder + ]; - cargoLock = { - inherit lockFile; - }; + cargoLock = { + inherit lockFile; + }; - nativeBuildInputs = [ - pkg-config - wrapGAppsHook4 - rust-bin.nightly."2024-05-10".default - ]; + nativeBuildInputs = [ + pkg-config + wrapGAppsHook4 + rust-bin.nightly."2024-05-10".default + ]; - copyLibs = true; + copyLibs = true; - postInstall = '' - install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop - install -D --mode=444 $src/src/resources/icons/${pname}.svg $out/share/pixmaps/${pname}.svg - ''; + postInstall = '' + install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop + install -D --mode=444 $src/src/resources/icons/${pname}.svg $out/share/pixmaps/${pname}.svg + ''; - # test is broken in nix for some reason - doInstallCheck = false; - doCheck = false; + # test is broken in nix for some reason + doInstallCheck = false; + doCheck = false; - meta = with lib; { - description = "A wip universal Linux settings application."; - homepage = "https://github.com/Xetibo/ReSet"; - changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}"; - license = licenses.gpl3; - maintainers = with maintainers; [ DashieTM ]; - mainProgram = "ReSet"; - }; -} + meta = with lib; { + description = "A wip universal Linux settings application."; + homepage = "https://github.com/Xetibo/ReSet"; + changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [DashieTM]; + mainProgram = "ReSet"; + }; + }