From 23f9d56c7498d7bf7ea5bd04c9e436fdd2b1c24d Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Mon, 9 Jan 2023 13:09:45 +0100 Subject: Define sway module --- aisaka.org | 63 ++++++++++++++++++++++++++++++++++++++++++++------ bash_profile | 0 home-configuration.scm | 13 +++++------ services/sway.scm | 24 +++++++++++++++++++ 4 files changed, 86 insertions(+), 14 deletions(-) create mode 100644 bash_profile create mode 100644 services/sway.scm diff --git a/aisaka.org b/aisaka.org index deb2dc6..a546e85 100644 --- a/aisaka.org +++ b/aisaka.org @@ -40,6 +40,56 @@ This service installs flashrom. (default-value #f))) #+end_src +* TODO Desktop Environment + +Sway is the currently chosen operating environment. + +** TODO Sway Window Manager + +The Sway Window Manager consists of Sway packages and relevant configurations. + +#+name: sway +#+begin_src scheme :tangle services/sway.scm :noweb yes + (add-to-load-path "./services") + + (define-module (sway) + #:use-module (gnu) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services shells)) + + <> + + <> +#+end_src + +*** TODO Sway Installation + +#+name: sway-packages +#+begin_src scheme + (define-public sway-service-type + (service-type + (name 'sway) + (extensions + `(,(service-extension home-profile-service-type + (lambda (_) + (map specification->package + '("sway" + "waybar")))))) + (description "Sway Window Manager installation.") + (default-value #f))) +#+end_src + +*** TODO Sway configuration + +#+name: sway-configuration +#+begin_src scheme + (define-public sway-configuration + (simple-service 'configuration-files home-files-service-type + `((".config/sway/config" ,(local-file "../sway.config")) + (".config/waybar/config" ,(local-file "../waybar.config"))))) +#+end_src + * imported configuration dump ** TODO System configuration @@ -135,7 +185,8 @@ This service installs flashrom. #:use-module (gnu home services shells) #:use-module (gnu packages) #:use-module (gnu services) - #:use-module (guix gexp)) + #:use-module (guix gexp) + #:use-module (sway)) (define allow-downgrades "--allow-downgrades ") @@ -234,13 +285,12 @@ This service installs flashrom. "seahorse" "sicp" "strace" - "sway" "trezor-agent" "unzip" - "waybar" "zip"))) (services - `(,(service flashrom-service-type) + `(,sway-configuration + ,(service flashrom-service-type) ,(service home-bash-service-type (home-bash-configuration (environment-variables '(("EDITOR" . "emacs -nw") @@ -260,15 +310,14 @@ This service installs flashrom. ("system-update-" . ,system-update-))) (bash-profile `(,(local-file "bash_profile"))) (bashrc `(,(local-file "bashrc"))))) + ,(service sway-service-type) ,(simple-service 'configuration-files home-files-service-type `((".config/git/config" ,(local-file "git.config")) (".config/guix/shell-authorized-directories" ,(local-file "guix-shell-authorized-directories")) (".emacs" ,(local-file "emacs.el")) - (".ssh/config" ,(local-file "ssh.config")) - (".config/sway/config" ,(local-file "sway.config")) - (".config/waybar/config" ,(local-file "waybar.config"))))))) + (".ssh/config" ,(local-file "ssh.config"))))))) #+end_src diff --git a/bash_profile b/bash_profile new file mode 100644 index 0000000..e69de29 diff --git a/home-configuration.scm b/home-configuration.scm index 28d9185..d6a3d16 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -7,7 +7,8 @@ #:use-module (gnu home services shells) #:use-module (gnu packages) #:use-module (gnu services) - #:use-module (guix gexp)) + #:use-module (guix gexp) + #:use-module (sway)) (define allow-downgrades "--allow-downgrades ") @@ -106,13 +107,12 @@ "seahorse" "sicp" "strace" - "sway" "trezor-agent" "unzip" - "waybar" "zip"))) (services - `(,(service flashrom-service-type) + `(,sway-configuration + ,(service flashrom-service-type) ,(service home-bash-service-type (home-bash-configuration (environment-variables '(("EDITOR" . "emacs -nw") @@ -132,12 +132,11 @@ ("system-update-" . ,system-update-))) (bash-profile `(,(local-file "bash_profile"))) (bashrc `(,(local-file "bashrc"))))) + ,(service sway-service-type) ,(simple-service 'configuration-files home-files-service-type `((".config/git/config" ,(local-file "git.config")) (".config/guix/shell-authorized-directories" ,(local-file "guix-shell-authorized-directories")) (".emacs" ,(local-file "emacs.el")) - (".ssh/config" ,(local-file "ssh.config")) - (".config/sway/config" ,(local-file "sway.config")) - (".config/waybar/config" ,(local-file "waybar.config"))))))) + (".ssh/config" ,(local-file "ssh.config"))))))) diff --git a/services/sway.scm b/services/sway.scm new file mode 100644 index 0000000..018144f --- /dev/null +++ b/services/sway.scm @@ -0,0 +1,24 @@ +(add-to-load-path "./services") + +(define-module (sway) + #:use-module (gnu) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services shells)) + +(define-public sway-service-type + (service-type + (name 'sway) + (extensions + `(,(service-extension home-profile-service-type + (lambda (_) + (map specification->package + '("sway" + "waybar")))))) + (description "Sway Window Manager installation.") + (default-value #f))) + +(define-public sway-configuration + (simple-service 'configuration-files home-files-service-type + `((".config/sway/config" ,(local-file "../sway.config")) + (".config/waybar/config" ,(local-file "../waybar.config"))))) -- cgit v1.2.3