mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-03-25 19:24:22 +00:00
Compare commits
3 Commits
9cb7193827
...
5cbca316d9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cbca316d9 | ||
|
|
55459b2515 | ||
|
|
0dbc71e278 |
@ -17,7 +17,7 @@
|
||||
(define-public atuin
|
||||
(package
|
||||
(name "atuin")
|
||||
(version "18.4.0")
|
||||
(version "18.9.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
@ -26,52 +26,23 @@
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1zi7ar999ycvig9c9crylab540xdgr0h6v99q9j8ypk9i1fviyiz"))))
|
||||
"026acssbzz01xfzl3acq56szzpyh76dzwp2m8z1pi29hlmbnyfli"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:tests? #f ;TODO.
|
||||
#:install-source? #f
|
||||
#:features
|
||||
''("client" "sync" "server" "clipboard" "daemon")
|
||||
''("client" "sync" "clipboard" "daemon")
|
||||
#:cargo-install-paths
|
||||
''("crates/atuin")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'disable-failing-tests
|
||||
(lambda _
|
||||
(substitute* '("crates/atuin/tests/sync.rs"
|
||||
"crates/atuin/tests/users.rs"
|
||||
"crates/atuin-dotfiles/src/store.rs"
|
||||
"crates/atuin-dotfiles/src/store/var.rs")
|
||||
(((string-append
|
||||
".*async fn (" (string-join
|
||||
'(;; Require running database.
|
||||
"build_aliases"
|
||||
"build_vars"
|
||||
"sync"
|
||||
"registration"
|
||||
"change_password"
|
||||
"multi_user_test")
|
||||
"|") ")")
|
||||
all)
|
||||
(string-append "#[ignore]\n" all)))))
|
||||
(add-after 'unpack 'patch-references
|
||||
(lambda _
|
||||
(substitute* (find-files "crates/atuin/src/shell")
|
||||
(("atuin (uuid|history|search)" all)
|
||||
(string-append #$output "/bin/" all)))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs features #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(registry (string-append out "/share/cargo/registry"))
|
||||
(sources (string-append out "/share/cargo/src")))
|
||||
(mkdir-p out)
|
||||
;; Make cargo reuse all the artifacts we just built instead
|
||||
;; of defaulting to making a new temp directory
|
||||
(setenv "CARGO_TARGET_DIR" "./target")
|
||||
;; Only install crates which include binary targets,
|
||||
;; otherwise cargo will raise an error.
|
||||
(invoke "cargo" "install" "--no-track" "--path" "crates/atuin"
|
||||
"--root" out "--features" (string-join features))))))))
|
||||
(string-append #$output "/bin/" all))))))))
|
||||
(inputs (cons sqlite (rosenthal-cargo-inputs 'atuin)))
|
||||
(home-page "https://atuin.sh/")
|
||||
(synopsis "Sync, search and backup shell history")
|
||||
@ -79,6 +50,4 @@
|
||||
"Atuin replaces existing shell history with a SQLite database, and records
|
||||
additional context for commands. Additionally, it provides optional and fully
|
||||
encrypted synchronisation of history between machines, via an Atuin server.")
|
||||
(license license:expat)
|
||||
(properties
|
||||
'((disable-updater? . #t)))))
|
||||
(license license:expat)))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,7 @@
|
||||
#:use-module (gnu services sddm)
|
||||
#:use-module (gnu services xorg)
|
||||
#:use-module (rosenthal services base)
|
||||
#:use-module (rosenthal services networking)
|
||||
;; Guix Home - services
|
||||
#:use-module (gnu home)
|
||||
#:use-module (gnu home services)
|
||||
@ -626,7 +627,9 @@ gtk-key-theme-name = ~a~%"
|
||||
gdm-service-type
|
||||
sddm-service-type))
|
||||
|
||||
(cons* (service bluetooth-service-type
|
||||
(cons* (service network-online-service-type)
|
||||
|
||||
(service bluetooth-service-type
|
||||
(bluetooth-configuration
|
||||
(auto-enable? #t)))
|
||||
|
||||
@ -699,6 +702,8 @@ gtk-key-theme-name = ~a~%"
|
||||
(auto-start? #f)
|
||||
(daemonize? #f)))
|
||||
|
||||
(service home-network-online-service-type)
|
||||
|
||||
;; NOTE: The environment variable set by ‘home-dbus-service-type’ will
|
||||
;; prevent GNOME from starting when using above Shepherd configuration.
|
||||
;; Replace ‘home-dbus-service-type’, expecting the session bus will be
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
;; Guile builtins
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
;; Utilities
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix records)
|
||||
@ -17,16 +18,73 @@
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu services dbus)
|
||||
#:use-module (gnu services shepherd)
|
||||
;; Guix Home - services
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services shepherd)
|
||||
;; Guix packages
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages networking)
|
||||
#:use-module (rosenthal packages networking)
|
||||
#:export (sing-box-service-type
|
||||
#:export (network-online-service-type
|
||||
home-network-online-service-type
|
||||
|
||||
sing-box-service-type
|
||||
sing-box-configuration
|
||||
|
||||
tailscale-configuration
|
||||
tailscale-service-type))
|
||||
|
||||
|
||||
;;;
|
||||
;;; network-online (https://codeberg.org/guix/guix/issues/838#issue-1886438)
|
||||
;;;
|
||||
|
||||
(define* (%network-online-shepherd _ #:key home-service?)
|
||||
(list (shepherd-service
|
||||
(requirement (if home-service? '() '(networking)))
|
||||
(provision '(network-online))
|
||||
(documentation "Wait for the network to come up.")
|
||||
(one-shot? #t)
|
||||
(start
|
||||
#~(lambda _
|
||||
(let ((timeout #$(file-append coreutils-minimal "/bin/timeout"))
|
||||
(sh #$(file-append bash-minimal "/bin/sh"))
|
||||
(ping (if #$home-service?
|
||||
"ping"
|
||||
#$(file-append inetutils "/bin/ping"))))
|
||||
(zero?
|
||||
(system* timeout "60" sh "-c"
|
||||
(format #f "\
|
||||
until ~a -qc1 -W1 example.org
|
||||
do
|
||||
sleep 1
|
||||
done"
|
||||
ping)))))))))
|
||||
|
||||
(define network-online-service-type
|
||||
(service-type
|
||||
(name 'network-online)
|
||||
(extensions
|
||||
(list (service-extension shepherd-root-service-type
|
||||
%network-online-shepherd)))
|
||||
(default-value #f)
|
||||
(description "Wait for the network to come up.")))
|
||||
|
||||
(define home-network-online-service-type
|
||||
(service-type
|
||||
(inherit network-online-service-type)
|
||||
(name 'home-network-online)
|
||||
(extensions
|
||||
(list (service-extension home-shepherd-service-type
|
||||
(cut %network-online-shepherd <> #:home-service? #t))))))
|
||||
|
||||
(define-service-type-mapping
|
||||
network-online-service-type => home-network-online-service-type)
|
||||
|
||||
|
||||
;;;
|
||||
;;; sing-box
|
||||
;;;
|
||||
|
||||
@ -54,8 +54,11 @@
|
||||
(atuin)
|
||||
(home-fish-extension
|
||||
(config
|
||||
(list (mixed-text-file "atuin.fish"
|
||||
atuin "/bin/atuin init fish | source\n"))))))
|
||||
(list (mixed-text-file "atuin.fish" "\
|
||||
status is-interactive
|
||||
and begin
|
||||
" atuin "/bin/atuin init fish | source
|
||||
end\n"))))))
|
||||
|
||||
(define home-fish-plugin-atuin-service-type
|
||||
(service-type
|
||||
@ -88,8 +91,11 @@
|
||||
(direnv)
|
||||
(home-fish-extension
|
||||
(config
|
||||
(list (mixed-text-file "direnv.fish"
|
||||
direnv "/bin/direnv hook fish | source\n"))))))
|
||||
(list (mixed-text-file "direnv.fish" "\
|
||||
status is-interactive
|
||||
and begin
|
||||
" direnv "/bin/direnv hook fish | source
|
||||
end\n"))))))
|
||||
|
||||
(define home-fish-plugin-direnv-service-type
|
||||
(service-type
|
||||
@ -122,8 +128,11 @@
|
||||
(zoxide)
|
||||
(home-fish-extension
|
||||
(config
|
||||
(list (mixed-text-file "zoxide.fish"
|
||||
zoxide "/bin/zoxide init --cmd cd fish | source\n"))))))
|
||||
(list (mixed-text-file "zoxide.fish" "\
|
||||
status is-interactive
|
||||
and begin
|
||||
" zoxide "/bin/zoxide init --cmd cd fish | source
|
||||
end\n"))))))
|
||||
|
||||
(define home-fish-plugin-zoxide-service-type
|
||||
(service-type
|
||||
|
||||
Loading…
Reference in New Issue
Block a user