From dae7ceec9603208cab6412534aa84b918071606c Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 4 Oct 2024 08:50:39 +0200 Subject: Change channels and combine home with system config. --- files/.bin/home-reconfigure | 4 +- files/.bin/system-reconfigure | 4 +- files/.config/guix/channels.scm | 24 +++--------- guix/jd/desktops/base.scm | 79 +++++++++++++++------------------------ guix/jd/home/services/desktop.scm | 21 ++++++++++- 5 files changed, 59 insertions(+), 73 deletions(-) diff --git a/files/.bin/home-reconfigure b/files/.bin/home-reconfigure index 4d16cc0..f55b896 100755 --- a/files/.bin/home-reconfigure +++ b/files/.bin/home-reconfigure @@ -2,8 +2,8 @@ if [ -n "$1" ]; then guix home -L $1 reconfigure \ - -e '((@@ (jd utils) current-home))' + -e '((@ (jd utils) current-home))' else guix home reconfigure \ - -e '((@@ (jd utils) current-home))' + -e '((@ (jd utils) current-home))' fi; diff --git a/files/.bin/system-reconfigure b/files/.bin/system-reconfigure index dae18f6..e76ba27 100755 --- a/files/.bin/system-reconfigure +++ b/files/.bin/system-reconfigure @@ -2,9 +2,9 @@ if [ -n "$1" ]; then sudo -E guix system -L $1 reconfigure \ - -e '((@@ (jd utils) current-operating-system))' + -e '((@ (jd utils) current-operating-system))' else sudo -E guix system reconfigure \ - -e '((@@ (jd utils) current-operating-system))' + -e '((@ (jd utils) current-operating-system))' fi; diff --git a/files/.config/guix/channels.scm b/files/.config/guix/channels.scm index 13bee44..cb25ece 100755 --- a/files/.config/guix/channels.scm +++ b/files/.config/guix/channels.scm @@ -1,19 +1,5 @@ -(cons* (channel - (name 'rustup) - (url "https://github.com/declantsien/guix-rustup") - (introduction - (make-channel-introduction - "325d3e2859d482c16da21eb07f2c6ff9c6c72a80" - (openpgp-fingerprint - "F695 F39E C625 E081 33B5 759F 0FC6 8703 75EF E2F5")))) - - (channel - (name 'nonguix) - (url "https://gitlab.com/nonguix/nonguix") - ;; Enable signature verification: - (introduction - (make-channel-introduction - "897c1a470da759236cc11798f4e0a5f7d4d59fbc" - (openpgp-fingerprint - "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) - %default-channels) +(cons* (channel + (name 'jdlugosz) + (branch "main") + (url "https://github.com/jdlugosz963/dotfiles")) + %default-channels) diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm index 079d57e..2cd98fd 100644 --- a/guix/jd/desktops/base.scm +++ b/guix/jd/desktops/base.scm @@ -22,7 +22,7 @@ (use-service-modules cups desktop networking ssh xorg docker virtualization pm sound dbus - nix sddm) + nix sddm guix) (define-public %jd-base-home-services (list @@ -119,37 +119,18 @@ (define-public %jd-base-services (cons* - (service openssh-service-type) + (service guix-home-service-type + `(("jakub" ,(home-environment + (services %jd-base-home-services))))) - ;; (set-xorg-configuration - ;; (xorg-configuration ;for Xorg - ;; (keyboard-layout (keyboard-layout "pl")))) - ;; (service greetd-service-type - ;; (greetd-configuration - ;; ;; We need to give the greeter user these permissions, otherwise - ;; ;; Sway will crash on launch. - ;; (greeter-supplementary-groups (list "video" "input")) - ;; (terminals - ;; (list (greetd-terminal-configuration - ;; (terminal-vt "1") - ;; (terminal-switch #t)) - ;; (greetd-terminal-configuration - ;; (terminal-vt "2")) - ;; (greetd-terminal-configuration - ;; (terminal-vt "3")) - ;; (greetd-terminal-configuration - ;; (terminal-vt "4")) - ;; (greetd-terminal-configuration - ;; (terminal-vt "5")) - ;; (greetd-terminal-configuration - ;; (terminal-vt "6")))))) + (service openssh-service-type) (service console-font-service-type - (map (lambda (tty) - (cons tty (file-append - font-terminus - "/share/consolefonts/ter-122n.psf.gz"))) - '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) + (map (lambda (tty) + (cons tty (file-append + font-terminus + "/share/consolefonts/ter-122n.psf.gz"))) + '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) (service screen-locker-service-type (screen-locker-configuration @@ -202,26 +183,26 @@ ;; %desktop-services (modify-services %desktop-services - (guix-service-type config => (guix-configuration - (inherit config) - (substitute-urls - (append (list "https://substitutes.nonguix.org") - %default-substitute-urls)) - (authorized-keys - (append (list (plain-file "non-guix.pub" - "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) - %default-authorized-guix-keys)))) - (delete network-manager-service-type) - ;; (delete mingetty-service-type) - (delete console-font-service-type) - - (delete pulseaudio-service-type) - (delete alsa-service-type) - (delete (if (string-prefix? "x86_64" - (or (%current-target-system) - (%current-system))) - gdm-service-type - sddm-service-type))))) + (guix-service-type config => (guix-configuration + (inherit config) + (substitute-urls + (append (list "https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (append (list (plain-file "non-guix.pub" + "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) + %default-authorized-guix-keys)))) + (delete network-manager-service-type) + ;; (delete mingetty-service-type) + (delete console-font-service-type) + + (delete pulseaudio-service-type) + (delete alsa-service-type) + (delete (if (string-prefix? "x86_64" + (or (%current-target-system) + (%current-system))) + gdm-service-type + sddm-service-type))))) ;; Odin is a base for my operating systems (define-public odin-free diff --git a/guix/jd/home/services/desktop.scm b/guix/jd/home/services/desktop.scm index 32c8059..d5aa414 100644 --- a/guix/jd/home/services/desktop.scm +++ b/guix/jd/home/services/desktop.scm @@ -13,6 +13,7 @@ #:use-module (gnu home services sound) #:use-module (gnu home services xdg) #:use-module (gnu home services gnupg) + #:use-module (gnu home services dotfiles) #:use-module (guix gexp) #:use-module (jd packages fonts)) @@ -33,6 +34,9 @@ "wlsunset" "grimshot" "swappy" + + "htop" + "distrobox" "udiskie" ;; rest @@ -121,7 +125,7 @@ `(("GTK_THEME" . "Adwaita:dark") ("VISUAL" . "emacsclient") ("EDITOR" . "emacsclient") - ("PATH" . "$HOME/.bin:$HOME/.npm-global/bin:$PATH") + ("PATH" . "$HOME/.bin:$HOME/.local/bin:$HOME/.npm-global/bin:$PATH") ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share") ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/") @@ -161,6 +165,19 @@ (default-cache-ttl-ssh 28800) (max-cache-ttl-ssh 28800))) +(define (desktop-gpg-agent-service config) + (home-gpg-agent-configuration + (pinentry-program + (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) + (ssh-support? #t) + (default-cache-ttl 28800) + (max-cache-ttl 28800) + (default-cache-ttl-ssh 28800) + (max-cache-ttl-ssh 28800))) + +(define (desktop-dotfiles-service config) + (home-dotfiles-configuration + (directories '("./files")))) (define-public home-desktop-service-type (service-type (name 'home-desktop) @@ -174,6 +191,8 @@ desktop-xdg-mime-applications-service) (service-extension home-gpg-agent-service-type desktop-gpg-agent-service) + (service-extension home-dotfiles-service-type + desktop-dotfiles-service) )) (default-value #f) (description "Runs desktop services."))) -- cgit v1.2.3