summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el125
-rw-r--r--.gitignore2
-rw-r--r--.guix-channel23
-rw-r--r--Makefile25
-rw-r--r--channels-lock.scm35
-rw-r--r--files/.Xmodmap2
-rw-r--r--files/.bash_profile17
-rwxr-xr-xfiles/.bin/arduino-cli14
-rwxr-xr-xfiles/.bin/chiaki21
-rwxr-xr-xfiles/.bin/clean.sh3
-rwxr-xr-xfiles/.bin/download_music.sh26
-rwxr-xr-xfiles/.bin/esp_upload.sh6
-rwxr-xr-xfiles/.bin/file_upload.sh38
-rwxr-xr-xfiles/.bin/guix-container8
-rwxr-xr-xfiles/.bin/home-reconfigure9
-rw-r--r--files/.bin/jd-arduino-cli.Dockerfile16
-rwxr-xr-xfiles/.bin/mount-nas-abaks1
-rwxr-xr-xfiles/.bin/oath14
-rwxr-xr-xfiles/.bin/profile-add-all9
-rwxr-xr-xfiles/.bin/stumpish196
-rwxr-xr-xfiles/.bin/system-reconfigure10
-rwxr-xr-xfiles/.bin/update.sh4
-rwxr-xr-xfiles/.bin/whois-at-hsp84
-rw-r--r--files/.config/alacritty/alacritty.toml46
-rw-r--r--files/.config/alacritty/alacritty.toml.old23
-rw-r--r--files/.config/alacritty/alacritty.yaml27
-rw-r--r--files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf1
-rw-r--r--files/.config/distrobox/distrobox.conf10
-rw-r--r--files/.config/dunst/dunstrc177
-rw-r--r--files/.config/guix/.gitignore1
-rwxr-xr-xfiles/.config/guix/channels.scm5
-rw-r--r--files/.config/guix/shell-authorized-directories10
-rw-r--r--files/.config/picom/picom.conf117
-rw-r--r--files/.config/polybar/config.ini122
-rwxr-xr-xfiles/.config/qtile/autorc31
-rw-r--r--files/.config/qtile/config.py232
-rwxr-xr-xfiles/.config/qtile/mdt_shell1
-rw-r--r--files/.config/qtile/photos/desktop.pngbin1555228 -> 0 bytes
-rw-r--r--files/.config/qtile/python.pngbin52166 -> 0 bytes
-rw-r--r--files/.config/qtile/readme.org5
-rw-r--r--files/.config/sway/config195
-rw-r--r--files/.config/waybar/config159
-rw-r--r--files/.config/waybar/style.css205
-rw-r--r--files/.emacs.d/.gitignore5
-rwxr-xr-xfiles/.emacs.d/init.el146
-rwxr-xr-xfiles/.emacs.d/jd/jd-apps.el49
-rwxr-xr-xfiles/.emacs.d/jd/jd-custom.el33
-rwxr-xr-xfiles/.emacs.d/jd/jd-dev.el177
-rwxr-xr-xfiles/.emacs.d/jd/jd-exwm.el177
-rwxr-xr-xfiles/.emacs.d/jd/jd-gym.el120
-rwxr-xr-xfiles/.emacs.d/jd/jd-keys.el49
-rw-r--r--files/.emacs.d/jd/jd-misc.el34
-rwxr-xr-xfiles/.emacs.d/jd/jd-mu4e.el84
-rwxr-xr-xfiles/.emacs.d/jd/jd-org.el222
-rw-r--r--files/.emacs.d/jd/jd-sway.el18
-rwxr-xr-xfiles/.emacs.d/jd/jd-ui.el104
-rw-r--r--files/.gitignore7
-rw-r--r--files/.guile2
-rw-r--r--files/.mbsyncrc47
-rw-r--r--files/.nix-channels1
-rw-r--r--files/.stumpwm.d/.gitignore1
-rwxr-xr-xfiles/.stumpwm.d/init.lisp360
-rw-r--r--guix/jd/desktops/base.scm236
-rwxr-xr-xguix/jd/desktops/berserker.scm17
-rw-r--r--guix/jd/desktops/mimir.scm14
-rw-r--r--guix/jd/home/services/desktop.scm199
-rw-r--r--guix/jd/home/services/emacs.scm113
-rw-r--r--guix/jd/home/services/polkit.scm31
-rw-r--r--guix/jd/packages/emacs.scm57
-rw-r--r--guix/jd/packages/fonts.scm25
-rw-r--r--guix/jd/packages/linux.scm51
-rw-r--r--guix/jd/services/polkit.scm21
-rw-r--r--guix/jd/utils.scm75
-rw-r--r--signing-key.pub7
-rw-r--r--src/gnu/home-services/state.scm223
-rw-r--r--src/jd/config.scm23
-rw-r--r--src/jd/features/emacs-xyz.scm127
-rw-r--r--src/jd/features/mail.scm147
-rw-r--r--src/jd/features/math.scm68
-rw-r--r--src/jd/features/networking.scm95
-rw-r--r--src/jd/features/nextcloud.scm50
-rw-r--r--src/jd/features/shepherd.scm33
-rw-r--r--src/jd/features/state.scm25
-rw-r--r--src/jd/host.scm71
-rw-r--r--src/jd/packages/python.scm170
-rw-r--r--src/jd/packages/supernote.scm48
-rw-r--r--src/jd/user.scm567
87 files changed, 1841 insertions, 4343 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..9329312
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,125 @@
1;; Per-directory local variables for GNU Emacs 23 and later.
2
3((nil
4 . ((fill-column . 78)
5 (sentence-end-double-space . t)
6 ;; (guix-current-profile . ) ;; TODO: Wpisac by wsakzywalo na ./guix/etc/profile
7 ))
8
9 (scheme-mode
10 .
11 ((indent-tabs-mode . nil)
12 (eval . (put 'with-eval-after-load 'scheme-indent-function 1))
13
14 (eval . (put 'eval-when 'scheme-indent-function 1))
15 (eval . (put 'call-with-prompt 'scheme-indent-function 1))
16 (eval . (put 'test-assert 'scheme-indent-function 1))
17 (eval . (put 'test-assertm 'scheme-indent-function 1))
18 (eval . (put 'test-equalm 'scheme-indent-function 1))
19 (eval . (put 'test-equal 'scheme-indent-function 1))
20 (eval . (put 'test-eq 'scheme-indent-function 1))
21 (eval . (put 'call-with-input-string 'scheme-indent-function 1))
22 (eval . (put 'guard 'scheme-indent-function 1))
23 (eval . (put 'lambda* 'scheme-indent-function 1))
24 (eval . (put 'substitute* 'scheme-indent-function 1))
25 (eval . (put 'match-record 'scheme-indent-function 2))
26
27 ;; 'modify-inputs' and its keywords.
28 (eval . (put 'modify-inputs 'scheme-indent-function 1))
29 (eval . (put 'replace 'scheme-indent-function 1))
30
31 ;; 'modify-phases' and its keywords.
32 (eval . (put 'modify-phases 'scheme-indent-function 1))
33 (eval . (put 'replace 'scheme-indent-function 1))
34 (eval . (put 'add-before 'scheme-indent-function 2))
35 (eval . (put 'add-after 'scheme-indent-function 2))
36
37 (eval . (put 'modify-services 'scheme-indent-function 1))
38 (eval . (put 'with-directory-excursion 'scheme-indent-function 1))
39 (eval . (put 'with-file-lock 'scheme-indent-function 1))
40 (eval . (put 'with-file-lock/no-wait 'scheme-indent-function 1))
41 (eval . (put 'with-profile-lock 'scheme-indent-function 1))
42 (eval . (put 'with-writable-file 'scheme-indent-function 2))
43
44 (eval . (put 'package 'scheme-indent-function 0))
45 (eval . (put 'package/inherit 'scheme-indent-function 1))
46 (eval . (put 'origin 'scheme-indent-function 0))
47 (eval . (put 'build-system 'scheme-indent-function 0))
48 (eval . (put 'bag 'scheme-indent-function 0))
49 (eval . (put 'gexp->derivation 'scheme-indent-function 1))
50 (eval . (put 'graft 'scheme-indent-function 0))
51 (eval . (put 'operating-system 'scheme-indent-function 0))
52 (eval . (put 'file-system 'scheme-indent-function 0))
53 (eval . (put 'manifest-entry 'scheme-indent-function 0))
54 (eval . (put 'manifest-pattern 'scheme-indent-function 0))
55 (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1))
56 (eval . (put 'with-store 'scheme-indent-function 1))
57 (eval . (put 'with-external-store 'scheme-indent-function 1))
58 (eval . (put 'with-error-handling 'scheme-indent-function 0))
59 (eval . (put 'with-mutex 'scheme-indent-function 1))
60 (eval . (put 'with-atomic-file-output 'scheme-indent-function 1))
61 (eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2))
62 (eval . (put 'call-with-decompressed-port 'scheme-indent-function 2))
63 (eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1))
64 (eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1))
65 (eval . (put 'call-with-lzip-input-port 'scheme-indent-function 1))
66 (eval . (put 'call-with-lzip-output-port 'scheme-indent-function 1))
67 (eval . (put 'signature-case 'scheme-indent-function 1))
68 (eval . (put 'emacs-batch-eval 'scheme-indent-function 0))
69 (eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1))
70 (eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1))
71 (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1))
72 (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1))
73 (eval . (put 'with-derivation-substitute 'scheme-indent-function 2))
74 (eval . (put 'with-status-report 'scheme-indent-function 1))
75 (eval . (put 'with-status-verbosity 'scheme-indent-function 1))
76 (eval . (put 'with-build-handler 'scheme-indent-function 1))
77
78 (eval . (put 'mlambda 'scheme-indent-function 1))
79 (eval . (put 'mlambdaq 'scheme-indent-function 1))
80 (eval . (put 'syntax-parameterize 'scheme-indent-function 1))
81 (eval . (put 'with-monad 'scheme-indent-function 1))
82 (eval . (put 'mbegin 'scheme-indent-function 1))
83 (eval . (put 'mwhen 'scheme-indent-function 1))
84 (eval . (put 'munless 'scheme-indent-function 1))
85 (eval . (put 'mlet* 'scheme-indent-function 2))
86 (eval . (put 'mlet 'scheme-indent-function 2))
87 (eval . (put 'run-with-store 'scheme-indent-function 1))
88 (eval . (put 'run-with-state 'scheme-indent-function 1))
89 (eval . (put 'wrap-program 'scheme-indent-function 1))
90 (eval . (put 'with-imported-modules 'scheme-indent-function 1))
91 (eval . (put 'with-extensions 'scheme-indent-function 1))
92 (eval . (put 'with-parameters 'scheme-indent-function 1))
93 (eval . (put 'let-system 'scheme-indent-function 1))
94 (eval . (put 'with-build-variables 'scheme-indent-function 2))
95
96 (eval . (put 'with-database 'scheme-indent-function 2))
97 (eval . (put 'call-with-database 'scheme-indent-function 1))
98 (eval . (put 'call-with-transaction 'scheme-indent-function 1))
99 (eval . (put 'with-statement 'scheme-indent-function 3))
100 (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 1))
101 (eval . (put 'call-with-savepoint 'scheme-indent-function 1))
102 (eval . (put 'call-with-retrying-savepoint 'scheme-indent-function 1))
103
104 (eval . (put 'call-with-container 'scheme-indent-function 1))
105 (eval . (put 'container-excursion 'scheme-indent-function 1))
106 (eval . (put 'eventually 'scheme-indent-function 1))
107
108 (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1))
109 (eval . (put 'with-repository 'scheme-indent-function 2))
110 (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2))
111 (eval . (put 'with-environment-variables 'scheme-indent-function 1))
112 (eval . (put 'with-fresh-gnupg-setup 'scheme-indent-function 1))
113
114 (eval . (put 'with-paginated-output-port 'scheme-indent-function 1))
115
116 (eval . (put 'with-shepherd-action 'scheme-indent-function 3))
117
118 ;; This notably allows '(' in Paredit to not insert a space when the
119 ;; preceding symbol is one of these.
120 (eval . (modify-syntax-entry ?~ "'"))
121 (eval . (modify-syntax-entry ?$ "'"))
122 (eval . (modify-syntax-entry ?+ "'"))))
123 (emacs-lisp-mode . ((indent-tabs-mode . nil)))
124 (texinfo-mode . ((indent-tabs-mode . nil)
125 (fill-column . 72))))
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0237959
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
1.nrepl-port
2guix
diff --git a/.guix-channel b/.guix-channel
deleted file mode 100644
index 57f7a2c..0000000
--- a/.guix-channel
+++ /dev/null
@@ -1,23 +0,0 @@
1(channel
2 (version 0)
3 (directory "guix")
4 (url "https://github.com/jdlugosz963/dotfiles")
5 (dependencies
6 (channel
7 (name nonguix)
8 (url "https://gitlab.com/nonguix/nonguix")
9 (branch "master")
10 (introduction
11 (channel-introduction
12 (version 0)
13 (commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc")
14 (signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
15 (channel
16 (name rustup)
17 (url "https://github.com/declantsien/guix-rustup")
18 (branch "master")
19 (introduction
20 (channel-introduction
21 (version 0)
22 (commit "325d3e2859d482c16da21eb07f2c6ff9c6c72a80")
23 (signer "F695 F39E C625 E081 33B5 759F 0FC6 8703 75EF E2F5")))))) \ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ee4387d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
1.DEFAULT_GOAL := reconfigure
2
3CHANNELS_FILE=./channels-lock.scm
4GUIXTM=guix time-machine -C ${CHANNELS_FILE}
5
6GUIX=$(GUIXTM) --
7
8env:
9 guix build \
10 -e '((@ (gnu packages package-management) guix-for-channels) (load "${CHANNELS_FILE}"))' \
11 -r guix
12
13repl:
14 ${GUIX} shell guile-next guile-ares-rs \
15 -e '((@ (rde packages guix) make-guix-package) (load "${CHANNELS_FILE}"))' \
16 -e '((@ (rde packages guix) make-channels-package) (load "${CHANNELS_FILE}"))' \
17 -- guile \
18 -L ./src \
19 -c \
20 "(begin (use-modules (guix gexp)) ((@ (ares server) run-nrepl-server)))"
21
22reconfigure:
23 sudo -E ${GUIX} system -L ./src reconfigure \
24 -e "(@ (jd config) %os)" \
25 --substitute-urls='https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org'
diff --git a/channels-lock.scm b/channels-lock.scm
new file mode 100644
index 0000000..d788474
--- /dev/null
+++ b/channels-lock.scm
@@ -0,0 +1,35 @@
1(use-modules (guix channels))
2
3(list (channel
4 (name 'rde)
5 (url "https://git.sr.ht/~abcdw/rde")
6 (branch "master")
7 (commit
8 "c0694b353d816c8ee95324db979116253b65c571")
9 (introduction
10 (make-channel-introduction
11 "257cebd587b66e4d865b3537a9a88cccd7107c95"
12 (openpgp-fingerprint
13 "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0"))))
14 (channel
15 (name 'guix)
16 (url "https://codeberg.org/guix/guix.git")
17 (branch "master")
18 (commit
19 "26729b9cf0e1be0ff9219f5f508ef95bc7f5985a")
20 (introduction
21 (make-channel-introduction
22 "9edb3f66fd807b096b48283debdcddccfea34bad"
23 (openpgp-fingerprint
24 "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
25 (channel
26 (name 'nonguix)
27 (url "https://gitlab.com/nonguix/nonguix")
28 (branch "master")
29 (commit
30 "3f4a1907cae9b0def09d1549c491bb4e307b9097")
31 (introduction
32 (make-channel-introduction
33 "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
34 (openpgp-fingerprint
35 "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
diff --git a/files/.Xmodmap b/files/.Xmodmap
deleted file mode 100644
index cb4706f..0000000
--- a/files/.Xmodmap
+++ /dev/null
@@ -1,2 +0,0 @@
1clear lock
2keycode 0x42 = Escape
diff --git a/files/.bash_profile b/files/.bash_profile
deleted file mode 100644
index 14802fe..0000000
--- a/files/.bash_profile
+++ /dev/null
@@ -1,17 +0,0 @@
1# Honor per-interactive-shell startup file
2if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
3
4export GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
5
6for i in $GUIX_EXTRA_PROFILES/*; do
7 profile=$i/$(basename "$i")
8 if [ -f "$profile"/etc/profile ]; then
9 GUIX_PROFILE="$profile"
10 . "$GUIX_PROFILE"/etc/profile
11 fi
12 unset profile
13done
14
15export NIX_PATH=~/.nix-defexpr/channels/nixos/
16
17. .profile
diff --git a/files/.bin/arduino-cli b/files/.bin/arduino-cli
deleted file mode 100755
index 7c0d41a..0000000
--- a/files/.bin/arduino-cli
+++ /dev/null
@@ -1,14 +0,0 @@
1#!/bin/sh
2
3SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4
5if [[ $(docker images | grep jd-arduino-cli | wc -l) -eq 0 ]]
6then
7 docker build -f "$SCRIPT_DIR/jd-arduino-cli.Dockerfile" -t jd-arduino-cli .
8fi
9
10docker run --rm --network none -it --privileged \
11 -v $(pwd):/src \
12 -v jd-arduino-cli-tmp:/tmp \
13 -v /dev:/dev jd-arduino-cli \
14 arduino-cli $@
diff --git a/files/.bin/chiaki b/files/.bin/chiaki
deleted file mode 100755
index 5fa6547..0000000
--- a/files/.bin/chiaki
+++ /dev/null
@@ -1,21 +0,0 @@
1#!/bin/sh
2
3CHIAKI_SHELL=/tmp/.chiaki.nix
4
5cat <<EOF > $CHIAKI_SHELL
6let
7 nixgl = import (fetchTarball https://github.com/guibou/nixGL/archive/main.tar.gz) { };
8in
9{ nixpkgs ? import <nixpkgs> {} }:
10with nixpkgs; mkShell {
11 buildInputs = [
12 chiaki
13 nixgl.auto.nixGLDefault
14 ];
15 shellHook = ''
16 nixGL chiaki && exit;
17 '';
18}
19EOF
20
21nix-shell $CHIAKI_SHELL
diff --git a/files/.bin/clean.sh b/files/.bin/clean.sh
deleted file mode 100755
index 3e6bbfd..0000000
--- a/files/.bin/clean.sh
+++ /dev/null
@@ -1,3 +0,0 @@
1#!/bin/sh
2
3sudo emerge --ask --depclean;
diff --git a/files/.bin/download_music.sh b/files/.bin/download_music.sh
deleted file mode 100755
index e3a3601..0000000
--- a/files/.bin/download_music.sh
+++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/sh
2
3BOLD="\e[1";
4ENDCOLOR="\e[0m";
5Green="32";
6LightRed="31";
7
8if ! [ $1 ]; then
9 echo ""
10 echo -e $BOLD";"";"$LightRed"m Please provide music url!"$ENDCOLOR
11 echo ""
12 exit
13fi
14
15MUSIC_DIR="~/Documents/Music/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s"
16if [ $2 ]; then
17 MUSIC_DIR="${a}/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s"
18fi
19
20echo ""
21echo -e $BOLD";"";"$Green"m Music will download to ${MUSIC_DIR} directory!"$ENDCOLOR
22echo ""
23
24sleep 1
25
26yt-dlp -x --audio-format mp3 --embed-metadata -o $MUSIC_DIR $1
diff --git a/files/.bin/esp_upload.sh b/files/.bin/esp_upload.sh
deleted file mode 100755
index 27d8d41..0000000
--- a/files/.bin/esp_upload.sh
+++ /dev/null
@@ -1,6 +0,0 @@
1#!/bin/sh
2
3# rm /tmp/arduino-sketch-*/ -r
4~/.local/bin/arduino-cli cache clean
5~/.local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2
6~/.local/bin/arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2
diff --git a/files/.bin/file_upload.sh b/files/.bin/file_upload.sh
deleted file mode 100755
index 0ff6c57..0000000
--- a/files/.bin/file_upload.sh
+++ /dev/null
@@ -1,38 +0,0 @@
1#!/bin/sh
2
3BOLD="\e[1";
4ENDCOLOR="\e[0m";
5Green="32m";
6LightRed="31m";
7
8echo ""
9echo -e $BOLD";"";"$Green" FILE UPLOADER"$ENDCOLOR
10echo ""
11
12if ! [ $1 ]; then
13 echo ""
14 echo -e $BOLD";"";"$LightRed" Please provide file path!"$ENDCOLOR
15 echo ""
16 exit
17fi
18
19if [ $1 ]; then
20 echo -e " Are u sure u want upload this file: "$BOLD";"";"$Green" '$1'"$ENDCOLOR"? [y/N]: "
21 read -p " " input
22 echo ""
23 # read -r -p " " input
24 case $input in
25 [yY][eE][sS]|[yY])
26 URL=$(curl -s -F "file=@$1" https://0x0.st);
27 echo -e " URL: "$BOLD";"";"$Green"$URL"$ENDCOLOR;
28 ;;
29 [nN][oO]|[nN])
30 echo -e $BOLD";"";"$Green" OK"$ENDCOLOR;
31 ;;
32 *)
33 echo -e $BOLD";"";"$LightRed" Invalid input..."$ENDCOLOR;
34 exit 1
35 ;;
36 esac
37 echo ""
38fi;
diff --git a/files/.bin/guix-container b/files/.bin/guix-container
deleted file mode 100755
index 162eda0..0000000
--- a/files/.bin/guix-container
+++ /dev/null
@@ -1,8 +0,0 @@
1#!/bin/sh
2
3guix shell -C -F -N \
4 -E XDG_RUNTIME_DIR=/tmp \
5 -E WAYLAND_DISPLAY \
6 -E DISPLAY \
7 --share=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY=/tmp/$WAYLAND_DISPLAY \
8 $@ coreutils
diff --git a/files/.bin/home-reconfigure b/files/.bin/home-reconfigure
deleted file mode 100755
index f55b896..0000000
--- a/files/.bin/home-reconfigure
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3if [ -n "$1" ]; then
4 guix home -L $1 reconfigure \
5 -e '((@ (jd utils) current-home))'
6else
7 guix home reconfigure \
8 -e '((@ (jd utils) current-home))'
9fi;
diff --git a/files/.bin/jd-arduino-cli.Dockerfile b/files/.bin/jd-arduino-cli.Dockerfile
deleted file mode 100644
index cb8eb91..0000000
--- a/files/.bin/jd-arduino-cli.Dockerfile
+++ /dev/null
@@ -1,16 +0,0 @@
1FROM python:3.12-rc-slim
2
3RUN apt update && apt install -y wget && \
4 wget https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz && \
5 tar -C /usr/bin/ -xf arduino-cli_nightly-latest_Linux_64bit.tar.gz
6
7RUN mkdir ~/.arduino15 && \
8 echo "board_manager:" > ~/.arduino15/arduino-cli.yaml && \
9 echo " additional_urls:" >> ~/.arduino15/arduino-cli.yaml && \
10 echo " - http://arduino.esp8266.com/stable/package_esp8266com_index.json" >> ~/.arduino15/arduino-cli.yaml
11
12
13RUN arduino-cli core update-index && \
14 arduino-cli core install esp8266:esp8266
15
16WORKDIR /src \ No newline at end of file
diff --git a/files/.bin/mount-nas-abaks b/files/.bin/mount-nas-abaks
deleted file mode 100755
index 6c14817..0000000
--- a/files/.bin/mount-nas-abaks
+++ /dev/null
@@ -1 +0,0 @@
1sudo mount -t cifs -o vers=2.0,username=kdlugosz,password=$(pass nas/abaks/kdlugosz) //195.74.91.28/kdlugosz /mnt \ No newline at end of file
diff --git a/files/.bin/oath b/files/.bin/oath
deleted file mode 100755
index 7444993..0000000
--- a/files/.bin/oath
+++ /dev/null
@@ -1,14 +0,0 @@
1#!/bin/sh
2
3if [[ $1 ]]; then
4 PASS=$(oathtool -b --totp $(pass show "oath/$1"))
5 printf $PASS | wl-copy
6 echo "pass: $PASS"
7 echo "Password should be in your clipboard!"
8else
9 echo "Usage: oath <pass>"
10 echo "Available pass:"
11 pass oath
12fi
13
14
diff --git a/files/.bin/profile-add-all b/files/.bin/profile-add-all
deleted file mode 100755
index bca4178..0000000
--- a/files/.bin/profile-add-all
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
4for i in $HOME/.config/guix/manifests/*; do
5 echo $i
6 MANIFEST_NAME=$(basename $i .scm)
7 mkdir -p "$GUIX_EXTRA_PROFILES"/"$MANIFEST_NAME"
8 guix package --manifest=$i --profile="$GUIX_EXTRA_PROFILES/$MANIFEST_NAME/$MANIFEST_NAME"
9done
diff --git a/files/.bin/stumpish b/files/.bin/stumpish
deleted file mode 100755
index 9e95c0c..0000000
--- a/files/.bin/stumpish
+++ /dev/null
@@ -1,196 +0,0 @@
1#!/bin/sh
2
3# Copyright (C) 2007 Jonathan Moore Liles
4#
5# Maintainer: Jonathan Moore Liles
6#
7# stumpish is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
11#
12# stumpish is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this software; see the file COPYING. If not, see
19# <http://www.gnu.org/licenses/>.
20
21### STUMPwm Interactive SHell.
22
23DELAY=0.01
24
25if ! sleep $DELAY 2>/dev/null >&2
26then
27 DELAY=1
28fi
29
30# replace -E with -r option for old versions of GNU sed
31if ! sed -E 1p /dev/null 2>/dev/null; then
32 sed() { shift; command sed -r "$@"; }
33fi
34
35# parse C-style backslash sequences by default
36if [ "$(echo -e foo)" = foo ]; then
37 echo() { builtin echo -e "$@"; }
38fi
39
40wait_result ()
41{
42 while true
43 do
44 RESULT=$(xprop -root -f STUMPWM_COMMAND_RESULT 8s \
45 STUMPWM_COMMAND_RESULT 2>/dev/null |
46 sed -E 's/\\([[:digit:]]+)/\\0\1/g')
47 if echo "$RESULT" | grep -v -q 'not found.$'
48 then
49 break
50 fi
51
52 sleep $DELAY
53 done
54
55 xprop -root -remove STUMPWM_COMMAND_RESULT
56
57 if echo "$RESULT" | grep -q '= $'
58 then
59 return 0
60 fi
61
62 echo "$RESULT" |
63 sed -E 's/[^"\\n]+"//
64 /^"[[:space:]]*$/d
65 s/(^|[^\\])\\n/\1\
66/g
67 s/\\(["\\n])/\1/g
68 s/\^([*[:digit:]]+|[Bbn])//g'
69}
70
71send_cmd ()
72{
73 local cmd="$1"
74
75 if [ "$cmd" = "stumpwm-quit" ]
76 then
77 cmd=quit
78 elif [ "$cmd" = "quit" ]
79 then
80 exit
81 fi
82
83 xprop -root -f STUMPWM_COMMAND 8s -set STUMPWM_COMMAND "$cmd"
84
85 wait_result
86}
87
88usage ()
89{
90 cat <<EOF
91Usage: ${0##*/} [[-e|-r] command [args...]]
92
93StumpIsh is the StumpWM shell. Use it to interact a running StumpWM
94instance. When run from a terminal with no arguments, stumpish
95accepts commands interactively and prints each result. If standard
96input is a pipe, stumpish executes any number of commands and prints
97the concatenated results. If the '-e' option and one argument are
98given on the command line, stumpish reads any number of lines from
99standard input and uses them as the argument to the named command.
100Otherwise, if one or more arguments are provided on the command line,
101the first is considered the name of the command to execute and the
102remainder is concatenated to form the argument.
103
104Example:
105 echo '(group-windows (current-group))' | ${0##*/} -e eval
106EOF
107 exit 0;
108}
109
110warn ()
111{
112 {
113 tput md bold
114 tput AF setaf 1
115 echo 'WARN:\c'
116 tput me sgr0
117 echo " $*"
118 } >&2
119}
120
121tput ()
122{
123 local cap1=$1 cap2=$2
124 shift 2
125
126 command tput $cap1 $@ 2>/dev/null ||
127 command tput $cap2 $@ 2>/dev/null
128}
129
130READLINE=yes
131
132if [ "x$1" = "x-r" ]
133then
134 READLINE=no
135 shift 1
136fi
137
138if [ $# -gt 0 ]
139then
140 [ "$1" = "--help" ] && usage
141 if [ "$1" = "-e" ]
142 then
143 if [ $# -ne 2 ]
144 then
145 echo "'-e' requires exactly one argument!"
146 exit
147 fi
148 shift 1
149 IFS=''
150 ARGS=$(cat /dev/stdin)
151 send_cmd "$1 $ARGS"
152 else
153 IFS=' '
154 send_cmd "$*"
155 fi
156else
157 if [ -t 0 ]
158 then
159 if ! type rlwrap 2>/dev/null >&2
160 then
161 warn rlwrap not found, command completion won\'t work
162 elif [ $READLINE = yes ]
163 then
164 COMMANDS="${TMPDIR:-/tmp}/stumpish.commands.$$"
165 echo $(send_cmd "commands") |
166 sed -E 's/[[:space:]]+/\
167/g' |
168 sort > "$COMMANDS"
169 trap 'rm -f "$COMMANDS"' exit int term
170 rlwrap -b '' -f "$COMMANDS" "$0" -r
171 exit
172 fi
173
174 tput AF setaf 5
175 echo Welcome to the STUMPwm Interactive SHell.
176 tput me sgr0
177 echo 'Type \c'
178 tput AF setaf 2
179 echo 'commands\c'
180 tput me sgr0
181 echo \ for a list of commands.
182
183 while read -p '> ' REPLY
184 do
185 tput md bold
186 tput AF setaf 2
187 send_cmd "$REPLY"
188 tput me sgr0
189 done
190 else
191 while read REPLY
192 do
193 send_cmd "$REPLY"
194 done
195 fi
196fi
diff --git a/files/.bin/system-reconfigure b/files/.bin/system-reconfigure
deleted file mode 100755
index e76ba27..0000000
--- a/files/.bin/system-reconfigure
+++ /dev/null
@@ -1,10 +0,0 @@
1#!/bin/sh
2
3if [ -n "$1" ]; then
4 sudo -E guix system -L $1 reconfigure \
5 -e '((@ (jd utils) current-operating-system))'
6else
7 sudo -E guix system reconfigure \
8 -e '((@ (jd utils) current-operating-system))'
9fi;
10
diff --git a/files/.bin/update.sh b/files/.bin/update.sh
deleted file mode 100755
index e6f9f8d..0000000
--- a/files/.bin/update.sh
+++ /dev/null
@@ -1,4 +0,0 @@
1#!/bin/sh
2
3sudo emerge --sync
4sudo emerge --ask --verbose --update --newuse --deep @world;
diff --git a/files/.bin/whois-at-hsp b/files/.bin/whois-at-hsp
deleted file mode 100755
index 982a90e..0000000
--- a/files/.bin/whois-at-hsp
+++ /dev/null
@@ -1,84 +0,0 @@
1#!/usr/bin/env -S guix shell guile guile-json -- guile --no-auto-compile -e main -s
2-*- scheme -*-
3!#
4
5(use-modules (srfi srfi-1)
6 (ice-9 iconv)
7 (ice-9 receive)
8 (web client)
9 (json))
10
11(define whois-at-hsp-endpoint "https://whois.at.hsp.sh/api/now")
12
13(define (http-get-serialize-json url)
14 (receive (response data) (http-request url)
15 (values (json-string->scm (bytevector->string data "UTF-8"))
16 response)))
17
18(define (whois-data->users whois-data)
19 (assoc-ref whois-data "users"))
20
21(define (whois-data->unknown-devices whois-data)
22 (assoc-ref whois-data "unknown_devices"))
23
24(define (whois-data->head-count whois-data)
25 (assoc-ref whois-data "headcount"))
26
27(define (whois-data->formated-users whois-data)
28 (let ((users (vector->list (whois-data->users whois-data))))
29 (if (> (length users) 0)
30 (fold-right
31 (lambda (a b) (string-append a " " b))
32 ""
33 users)
34 "No visible users!")))
35
36(define (whois-data->summary whois-data)
37 (string-append
38 "Unknown devices: "
39 (number->string (whois-data->unknown-devices whois-data))
40 "\nUsers: [" (number->string (whois-data->head-count whois-data)) "] "
41 (whois-data->formated-users whois-data)))
42
43(define (notify data)
44 (system* "notify-send"
45 "WHOIS AT HSP"
46 (whois-data->summary data)))
47
48(define (command-line-option? option args)
49 (> (length (or (member option args)
50 '()))
51 0))
52
53(define-syntax-rule (command-line-args-handle args default ((option ...) body ...) ...)
54 (let ((option? (lambda (o) (command-line-option? o args))))
55 (cond ((or (option? option) ...) body ...) ...
56 (#t default))))
57
58;; (command-line-args-handle '("a" "--help")
59;; 0
60;; (("-h" "--help") "dupa"))
61
62(define (main args)
63 (let ((whois-data (http-get-serialize-json whois-at-hsp-endpoint)))
64 (command-line-args-handle args
65 (begin (display (whois-data->summary whois-data))
66 (newline))
67 (("-h" "--help")
68 (display (string-append "-h, --help Help message\n"
69 "-n, --notify Notification massage with whois information.\n"
70 "-u Get users\n"
71 "-H Get head count\n"
72 "-U Get unknown devices\n")))
73 (("-n" "--notify")
74 (notify whois-data))
75 (("-u")
76 (display (whois-data->formated-users whois-data))
77 (newline))
78 (("-H")
79 (display (whois-data->head-count whois-data))
80 (newline))
81 (("-U")
82 (display (whois-data->unknown-devices whois-data))
83 (newline)))))
84
diff --git a/files/.config/alacritty/alacritty.toml b/files/.config/alacritty/alacritty.toml
deleted file mode 100644
index 39fd4e9..0000000
--- a/files/.config/alacritty/alacritty.toml
+++ /dev/null
@@ -1,46 +0,0 @@
1[cursor]
2style = "Block"
3unfocused_hollow = true
4
5[font]
6size = 14
7
8[font.italic]
9family = "Terminus"
10style = "Light Italic"
11
12[font.normal]
13family = "Terminus"
14style = "Light"
15
16[font.offset]
17x = 0
18y = 0
19
20[window]
21dynamic_padding = true
22# opacity = 0.90
23
24[colors.bright]
25black = "0x002b36"
26blue = "0x839496"
27cyan = "0x93a1a1"
28green = "0x586e75"
29magenta = "0x6c71c4"
30red = "0xcb4b16"
31white = "0xfdf6e3"
32yellow = "0x657b83"
33
34[colors.normal]
35black = "0x073642"
36blue = "0x268bd2"
37cyan = "0x2aa198"
38green = "0x859900"
39magenta = "0xd33682"
40red = "0xdc322f"
41white = "0xeee8d5"
42yellow = "0xb58900"
43
44[colors.primary]
45background = "0x002b36"
46foreground = "0x839496"
diff --git a/files/.config/alacritty/alacritty.toml.old b/files/.config/alacritty/alacritty.toml.old
deleted file mode 100644
index 031d81c..0000000
--- a/files/.config/alacritty/alacritty.toml.old
+++ /dev/null
@@ -1,23 +0,0 @@
1[cursor]
2style = "Block"
3unfocused_hollow = true
4
5[font]
6size = 14
7
8[font.italic]
9family = "Terminus"
10style = "Light Italic"
11
12[font.normal]
13family = "Terminus"
14style = "Light"
15
16[font.offset]
17x = 0
18y = 0
19
20[window]
21dynamic_padding = true
22opacity = 0.90
23
diff --git a/files/.config/alacritty/alacritty.yaml b/files/.config/alacritty/alacritty.yaml
deleted file mode 100644
index a4f2823..0000000
--- a/files/.config/alacritty/alacritty.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
1colors:
2 # Default colors
3 primary:
4 background: '0x002b36'
5 foreground: '0x839496'
6
7 # Normal colors
8 normal:
9 black: '0x073642'
10 red: '0xdc322f'
11 green: '0x859900'
12 yellow: '0xb58900'
13 blue: '0x268bd2'
14 magenta: '0xd33682'
15 cyan: '0x2aa198'
16 white: '0xeee8d5'
17
18 # Bright colors
19 bright:
20 black: '0x002b36'
21 red: '0xcb4b16'
22 green: '0x586e75'
23 yellow: '0x657b83'
24 blue: '0x839496'
25 magenta: '0x6c71c4'
26 cyan: '0x93a1a1'
27 white: '0xfdf6e3'
diff --git a/files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf b/files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf
deleted file mode 100644
index 5ffc4fe..0000000
--- a/files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf
+++ /dev/null
@@ -1 +0,0 @@
1(:tree "/home/jakub/Projects/lisp/") \ No newline at end of file
diff --git a/files/.config/distrobox/distrobox.conf b/files/.config/distrobox/distrobox.conf
deleted file mode 100644
index 446223c..0000000
--- a/files/.config/distrobox/distrobox.conf
+++ /dev/null
@@ -1,10 +0,0 @@
1container_always_pull="1"
2container_generate_entry=0
3container_manager="docker"
4container_image_default="registry.opensuse.org/opensuse/toolbox:latest"
5container_name_default="test-name-1"
6container_user_custom_home="$HOME/.local/share/container-home-test"
7# container_init_hook="~/.local/distrobox/a_custom_default_init_hook.sh"
8# container_pre_init_hook="~/a_custom_default_pre_init_hook.sh"
9non_interactive="1"
10skip_workdir="0" \ No newline at end of file
diff --git a/files/.config/dunst/dunstrc b/files/.config/dunst/dunstrc
deleted file mode 100644
index b3b93b6..0000000
--- a/files/.config/dunst/dunstrc
+++ /dev/null
@@ -1,177 +0,0 @@
1[global]
2frame_width = 2
3frame_color = "#39bae6"
4font = sourcecodepro
5
6# Allow a small subset of html markup:
7# <b>bold</b>
8# <i>italic</i>
9# <s>strikethrough</s>
10# <u>underline</u>
11#
12# For a complete reference see
13# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
14# If markup is not allowed, those tags will be stripped out of the
15# message.
16markup = yes
17
18# The format of the message. Possible variables are:
19# %a appname
20# %s summary
21# %b body
22# %i iconname (including its path)
23# %I iconname (without its path)
24# %p progress value if set ([ 0%] to [100%]) or nothing
25# Markup is allowed
26format = "%s %p\n%b"
27
28# Sort messages by urgency.
29sort = yes
30
31# Show how many messages are currently hidden (because of geometry).
32indicate_hidden = yes
33
34# Alignment of message text.
35# Possible values are "left", "center" and "right".
36alignment = left
37
38# The frequency with wich text that is longer than the notification
39# window allows bounces back and forth.
40# This option conflicts with "word_wrap".
41# Set to 0 to disable.
42bounce_freq = 5
43
44
45# Show age of message if message is older than show_age_threshold
46# seconds.
47# Set to -1 to disable.
48show_age_threshold = 60
49
50# Split notifications into multiple lines if they don't fit into
51# geometry.
52word_wrap = no
53
54# Ignore newlines '\n' in notifications.
55ignore_newline = no
56
57
58# The geometry of the window:
59# [{width}]x{height}[+/-{x}+/-{y}]
60# The geometry of the message window.
61# The height is measured in number of notifications everything else
62# in pixels. If the width is omitted but the height is given
63# ("-geometry x2"), the message window expands over the whole screen
64# (dmenu-like). If width is 0, the window expands to the longest
65# message displayed. A positive x is measured from the left, a
66# negative from the right side of the screen. Y is measured from
67# the top and down respectevly.
68# The width can be negative. In this case the actual width is the
69# screen width minus the width defined in within the geometry option.
70geometry = "500x10-10+50"
71
72# Shrink window if it's smaller than the width. Will be ignored if
73# width is 0.
74shrink = yes
75
76# The transparency of the window. Range: [0; 100].
77# This option will only work if a compositing windowmanager is
78# present (e.g. xcompmgr, compiz, etc.).
79transparency = 15
80
81# Don't remove messages, if the user is idle (no mouse or keyboard input)
82# for longer than idle_threshold seconds.
83# Set to 0 to disable.
84# default 120
85idle_threshold = 120
86
87# Which monitor should the notifications be displayed on.
88monitor = 0
89
90# Display notification on focused monitor. Possible modes are:
91# mouse: follow mouse pointer
92# keyboard: follow window with keyboard focus
93# none: don't follow anything
94#
95# "keyboard" needs a windowmanager that exports the
96# _NET_ACTIVE_WINDOW property.
97# This should be the case for almost all modern windowmanagers.
98#
99# If this option is set to mouse or keyboard, the monitor option
100# will be ignored.
101follow = mouse
102
103# Should a notification popped up from history be sticky or timeout
104# as if it would normally do.
105sticky_history = yes
106
107# Maximum amount of notifications kept in history
108history_length = 20
109
110# Display indicators for URLs (U) and actions (A).
111show_indicators = yes
112
113# The height of a single line. If the height is smaller than the
114# font height, it will get raised to the font height.
115# This adds empty space above and under the text.
116line_height = 0
117
118# Draw a line of "separator_height" pixel height between two
119# notifications.
120# Set to 0 to disable.
121separator_height = 1
122
123# Padding between text and separator.
124# padding = 8
125padding = 8
126
127# Horizontal padding.
128horizontal_padding = 10
129
130# Define a color for the separator.
131# possible values are:
132# * auto: dunst tries to find a color fitting to the background;
133# * foreground: use the same color as the foreground;
134# * frame: use the same color as the frame;
135# * anything else will be interpreted as a X color.
136separator_color = #263238
137
138# Print a notification on startup.
139# This is mainly for error detection, since dbus (re-)starts dunst
140# automatically after a crash.
141startup_notification = false
142
143# dmenu path.
144dmenu = /usr/bin/dmenu -p dunst:
145
146# Browser for opening urls in context menu.
147browser = palemoon
148
149# Align icons left/right/off
150icon_position = left
151
152# Limit icons size.
153max_icon_size=128
154
155[urgency_low]
156# IMPORTANT: colors have to be defined in quotation marks.
157# Otherwise the "#" and following would be interpreted as a comment.
158background "#0d1017"
159foreground = "#888888"
160timeout = 10
161# Icon for notifications with low urgency, uncomment to enable
162#icon = /path/to/icon
163
164[urgency_normal]
165background = "#1e2128"
166foreground = "#ffffff"
167timeout = 10
168# Icon for notifications with normal urgency, uncomment to enable
169#icon = /path/to/icon
170
171[urgency_critical]
172background = "#900000"
173foreground = "#ffffff"
174frame_color = "#ff0000"
175timeout = 0
176# Icon for notifications with critical urgency, uncomment to enable
177#icon = /path/to/icon
diff --git a/files/.config/guix/.gitignore b/files/.config/guix/.gitignore
deleted file mode 100644
index 1f4ddec..0000000
--- a/files/.config/guix/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1current \ No newline at end of file
diff --git a/files/.config/guix/channels.scm b/files/.config/guix/channels.scm
deleted file mode 100755
index cb25ece..0000000
--- a/files/.config/guix/channels.scm
+++ /dev/null
@@ -1,5 +0,0 @@
1(cons* (channel
2 (name 'jdlugosz)
3 (branch "main")
4 (url "https://github.com/jdlugosz963/dotfiles"))
5 %default-channels)
diff --git a/files/.config/guix/shell-authorized-directories b/files/.config/guix/shell-authorized-directories
deleted file mode 100644
index f6e0c84..0000000
--- a/files/.config/guix/shell-authorized-directories
+++ /dev/null
@@ -1,10 +0,0 @@
1/home/jakub/Projects/laco
2/home/jakub/Projects/yasa
3/home/jakub/Projects/trial
4/home/jakub/Projects/matura-infa
5/home/jakub/Projects/abaks-infra
6/home/jakub/Projects/lispz
7/home/jakub/Projects/zig-learning
8/home/jakub/Projects/let-over-lambda
9/home/jakub/Projects/rust
10/home/jakub/temphome/embedded-rust
diff --git a/files/.config/picom/picom.conf b/files/.config/picom/picom.conf
deleted file mode 100644
index 0f3fe1d..0000000
--- a/files/.config/picom/picom.conf
+++ /dev/null
@@ -1,117 +0,0 @@
1# ____ _____
2# | _ \_ _| Derek Taylor (DistroTube)
3# | | | || | http://www.youtube.com/c/DistroTube
4# | |_| || | http://www.gitlab.com/dwt1/
5# |____/ |_|
6#
7# My config. Not much to see here; just some pretty standard stuff.
8
9# Enabled client-side shadows on windows. Note desktop windows
10# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
11# unless explicitly requested using the wintypes option.
12#
13shadow = true;
14
15# The blur radius for shadows, in pixels. (defaults to 12)
16shadow-radius = 8;
17
18# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
19shadow-opacity = .6
20
21# The left offset for shadows, in pixels. (defaults to -15)
22shadow-offset-x = -3;
23
24# The top offset for shadows, in pixels. (defaults to -15)
25shadow-offset-y = -3;
26
27# Specify a list of conditions of windows that should have no shadow.
28#
29# examples:
30# shadow-exclude = "n:e:Notification";
31#
32# shadow-exclude = []
33shadow-exclude = [
34 "name = 'Notification'",
35 "class_g = 'Conky'",
36 "class_g ?= 'Notify-osd'",
37 "class_g = 'Cairo-clock'",
38 "class_g = 'slop'",
39 "class_g = 'Polybar'",
40 "_GTK_FRAME_EXTENTS@:c"
41];
42
43
44# Fade windows in/out when opening/closing and when opacity changes,
45# unless no-fading-openclose is used.
46# fading = false
47fading = true;
48
49# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
50# fade-in-step = 0.028
51fade-in-step = 0.3;
52
53# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
54# fade-out-step = 0.03
55fade-out-step = 0.3;
56
57# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
58# fade-delta = 10
59
60# Specify a list of conditions of windows that should not be faded.
61# don't need this, we disable fading for all normal windows with wintypes: {}
62fade-exclude = [
63 "class_g = 'slop'" # maim
64]
65
66# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
67inactive-opacity = 0.9
68# inactive-opacity = 1.0;
69
70# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
71# frame-opacity = 1.0
72frame-opacity = 0.7;
73
74# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
75# menu-opacity = 1.0
76# menu-opacity is depreciated use dropdown-menu and popup-menu instead.
77
78#If using these 2 below change their values in line 510 & 511 aswell
79popup_menu = { opacity = 0.8; }
80dropdown_menu = { opacity = 0.8; }
81
82
83# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
84# inactive-opacity-override = true
85inactive-opacity-override = false;
86
87# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
88active-opacity = 1.0;
89
90# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
91# inactive-dim = 0.0
92
93# Specify a list of conditions of windows that should always be considered focused.
94# focus-exclude = []
95focus-exclude = [
96 "class_g = 'Cairo-clock'",
97 "class_g = 'Bar'", # lemonbar
98 "class_g = 'slop'" # maim
99];
100
101opacity-rule = [
102 "100:class_g = 'XTerm'",
103 "100:class_g = 'URxvt'",
104 "100:class_g = 'firefox'",
105 "100:class_g = 'Thunderbird'"
106];
107
108wintypes:
109{
110 normal = { fade = false; shadow = true; }
111 tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
112 dock = { shadow = false; }
113 dnd = { shadow = true; }
114 popup_menu = { opacity = 0.8; }
115 dropdown_menu = { opacity = 0.8; }
116};
117
diff --git a/files/.config/polybar/config.ini b/files/.config/polybar/config.ini
deleted file mode 100644
index d43ee51..0000000
--- a/files/.config/polybar/config.ini
+++ /dev/null
@@ -1,122 +0,0 @@
1[settings]
2screenchange-reload = true
3
4[colors]
5background = ${xrdb:emacs.background}
6foreground = ${xrdb:emacs.foreground}
7primary = #7fd962
8disabled = #707880
9
10[bar/example]
11width = 100%
12height = 18pt
13
14background = ${colors.background}
15foreground = ${colors.foreground}
16
17line-size = 1.5pt
18
19padding-left = 0
20padding-right = 1
21
22module-margin = 1
23
24separator = |
25separator-foreground = ${colors.disabled}
26
27font-0 = "Terminus:size=15"
28font-1 = "FontAwesome"
29
30modules-left = xworkspaces
31modules-right = memory cpu battery date
32
33cursor-click = pointer
34cursor-scroll = ns-resize
35
36enable-ipc = true
37
38tray-position = right
39
40[module/xworkspaces]
41type = internal/xworkspaces
42
43icon-0 = 1;0
44icon-1 = 2;1
45icon-2 = 3;2
46icon-3 = 4;3
47icon-4 = 5;4
48icon-5 = 6;5
49icon-6 = 7;6
50icon-7 = 8;7
51icon-8 = 9;8
52icon-9 = 10;9
53
54label-active = %icon%
55label-active-background = ${colors.background-alt}
56label-active-underline= ${colors.primary}
57label-active-padding = 1
58
59label-occupied = %icon%
60label-occupied-padding = 1
61
62label-urgent = %icon%
63label-urgent-background = ${colors.alert}
64label-urgent-padding = 1
65
66label-empty = %icon%
67label-empty-foreground = ${colors.disabled}
68label-empty-padding = 1
69
70[module/battery]
71type = internal/battery
72battery = BAT0
73adapter = ADP1
74
75format-charging = <animation-charging> <label-charging>
76format-discharging = <ramp-capacity> <label-discharging>
77format-low = <ramp-capacity> <label-low>
78format-full = <ramp-capacity> <label-full>
79
80label-charging = %percentage%%
81label-discharging = %percentage%%
82label-low = LOW %percentage%%
83label-full = FULL %percentage%%
84
85ramp-capacity-0 = 
86ramp-capacity-1 = 
87ramp-capacity-2 = 
88ramp-capacity-3 = 
89ramp-capacity-4 = 
90ramp-capacity-foreground = ${colors.primary}
91
92animation-charging-0 = 
93animation-charging-1 = 
94animation-charging-2 = 
95animation-charging-3 = 
96animation-charging-4 = 
97animation-charging-foreground = ${colors.primary}
98animation-charging-framerate = 750
99
100[module/memory]
101type = internal/memory
102interval = 2
103format-prefix = "RAM "
104format-prefix-foreground = ${colors.primary}
105label = %percentage_used:2%%
106
107[module/cpu]
108type = internal/cpu
109interval = 2
110format-prefix = "CPU "
111format-prefix-foreground = ${colors.primary}
112label = %percentage:2%%
113
114[module/date]
115type = internal/date
116interval = 1
117
118date = %H:%M
119date-alt = %Y-%m-%d %H:%M:%S
120
121label = %date%
122label-foreground = ${colors.primary}
diff --git a/files/.config/qtile/autorc b/files/.config/qtile/autorc
deleted file mode 100755
index c54f683..0000000
--- a/files/.config/qtile/autorc
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/bin/bash
2
3function monitor_settings() {
4 sleep .5
5 monitor_status=$(xrandr | grep "HDMI-1-4 connected" | wc -l)
6
7 if [ $monitor_status == 1 ];
8 then
9 # xrandr --auto
10 # xrandr --output eDP-1 --off
11 xrandr --output eDP-1-1 --auto --output HDMI-0 --auto --left-of eDP-1-1
12 fi
13}
14
15function caps_to_esc(){ xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'; }
16
17function start() {
18 killall $1
19 sleep .5
20 $($1 $2) &
21}
22
23# monitor_settings
24caps_to_esc
25
26start nitrogen "--restore"
27start picom ""
28start spotifyd ""
29start rclone "mount remote:/sync /home/jakub/Sync"
30start emacs "--daemon"
31xinput set-prop 11 344 1
diff --git a/files/.config/qtile/config.py b/files/.config/qtile/config.py
deleted file mode 100644
index 9106731..0000000
--- a/files/.config/qtile/config.py
+++ /dev/null
@@ -1,232 +0,0 @@
1import os
2import subprocess
3
4from typing import List
5
6from libqtile import bar, layout, widget
7from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord
8from libqtile import extension
9from libqtile.lazy import lazy
10from libqtile.utils import guess_terminal
11from libqtile import hook
12
13MOD = "mod4"
14
15TERMINAL = guess_terminal()
16
17DMENU_FLAGS = '-l 16 -p run -c -i'
18
19BAR = '#282a36'
20LIGHT_BAR = '#393b37'
21YELLOW = '#f1fa8c'
22RED = '#ff5555'
23LIGHT_RED = '#ff9999'
24GREEN = '#50fa7b'
25CYAN = '#8be9fd'
26LIGHT_CYAN = '#abfbff'
27
28@hook.subscribe.startup_once
29def autostart():
30 home = os.path.expanduser('~/.config/qtile/autorc')
31 subprocess.run([home])
32
33keys = [
34 Key([MOD], "h", lazy.layout.left(), desc="Move focus to left"),
35 Key([MOD], "l", lazy.layout.right(), desc="Move focus to right"),
36 Key([MOD], "j", lazy.layout.down(), desc="Move focus down"),
37 Key([MOD], "k", lazy.layout.up(), desc="Move focus up"),
38 Key([MOD], "s", lazy.next_screen() ),
39 Key([MOD], "space", lazy.window.toggle_floating(),
40 desc="Move window focus to other window"),
41
42 Key([MOD, "shift"], "h", lazy.layout.shuffle_left(),
43 desc="Move window to the left"),
44 Key([MOD, "shift"], "l", lazy.layout.shuffle_right(),
45 desc="Move window to the right"),
46 Key([MOD, "shift"], "j", lazy.layout.shuffle_down(),
47 desc="Move window down"),
48 Key([MOD, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
49
50 Key([MOD, "control"], "h", lazy.layout.grow_left(),
51 desc="Grow window to the left"),
52 Key([MOD, "control"], "l", lazy.layout.grow_right(),
53 desc="Grow window to the right"),
54 Key([MOD, "control"], "j", lazy.layout.grow_down(),
55 desc="Grow window down"),
56 Key([MOD, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
57 Key([MOD], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
58
59 Key([MOD, "shift"], "Return", lazy.layout.toggle_split(),
60 desc="Toggle between split and unsplit sides of stack"),
61 Key([MOD], "Return", lazy.spawn(TERMINAL), desc="Launch terminal"),
62
63 Key([MOD], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
64 Key([MOD], "c", lazy.window.kill(), desc="Kill focused window"),
65
66 Key([MOD, "control"], "r", lazy.restart(), desc="Restart Qtile"),
67 Key([MOD, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
68
69 Key([MOD], "F12", os.system("xbacklight -inc 10"), desc="Inc backlight"),
70 Key([MOD], "F11", os.system("xbacklight -dec 10"), desc="Dec backlight"),
71
72 Key([MOD], "r", lazy.spawncmd(),
73 desc="Spawn a command using a prompt widget"),
74
75 KeyChord([MOD], "p", [
76 Key([], "p", lazy.spawn(f"dmenu_run {DMENU_FLAGS}"), desc="Spawn dmenu run"),
77 Key([], "n", lazy.spawn(f"networkmanager_dmenu {DMENU_FLAGS}"), desc="Spawn dmenu for network manager"),
78 ]),
79
80 Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"),
81 Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"),
82 Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"),
83
84 KeyChord([MOD], "e", [
85 Key([], "e", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Spawn Emacsclient"),
86 Key([], "d", lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"), desc='Emacsclient Dired'),
87 Key([], "m", lazy.spawn("emacsclient -c -a 'emacs' --eval '(emms-browser)'"), desc='Emacsclient Dired'),
88 ]),
89
90 Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"),
91 Key([MOD, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"),
92 Key([MOD, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"),
93 Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"),
94]
95
96groups_names = [
97 "dev",
98 "www",
99 "music",
100 "virt",
101 "sys",
102 "other"
103]
104
105groups = [Group(i) for i in groups_names]
106for i, group in enumerate(groups):
107 keys.extend([
108 Key([MOD], str(i+1), lazy.group[group.name].toscreen(),
109 desc="Switch to group {}".format(group.name)),
110
111 Key([MOD, "shift"], str(i+1), lazy.window.togroup(group.name, switch_group=True),
112 desc="Switch to & move focused window to group {}".format(group.name)),
113 ])
114
115mouse = [
116 Drag([MOD], "Button1", lazy.window.set_position_floating(),
117 start=lazy.window.get_position()),
118 Drag([MOD], "Button3", lazy.window.set_size_floating(),
119 start=lazy.window.get_size()),
120 Click([MOD], "Button2", lazy.window.bring_to_front())
121]
122
123layout_cfg = {
124 'border_width': 2,
125 'border_normal': "#bb8888",
126 'border_focus': "884444",
127 'margin': 8
128}
129
130layouts = [
131 # layout.Columns(**layout_cfg),
132 # layout.Max(),
133 layout.Stack(num_stacks=1, **layout_cfg),
134 # layout.Bsp(),
135 # layout.Matrix(),
136 layout.MonadTall(**layout_cfg),
137 # layout.MonadWide(),
138 # layout.RatioTile(),
139 # layout.Tile(),
140 # layout.TreeTab(),
141 # layout.VerticalTile(),
142 # layout.Zoomy(),
143]
144
145widget_defaults = dict(
146 font='sans',
147 fontsize=12,
148 padding=6,
149)
150
151transparent_sep = {
152 'foreground': BAR,
153 'margin': 2
154}
155
156soft_sep = {
157 'foreground': '44475a',
158 'padding': 2,
159 'margin': 4
160}
161
162screens = [
163 Screen(
164 top=bar.Bar(
165 [
166 widget.Sep(**transparent_sep),
167 widget.Image(filename="~/.config/qtile/python.png", margin=4),
168 widget.Sep(**transparent_sep),
169 widget.CurrentLayout(),
170 widget.Sep(**transparent_sep),
171 widget.GroupBox(
172 margin_y = 3,
173 margin_x = 0,
174 padding_y = 5,
175 padding_x = 3,
176 borderwidth = 3,
177 rounded = False,
178 highlight_color = LIGHT_BAR,
179 highlight_method = "line",
180 this_current_screen_border = CYAN,
181 this_screen_border = CYAN,
182 other_current_screen_border = LIGHT_BAR,
183 other_screen_border = LIGHT_BAR,
184 ),
185 widget.Prompt(),
186 widget.Sep(**transparent_sep),
187 widget.WindowName(),
188 widget.Net(format="🌐 ↓{down} ↑{up}", foreground=YELLOW),
189 widget.Sep(**soft_sep),
190 widget.CPU(format='💻 {load_percent}%', fontsize=12, foreground=RED),
191 widget.Sep(**soft_sep),
192 widget.Battery(format='🔋 {char} {percent:2.0%} {hour:d}:{min:02d} {watt:.2f} W', foreground=GREEN),
193 widget.Sep(**soft_sep),
194 widget.Clock(format='📅 %B %-d, %H:%M', foreground=CYAN),
195 widget.Sep(**soft_sep),
196 widget.CurrentScreen(),
197 widget.Sep(**soft_sep),
198 widget.Systray()
199 ],
200 24,
201 margin=8,
202 background=BAR,
203 border_color=CYAN,
204 border_width=1
205 ),
206 ),
207]
208
209floating_layout = layout.Floating(float_rules=[
210 # Run the utility of `xprop` to see the wm class and name of an X client.
211 *layout.Floating.default_float_rules,
212 Match(wm_class='confirmreset'), # gitk
213 Match(wm_class='makebranch'), # gitk
214 Match(wm_class='maketag'), # gitk
215 Match(wm_class='ssh-askpass'), # ssh-askpass
216 Match(title='branchdialog'), # gitk
217 Match(title='pinentry'), # GPG key password entry
218])
219
220dgroups_key_binder = None
221dgroups_app_rules = []
222
223follow_mouse_focus = True
224bring_front_click = False
225cursor_warp = False
226auto_fullscreen = True
227focus_on_window_activation = "smart"
228reconfigure_screens = True
229
230auto_minimize = True
231
232wmname = "LG3D"
diff --git a/files/.config/qtile/mdt_shell b/files/.config/qtile/mdt_shell
deleted file mode 100755
index 90fa6f3..0000000
--- a/files/.config/qtile/mdt_shell
+++ /dev/null
@@ -1 +0,0 @@
1TERM=xterm-256color /home/jakub/.local/bin/mdt shell
diff --git a/files/.config/qtile/photos/desktop.png b/files/.config/qtile/photos/desktop.png
deleted file mode 100644
index 8fca190..0000000
--- a/files/.config/qtile/photos/desktop.png
+++ /dev/null
Binary files differ
diff --git a/files/.config/qtile/python.png b/files/.config/qtile/python.png
deleted file mode 100644
index 9a4b1ed..0000000
--- a/files/.config/qtile/python.png
+++ /dev/null
Binary files differ
diff --git a/files/.config/qtile/readme.org b/files/.config/qtile/readme.org
deleted file mode 100644
index 235dd47..0000000
--- a/files/.config/qtile/readme.org
+++ /dev/null
@@ -1,5 +0,0 @@
1#+title: Config
2
3* Qtile conifg
4- My personal qtile config ;)
5 [[./photos/desktop.png]]
diff --git a/files/.config/sway/config b/files/.config/sway/config
deleted file mode 100644
index cf587fc..0000000
--- a/files/.config/sway/config
+++ /dev/null
@@ -1,195 +0,0 @@
1set $mod Mod4
2
3set $left h
4set $down j
5set $up k
6set $right l
7
8set $term alacritty
9set $emacs emacsclient -c
10set $menu fuzzel -r0 -b 282828f2 -C 458588f2 -B 3 -s 458588f2 -S 282828FF --font "Terminus:size=12" -p "run: "
11
12set $laptop-display eDP-1
13set $generic-display HDMI-A-1
14set $primary-home-display 'Iiyama North America PLE2407HDSD 0x01010101'
15set $secondary-home-display 'Dell Inc. DELL E190S M8VPV186CELI'
16
17set $primary-display-layout 'Samsung Electric Company C34H89x HTJM200007' $primary-home-display $generic-display $laptop-display
18set $secondary-display-layout $secondary-home-display $laptop-display
19
20# output * bg SPOILER_33.png fill
21output * bg #002b36 solid_color
22
23output $laptop-display resolution 1920x1080 position 1920,0
24output $generic-display resolution 1920x1080 position 0,0
25output $primary-home-display resolution 1920x1080 position 0,0
26output $secondary-home-display resolution 1280x1024 position 1920,0
27set $opacity 0.9
28
29client.focused #002b36 #586e75 #eee8d5 #268bd2
30client.focused_inactive #002b36 #073642 #93a1a1 #268bd2
31client.unfocused #002b36 #073642 #93a1a1 #268bd2
32client.urgent #002b36 #dc322f #fdf6e3 #002b36
33
34input type:keyboard {
35 xkb_layout pl,us
36}
37
38input type:touchpad {
39 tap enabled
40 middle_emulation enabled
41}
42
43bindsym $mod+Shift+s output $laptop-display toggle
44
45set $swaylock 'swaylock -f -c 000000 --font "Terminus"'
46exec swayidle -w \
47 timeout 280 $swaylock \
48 timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
49 before-sleep $swaylock
50
51# inhibit_idle fullscreen
52
53bindsym $mod+Escape exec $swaylock
54
55bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
56bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
57
58bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
59bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
60bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
61
62bindsym XF86AudioNext exec playerctl next
63bindsym XF86AudioPrev exec playerctl previous
64bindsym XF86AudioPlay exec playerctl play-pause
65bindsym XF86AudioPause exec playerctl pause
66
67bindsym print exec grimshot --notify copy area
68bindsym $mod+print exec grimshot --notify copy output
69bindsym $mod+Ctrl+print grimshot save area - | swappy -f -
70
71bindsym $mod+Return exec $term
72
73bindsym $mod+Shift+q kill
74
75floating_modifier $mod normal
76
77bindsym $mod+Shift+c reload
78bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
79
80bindsym $mod+$left focus left
81bindsym $mod+$down focus down
82bindsym $mod+$up focus up
83bindsym $mod+$right focus right
84
85bindsym $mod+Shift+$left move left
86bindsym $mod+Shift+$down move down
87bindsym $mod+Shift+$up move up
88bindsym $mod+Shift+$right move right
89
90workspace 1 output $primary-display-layout
91workspace 2 output $primary-display-layout
92workspace 3 output $secondary-display-layout
93workspace 4 output $secondary-display-layout
94workspace 9 output $primary-display-layout
95workspace 10 output $secondary-display-layout
96
97bindsym $mod+1 workspace number 1
98bindsym $mod+2 workspace number 2
99bindsym $mod+3 workspace number 3
100bindsym $mod+4 workspace number 4
101bindsym $mod+5 workspace number 5
102bindsym $mod+6 workspace number 6
103bindsym $mod+7 workspace number 7
104bindsym $mod+8 workspace number 8
105bindsym $mod+9 workspace number 9
106bindsym $mod+0 workspace number 10
107
108bindsym $mod+Shift+1 move container to workspace number 1
109bindsym $mod+Shift+2 move container to workspace number 2
110bindsym $mod+Shift+3 move container to workspace number 3
111bindsym $mod+Shift+4 move container to workspace number 4
112bindsym $mod+Shift+5 move container to workspace number 5
113bindsym $mod+Shift+6 move container to workspace number 6
114bindsym $mod+Shift+7 move container to workspace number 7
115bindsym $mod+Shift+8 move container to workspace number 8
116bindsym $mod+Shift+9 move container to workspace number 9
117bindsym $mod+Shift+0 move container to workspace number 10
118
119assign [app_id="(firefox-default|Firefox|qutebrowser|Chromium-browser)"] 2
120assign [instance="(chromium-browser)"] 2
121assign [instance="(spotify)"] 3
122assign [app_id=".blueman-manager-real"] 3
123assign [app_id="pavucontrol"] 3
124assign [app_id="(org.telegram.desktop)"] 4
125assign [app_id="vesktop"] 4
126assign [app_id="com.ktechpit.whatsie"] 4
127assign [instance="(discord)"] 4
128
129# for_window [app_id="vesktop"] opacity $opacity
130
131bindsym $mod+b splith
132bindsym $mod+v splitv
133
134bindsym $mod+s layout stacking
135bindsym $mod+w layout tabbed
136bindsym $mod+e layout toggle split
137
138bindsym $mod+f fullscreen
139bindsym $mod+Shift+space floating toggle
140bindsym $mod+space focus mode_toggle
141bindsym $mod+a focus parent
142
143bindsym $mod+Shift+minus move scratchpad
144bindsym $mod+minus scratchpad show
145
146mode "resize" {
147 bindsym $left resize shrink width 10px
148 bindsym $down resize grow height 10px
149 bindsym $up resize shrink height 10px
150 bindsym $right resize grow width 10px
151
152 bindsym Return mode "default"
153 bindsym Control+g mode "default"
154 bindsym Escape mode "default"
155}
156bindsym $mod+r mode "resize"
157
158set $default swaymsg mode default
159mode "menu" {
160 bindsym --no-repeat e exec '$default; $emacs;'
161 bindsym --no-repeat w exec "$default; whois-at-hsp -n"
162
163 bindsym Return mode "default"
164 bindsym Control+g mode "default"
165 bindsym Escape mode "default"
166
167}
168bindsym $mod+o mode "menu"
169
170
171workspace_layout tabbed
172
173# default_border normal 3
174# gaps outer 0
175# gaps inner 6
176# corner_radius 4
177# blur_xray disable
178# blur enable
179# layer_effects "waybar" blur enable
180
181font Terminus (TTF) 12
182bindsym $mod+p exec $menu
183
184
185# Taken from dawivil dotfiles.
186exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
187
188# exec udiskie -t
189exec mako --font "Terminus (TTF)" --outer-margin=5 --margin=3 --border-size=3 --default-timeout=7000 --background="#282828e0"
190
191exec nm-applet --indicator
192exec blueman-applet
193exec waybar
194exec udiskie -t
195exec wlsunset -l 51.919438 -L 19.145136
diff --git a/files/.config/waybar/config b/files/.config/waybar/config
deleted file mode 100644
index 5ebee30..0000000
--- a/files/.config/waybar/config
+++ /dev/null
@@ -1,159 +0,0 @@
1{
2 "layer": "top",
3 "position": "top",
4
5 "modules-left": [
6 "sway/workspaces",
7 "sway/mode"
8 ],
9
10 "modules-right": [
11// "custom/whois",
12 "pulseaudio",
13 "network",
14 "memory",
15 "cpu",
16 "temperature",
17 "battery",
18 "sway/language",
19 "clock#date",
20 "clock#time",
21 "idle_inhibitor",
22 "tray"
23 ],
24
25 // Modules
26 "idle_inhibitor": {
27 "format": "{icon}",
28 "format-icons": {
29 "activated": "",
30 "deactivated": ""
31 }
32 },
33
34 "battery": {
35 "interval": 10,
36 "states": {
37 "warning": 30,
38 "critical": 15
39 },
40 "format-time": "{H}:{M:02}",
41 "format": "{icon} {capacity}% ({time})",
42 "format-charging": " {capacity}% ({time})",
43 "format-charging-full": " {capacity}%",
44 "format-full": "{icon} {capacity}%",
45 "format-alt": "{icon} {power}W",
46 "format-icons": [
47 "",
48 "",
49 "",
50 "",
51 ""
52 ],
53 "tooltip": false
54 },
55
56 "clock#time": {
57 "interval": 10,
58 "format": "{:%H:%M}",
59 "tooltip": false
60 },
61
62 "clock#date": {
63 "interval": 20,
64 "format": " {:%e %b %Y}",
65 "tooltip": false
66 //"tooltip-format": "{:%e %B %Y}"
67 },
68
69 "cpu": {
70 "interval": 5,
71 "tooltip": false,
72 "format": " {usage}%",
73 "format-alt": " {load}",
74 "states": {
75 "warning": 70,
76 "critical": 90
77 }
78 },
79
80 "sway/language": {
81 "format": " {}",
82 "min-length": 5,
83 "on-click": "swaymsg 'input * xkb_switch_layout next'",
84 "tooltip": false
85 },
86
87 "memory": {
88 "interval": 5,
89 "format": " {used:0.1f}G/{total:0.1f}G",
90 "states": {
91 "warning": 70,
92 "critical": 90
93 },
94 "tooltip": false
95 },
96
97 "network": {
98 "interval": 5,
99 "format-wifi": " {essid} ({signalStrength}%)",
100 "format-ethernet": " {ifname}",
101 "format-disconnected": "No connection",
102 "format-alt": " {ipaddr}/{cidr}",
103 "tooltip": false
104 },
105
106 "sway/mode": {
107 "format": "{}",
108 "tooltip": false
109 },
110
111 "sway/window": {
112 "format": "{}",
113 "max-length": 30,
114 "tooltip": false
115 },
116
117 "sway/workspaces": {
118 "disable-scroll-wraparound": true,
119 "smooth-scrolling-threshold": 4,
120 "enable-bar-scroll": true,
121 "format": "{name}"
122 },
123
124 "pulseaudio": {
125 "format": "{icon} {volume}%",
126 "format-bluetooth": "{icon} {volume}%",
127 "format-muted": "",
128 "format-icons": {
129 "headphone": "",
130 "hands-free": "",
131 "headset": "",
132 "phone": "",
133 "portable": "",
134 "car": "",
135 "default": ["", ""]
136 },
137 "scroll-step": 1,
138 "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
139 "tooltip": false
140 },
141
142 "temperature": {
143 "critical-threshold": 90,
144 "interval": 5,
145 "format": "{icon} {temperatureC}°",
146 "format-icons": [
147 "",
148 "",
149 "",
150 "",
151 ""
152 ],
153 "tooltip": false
154 },
155
156 "tray": {
157 "icon-size": 18,
158 }
159}
diff --git a/files/.config/waybar/style.css b/files/.config/waybar/style.css
deleted file mode 100644
index 53d732b..0000000
--- a/files/.config/waybar/style.css
+++ /dev/null
@@ -1,205 +0,0 @@
1/* Keyframes */
2
3@keyframes blink-critical {
4 to {
5 /*color: @white;*/
6 background-color: @critical;
7 }
8}
9
10
11/* Styles */
12
13/* Colors (gruvbox) */
14@define-color black #073642;
15@define-color red #dc322f;
16@define-color green #859900;
17@define-color yellow #b58900;
18@define-color blue #268bd2;
19@define-color purple #d33682;
20@define-color aqua #00afaf;
21@define-color gray #1c1c1c;
22@define-color brgray #928374;
23@define-color brred #cb4b16;
24@define-color brgreen #586e75;
25@define-color bryellow #657b83;
26@define-color brblue #839496;
27@define-color brpurple #6c71c4;
28@define-color braqua #93a1a1;
29@define-color white #eee8d5;
30@define-color bg1 #073642;
31@define-color bg2 #002b36;
32
33
34@define-color warning @bryellow;
35@define-color critical @red;
36@define-color mode @bg2;
37@define-color unfocused @bg2;
38@define-color focused @blue;
39@define-color inactive @purple;
40@define-color sound @green;
41@define-color network @yellow;
42@define-color memory @aqua;
43@define-color cpu @blue;
44@define-color temp @brpurple;
45@define-color layout @green;
46@define-color battery @yellow;
47@define-color date @aqua;
48@define-color time @bg2;
49@define-color tray @bg2;
50
51/* Reset all styles */
52* {
53 border: none;
54 border-radius: 0;
55 min-height: 0;
56 margin: 0;
57 padding: 0;
58 box-shadow: none;
59 text-shadow: none;
60 icon-shadow: none;
61}
62
63/* The whole bar */
64#waybar {
65 background: @bg2;
66 color: @white;
67 font-family: "Terminus (TTF)", FontAwesome;
68 font-size: 12pt;
69}
70
71/* Each module */
72#battery,
73#clock,
74#cpu,
75#language,
76#memory,
77#mode,
78#network,
79#pulseaudio,
80#temperature,
81#tray,
82#backlight,
83#idle_inhibitor,
84#disk,
85#user,
86#mpris {
87 padding-left: 8pt;
88 padding-right: 8pt;
89}
90
91/* Each critical module */
92#memory.critical,
93#cpu.critical,
94#temperature.critical,
95#battery.critical.discharging {
96 animation-timing-function: linear;
97 animation-iteration-count: infinite;
98 animation-direction: alternate;
99 animation-name: blink-critical;
100 animation-duration: 1s;
101}
102
103/* Each warning */
104#network.disconnected,
105#memory.warning,
106#cpu.warning,
107#temperature.warning,
108#battery.warning.discharging {
109 color: @warning;
110}
111
112/* And now modules themselves in their respective order */
113
114/* Current sway mode (resize etc) */
115#mode {
116 color: @white;
117 background: @mode;
118}
119
120/* Workspaces stuff */
121#workspaces button {
122 /*font-weight: bold;*/
123 padding-left: 2pt;
124 padding-right: 2pt;
125 color: @white;
126 background: @unfocused;
127}
128
129/* Inactive (on unfocused output) */
130#workspaces button.visible {
131 color: @white;
132 background: @inactive;
133}
134
135/* Active (on focused output) */
136#workspaces button.focused {
137 color: @black;
138 background: @focused;
139}
140
141/* Contains an urgent window */
142#workspaces button.urgent {
143 color: @black;
144 background: @warning;
145}
146
147/* Style when cursor is on the button */
148#workspaces button:hover {
149 background: @black;
150 color: @white;
151}
152
153#window {
154 margin-right: 35pt;
155 margin-left: 35pt;
156}
157
158#pulseaudio {
159 background: @sound;
160 color: @black;
161}
162
163#network {
164 background: @network;
165 color: @white;
166}
167
168#memory {
169 background: @memory;
170 color: @black;
171}
172
173#cpu {
174 background: @cpu;
175 color: @white;
176}
177
178#temperature {
179 background: @temp;
180 color: @black;
181}
182
183#language {
184 background: @layout;
185 color: @black;
186}
187
188#battery {
189 background: @battery;
190 color: @white;
191}
192
193#tray {
194 background: @tray;
195}
196
197#clock.date {
198 background: @date;
199 color: @black;
200}
201
202#clock.time {
203 background: @time;
204 color: @white;
205}
diff --git a/files/.emacs.d/.gitignore b/files/.emacs.d/.gitignore
deleted file mode 100644
index 10f87ad..0000000
--- a/files/.emacs.d/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
1*
2!init.el
3!jd
4!jd/*
5!.gitignore \ No newline at end of file
diff --git a/files/.emacs.d/init.el b/files/.emacs.d/init.el
deleted file mode 100755
index 090592f..0000000
--- a/files/.emacs.d/init.el
+++ /dev/null
@@ -1,146 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6;; Minimize garbage collection during startup
7(setq gc-cons-threshold most-positive-fixnum)
8
9;; Lower threshold back to 8 MiB (default is 800kB)
10(add-hook 'emacs-startup-hook
11 (lambda ()
12 (setq gc-cons-threshold (expt 2 23))))
13
14(defvar jd/manifest-list
15 nil
16 "List that contain Emacs packages for GNU/Guix." )
17
18(defvar jd/exwm-p
19 (or (not (null (getenv "JD_EXWM")))
20 (and (seq-contains command-line-args "exwm" #'string-match)
21 t))
22 "Is non-nil when Emacs is run as a window manager.")
23
24(defvar jd/guix-p
25 (and (eq system-type 'gnu/linux)
26 (file-exists-p "/etc/os-release")
27 (with-temp-buffer
28 (insert-file-contents "/etc/os-release")
29 (search-forward "ID=guix" nil t))
30 t)
31 "Is non-nil when Emacs packages are installed by GNU/Guix package manager.")
32
33(defun jd/add-package-to-manifest (guix-package-name)
34 "Add GUIX-PACKAGE-NAME to jd/manifest-list."
35 (unless (member guix-package-name jd/manifest-list)
36 (setq jd/manifest-list
37 (cons guix-package-name jd/manifest-list))))
38
39(add-to-list 'load-path (concat user-emacs-directory "/jd"))
40
41(defun jd/display-startup-time ()
42 (message "Emacs loaded in %s with %d garbage collections."
43 (format "%.2f seconds"
44 (float-time
45 (time-subtract after-init-time before-init-time)))
46 gcs-done))
47
48(defun jd-emacs/startup ()
49 "This procedure will run after Emacs startup."
50 (electric-pair-mode 1)
51 (global-company-mode 1)
52 (jd/display-startup-time))
53
54(add-hook 'emacs-startup-hook #'jd-emacs/startup)
55
56(setq user-full-name "Jakub Dlugosz"
57 user-mail-address "jdlugosz963@gmail.com")
58
59(setq backup-directory-alist '(("." . "~/.cache/emacs/backup"))
60 backup-by-copying t
61 version-control t
62 delete-old-versions t
63 kept-new-versions 20
64 kept-old-versions 5
65 custom-file (concat user-emacs-directory
66 "custom.el"))
67
68;; (setq user-emacs-directory "~/.cache/emacs")
69
70(require 'package)
71(setq package-archives '(("melpa" . "https://melpa.org/packages/")
72 ("org" . "https://orgmode.org/elpa/")
73 ("gnu-devel" . "https://elpa.gnu.org/devel/")
74 ("elpa" . "https://elpa.gnu.org/packages/")))
75(package-initialize)
76
77(unless package-archive-contents
78 (package-refresh-contents))
79
80(jd/add-package-to-manifest "emacs-use-package")
81(unless jd/guix-p
82 (unless (package-installed-p 'use-package)
83 (package-install 'use-package)))
84
85(require 'use-package)
86
87(setq use-package-always-ensure (not jd/guix-p))
88
89(defun jd/generate-manifest ()
90 "Generate GNU/Guix Emacs manifest to temp-buffer."
91 (interactive)
92 (with-output-to-temp-buffer "*guix-emacs-packages-manifest.scm*"
93 (princ (concat ";; This file is auto-generated by Emacs "
94 "function: jd/manifest-generate-to-file \n"))
95 (princ `(specifications->manifest
96 '(,@(mapcar #'(lambda (guix-package-name)
97 (concat "\""
98 guix-package-name
99 "\"\n"))
100 jd/manifest-list))))))
101
102(defun use-package-normalize/:guix-package (name keyword args)
103 (use-package-as-one (symbol-name keyword) args
104 #'(lambda (_label arg)
105 (cond
106 ((consp arg) arg)
107 ((stringp arg) (list arg))
108 ((use-package-non-nil-symbolp arg) (symbol-name arg))
109 (t
110 (use-package-error
111 ":pin wants an archive name (a string)"))))))
112
113(defun use-package-handler/:guix-package
114 (name _keyword args rest state)
115 (let ((body (use-package-process-keywords name rest state)))
116 (use-package-concat
117 (when (consp args)
118 (mapcar #'(lambda (arg)
119 `(jd/add-package-to-manifest ,arg))
120 args))
121 body)))
122
123(add-to-list 'use-package-keywords ':guix-package)
124
125(jd/add-package-to-manifest "emacs")
126(jd/add-package-to-manifest "emacs-guix")
127
128(require 'jd-keys)
129(require 'jd-ui)
130(require 'jd-org)
131(require 'jd-dev)
132(require 'jd-apps)
133(require 'jd-custom)
134(require 'jd-mu4e)
135(require 'jd-misc)
136(require 'jd-sway)
137
138(when jd/exwm-p
139 (require 'jd-exwm))
140
141;; (setq gc-cons-threshold (* 2 1000 1000))
142
143;;; init.el ends here
144(put 'upcase-region 'disabled nil)
145(put 'downcase-region 'disabled nil)
146(put 'set-goal-column 'disabled nil)
diff --git a/files/.emacs.d/jd/jd-apps.el b/files/.emacs.d/jd/jd-apps.el
deleted file mode 100755
index f06430b..0000000
--- a/files/.emacs.d/jd/jd-apps.el
+++ /dev/null
@@ -1,49 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(use-package vterm
7 :guix-package "emacs-vterm"
8 :init
9 (add-to-list 'project-switch-commands '(project-vterm "Vterm") t)
10 (add-to-list 'project-kill-buffer-conditions
11 '(major-mode . vterm-mode))
12 (setq vterm-copy-exclude-prompt t)
13 :config
14 (setq vterm-buffer-name "vterm")
15 ;; (evil-set-initial-state 'vterm-mode 'emacs)
16 (setq vterm-tramp-shells
17 (append '(("ssh" "/bin/bash")) vterm-tramp-shells))
18
19 )
20
21(use-package all-the-icons-dired
22 :guix-package "emacs-all-the-icons-dired"
23 :hook (dired-mode . all-the-icons-dired-mode))
24
25(use-package dired
26 :ensure nil
27 :commands (dired dired-jump)
28 :custom ((dired-listing-switches "-agho --group-directories-first"))
29 :config
30 (setq dired-kill-when-opening-new-dired-buffer t))
31
32(use-package pdf-tools
33 :guix-package
34 "emacs-pdf-tools")
35
36(use-package password-store
37 :guix-package "emacs-password-store"
38 :bind
39 ("C-c P p" . password-store-copy)
40 ("C-c P i" . password-store-insert)
41 ("C-c P g" . password-store-generate))
42
43(use-package shell
44 :bind
45 ("C-c C-<return>" . shell))
46
47(provide 'jd-apps)
48
49;;; jd-apps.el ends here
diff --git a/files/.emacs.d/jd/jd-custom.el b/files/.emacs.d/jd/jd-custom.el
deleted file mode 100755
index a634baa..0000000
--- a/files/.emacs.d/jd/jd-custom.el
+++ /dev/null
@@ -1,33 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(setq erc-nick "bobbma"
7 erc-user-full-name "Jakub Dlugosz"
8 erc-notify-list '("akuleszaa"))
9
10(defun hipis-znc ()
11 (interactive)
12 (erc :server "195.74.91.18"
13 :port "6697"))
14
15
16;; Repair load paths when tramp try to connect to guix instances
17(require 'tramp)
18
19(connection-local-set-profile-variables
20 'guix-system
21 '((tramp-remote-path . (tramp-own-remote-path))))
22
23(connection-local-set-profiles
24 '(:application tramp :protocol "sudo" :machine "localhost")
25 'guix-system)
26
27(connection-local-set-profiles
28 '(:application tramp :protocol "ssh" :machine "jdlugosz.com")
29 'guix-system)
30
31(provide 'jd-custom)
32
33;;; jd-custom.el ends here
diff --git a/files/.emacs.d/jd/jd-dev.el b/files/.emacs.d/jd/jd-dev.el
deleted file mode 100755
index 12cd21b..0000000
--- a/files/.emacs.d/jd/jd-dev.el
+++ /dev/null
@@ -1,177 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6;; (setq c-default-style "linux"
7;; c-basic-offset 8
8;; gdb-many-windows t)
9
10(use-package lsp-mode
11 :guix-package "emacs-lsp-mode"
12 :diminish t
13 :commands (lsp lsp-deferred)
14 :init
15 (setq lsp-headerline-breadcrumb-enable nil)
16 (setq lsp-diagnostics-provider :none)
17 (setq lsp-modeline-diagnostics-enable nil)
18 (setq lsp-keymap-prefix "C-c l")
19 :config
20 (lsp-enable-which-key-integration t)
21
22 (global-set-key (kbd "C-x ]")
23 #'(lambda ()
24 (interactive)
25 (forward-page)
26 (recenter-top-bottom 0)))
27
28 (global-set-key (kbd "C-x [")
29 #'(lambda ()
30 (interactive)
31 (backward-page)
32 (recenter-top-bottom 0)))
33
34 (define-key c-mode-map
35 (kbd "C-c C-c")
36 #'(lambda ()
37 (interactive)
38 (compile compile-command)))
39
40 (define-key c-mode-map
41 (kbd "C-c M-c")
42 'compile))
43
44(use-package lsp-ivy
45 :guix-package "emacs-lsp-ivy"
46 :after lsp)
47
48
49(use-package paredit
50 :guix-package "emacs-paredit")
51
52(defun jd/lisp-mode-setup ()
53 (rainbow-delimiters-mode)
54 (paredit-mode))
55
56(add-hook 'emacs-startup-hook
57 (lambda ()
58 (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup)
59 (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup)
60 (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup)
61 (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup)))
62
63(use-package rainbow-delimiters
64 :guix-package "emacs-rainbow-delimiters")
65
66(use-package sly
67 :guix-package "emacs-sly")
68
69(use-package geiser
70 :guix-package "emacs-geiser")
71
72(use-package geiser-racket
73 :guix-package "emacs-geiser-racket")
74
75(use-package racket-mode
76 :guix-package "emacs-racket-mode")
77
78(use-package geiser-guile
79 :guix-package "emacs-geiser-guile"
80 :config
81 (when jd/guix-p
82 (defun jd/guix-repl ()
83 (interactive)
84 (let ((geiser-guile-binary '("guix" "repl"))
85 (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path)))
86 (geiser 'guile)))))
87
88(use-package pyvenv
89 :guix-package "emacs-pyvenv"
90 :after python-mode)
91
92(use-package typescript-mode
93 :guix-package "emacs-typescript-mode"
94 :mode ("\\.ts\\'")
95 :config
96 (setq typescript-indent-level 2))
97
98(use-package cider
99 :guix-package "emacs-cider")
100
101(use-package tide
102 :guix-package "emacs-tide"
103 :after (typescript-mode company web-mode))
104
105(use-package flycheck
106 :guix-package "emacs-flycheck"
107 :hook ((after-init . global-flycheck-mode)))
108
109(use-package web-mode
110 :guix-package "emacs-web-mode"
111 :mode
112 ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'")
113 :config
114 (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'")))
115 (setq web-mode-markup-indent-offset 2)
116 (setq web-mode-css-indent-offset 2)
117 (setq web-mode-code-indent-offset 2)
118 (setq web-mode-script-padding 2)
119 (setq web-mode-block-padding 2)
120 (setq web-mode-style-padding 2)
121 (setq web-mode-enable-auto-pairing t)
122 (setq web-mode-enable-auto-closing t)
123 (setq web-mode-enable-current-element-highlight t))
124
125(use-package yaml-mode
126 :guix-package "emacs-yaml-mode")
127
128(use-package docker
129 :guix-package "emacs-docker"
130 :bind
131 ("C-c D d" . docker-containers)
132 ("C-c D D" . docker))
133
134(use-package company
135 :guix-package "emacs-company"
136 :diminish t
137 :after lsp-mode
138 :hook (lsp-mode . company-mode)
139 :bind (:map company-active-map
140 ("<tab>" . company-complete-selection))
141 (:map lsp-mode-map
142 ("<tab>" . company-indent-or-complete-common))
143 :custom
144 (company-minimum-prefix-length 1)
145 (company-idle-delay 0.0)
146 :config
147 (global-company-mode))
148
149(use-package projectile
150 :guix-package "emacs-projectile"
151 :diminish projectile-mode
152 :init
153 (when (file-directory-p "~/Documents/code")
154 (setq projectile-project-search-path '("~/Documents/code/")))
155 :custom ((projectile-Completion-system 'ivy))
156 :config
157 (setq projectile-switch-project-action #'projectile-dired)
158 (projectile-mode))
159
160(use-package magit
161 :guix-package "emacs-magit"
162 :custom
163 (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
164
165(use-package restclient
166 :guix-package "emacs-restclient")
167
168(setq sql-connection-alist
169 '(("net47-abaks"
170 (sql-product 'postgres)
171 (sql-user "kuba")
172 (sql-database "net47")
173 (sql-server "net47.abaks.pl"))))
174
175(provide 'jd-dev)
176
177;;; jd-dev.el ends here
diff --git a/files/.emacs.d/jd/jd-exwm.el b/files/.emacs.d/jd/jd-exwm.el
deleted file mode 100755
index 7731b01..0000000
--- a/files/.emacs.d/jd/jd-exwm.el
+++ /dev/null
@@ -1,177 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6
7(use-package perspective
8 :guix-package "emacs-perspective")
9
10(use-package exwm
11 :guix-package "emacs-exwm"
12 :config
13 (defun jd/exwm-update-class ()
14 (exwm-workspace-rename-buffer exwm-class-name))
15
16 (defun jd-exwm/run-in-background (command)
17 (let ((command-parts (split-string command "[ ]+")))
18 (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
19
20 (defun jd-exwm/restart-process (program-name)
21 (call-process "killall" nil nil nil program-name)
22 (jd-exwm/run-in-background program-name))
23
24 (defun jd-exwm/exwm-init-hook ()
25 (jd-exwm/run-in-background "nitrogen --restore")
26 (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1")
27 (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d")
28
29 (jd-exwm/restart-process "polybar")
30 (jd-exwm/restart-process "nm-applet")
31 (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6")
32 (jd-exwm/restart-process "blueman-applet"))
33
34 (defun jd-exwm/exwm-update-title ()
35 (exwm-workspace-rename-buffer exwm-title))
36
37 (defun jd-exwm/configure-window-by-class ()
38 (interactive)
39 (pcase exwm-class-name
40 ("firefox" (exwm-workspace-move-window 2))
41 ("Brave" (exwm-workspace-move-window 2))
42 ("qutebrowser" (exwm-workspace-move-window 2))
43 ("discord" (exwm-workspace-move-window 5))
44 ("obs" (exwm-workspace-move-window 5))
45 ("Virt-manager" (exwm-workspace-move-window 4))))
46
47 (setq exwm-workspace-number 10)
48
49 ;; (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook)
50 (add-hook 'exwm-update-class-hook #'jd/exwm-update-class)
51 (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title)
52 (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class)
53
54 (require 'exwm-randr)
55 (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1"))
56 (exwm-randr-enable)
57
58 (setq exwm-input-simulation-keys
59 '(([?\C-b] . [left])
60 ([?\C-f] . [right])
61 ([?\C-p] . [up])
62 ([?\C-n] . [down])
63 ([?\C-a] . [home])
64 ([?\C-e] . [end])
65 ([?\C-k] . [S-end delete])
66 ([?\M-w] . [C-c])
67 ([?\C-y] . [C-v])
68 ([?\C-v] . [next])
69 ([?\M-v] . [prior])
70 ))
71
72 (setq exwm-input-prefix-keys
73 '(?\C-x
74 ?\C-u
75 ?\C-h
76 ?\M-x
77 ?\M-`
78 ?\M-&
79 ?\M-!
80 ?\C-g
81 ?\M-:
82 ?\C-\M-j
83 ?\C-\ ))
84
85 (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
86 (exwm-input-set-key (kbd "s-p") 'counsel-linux-app)
87
88 (setq exwm-input-global-keys
89 `(([?\s-R] . exwm-reset)
90
91
92 ([?\s-r] . (lambda (command)
93 (interactive (list (read-shell-command "$ ")))
94 (start-process-shell-command command nil command)))
95
96 ([?\s-W] . exwm-workspace-move-window)
97 ([?\s-w] . exwm-workspace-switch)
98
99 ,@(mapcar (lambda (i)
100 `(,(kbd (format "s-%d" i)) .
101 (lambda ()
102 (interactive)
103 (exwm-workspace-switch-create ,i))))
104 (number-sequence 0 9))))
105
106 (exwm-enable)
107 (require 'exwm-systemtray)
108 (exwm-systemtray-enable))
109
110(use-package desktop-environment
111 :guix-package "emacs-desktop-environment"
112 :after exwm
113 :custom
114 (desktop-environment-brightness-small-increment "2%+")
115 (desktop-environment-brightness-small-decrement "2%-")
116 (desktop-environment-brightness-normal-increment "5%+")
117 (desktop-environment-brightness-normal-decrement "5%-")
118
119 :config
120 (defun jd/dunst-show-history ()
121 (interactive)
122 (start-process-shell-command "dunstctl" nil "dunstctl history-pop"))
123 (global-set-key (kbd "C-c N h") #'jd/dunst-show-history)
124
125 (defun jd/dunst-close ()
126 (interactive)
127 (start-process-shell-command "dunstctl" nil "dunstctl close"))
128 (global-set-key (kbd "C-c N c") #'jd/dunst-close)
129
130 (defun jd/dunst-close-all ()
131 (interactive)
132 (start-process-shell-command "dunstctl" nil "dunstctl close-all"))
133 (global-set-key (kbd "C-c N a") #'jd/dunst-close-all)
134
135 (desktop-environment-mode))
136
137;; (set-frame-parameter (selected-frame) 'alpha '(90 . 90))
138;; (add-to-list 'default-frame-alist `(alpha . (90 . 90)))
139;; (set-frame-parameter (selected-frame) 'fullscreen 'maximized)
140;; (add-to-list 'default-frame-alist '(fullscreen . maximized))
141
142(defun jd-exwm/get-color (ATTRIBUTE)
143 (face-attribute 'default ATTRIBUTE))
144
145(defun theme-to-xresources ()
146 (interactive)
147 (require 'term)
148 (with-temp-buffer
149 (insert "! Generated by theme-to-xresources\n")
150 (dolist (spec
151 '(("emacs.background" :background "E6")
152 ("emacs.foreground" :foreground "")))
153 (let ((color (jd-exwm/get-color (cadr spec))))
154 (insert (format "%s: #%s%s\n"
155 (car spec)
156 (caddr spec)
157 (string-remove-prefix "#" color))))
158 jd
159 (write-region (point-min) (point-max) "~/.Xresources")))
160 (call-process "xrdb" nil nil nil "-merge" (expand-file-name "~/.Xresources")))
161
162(defun jd/theme-sync ()
163 (interactive)
164 (theme-to-xresources)
165 (setq org-confirm-babel-evaluate nil)
166 (org-babel-tangle-file "~/dotfiles/Desktop.org")
167 (setq org-confirm-babel-evaluate 't)
168 (call-process "killall" nil nil nil "dunst") ;; TODO: prevent clear notification history
169 (jd-exwm/restart-process "polybar"))
170
171;; (add-hook 'jd/load-theme-hook #'jd/theme-sync)
172;; (add-hook 'exwm-init-hook #'jd/theme-sync)
173
174(provide 'jd-exwm)
175
176;;; jd-exwm.el ends here
177
diff --git a/files/.emacs.d/jd/jd-gym.el b/files/.emacs.d/jd/jd-gym.el
deleted file mode 100755
index 581bf65..0000000
--- a/files/.emacs.d/jd/jd-gym.el
+++ /dev/null
@@ -1,120 +0,0 @@
1;;; jd-gym.el --- Gym workout manager.
2;;; Commentary:
3;; It will be a gym workout manager in the future.
4;;; code:
5
6(require 'emacsql-sqlite)
7
8(defconst jd-gym/db--tables-schema
9 '((workout-plans
10 [(id integer :primary-key :autoincrement)
11 (name text)])
12
13 (workouts
14 [(id integer :primary-key :autoincrement)
15 (workout-plan-id integer :not-null)
16 (day integer :not-null)
17 (month integer :not-null)
18 (year integer :not-null)]
19 (:foreign-key [workout-plan-id] :references workout-plans [id] :on-delete :cascade))
20
21 (muscle-part
22 [(id integer :primary-key :autoincrement)
23 (name text :not-null)])
24
25 (exercises
26 [(id integer :primary-key :autoincrement)
27 (name text :not-null)
28 (muscle-part-id integer :not-null)]
29 (:foreign-key [muscle-part-id] :references muscle-part [id] :on-delete :cascade))
30
31 (workout-plan-exercise-map
32 [(id integer :primary-key :autoincrement)
33 (week-day integer :not-null)
34 (workout-plan-id integer :not-null)
35 (exercise-id integer :not-null)]
36 (:foreign-key [workout-plan-id] :references workout-plans [id] :on-delete :cascade)
37 (:foreign-key [exercise-id] :references exercises [id] :on-delete :cascade))
38
39 (workout-sets
40 [(id integer :primary-key :autoincrement)
41 (reps integer :not-null)
42 (weight integer :not-null)
43 (workout-plan-exercise-map-id integer :not-null)
44 (comment text)]
45 (:foreign-key [workout-plan-exercise-map-id] :references workout-plan-exercise-map [id] :on-delete :cascade))))
46
47(defconst jd-gym/db--test-data
48 '((workout-plans
49 ([nil "Push pull"]))
50 (workouts
51 ([nil 1 3 1 2023]))
52 (muscle-part
53 ([nil "glutes"]
54 [nil "chest"]))
55 (exercises
56 ([nil "Bench press" 2]
57 [nil "RDL" 1]))
58 (workout-plan-exercise-map
59 ([nil 0 1 1] ; Monday, Push pull, Bench press
60 [nil 1 1 2] ; Tuesday, Push pull, RDL
61 [nil 3 1 1] ; Thursday, Push pull, Bench press
62 [nil 4 1 2] ; Friday, Push pull, RDL
63 ))
64 (workout-sets
65 ([nil 7 70 1 "New PR!"]
66 [nil 8 110 2 "It was hard!"]))))
67
68(defun jd-gym/db--test-data-insert ()
69 "Insert test data to jd-gym database."
70 (mapc (lambda (table)
71 (let ((table-name (car table))
72 (table-data (cdr table)))
73 (emacsql jd-gym/db--conn [:insert :into $i1
74 :values $v2]
75 table-name table-data)))
76 jd-gym/db--test-data))
77
78(defvar jd-gym/db-path "~/Documents/Gym/gym.sqlite"
79 "Path can be relative or absolute.")
80
81(defvar jd-gym/db--conn nil
82 "Store connection to jd-gym database.")
83
84(defun jd-gym/db--conn-p ()
85 "Check if jd-gym is connected to db."
86 (and (emacsql-sqlite-connection-p jd-gym/db--conn)
87 (emacsql-live-p jd-gym/db--conn)))
88
89(defun jd-gym/db--connect ()
90 "Connect to db if there is no connection yet."
91 (unless (jd-gym/db--conn-p)
92 (setq jd-gym/db--conn (emacsql-sqlite jd-gym/db-path))))
93
94(defun jd-gym/db--close ()
95 "Close db connection."
96 (when (jd-gym/db--conn-p)
97 (emacsql-close jd-gym/db--conn)))
98
99(defun jd-gym/db--init ()
100 "Initialize database structure."
101 (when (jd-gym/db--conn-p)
102 (emacsql jd-gym/db--conn [:pragma (= foreign_keys ON)])
103 (emacsql jd-gym/db--conn "PRAGMA foreign_keys=ON")
104 (mapc (lambda (table)
105 (let ((table-name (car table))
106 (table-schema (cdr table)))
107 (emacsql jd-gym/db--conn [:create-table $i1 $S2] table-name table-schema)))
108 jd-gym/db--tables-schema)))
109
110(defun jd-gym/db ()
111 "Entrypoint to jd-gym db."
112 (unless (file-exists-p jd-gym/db-path)
113 (jd-gym/db--close)
114 (jd-gym/db--connect) ; Restart connection
115 (jd-gym/db--init)))
116
117
118(provide 'jd-gym)
119
120;;; jd-gym.el ends here
diff --git a/files/.emacs.d/jd/jd-keys.el b/files/.emacs.d/jd/jd-keys.el
deleted file mode 100755
index 8c1c4cb..0000000
--- a/files/.emacs.d/jd/jd-keys.el
+++ /dev/null
@@ -1,49 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3;; Custom keysets used in my emacs
4;;; Code:
5
6(use-package multiple-cursors
7 :guix-package "emacs-multiple-cursors"
8 :config
9 (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
10 (global-set-key (kbd "C->") 'mc/mark-next-like-this)
11 (global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
12 (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this))
13
14(use-package hydra
15 :guix-package "emacs-hydra"
16 ;; :defer t
17 :config
18 (defun jd/text-scale-increase ()
19 (interactive)
20 (let ((old-face-attribute (face-attribute 'default :height)))
21 (set-face-attribute 'default nil :height (+ old-face-attribute 10))))
22
23 (defun jd/text-scale-decrease ()
24 (interactive)
25 (let ((old-face-attribute (face-attribute 'default :height)))
26 (set-face-attribute 'default nil :height (- old-face-attribute 10))))
27
28 (defhydra hydra-text-scale-global (:timeout 4)
29 "scale text"
30 ("j" jd/text-scale-increase "in")
31 ("k" jd/text-scale-decrease "out")
32 ("q" nil "finished" :exit t)) ;; TODO not working
33
34 (defhydra hydra-text-scale (:timeout 4)
35 "scale text"
36 ("j" text-scale-increase "in")
37 ("k" text-scale-decrease "out")
38 ("q" nil "finished" :exit t)))
39
40(use-package undo-tree
41 :guix-package "emacs-undo-tree"
42 :diminish
43 :config
44 (setq undo-tree-auto-save-history nil)
45 (global-undo-tree-mode 1))
46
47(provide 'jd-keys)
48
49;;; jd-keys.el ends here
diff --git a/files/.emacs.d/jd/jd-misc.el b/files/.emacs.d/jd/jd-misc.el
deleted file mode 100644
index 2b7d1bd..0000000
--- a/files/.emacs.d/jd/jd-misc.el
+++ /dev/null
@@ -1,34 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defun jd/generete-qr-from-clipboard ()
7 (interactive)
8 (let ((clipboard-value (x-get-clipboard))
9 (clipboard-file-path "/tmp/clipboard_value.txt")
10 (clipboard-out-image "/tmp/qr.png"))
11 (with-temp-file clipboard-file-path
12 (insert clipboard-value))
13 (shell-command (concat
14 "qrencode -o "
15 clipboard-out-image
16 " < "
17 clipboard-file-path))
18 (find-file clipboard-out-image)))
19
20(defun jd/dired-open-file-in-kill-ring ()
21 (interactive)
22 (let* ((last-killed (car kill-ring))
23 (exists-p (file-exists-p last-killed))
24 (dir-p (file-directory-p last-killed)))
25 (cond
26 ((not exists-p) (message "File doesn't exists!"))
27 (dir-p (dired last-killed))
28 ((not dir-p) (find-file last-killed)))))
29
30(global-set-key (kbd "C-c O") #'jd/dired-open-file-in-kill-ring)
31
32(provide 'jd-misc)
33
34;;; jd-misc.el ends here
diff --git a/files/.emacs.d/jd/jd-mu4e.el b/files/.emacs.d/jd/jd-mu4e.el
deleted file mode 100755
index b388201..0000000
--- a/files/.emacs.d/jd/jd-mu4e.el
+++ /dev/null
@@ -1,84 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(use-package htmlize
7 :guix-package "emacs-htmlize")
8
9(use-package mu4e
10 :guix-package ("mu" "isync")
11 :defer 10
12 :ensure nil
13 :bind
14 ("C-c M" . mu4e)
15 :config
16 ;a (require 'org-mu4e)
17
18 (unless jd/guix-p
19 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
20 (setq mu4e-mu-binary "/usr/local/bin/mu"))
21
22 (setq mu4e-update-interval (* 10 60))
23 (setq mu4e-get-mail-command "mbsync -a")
24 (setq mu4e-maildir "~/Mail")
25
26 (setq mu4e-completing-read-function #'ivy-completing-read)
27
28 (setq mu4e-change-filenames-when-moving t)
29
30 (setq mu4e-contexts
31 `(,(make-mu4e-context
32 :name "Abaks"
33 :match-func (lambda (msg) (when msg
34 (string-prefix-p "/abaks" (mu4e-message-field msg :maildir))))
35 :vars '(
36 (user-full-name . "Jakub Dlugosz")
37 (user-mail-address . "jakub@abaks.pl")
38 (mu4e-sent-folder . "/abaks/Sent Items")
39 (mu4e-trash-folder . "/abaks/Trash")
40 (mu4e-drafts-folder . "/abaks/Drafts")
41 (mu4e-refile-folder . "/abaks/Archive")
42 (mu4e-sent-messages-behavior . sent)
43 (smtpmail-local-domain . "pl")
44 (smtpmail-smtp-server . "smtp.abaks.pl")
45 (smtpmail-smtp-user . "jakub@abaks.pl")))
46 ,(make-mu4e-context
47 :name "Gmail"
48 :match-func (lambda (msg) (when msg
49 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
50 :vars '(
51 (user-full-name . "Jakub Dlugosz")
52 (user-mail-address . "jdlugosz963@gmail.com")
53 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
54 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
55 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
56 (mu4e-refile-folder . "/gmail/Archive")
57 (smtpmail-local-domain . "com")
58 (smtpmail-smtp-server . "smtp.gmail.com")
59 (smtpmail-smtp-user . "jdlugosz963@gmail.com")
60 (mu4e-sent-messages-behavior . sent)))))
61
62 (setq mail-user-agent 'mu4e-user-agent
63 mail-host-address nil
64 message-send-mail-function 'smtpmail-send-it
65 smtpmail-smtp-service 465
66 smtpmail-stream-type 'ssl
67 smtpmail-servers-requiring-authorization ".*")
68
69 (setq mu4e-compose-signature (concat
70 "Pozdrawiam,\n"
71 "Jakub Długosz"))
72
73 (mu4e t)
74 (mu4e-modeline-mode nil))
75
76(use-package mu4e-alert
77 :guix-package "emacs-mu4e-alert"
78 :defer 20
79 :config
80 (mu4e-alert-set-default-style 'libnotify)
81 (mu4e-alert-enable-mode-line-display)
82 (mu4e-alert-enable-notifications))
83
84(provide 'jd-mu4e)
diff --git a/files/.emacs.d/jd/jd-org.el b/files/.emacs.d/jd/jd-org.el
deleted file mode 100755
index 554533d..0000000
--- a/files/.emacs.d/jd/jd-org.el
+++ /dev/null
@@ -1,222 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defvar jd/org-home "~/Notes")
7(defvar jd/org-roam-home (concat jd/org-home "/roam"))
8(defvar jd/org-sync (concat jd/org-home "/sync"))
9(defvar jd/org-roam-daily-home (concat jd/org-roam-home "/daily"))
10
11(defun jd/org-mode-init ()
12 (org-indent-mode)
13 (variable-pitch-mode 1)
14 (visual-line-mode 1))
15
16(defun jd-emacs/org-insert-date (&optional date)
17 (org-insert-time-stamp (org-read-date nil t (or date "+0d"))))
18
19(use-package org-pomodoro
20 :guix-package "emacs-org-pomodoro")
21
22(use-package org-caldav
23 :guix-package "emacs-org-caldav"
24 :config
25 (setq org-caldav-url "http://caldav.jdlugosz.com/radicale/admin/"
26 org-caldav-files nil
27 org-icalendar-timezone "Europe/Warsaw")
28
29 (defun jd/caldav-calendar-sync ()
30 (interactive)
31 (let ((org-caldav-calendar-id "0c54a523-c7aa-2f26-2c18-a12b69c2bc86")
32 (org-caldav-inbox (concat jd/org-sync
33 "/calendar.org")))
34 (org-caldav-sync)))
35
36 (defun jd/caldav-journal-sync ()
37 (interactive)
38 (let ((org-caldav-calendar-id "3cc70419-a787-5f84-28c6-96f15fc606d9")
39 (org-caldav-inbox (concat jd/org-sync
40 "/journal.org")))
41 (org-caldav-sync)))
42
43 (defun jd/caldav-tasks-sync ()
44 (interactive)
45 (let ((org-caldav-calendar-id "372cbbb3-14f7-fc15-9f7b-cae04114920c")
46 (org-caldav-inbox (concat jd/org-sync
47 "/tasks.org")))
48 (org-caldav-sync))))
49
50(use-package org
51 :guix-package "emacs-org"
52 :pin org
53 :commands (org-capture org-agenda)
54 :hook (org-mode . jd/org-mode-init)
55 :bind
56 ("C-c o c" . #'org-capture)
57 ("C-c o p" . #'org-mobile-pull)
58 ("C-c o P" . #'org-mobile-push)
59 ("C-c o a" . #'org-agenda)
60 :config
61 (defun jd/org-mode-file (file-name) (concat org-directory "/" file-name ".org"))
62 (setq org-directory (file-truename "~/Notes")
63 org-mobile-directory (concat org-directory "/Mobile")
64 org-mobile-inbox-for-pull (concat org-directory "/flagged.org") ;; TODO: ??
65
66 org-refile-targets '((org-agenda-files :maxlevel . 1))
67 org-outline-path-complete-in-steps nil
68 org-refile-use-outline-path t
69 org-agenda-files '("Personal.org" "Work.org" "Inbox.org" "Collage.org")
70 org-ellipsis " ▾"
71 org-agenda-start-with-log-mode t
72 org-log-done 'time
73 org-log-into-drawer t
74 org-return-follows-link t
75 org-latex-listings 'minted
76 org-latex-packages-alist '(("" "minted"))
77
78 org-agenda-custom-commands
79 `(("p" "Planning"
80 ((tags-todo "+planning"
81 ((org-agenda-overriding-header "Planning Tasks")))
82 (tags-todo "-{.*}"
83 ((org-agenda-overriding-header "Untagged Tasks")))
84 (todo "*" ((org-agenda-files '(,(jd/org-mode-file "Inbox")))
85 (org-agenda-overriding-header "Unprocessed Inbox Items")))))
86
87 ("d" "Daily Agenda"
88 ((agenda "" ((org-agenda-span 'day)
89 (org-deadline-warning-days 7)))
90 (tags-todo "+PRIORITY=\"A\""
91 ((org-agenda-overriding-header "High Priority Tasks")))))
92
93 ("c" "Collage Agenda"
94 ((agenda "" ((org-agenda-span 'week)
95 (org-deadline-warning-days 7))))
96 ((org-agenda-filter-preset '("+collage"))))
97
98 ("w" "Weekly Review"
99 ((agenda ""
100 ((org-agenda-overriding-header "Completed Tasks")
101 (org-agenda-skip-function '(org-agenda-skip-entry-if 'nottodo 'done))
102 (org-agenda-span 'week)))
103
104 (agenda ""
105 ((org-agenda-overriding-header "Unfinished Scheduled Tasks")
106 (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
107 (org-agenda-span 'week))))))
108
109 org-capture-templates
110 `(("i" "Capture to Inbox" entry (file+olp ,(jd/org-mode-file "Inbox") "Inbox")
111 "* TODO %?\n %t\n" :empty-lines 1)
112 ("c" "Capture to Collage" entry (file+olp ,(jd/org-mode-file "Collage") "Collage")
113 "* TODO %? :collage:%^g \n %t\n" :empty-lines 1))
114
115 org-latex-pdf-process
116 '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
117 "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
118
119 (require 'org-tempo)
120
121 (defun jd/org-font-setup ()
122 (dolist (face '((org-level-1 . 1.3)
123 (org-level-2 . 1.2)
124 (org-level-3 . 1.1)
125 (org-level-4 . 1.0)
126 (org-level-5 . 1.0)
127 (org-level-6 . 1.0)
128 (org-level-7 . 1.0)
129 (org-level-8 . 1.0)))
130 (set-face-attribute (car face) nil :font "Terminus" :weight 'Bold :height (cdr face)))
131
132 ;; Ensure that anything that should be fixed-pitch in Org files appears that way
133 (set-face-attribute 'org-block nil :font "Terminus" :inherit 'fixed-pitch :height 100)
134 (set-face-attribute 'org-table nil :inherit 'fixed-pitch)
135 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
136 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
137 (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
138 (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
139 (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
140 (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
141 (set-face-attribute 'line-number nil :inherit 'fixed-pitch)
142 (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))
143
144 (with-eval-after-load 'org (jd/org-font-setup))
145
146 (defun jd-emacs/org-timer-stop ()
147 (start-process-shell-command "notify-send" nil "notify-send Zakonczono odliczanie"))
148
149 (add-hook 'org-timer-stop-hook #'jd-emacs/org-timer-stop)
150
151 (defun jd/org-tempo-setup ()
152 (dolist (template '(("s" . "src")
153 ("sql" . "src sql")
154 ("sh" . "src sh")
155 ("el" . "src emacs-lisp")
156 ("li" . "src lisp")
157 ("sc" . "src scheme")
158 ("ts" . "src typescript")
159 ("py" . "src python")
160 ("go" . "src go")
161 ("yaml" . "src yaml")))
162 (add-to-list 'org-structure-template-alist template)))
163
164 (with-eval-after-load 'org-tempo (jd/org-tempo-setup))
165
166 (org-babel-do-load-languages
167 'org-babel-load-languages
168 '((emacs-lisp . t)
169 (python . t)
170 (shell . t))))
171
172(use-package org-superstar
173 :guix-package "emacs-org-superstar"
174 :hook (org-mode . org-superstar-mode)
175 :init
176 (setq org-superstar-special-todo-items t)
177 (setq org-superstar-remove-leading-stars t)
178 (setq org-superstar-headline-bullets-list '("◉" "○" "●" "○" "●" "○" "●")))
179
180(use-package org-roam
181 :guix-package "emacs-org-roam"
182 :custom
183 (org-roam-directory (file-truename jd/org-roam-home))
184 :bind (("C-c n l" . org-roam-buffer-toggle)
185 ("C-c n f" . org-roam-node-find)
186 ("C-c n g" . org-roam-graph)
187 ("C-c n i" . org-roam-node-insert)
188 ("C-c n c" . org-roam-capture)
189 ;; Dailies
190 ("C-c n j" . org-roam-dailies-capture-today))
191 :bind-keymap
192 ("C-c n d" . org-roam-dailies-map)
193 :config
194 (require 'org-roam-dailies)
195
196 (defun jd/org-roam-filter-by-tag (tag-name)
197 (lambda (node)
198 (member tag-name (org-roam-node-tags node))))
199
200 (defun jd/org-roam-list-notes-by-tag (tag-name)
201 (mapcar #'org-roam-node-file
202 (seq-filter
203 (jd/org-roam-filter-by-tag tag-name)
204 (org-roam-node-list))))
205
206 (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
207 (setq org-roam-capture-templates
208 '(("d" "default" plain "%?"
209 :target (file+head+olp
210 "%<%Y%m%d%H%M%S>-${slug}.org"
211 "#+title: ${title}\n\n"
212 ("${title}"))
213 :unnarrowed t)))
214
215 (org-roam-db-autosync-mode))
216
217(use-package ox-pandoc
218 :guix-package "emacs-ox-pandoc")
219
220(provide 'jd-org)
221
222;;; jd-org.el ends here
diff --git a/files/.emacs.d/jd/jd-sway.el b/files/.emacs.d/jd/jd-sway.el
deleted file mode 100644
index cdfb667..0000000
--- a/files/.emacs.d/jd/jd-sway.el
+++ /dev/null
@@ -1,18 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defun use-package-normalize/:diminish (name keyword args)
7 (use-package-as-one (symbol-name keyword) args
8 (apply-partially #'use-package-normalize-diminish name) t))
9
10(use-package shackle
11 :guix-package "emacs-shackle")
12
13(use-package sway
14 :guix-package "emacs-sway")
15
16(provide 'jd-sway)
17
18;;; jd-sway.el ends here
diff --git a/files/.emacs.d/jd/jd-ui.el b/files/.emacs.d/jd/jd-ui.el
deleted file mode 100755
index 4e388c9..0000000
--- a/files/.emacs.d/jd/jd-ui.el
+++ /dev/null
@@ -1,104 +0,0 @@
1;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(setq inhibit-startup-message t)
7(setq visible-bell t)
8(scroll-bar-mode -1)
9(tool-bar-mode -1)
10(tooltip-mode -1)
11(menu-bar-mode -1)
12(set-fringe-mode 10)
13
14;; (set-frame-parameter (selected-frame) 'alpha '(92 . 92))
15;; (add-to-list 'default-frame-alist '(alpha . (92 . 92)))
16
17(let ((height (if (string-equal (system-name)
18 "berserker")
19 175
20 125)))
21 (custom-set-faces
22 `(default ((t (:inherit nil :height ,height :family "Terminus"))))
23 `(line-number ((t (:inherit nil :height ,height :family "Terminus"))))
24 `(line-number-current-line ((t (:inherit nil :height ,height :family "Terminus"))))))
25
26(add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative)
27
28(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
29
30(global-prettify-symbols-mode 1)
31
32(defalias 'yes-or-no-p 'y-or-n-p)
33
34(require 'diminish)
35
36(use-package doom-modeline
37 :guix-package "emacs-doom-modeline"
38 :config
39 (doom-modeline-mode))
40
41(use-package solarized-theme
42 :guix-package "emacs-solarized-theme"
43 :config
44 (load-theme 'solarized-dark-high-contrast t))
45
46
47(use-package diminish
48 :guix-package "emacs-diminish")
49
50(use-package hl-todo
51 :guix-package "emacs-hl-todo"
52 :init
53 (setq hl-todo-keyword-faces
54 '(("TODO" . "#FF0000")
55 ("FIXME" . "#FF0000")
56 ("DEBUG" . "#A020F0")))
57 :config
58 (global-hl-todo-mode 1))
59
60(defvar jd/load-theme-hook nil)
61(defun jd/load-theme ()
62 (interactive)
63 (counsel-load-theme)
64 (run-hooks 'jd/load-theme-hook))
65
66(use-package ivy
67 :guix-package "emacs-ivy"
68 :diminish
69 :bind
70 (("C-s" . swiper))
71 :config
72 (ivy-mode 1))
73
74(use-package counsel
75 :guix-package "emacs-counsel"
76 :diminish t
77 :config
78 (counsel-mode 1))
79
80(use-package which-key
81 :guix-package "emacs-which-key"
82 :diminish
83 :config
84 (which-key-mode)
85 (setq which-key-idle-delay 0.3))
86
87(use-package all-the-icons
88 :guix-package "emacs-all-the-icons")
89
90(use-package beacon
91 :guix-package "emacs-beacon"
92 :config
93 (beacon-mode 1))
94
95(setq display-time-string-forms
96 '(" " 24-hours ":" minutes " "))
97
98(when jd/exwm-p
99 (display-battery-mode)
100 (display-time-mode))
101
102(provide 'jd-ui)
103
104;;; jd-ui.el ends here
diff --git a/files/.gitignore b/files/.gitignore
deleted file mode 100644
index f3fe7e5..0000000
--- a/files/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
1__pycache__/
2elpa/
3auto-save-list/
4eln-cache/
5url/
6**/#*
7**/*~
diff --git a/files/.guile b/files/.guile
deleted file mode 100644
index 2076bd2..0000000
--- a/files/.guile
+++ /dev/null
@@ -1,2 +0,0 @@
1 (use-modules (ice-9 readline))
2 (activate-readline) \ No newline at end of file
diff --git a/files/.mbsyncrc b/files/.mbsyncrc
deleted file mode 100644
index 20a8692..0000000
--- a/files/.mbsyncrc
+++ /dev/null
@@ -1,47 +0,0 @@
1IMAPStore abaks-remote
2Host imap.abaks.pl
3Port 143
4SSLType None
5AuthMechs LOGIN
6User jakub@abaks.pl
7PassCmd "pass email/jakub@abaks.pl"
8CertificateFile /etc/ssl/certs/ca-certificates.crt
9
10MaildirStore abaks-local
11Path ~/Mail/abaks/
12Inbox ~/Mail/abaks/INBOX
13Subfolders Verbatim
14
15Channel abaks
16Far :abaks-remote:
17Near :abaks-local:
18Patterns INBOX * !Sync*
19Expunge None
20CopyArrivalDate yes
21Sync All
22Create Near
23SyncState *
24
25IMAPStore gmail-remote
26Host imap.gmail.com
27Port 993
28SSLType IMAPS
29AuthMechs LOGIN
30User jdlugosz963@gmail.com
31PassCmd "pass email/jdlugosz963@gmail.com"
32CertificateFile /etc/ssl/certs/ca-certificates.crt
33
34MaildirStore gmail-local
35Path ~/Mail/gmail/
36Inbox ~/Mail/gmail/INBOX
37Subfolders Verbatim
38
39Channel gmail
40Far :gmail-remote:
41Near :gmail-local:
42Patterns INBOX * !Sync*
43Expunge None
44CopyArrivalDate yes
45Sync All
46Create Near
47SyncState *
diff --git a/files/.nix-channels b/files/.nix-channels
deleted file mode 100644
index 46c3d72..0000000
--- a/files/.nix-channels
+++ /dev/null
@@ -1 +0,0 @@
1https://nixos.org/channels/nixos-23.11 nixos
diff --git a/files/.stumpwm.d/.gitignore b/files/.stumpwm.d/.gitignore
deleted file mode 100644
index 4c478cf..0000000
--- a/files/.stumpwm.d/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1stumpwm.log* \ No newline at end of file
diff --git a/files/.stumpwm.d/init.lisp b/files/.stumpwm.d/init.lisp
deleted file mode 100755
index 0970718..0000000
--- a/files/.stumpwm.d/init.lisp
+++ /dev/null
@@ -1,360 +0,0 @@
1(in-package :stumpwm)
2
3
4(setq *message-window-gravity* :center)
5(setq *message-window-input-gravity* :center)
6(setq *input-window-gravity* :center)
7(setq *window-border-style* :none)
8
9(set-bg-color :gray10)
10(setq *mode-line-background-color* "Gray10")
11
12(set-prefix-key (kbd "C-z"))
13(setq *float-window-modifier* :super)
14
15(define-key *top-map* (kbd "s-w") "gselect")
16
17(defcommand lock () ()
18 (run-shell-command "slock"))
19
20(define-key *top-map* (kbd "s-l") "lock")
21
22(defcommand server-start () ()
23 (slynk:create-server :port 4005)
24 (message "server started at port: \"4005\"!"))
25
26
27(define-key *root-map* (kbd "C-q") "send-raw-key")
28
29(define-key *root-map* (kbd "M") "mode-line")
30(define-key *root-map* (kbd "C-n") "fnext")
31(define-key *root-map* (kbd "C-p") "fprev")
32(define-key *root-map* (kbd "b") "windowlist")
33
34
35
36;; (run-commands "gnew Code"
37;; "gnew Web"
38;; "gnew Music"
39;; "gnew Game"
40;; "gnew School")
41
42(define-remapped-keys
43 '(("(Firefox|Chrome|qutebrowser)"
44 ("C-n" . "Down")
45 ("C-p" . "Up")
46 ("C-f" . "Right")
47 ("C-b" . "Left")
48 ("C-v" . "Next")
49 ("M-v" . "Prior")
50 ("M-w" . "C-c")
51 ("C-w" . "C-x")
52 ("C-y" . "C-v")
53 ("M-<" . "Home")
54 ("M->" . "End")
55 ("C-a" . "Home")
56 ("C-e" . "End")
57 ("C-M-b" . "M-Left")
58 ("C-M-f" . "M-Right")
59 ("C-g" . "ESC")
60 ("C-k" . ("C-S-End" "C-x")))))
61
62(define-frame-preference "chat"
63 (0 NIL T :create T :class "quassel")
64 (1 NIL T :create T :class "discord")
65 (2 NIL T :create T :class "nheko"))
66
67(define-frame-preference "vm"
68 (0 NIL T :create T :class ".virt-manager-real"))
69
70(run-shell-command "~/.fehbg")
71
72(require :pamixer)
73(require :pass)
74
75(require :screenshot)
76(pamixer:volume-down 10)
77
78(defun get-brightness ()
79 (let ((c (parse-integer (string-trim
80 (string #\newline)
81 (run-shell-command "brightnessctl g" t))))
82 (m (parse-integer (string-trim
83 (string #\newline)
84 (run-shell-command "brightnessctl m" t)))))
85 (format nil "~3,1f%" (* (/ c m) 100))))
86
87(defun set-brightness (x)
88 (run-shell-command (concat "brightnessctl s " x))
89 (message (concat "Brightness: " (get-brightness))))
90
91(defcommand my-volume-down () ()
92 (pamixer:volume-down 5)
93 (message (format nil "Volume: ~s%" (pamixer:get-volume))))
94
95(defcommand my-volume-up () ()
96 (pamixer:volume-up 5)
97 (message (format nil "Volume: ~s%" (pamixer:get-volume))))
98
99(defcommand my-toggle-mute () ()
100 (pamixer:toggle-mute)
101 (if (pamixer:get-mute)
102 (message "Mute: ^2ON")
103 (message "Mute: ^1OFF")))
104
105(defcommand my-brightness-up () ()
106 (set-brightness "+5%"))
107
108(defcommand my-brightness-down () ()
109 (set-brightness "5%-"))
110
111(defcommand my-brightness-one () ()
112 (set-brightness "1"))
113
114
115(define-key *top-map* (kbd "XF86AudioMute") "my-toggle-mute")
116(define-key *top-map* (kbd "XF86AudioRaiseVolume") "my-volume-up")
117(define-key *top-map* (kbd "XF86AudioLowerVolume") "my-volume-down")
118
119(define-key *top-map* (kbd "XF86MonBrightnessUp") "my-brightness-up")
120(define-key *top-map* (kbd "XF86MonBrightnessDown") "my-brightness-down")
121
122(defun my-screenshoot-command-wrapper (screenshot-command ss-name)
123 (apply screenshot-command (list (concat
124 "~/Pictures/Screenshots/"
125 (string-trim
126 (string #\newline)
127 (run-shell-command "date +%Y-%M-%d-%T" t))
128 "-" (or ss-name "untitled")
129 ".png"))))
130
131
132(defcommand my-screenshot-area (ss-name)
133 ((:string "Screenshot name: "))
134 (my-screenshoot-command-wrapper #'screenshot:screenshot-area ss-name))
135
136(defcommand my-screenshot-window (ss-name)
137 ((:string "Screenshot name: "))
138 (my-screenshoot-command-wrapper #'screenshot:screenshot-window ss-name))
139
140(defcommand my-screenshot (ss-name)
141 ((:string "Screenshot name: "))
142 (my-screenshoot-command-wrapper #'screenshot:screenshot ss-name))
143
144(defvar *misc-keymap*
145 (let ((m (make-sparse-keymap)))
146 (define-key m (kbd "0") "my-toggle-mute")
147 (define-key m (kbd "+") "my-volume-up")
148 (define-key m (kbd "=") "my-volume-up")
149 (define-key m (kbd "-") "my-volume-down")
150
151 (define-key m (kbd "p") "pass-copy-menu")
152 (define-key m (kbd "C-p") "pass-copy-menu")
153 (define-key m (kbd "g") "pass-generate")
154 (define-key m (kbd "C-g") "pass-generate")
155
156 (define-key m (kbd "C-a") "my-screenshot-area")
157 (define-key m (kbd "a") "my-screenshot-area")
158 (define-key m (kbd "C-w") "my-screenshot-window")
159 (define-key m (kbd "w") "my-screenshot-window")
160 (define-key m (kbd "C-s") "my-screenshot")
161 (define-key m (kbd "s") "my-screenshot")
162
163 m))
164
165
166
167
168(define-key *root-map* (kbd "C-m") '*misc-keymap*)
169
170;;
171;; ;;; MODE-LINE
172(require :cpu)
173(require :mem)
174(require :net)
175
176(require :stumptray)
177(stumptray:add-mode-line-hooks)
178
179(defun update-stumptray-position (&rest args)
180 (setf (symbol-value (find-symbol "*TRAY-HEAD-SELECTION-FN*" :stumptray))
181 (if (>= (list-length (stumpwm:screen-heads (stumpwm:current-screen))) 2)
182 #'second
183 #'first)))
184
185(stumpwm:add-hook stumpwm:*new-head-hook* 'update-stumptray-position)
186(update-stumptray-position)
187
188(defun get-battery-status ()
189 (let* ((state (string-trim
190 (string #\newline)
191 (run-shell-command
192 (concat "upower -i /org/freedesktop/UPower/devices/battery_BAT0 "
193 "| grep state: "
194 "| awk '{print $2}'")
195 t)))
196 (perc (string-trim
197 (string #\newline)
198 (run-shell-command (concat
199 "upower -i /org/freedesktop/UPower/devices/battery_BAT0 "
200 "| grep perc "
201 "| awk '{print $2}'")
202 t)))
203 (perc-num (parse-integer (aref (nth-value 1 (cl-ppcre:scan-to-strings "^(.*)\%$" perc)) 0))))
204 (format
205 nil
206 (concat
207 "BAT: "
208 (cond
209 ((and (equal state "discharging")
210 (<= perc-num 20))
211 "^1[-~a]^]")
212 ((equal state "discharging") "[-~a]")
213 ((equal state "charging") "[+~a]")
214 ((equal state "fully-charged") "[~a]")
215 (t (concat state " [~a]"))))
216 perc)))
217
218
219
220(setq *screen-mode-line-format* (list "[^B%n^b] %W ^> %C | %M | %l | "
221 '(:eval (get-battery-status))
222 " " ;; empty space for stumptray icons
223 ))
224
225(require :yason) ;; json parser
226(require :drakma) ;; http client
227
228
229(defcommand kto-hakuje-p () ()
230 (let* ((response (yason:parse
231 (flexi-streams:octets-to-string
232 (drakma:http-request "https://whois.at.hsp.sh/api/now"))))
233 (users (gethash "users" response))
234 (unknown-devices (gethash "unknown_devices" response)))
235 (message (cond
236 ((and (= (list-length users) 0)
237 (= unknown-devices 0))
238 "Spejs jest pusty!")
239 ((and (= (list-length users) 0)
240 (> unknown-devices 0))
241 (format nil "W spejsie jest nieznanych ~a urzadzen." unknown-devices))
242 ((and (> (list-length users) 0)
243 (= unknown-devices 0))
244 (format nil "W spejsie jest ~a." users))
245 ((and (> (list-length users) 0)
246 (> unknown-devices 0))
247 (format nil "W spejsie jest ~a oraz ~a nieznane urzadzenia." users unknown-devices))))))
248
249
250(define-key *misc-keymap* (kbd "h") "kto-hakuje-p")
251(define-key *misc-keymap* (kbd "C-h") "kto-hakuje-p")
252
253
254(defun emacs-server-p ()
255 (let ((status-code (caddr
256 (multiple-value-list
257 (uiop:run-program "ls /run/user/$(id -u)/emacs/server"
258 :ignore-error-status T)))))
259 (= status-code 0)))
260
261(stumpwm:defcommand emacs-start-server (&optional (show-message T) (wait-for-start NIL)) ()
262 (let ((mess (if (not (emacs-server-p))
263 (progn (stumpwm:run-shell-command "emacs --daemon" wait-for-start)
264 "Emacs server is starting....")
265 "Emacs server is running already!")))
266 (when show-message (message mess))))
267
268(stumpwm:defcommand emacs-stop-server (&optional (show-message T)) ()
269 (let ((mess (if (emacs-server-p)
270 (progn (stumpwm:run-shell-command "emacsclient -e \"(server-force-delete)\"")
271 "Emacs server gone away :(....")
272 "Emacs server wasn't alive!")))
273 (when show-message (message mess))))
274
275
276(stumpwm:defcommand emacs-restart-server (&optional (show-message T)) ()
277 (emacs-stop-server NIL)
278 (emacs-start-server show-message))
279
280(defun postwalk (fun tree)
281 (if (consp tree)
282 (loop :for a :in tree
283 :if (consp a)
284 :collect (postwalk fun a)
285 :else
286 :collect (funcall fun a))
287 (funcall fun tree)))
288
289(defmacro eval-emacs-sexp (sexp
290 &key (create-new-frame NIL))
291 `(stumpwm:run-shell-command
292 (format nil "emacsclient~{ ~A~} '~A'"
293 (list ,(if create-new-frame "-c" "")
294 "-e")
295 (postwalk (lambda (x)
296 (cond
297 ((stringp x) (concat "\"" x "\""))
298 ((symbolp x) (string-downcase (string x)))
299 (T x)))
300 ,sexp))
301 ,(not create-new-frame)))
302
303
304(defmacro defcommand-from-emacs (name
305 (&rest args)
306 (&rest interactive-args)
307 (&key (create-new-frame T) (output-wrapper NIL))
308 &body body)
309 `(stumpwm:defcommand ,name ,args ,interactive-args
310 (when (not (emacs-server-p))
311 (emacs-start-server NIL T))
312
313 ,(let ((x `(eval-emacs-sexp (progn ,@body)
314 :create-new-frame ,create-new-frame)))
315 (cond
316 ((and create-new-frame output-wrapper)
317 (error "Cannot wrap the output, becaouse create-new-frame is T."))
318 (output-wrapper `(funcall ,output-wrapper ,x))
319 (T `(funcall (lambda (x) (progn x nil)) ,x))))))
320
321
322(defcommand-from-emacs emacs-client () () ()
323 nil)
324
325(defcommand-from-emacs emacs-calc () () ()
326 '(full-calc))
327
328(defcommand-from-emacs emacs-org-agenda () () ()
329 '(org-agenda-list))
330
331(defcommand-from-emacs emacs-mu4e () () ()
332 '(mu4e))
333
334(defcommand-from-emacs emacs-shell () () ()
335 '(shell))
336
337(defcommand-from-emacs emacs-eshell () () ()
338 '(eshell))
339
340(defvar *emacs-keymap*
341 (let ((e (make-sparse-keymap)))
342 (define-key e (kbd "a") "emacs-org-agenda")
343 (define-key e (kbd "C-a") "emacs-org-agenda")
344 (define-key e (kbd "c") "emacs-calc")
345 (define-key e (kbd "C-c") "emacs-calc")
346 (define-key e (kbd "m") "emacs-mu4e")
347 (define-key e (kbd "C-m") "emacs-mu4e")
348
349 e))
350
351
352
353
354(define-key *root-map* (kbd "C-e") '*emacs-keymap*)
355(define-key *root-map* (kbd "e") "emacs-client")
356(define-key *root-map* (kbd "c") "emacs-shell")
357(define-key *root-map* (kbd "C") "emacs-eshell")
358
359
360(emacs-start-server nil)
diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm
deleted file mode 100644
index 2cd98fd..0000000
--- a/guix/jd/desktops/base.scm
+++ /dev/null
@@ -1,236 +0,0 @@
1(define-module (jd desktops base)
2 #:use-module (jd home services polkit)
3 #:use-module (jd home services desktop)
4 #:use-module (jd home services emacs)
5 #:use-module (jd services polkit)
6
7 #:use-module (gnu)
8 #:use-module (gnu home)
9 #:use-module (gnu home services)
10 #:use-module (gnu home services desktop)
11 #:use-module (gnu home services gnupg)
12 #:use-module (gnu home services xdg)
13 #:use-module (gnu home services sound)
14 #:use-module (gnu services)
15 #:use-module (guix packages)
16
17 #:use-module (nongnu packages linux)
18 #:use-module (nongnu system linux-initrd))
19
20(use-package-modules wm gnome networking virtualization
21 lisp lisp-xyz cups fonts gnupg android)
22
23(use-service-modules cups desktop networking ssh xorg
24 docker virtualization pm sound dbus
25 nix sddm guix)
26
27(define-public %jd-base-home-services
28 (list
29 ;; (service home-redshift-service-type
30 ;; (home-redshift-configuration
31 ;; (location-provider 'manual)
32 ;; (latitude 51.919438)
33 ;; (longitude 19.145136)))
34 ;; Poland
35
36 (service home-dbus-service-type)
37 (service home-emacs-service-type)
38 (service home-desktop-service-type)
39
40 ;; Dont know why, but when i put home-gpg-agent-service-type as an
41 ;; extension in home-desktop-service-type service it doesn't work.
42 (service home-gpg-agent-service-type
43 (home-gpg-agent-configuration
44 (pinentry-program
45 (file-append pinentry-gnome3 "/bin/pinentry-gnome3"))
46 (ssh-support? #t)
47 (default-cache-ttl 28800)
48 (max-cache-ttl 28800)
49 (default-cache-ttl-ssh 28800)
50 (max-cache-ttl-ssh 28800)))
51 ;; (service home-polkit-gnome-service-type)
52 ))
53
54
55(define-public %jakub-user
56 (user-account
57 (name "jakub")
58 (comment "Jakub Dlugosz")
59 (group "users")
60 (home-directory "/home/jakub")
61 (supplementary-groups '("wheel" ;; sudo
62 "netdev" ;; network devices
63 "kvm"
64 "libvirt"
65 "tty"
66 "input"
67 "docker"
68 "audio" ;; control audio devices
69 "video" ;; access to webcam
70 "dialout" ;; access to /dev/ttyUSBX devices
71 "adbusers"
72 ))))
73
74(define-public %jd-base-user-accounts
75 (cons*
76 %jakub-user
77 %base-user-accounts))
78
79(define-public %stumpwm-packages
80 (list sbcl
81 sbcl-dbus
82 stumpwm+slynk
83
84 sbcl-stumpwm-screenshot
85 sbcl-stumpwm-pamixer
86 sbcl-stumpwm-pass
87
88 sbcl-stumpwm-cpu
89 sbcl-stumpwm-mem
90 sbcl-stumpwm-net
91 sbcl-stumpwm-battery-portable
92 sbcl-stumpwm-stumptray
93
94 sbcl-stumpwm-ttf-fonts
95
96 sbcl-drakma
97 sbcl-yason
98
99 (list stumpwm "lib")))
100
101(define-public %root-packages
102 (specifications->packages '("emacs"
103 "emacs-exwm"
104 "stow"
105 "bluez"
106 "bluez-alsa"
107 "exfat-utils"
108 "git"
109 "xf86-input-libinput"
110 "intel-vaapi-driver"
111 "libva-utils" ;; vainfo
112 ;; "nss-certs" -- it is in %base-packages from fdfd7667c66cf9ce746330f39bcd366e124460e1
113 "nix")))
114
115(define-public %jd-base-packages
116 (append %root-packages
117 ;; %stumpwm-packages
118 %base-packages))
119
120(define-public %jd-base-services
121 (cons*
122 (service guix-home-service-type
123 `(("jakub" ,(home-environment
124 (services %jd-base-home-services)))))
125
126 (service openssh-service-type)
127
128 (service console-font-service-type
129 (map (lambda (tty)
130 (cons tty (file-append
131 font-terminus
132 "/share/consolefonts/ter-122n.psf.gz")))
133 '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
134
135 (service screen-locker-service-type
136 (screen-locker-configuration
137 (name "swaylock")
138 (program (file-append swaylock "/bin/swaylock"))
139 (using-pam? #t)
140 (using-setuid? #f)))
141
142 (service network-manager-service-type
143 (network-manager-configuration
144 (vpn-plugins (list network-manager-openvpn))))
145
146 (simple-service 'dbus-packages dbus-root-service-type (list blueman
147 virt-manager))
148 (service bluetooth-service-type
149 (bluetooth-configuration
150 (auto-enable? #t)))
151
152 (service containerd-service-type)
153 (service docker-service-type)
154 (service libvirt-service-type
155 (libvirt-configuration
156 (unix-sock-group "libvirt")))
157 (service virtlog-service-type)
158
159 (service cups-service-type
160 (cups-configuration
161 (web-interface? #t)
162 (extensions
163 (list cups-filters))))
164
165 (service thermald-service-type)
166 (service tlp-service-type
167 (tlp-configuration
168 (cpu-boost-on-ac? #t)
169 (wifi-pwr-on-bat? #t)))
170
171 (service nix-service-type)
172
173 polkit-network-manager-service
174
175 (udev-rules-service 'android android-udev-rules
176 #:groups '("adbusers"))
177
178 (udev-rules-service 'microbit (udev-rule
179 "69-microbit.rules"
180 (string-append "ACTION!=\"add|change\", GOTO=\"microbit_rules_end\""
181 "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0d28\", ATTR{idProduct}==\"0204\", TAG+=\"uaccess\""
182 "LABEL=\"microbit_rules_end\"")))
183
184 ;; %desktop-services
185 (modify-services %desktop-services
186 (guix-service-type config => (guix-configuration
187 (inherit config)
188 (substitute-urls
189 (append (list "https://substitutes.nonguix.org")
190 %default-substitute-urls))
191 (authorized-keys
192 (append (list (plain-file "non-guix.pub"
193 "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))"))
194 %default-authorized-guix-keys))))
195 (delete network-manager-service-type)
196 ;; (delete mingetty-service-type)
197 (delete console-font-service-type)
198
199 (delete pulseaudio-service-type)
200 (delete alsa-service-type)
201 (delete (if (string-prefix? "x86_64"
202 (or (%current-target-system)
203 (%current-system)))
204 gdm-service-type
205 sddm-service-type)))))
206
207;; Odin is a base for my operating systems
208(define-public odin-free
209 (operating-system
210 (locale "en_US.utf8")
211 (timezone "Europe/Warsaw")
212 (keyboard-layout (keyboard-layout "pl"))
213 (host-name "odin")
214
215 (users %jd-base-user-accounts)
216 (packages %jd-base-packages)
217 (services %jd-base-services)
218
219 (bootloader (bootloader-configuration
220 (bootloader grub-bootloader)
221 (targets (list "/boot/efi"))
222 (keyboard-layout keyboard-layout)))
223
224 (file-systems (cons* (file-system
225 (mount-point "/tmp")
226 (device "none")
227 (type "tmpfs")
228 (check? #f))
229 %base-file-systems))))
230
231(define-public odin-non-free
232 (operating-system
233 (inherit odin-free)
234 (kernel linux)
235 (initrd microcode-initrd)
236 (firmware (list linux-firmware))))
diff --git a/guix/jd/desktops/berserker.scm b/guix/jd/desktops/berserker.scm
deleted file mode 100755
index 3d6b0df..0000000
--- a/guix/jd/desktops/berserker.scm
+++ /dev/null
@@ -1,17 +0,0 @@
1(define-module (jd desktops berserker)
2 #:use-module (jd desktops base)
3 #:use-module (jd packages linux)
4 #:use-module (jd utils)
5 #:use-module (gnu)
6 #:use-module (gnu home))
7
8(define-public home
9 (home-environment
10 (services %jd-base-home-services)))
11
12(define-public system
13 (operating-system
14 (inherit odin-non-free)
15 (kernel-loadable-modules (list xmm7360-pci))
16 (host-name "berserker")))
17
diff --git a/guix/jd/desktops/mimir.scm b/guix/jd/desktops/mimir.scm
deleted file mode 100644
index e5db0b7..0000000
--- a/guix/jd/desktops/mimir.scm
+++ /dev/null
@@ -1,14 +0,0 @@
1(define-module (jd desktops mimir)
2 #:use-module (jd desktops base)
3 #:use-module (gnu)
4 #:use-module (gnu home))
5
6(define-public home
7 (home-environment
8 (services %jd-base-home-services)))
9
10(define-public system
11 (operating-system
12 (inherit odin-non-free)
13 (host-name "mimir")))
14
diff --git a/guix/jd/home/services/desktop.scm b/guix/jd/home/services/desktop.scm
deleted file mode 100644
index d5aa414..0000000
--- a/guix/jd/home/services/desktop.scm
+++ /dev/null
@@ -1,199 +0,0 @@
1(define-module (jd home services desktop)
2 #:use-module (gnu packages)
3 #:use-module (gnu packages freedesktop)
4 #:use-module (gnu packages networking)
5 #:use-module (gnu packages syncthing)
6 #:use-module (gnu packages gnome)
7 #:use-module (gnu packages gnupg)
8 #:use-module (gnu services)
9 #:use-module (gnu services configuration)
10 #:use-module (gnu home services)
11 #:use-module (gnu home services shepherd)
12 #:use-module (gnu home services desktop)
13 #:use-module (gnu home services sound)
14 #:use-module (gnu home services xdg)
15 #:use-module (gnu home services gnupg)
16 #:use-module (gnu home services dotfiles)
17 #:use-module (guix gexp)
18
19 #:use-module (jd packages fonts))
20
21(define (desktop-profile-service config)
22 (append
23 (list font-terminus-ttf)
24 (specifications->packages '("sway"
25 ;; "swayfx"
26 "swaylock"
27 "swayidle"
28 "swaynotificationcenter"
29 "waybar"
30 "fuzzel"
31 "foot"
32 "mako"
33 "wl-clipboard"
34 "wlsunset"
35 "grimshot"
36 "swappy"
37
38 "htop"
39 "distrobox"
40
41 "udiskie"
42 ;; rest
43 "qutebrowser"
44 "ungoogled-chromium"
45 "firefox"
46 "tor-client"
47 "signal-desktop"
48
49 "pulsemixer"
50 "pavucontrol"
51 "alsa-utils"
52
53 "virt-manager"
54
55 "flatpak"
56 "redshift"
57 "fontmanager"
58
59 "polybar"
60
61 "blueman"
62
63 "nomacs"
64
65 "xdg-utils"
66 "xdg-dbus-proxy"
67 "xdg-desktop-portal-gtk"
68 "xdg-desktop-portal-wlr"
69 "glib:bin"
70 "gtk+:bin"
71 "gnome-keyring"
72 "shared-mime-info"
73 "libnotify"
74 "dconf"
75 "hicolor-icon-theme"
76
77 "dunst"
78
79 ; "gimp"
80 ; "inkscape"
81
82 "mpv"
83 "youtube-dl"
84
85 "pamixer"
86 "playerctl"
87 "scrot"
88 "brightnessctl"
89 "upower"
90 "tlp"
91 "feh"
92 "alacritty"
93
94 "curl"
95 "wget"
96 "zip"
97 "unzip"
98 "qrencode"
99 "trash-cli"
100 "pandoc"
101 "password-store"
102 "oath-toolkit"
103 ;; "pinentry"
104
105 "syncthing"
106 "syncthing-gtk"
107
108 "xmodmap"
109 "xrandr"
110 "arandr"
111 "xss-lock"
112 "libinput"
113 "xinput"
114 "xprop"
115 "rlwrap"
116
117 "nheko"
118 "quassel"
119 "inkscape"
120 "gimp"
121 "libreoffice"
122 "steam"))))
123
124(define (desktop-environment-variables-service config)
125 `(("GTK_THEME" . "Adwaita:dark")
126 ("VISUAL" . "emacsclient")
127 ("EDITOR" . "emacsclient")
128 ("PATH" . "$HOME/.bin:$HOME/.local/bin:$HOME/.npm-global/bin:$PATH")
129 ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")
130 ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/")
131
132 ;; Set Wayland-specific environment variables (taken from RDE)
133 ("XDG_CURRENT_DESKTOP" . "sway")
134 ("XDG_SESSION_TYPE" . "wayland")
135 ("RTC_USE_PIPEWIRE" . "true")
136 ("SDL_VIDEODRIVER" . "wayland")
137 ("MOZ_ENABLE_WAYLAND" . "1")
138 ("CLUTTER_BACKEND" . "wayland")
139 ("ELM_ENGINE" . "wayland_egl")
140 ("ECORE_EVAS_ENGINE" . "wayland-egl")
141 ("QT_QPA_PLATFORM" . "wayland-egl"))) ;; QT_QPA_PLATFORM=xcb
142
143(define (desktop-xdg-mime-applications-service config)
144 (home-xdg-mime-applications-configuration
145 (default '((inode/directory . emacsclient.desktop)
146 (application/pdf . emacsclient.desktop)
147 (x-scheme-handler/http= . firefox.desktop)
148 (x-scheme-handler/https= . firefox.desktop)))
149 ;; (desktop-entries
150 ;; (list (xdg-desktop-entry
151 ;; (file "emacs-desktop")
152 ;; (name "Emacs")
153 ;; (type 'application)
154 ;; (config
155 ;; '((exec . "emacsclient -a emacs %u"))))))
156 ))
157
158(define (desktop-gpg-agent-service config)
159 (home-gpg-agent-configuration
160 (pinentry-program
161 (file-append pinentry-gnome3 "/bin/pinentry-gnome3"))
162 (ssh-support? #t)
163 (default-cache-ttl 28800)
164 (max-cache-ttl 28800)
165 (default-cache-ttl-ssh 28800)
166 (max-cache-ttl-ssh 28800)))
167
168(define (desktop-gpg-agent-service config)
169 (home-gpg-agent-configuration
170 (pinentry-program
171 (file-append pinentry-gnome3 "/bin/pinentry-gnome3"))
172 (ssh-support? #t)
173 (default-cache-ttl 28800)
174 (max-cache-ttl 28800)
175 (default-cache-ttl-ssh 28800)
176 (max-cache-ttl-ssh 28800)))
177
178(define (desktop-dotfiles-service config)
179 (home-dotfiles-configuration
180 (directories '("./files"))))
181
182(define-public home-desktop-service-type
183 (service-type (name 'home-desktop)
184 (extensions (list (service-extension home-profile-service-type
185 desktop-profile-service)
186 (service-extension home-environment-variables-service-type
187 desktop-environment-variables-service)
188 (service-extension home-pipewire-service-type
189 (lambda (_) (home-pipewire-configuration)))
190 (service-extension home-xdg-mime-applications-service-type
191 desktop-xdg-mime-applications-service)
192 (service-extension home-gpg-agent-service-type
193 desktop-gpg-agent-service)
194 (service-extension home-dotfiles-service-type
195 desktop-dotfiles-service)
196 ))
197 (default-value #f)
198 (description "Runs desktop services.")))
199
diff --git a/guix/jd/home/services/emacs.scm b/guix/jd/home/services/emacs.scm
deleted file mode 100644
index 15f0e68..0000000
--- a/guix/jd/home/services/emacs.scm
+++ /dev/null
@@ -1,113 +0,0 @@
1(define-module (jd home services emacs)
2 #:use-module (jd packages emacs)
3
4 #:use-module (gnu packages)
5 #:use-module (gnu packages emacs)
6
7 #:use-module (gnu services)
8 #:use-module (gnu services configuration)
9 #:use-module (gnu home services)
10 #:use-module (gnu home services shepherd)
11 #:use-module (gnu home services desktop)
12
13 #:use-module (guix gexp)
14 #:use-module (guix packages)
15 #:use-module (guix profiles))
16
17(define-configuration home-emacs-service-configuration
18 (emacs-package
19 (package emacs-next-pgtk)
20 "Emacs packages"))
21
22(define (emacs-profile-service config)
23 (append (list emacs-org-roam-ui
24 emacs-lsp-mode!
25 (home-emacs-service-configuration-emacs-package
26 config))
27 (specifications->packages '("emacs-sway"
28 "emacs-shackle"
29 "emacs-ytdl"
30 "emacs-desktop-environment"
31 "emacs-exwm"
32 "emacs-perspective"
33 "emacs-mu4e-alert"
34 "mu"
35 "isync"
36 "emacs-htmlize"
37 "emacs-bluetooth"
38 "emacs-nov-el"
39 "emacs-password-store"
40 "emacs-mastodon"
41 "emacs-elfeed"
42 "emacs-pdf-tools"
43 "emacs-emms"
44 "emacs-all-the-icons-dired"
45 "emacs-vterm"
46 "emacs-restclient"
47 "emacs-magit"
48 "emacs-neotree"
49 "emacs-projectile"
50 "emacs-company-box"
51 "emacs-company"
52 "emacs-docker"
53 "emacs-yaml-mode"
54 "emacs-web-mode"
55 "emacs-flycheck"
56 "emacs-tide"
57 "emacs-cider"
58 "emacs-typescript-mode"
59 "emacs-pyvenv"
60 "emacs-geiser-guile"
61 "emacs-racket-mode"
62 "emacs-geiser-racket"
63 "emacs-geiser"
64 "emacs-sly"
65 "emacs-rainbow-delimiters"
66 "emacs-paredit"
67 ;; "emacs-lsp-ivy"
68 ;; "emacs-lsp-mode"
69 "emacs-org-caldav"
70 "emacs-org-pomodoro"
71 "emacs-org-roam"
72 "emacs-org-roam-bibtex"
73 "emacs-org-superstar"
74 "emacs-org"
75 "emacs-ox-pandoc"
76 "emacs-beacon"
77 "emacs-all-the-icons"
78 "emacs-which-key"
79 "emacs-counsel"
80 "emacs-ivy"
81 "emacs-hl-todo"
82 "emacs-diminish"
83 "emacs-solarized-theme"
84 "font-terminus"
85 "emacs-undo-tree"
86 "emacs-hydra"
87 "emacs-multiple-cursors"
88 "emacs-general"
89 "emacs-guix"
90 "emacs-doom-modeline"
91 "emacs-use-package"))))
92
93(define (emacs-shepherd-services config)
94 (list (shepherd-service
95 (documentation "Emacs daemon.")
96 (provision '(emacs))
97 (start #~(make-forkexec-constructor
98 (list #$(file-append (home-emacs-service-configuration-emacs-package
99 config)
100 "/bin/emacs")
101 "--fg-daemon")))
102 (stop #~(make-kill-destructor)))))
103
104(define-public home-emacs-service-type
105 (service-type (name 'home-emacs)
106 (extensions (list (service-extension home-profile-service-type
107 emacs-profile-service)
108 (service-extension home-shepherd-service-type
109 emacs-shepherd-services)
110 ))
111 (default-value (home-emacs-service-configuration))
112 (description "Runs emacs daemon service.")))
113
diff --git a/guix/jd/home/services/polkit.scm b/guix/jd/home/services/polkit.scm
deleted file mode 100644
index 327ee08..0000000
--- a/guix/jd/home/services/polkit.scm
+++ /dev/null
@@ -1,31 +0,0 @@
1(define-module (jd home services polkit)
2 #:use-module (gnu packages)
3 #:use-module (gnu packages polkit)
4 #:use-module (gnu services)
5 #:use-module (gnu services configuration)
6 #:use-module (gnu home services)
7 #:use-module (gnu home services shepherd)
8 #:use-module (guix gexp))
9
10
11(define (polkit-gnome-profile-service config)
12 (specifications->packages '("polkit-gnome")))
13
14(define (polkit-gnome-shepherd-service config)
15 (list (shepherd-service
16 (documentation "Polkit gnome service.")
17 (provision '(polkit-gnome))
18 (start #~(make-forkexec-constructor
19 (list #$(file-append polkit-gnome
20 "/libexec/polkit-gnome-authentication-agent-1"))))
21 (stop #~(make-kill-destructor)))))
22
23(define-public home-polkit-gnome-service-type
24 (service-type (name 'home-polkit-gnome)
25 (extensions (list (service-extension home-profile-service-type
26 polkit-gnome-profile-service)
27 (service-extension home-shepherd-service-type
28 polkit-gnome-shepherd-service)))
29 (default-value #f)
30 (description "Runs the PolicyKit-gnome service.")))
31
diff --git a/guix/jd/packages/emacs.scm b/guix/jd/packages/emacs.scm
deleted file mode 100644
index 0b9b19d..0000000
--- a/guix/jd/packages/emacs.scm
+++ /dev/null
@@ -1,57 +0,0 @@
1(define-module (jd packages emacs)
2 #:use-module (gnu packages emacs-xyz)
3 #:use-module (gnu packages)
4 #:use-module (guix packages)
5 #:use-module (guix git-download)
6 #:use-module (guix build-system emacs)
7 #:use-module ((guix licenses) #:prefix license:)
8 #:export (emacs-org-roam-ui
9 emacs-lsp-mode!))
10
11
12(define emacs-org-roam-ui
13 (let ((commit "9474a254390b1e42488a1801fed5826b32a8030b")
14 (revision "0"))
15 (package
16 (name "emacs-org-roam-ui")
17 (version (git-version "0" revision commit))
18 (source (origin
19 (method git-fetch)
20 (uri (git-reference
21 (url "https://github.com/org-roam/org-roam-ui")
22 (commit commit)))
23 (file-name (git-file-name name version))
24 (sha256
25 (base32
26 "0v54vxh95izch74wz2dl2dkdqicbvshra55l6qvd4xl5qmfhpjdc"))))
27 (build-system emacs-build-system)
28 (arguments
29 `(#:include (cons "^out" %default-include)))
30 (propagated-inputs
31 (list emacs-org-roam emacs-websocket emacs-simple-httpd emacs-f))
32 (home-page "https://github.com/org-roam/org-roam-ui")
33 (synopsis "A graphical frontend for your org-roam Zettelkasten")
34 (description " Org-Roam-UI is a frontend for exploring and interacting
35with your @code{org-roam} notes. It is meant a successor of
36@code{org-roam-server} that extends functionality of org-roam with a Web app
37that runs side-by-side with Emacs.")
38 (license license:gpl3+))))
39
40
41
42(define emacs-lsp-mode!
43 (let ((commit "808c4d0ab9f19bb92c56716cf59df89432b63f5d")
44 (revision "1"))
45 (package
46 (inherit emacs-lsp-mode)
47 (name "emacs-lsp-mode")
48 (version (git-version "8.0.1" revision commit))
49 (source
50 (origin
51 (method git-fetch)
52 (uri (git-reference
53 (url "https://github.com/emacs-lsp/lsp-mode")
54 (commit commit)))
55 (file-name (git-file-name name version))
56 (sha256
57 (base32 "0ridjhzndwjj8947vabq05njgnns74hi69x77axgcbv1c4nasz2y")))))))
diff --git a/guix/jd/packages/fonts.scm b/guix/jd/packages/fonts.scm
deleted file mode 100644
index fa70722..0000000
--- a/guix/jd/packages/fonts.scm
+++ /dev/null
@@ -1,25 +0,0 @@
1(define-module (jd packages fonts)
2 #:use-module (gnu packages)
3 #:use-module (guix packages)
4 #:use-module (guix download)
5 #:use-module (guix build-system font)
6 #:use-module ((guix licenses) #:prefix license:))
7
8(define-public font-terminus-ttf
9 (package
10 (name "font-terminus-ttf")
11 (version "4.49.3")
12 (source (origin
13 (method url-fetch)
14 (uri (string-append "https://files.ax86.net/terminus-ttf/files/"
15 version "/terminus-ttf-" version ".zip"))
16 (sha256
17 (base32
18 "0xvm4mcf0gx7df35swqwxb7a5h3z0gf6dkg6zy84b6nrk0fr5b8f"))))
19 (build-system font-build-system)
20 (home-page "https://files.ax86.net/terminus-ttf/")
21 (synopsis "Terminus TTF Font")
22 (description
23 "Terminus TTF is a TrueType version of Terminus Font, a fixed-width bitmap font optimized for long work with computers.")
24 (license license:gpl2+)))
25
diff --git a/guix/jd/packages/linux.scm b/guix/jd/packages/linux.scm
deleted file mode 100644
index 94549c3..0000000
--- a/guix/jd/packages/linux.scm
+++ /dev/null
@@ -1,51 +0,0 @@
1(define-module (jd packages linux)
2 #:use-module (guix packages)
3 #:use-module (guix download)
4 #:use-module (guix build-system linux-module)
5 #:use-module (guix git-download)
6 #:use-module (guix gexp)
7 #:use-module (gnu packages linux)
8 #:use-module (gnu packages pciutils)
9 #:use-module (gnu packages pkg-config)
10 #:use-module (gnu packages autotools)
11 #:use-module ((guix licenses) #:prefix license:))
12
13(define-public xmm7360-pci
14 (package
15 (name "xmm7360-pci")
16 (version "0.1.0")
17 (source
18 (origin
19 (method git-fetch)
20 (uri (git-reference
21 (url "https://github.com/xmm7360/xmm7360-pci.git")
22 (commit "a8ff2c6ceee84cbe74df8a78cfaa5a016d362ed4")))
23 (file-name (git-file-name name version))
24 (sha256
25 (base32
26 "1aals95hk76rgd21rknqc9qfjva6g6gwicw6wz19m20bn08bs2f3"))))
27 (build-system linux-module-build-system)
28 (arguments
29 (list
30 #:tests? #f
31 #:phases
32 #~(modify-phases %standard-phases
33 (add-after 'unpack 'patch-makefile
34 (lambda _
35 (substitute* (find-files
36 "." "^Makefile(\\.include)?$")
37 (("^ccflags-y := .*$")
38 "ccflags-y := -Wno-multichar -Wno-incompatible-pointer-types")))))))
39 (native-inputs
40 `(("pkg-config" ,pkg-config)
41 ("autoconf" ,autoconf)
42 ("automake" ,automake)))
43 (inputs
44 `(("kernel" ,linux-libre)
45 ("pciutils" ,pciutils)))
46 (synopsis "Kernel module for Intel XMM7360 LTE modem")
47 (description
48 "This package provides a kernel module for the Intel XMM7360 LTE modem, allowing it to function in Linux.")
49 (home-page "https://github.com/xmm7360/xmm7360-pci")
50 (license license:gpl3+)))
51
diff --git a/guix/jd/services/polkit.scm b/guix/jd/services/polkit.scm
deleted file mode 100644
index 948500c..0000000
--- a/guix/jd/services/polkit.scm
+++ /dev/null
@@ -1,21 +0,0 @@
1(define-module (jd services polkit)
2 #:use-module (gnu services)
3 #:use-module (gnu services dbus)
4 #:use-module (gnu home services)
5 #:use-module (guix gexp))
6
7(define polkit-network-manager
8 (file-union
9 "polkit-wheel"
10 `(("share/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules"
11 ,(plain-file
12 "50-org.freedesktop.NetworkManager.rules"
13 "polkit.addRule(function(action, subject) {
14 if (action.id.indexOf(\"org.freedesktop.NetworkManager.\") == 0 &&
15 subject.isInGroup(\"netdev\")) {
16 return polkit.Result.YES;
17 }
18});")))))
19
20(define-public polkit-network-manager-service
21 (simple-service 'polkit-network-manager polkit-service-type (list polkit-network-manager)))
diff --git a/guix/jd/utils.scm b/guix/jd/utils.scm
deleted file mode 100644
index 72be6fc..0000000
--- a/guix/jd/utils.scm
+++ /dev/null
@@ -1,75 +0,0 @@
1(define-module (jd utils)
2 #:use-module (gnu system)
3 #:use-module (ice-9 match)
4 #:export (jd-search-patches
5 current-operating-system
6 current-home))
7
8(define primitive-host-operating-system
9 "/etc/config.scm")
10
11(define-macro (define-combine-operating-systems name fields)
12 `(define (,name os-to-inherit-from os)
13 (operating-system
14 (inherit os-to-inherit-from)
15 ,@(map (lambda (field)
16 `(,field
17 (,(string->symbol
18 (string-append
19 "operating-system-"
20 (symbol->string field)))
21 os)))
22 fields))))
23
24(define-combine-operating-systems combine-install-dest-informations
25 (bootloader mapped-devices file-systems))
26
27(define (make-reconfigureable-os os)
28 (combine-install-dest-informations
29 os
30 (load primitive-host-operating-system)))
31
32(define (current-operating-system)
33 (make-reconfigureable-os
34 (module-ref
35 (resolve-module
36 `(jd desktops ,(string->symbol (gethostname))))
37 'system)))
38
39(define (current-home)
40 (module-ref
41 (resolve-module
42 `(jd desktops ,(string->symbol (gethostname))))
43 'home))
44
45;; This code is copied and modified from (gnu packages) module.
46
47(define (make-custom-load-path dir-path)
48 (make-parameter
49 (map (lambda (directory)
50 (let ((custom-dir (string-append directory dir-path)))
51 (if (and (file-exists? custom-dir)
52 (file-is-directory? custom-dir))
53 custom-dir
54 directory)))
55 %load-path)))
56
57(define (make-custom-searcher load-path)
58 (lambda (file-name)
59 (or (search-path (load-path) file-name)
60 (raise (string-append file-name
61 ": not found")))))
62
63(define %jd-patch-path (make-custom-load-path "/jd/packages/patches"))
64(define %jd-dot-files-path (make-custom-load-path "/jd/home/services/dotfiles"))
65
66(define (jd-search-patch file-name)
67 "Search the patch FILE-NAME. Raise an error if not found."
68 (or (search-path (%jd-patch-path) file-name)
69 (raise (string-append file-name
70 ": patch not found"))))
71
72(define-syntax-rule (jd-search-patches file-name ...)
73 "Return the list of absolute file names corresponding to each
74FILE-NAME found in %JD-PATCH-PATH."
75 (list (jd-search-patch file-name) ...))
diff --git a/signing-key.pub b/signing-key.pub
new file mode 100644
index 0000000..01d162e
--- /dev/null
+++ b/signing-key.pub
@@ -0,0 +1,7 @@
1;; signing-key for nonguix substitutes
2(public-key
3 (ecc
4 (curve Ed25519)
5 (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
6 )
7 )
diff --git a/src/gnu/home-services/state.scm b/src/gnu/home-services/state.scm
new file mode 100644
index 0000000..aee9942
--- /dev/null
+++ b/src/gnu/home-services/state.scm
@@ -0,0 +1,223 @@
1(define-module (gnu home-services state)
2 #:use-module (srfi srfi-1)
3 #:use-module (ice-9 match)
4 #:use-module (gnu home services)
5 #:use-module (gnu home-services-utils)
6 #:use-module (gnu home services shepherd)
7 #:use-module (gnu home-services version-control)
8 #:use-module (gnu services shepherd)
9 #:use-module (gnu services configuration)
10 #:use-module (gnu packages ssh)
11 #:use-module (guix packages)
12 #:use-module (guix gexp)
13 #:use-module (guix monads)
14 #:use-module (guix modules)
15 #:use-module (guix records)
16
17 #:export (home-state-service-type
18 state-generic
19 state-git
20 state-hg
21 state-rsync))
22
23(use-modules (gnu packages version-control))
24(define* (state-hg path remote #:key (config #f))
25 (state-generic
26 path
27 #:init-gexp
28 #~(lambda* (_ self)
29 (let* ((meta (perform-service-action self 'metadata))
30 (path (assoc-ref meta 'path))
31 (remote (assoc-ref meta 'remote)))
32 (format #t "Initializing ~a.\n" self)
33 (let* ((port ((@@ (guix build utils) open-pipe-with-stderr)
34 #$(file-append mercurial "/bin/hg") "clone" remote path)))
35 (waitpid WAIT_ANY)
36 (display ((@ (ice-9 rdelim) read-delimited) "" port))
37 (close-port port))
38
39 (when '#$config
40 (call-with-output-file (string-append path "/.hg/hgrc")
41 (lambda (port) (display (string-append
42 #$@(serialize-hg-config config)) port))))))
43 #:additional-metadata `((remote . ,remote)
44 (general-sync? . #f))))
45
46(define* (state-git path remote #:key (config #f))
47 (state-generic
48 path
49 #:init-gexp
50 #~(lambda* (_ self)
51 (let* ((meta (perform-service-action self 'metadata))
52 (path (assoc-ref meta 'path))
53 (remote (assoc-ref meta 'remote)))
54 (format #t "Initializing ~a.\n" self)
55 ;; TODO: revisit git clone implementation
56 ;; FIXME: Hang up shepherd if username/password asked
57 (let* ((port ((@@ (guix build utils) open-pipe-with-stderr)
58 #$(file-append git "/bin/git") "clone" remote path)))
59 (waitpid WAIT_ANY)
60 (display ((@ (ice-9 rdelim) read-delimited) "" port))
61 (close-port port))
62
63 (when #$config
64 (call-with-output-file (string-append path "/.git/config")
65 (lambda (port) (display #$config port))))))
66 #:additional-metadata `((remote . ,remote)
67 (general-sync? . #f))))
68
69(use-modules (gnu packages rsync))
70(define* (state-rsync path remote)
71 (state-generic
72 path
73 #:init-gexp
74 #~(lambda* (_ self)
75 (let* ((meta (perform-service-action self 'metadata))
76 (path (assoc-ref meta 'path))
77 (remote (assoc-ref meta 'remote)))
78 (format #t "Initializing ~a.\n" self)
79 ;; TODO: revisit git clone implementation
80 (let* ((port ((@@ (guix build utils) open-pipe-with-stderr)
81 #$(file-append rsync "/bin/rsync") "-aP" remote path)))
82 (waitpid WAIT_ANY)
83 (display ((@ (ice-9 rdelim) read-delimited) "" port))
84 (close-port port))))
85 #:sync-gexp
86 #~(lambda* (_ self)
87 (let* ((meta (perform-service-action self 'metadata))
88 (path (assoc-ref meta 'path))
89 (remote (assoc-ref meta 'remote)))
90 (format #t "Synchronizing ~a.\n" self)
91 (let* ((port ((@@ (guix build utils) open-pipe-with-stderr)
92 #$(file-append rsync "/bin/rsync") "-aP" path remote)))
93 (waitpid WAIT_ANY)
94 (display ((@ (ice-9 rdelim) read-delimited) "" port))
95 (close-port port))))
96 #:additional-metadata `((remote . ,remote)
97 (general-sync? . #t))))
98
99(define %service-get-gexp
100 #~(lambda (x)
101 (car
102 (filter
103 (lambda (y) (eq? (car (service-provision y)) x))
104 ((@@ (shepherd service) service-list))))))
105
106(define* (state-generic
107 path
108 #:key
109 (init-gexp
110 #~(lambda* (_ self)
111 (let ((path (assoc-ref (perform-service-action self 'metadata) 'path)))
112 (format #t "Initializing ~a.\n" self)
113 (format #t "Creating ~a directory..." path)
114 (mkdir-p path)
115 (display " done\n"))))
116 (sync-gexp
117 #~(lambda* (_ self)
118 (let ((path (assoc-ref (perform-service-action self 'metadata) 'path)))
119 (format #t "Synchronizing ~a.\n" self)
120 (format #t "Nothing to synchronize.\n"))))
121 (additional-metadata '((general-sync? . #f))))
122 "A function which returns a shepherd-service with all required
123actions for state management, should be used as a basis for other
124state related items like git-state, rsync-state, etc."
125 (let ((self (string->symbol
126 (format #f "state-~a" path))))
127 (shepherd-service
128 (documentation (format #f "Managing state at ~a." path))
129 (provision (list self))
130 (auto-start? #f)
131 (start #~(lambda ()
132 (if (perform-service-action (#$%service-get-gexp '#$self) 'state-exists?)
133 #t
134 (begin
135 (format #t "~a is not initilized yet." '#$self)
136 #f))))
137 (actions (list
138 (shepherd-action
139 (name 'state-exists?)
140 (documentation "Check if state file/directory exists.")
141 (procedure #~(lambda* (#:rest rest)
142 (file-exists? #$path))))
143 (shepherd-action
144 (name 'unchecked-init)
145 (documentation "Do not use this action directly.")
146 (procedure #~(lambda* (#:rest rest)
147 (#$init-gexp rest (#$%service-get-gexp '#$self)))))
148 (shepherd-action
149 (name 'metadata)
150 (documentation "Returns metadata related to the state.")
151 (procedure #~(lambda* _
152 (append
153 `((path . #$path)
154 (self . ,(#$%service-get-gexp '#$self)))
155 '#$additional-metadata))))
156 (shepherd-action
157 (name 'sync)
158 (documentation "Sync the state.")
159 (procedure #~(lambda* (#:rest rest)
160 (#$sync-gexp rest (#$%service-get-gexp '#$self)))))
161 (shepherd-action
162 (name 'init)
163 (documentation "Generic initialize.")
164 (procedure #~(lambda* (#:rest rest)
165 (if (perform-service-action (#$%service-get-gexp '#$self) 'state-exists?)
166 (format #t "~a already initialized.\n" '#$self)
167 (begin
168 (perform-service-action (#$%service-get-gexp '#$self) 'unchecked-init (#$%service-get-gexp '#$self))
169 (start-service (#$%service-get-gexp '#$self))))))))))))
170
171(define (add-shepherd-services services)
172 (let* ((service-names
173 (map
174 (lambda (service) (car (shepherd-service-provision service)))
175 services)))
176 (append
177 services
178 (list
179 (shepherd-service
180 (documentation "Init, update and maybe destroy state.")
181 (provision '(state))
182 (auto-start? #t)
183 (start #~(lambda ()
184 (map (lambda (name)
185 (let ((name (#$%service-get-gexp name)))
186 (when (perform-service-action name 'state-exists?)
187 (start-service name))))
188 '#$service-names)))
189 (actions (list
190 (shepherd-action
191 (name 'sync)
192 (documentation
193 "Sync all the state. Highly dependent on state type.")
194 (procedure
195 #~(lambda _
196 (map (lambda (name)
197 (let ((name (#$%service-get-gexp name)))
198 (when (assoc-ref (perform-service-action name 'metadata)
199 'general-sync?)
200 (perform-service-action name 'sync name))))
201 '#$service-names))))
202 (shepherd-action
203 (name 'init)
204 (documentation "Initialize all the state.")
205 (procedure #~(lambda _
206 (map (lambda (name)
207 (let ((name (#$%service-get-gexp name)))
208 (when (not (perform-service-action name 'state-exists?))
209 (perform-service-action name 'init)
210 (start-service name))))
211 '#$service-names)))))))))))
212
213
214(define home-state-service-type
215 (service-type (name 'home-state)
216 (extensions
217 (list (service-extension
218 home-shepherd-service-type
219 add-shepherd-services)))
220 (default-value '())
221 (compose concatenate)
222 (extend append)
223 (description "A toolset for initializing state.")))
diff --git a/src/jd/config.scm b/src/jd/config.scm
new file mode 100644
index 0000000..f79df44
--- /dev/null
+++ b/src/jd/config.scm
@@ -0,0 +1,23 @@
1(define-module (jd config)
2 #:use-module (jd host)
3 #:use-module (jd user)
4 #:use-module (rde features)
5 #:use-module (gnu services)
6 #:use-module (gnu system)
7 #:use-module (gnu services guix)
8 #:use-module (srfi srfi-1)
9 #:use-module (ice-9 match))
10
11
12(define-public jd-config
13 (rde-config
14 (integrate-he-in-os? #t)
15 (features
16 (append
17 (list (feature-nonfree-kernel))
18 %host-features
19 %user-features))))
20
21(define-public %os
22 (rde-config-operating-system jd-config))
23
diff --git a/src/jd/features/emacs-xyz.scm b/src/jd/features/emacs-xyz.scm
new file mode 100644
index 0000000..8b414ef
--- /dev/null
+++ b/src/jd/features/emacs-xyz.scm
@@ -0,0 +1,127 @@
1(define-module (jd features emacs-xyz)
2 #:use-module (rde features)
3 #:use-module (rde features emacs)
4
5 #:export (feature-emacs-org-uni))
6
7(define* (feature-emacs-org-uni
8 #:key
9 (capture-key "u")
10 (org-uni-task-olp (list "Tasks"))
11 (org-uni-class-prop-name "UNI-CLASS")
12 (org-uni-course-prop-name "COURSE"))
13 (ensure-pred string? capture-key)
14 (ensure-pred list? org-uni-task-olp)
15 (ensure-pred string? org-uni-course-prop-name)
16
17 (ensure-pred string? org-uni-class-prop-name)
18
19 (define emacs-f-name 'org-uni)
20 (define f-name (symbol-append 'emacs- emacs-f-name))
21
22 (define (get-home-services config)
23 (list
24 (rde-elisp-configuration-service
25 emacs-f-name
26 config
27 `((defvar org-uni-class-prop-name ,org-uni-class-prop-name)
28 (defvar org-uni-task-olp (list ,@org-uni-task-olp)
29 "An outline path to task heading, that start from uni class heading.")
30 (defun org-uni-normalize (s)
31 (let ((replacements
32 '(("ą" . "a") ("ć" . "c") ("ę" . "e") ("ł" . "l")
33 ("ń" . "n") ("ó" . "o") ("ś" . "s") ("ź" . "z") ("ż" . "z")
34 ("Ą" . "A") ("Ć" . "C") ("Ę" . "E") ("Ł" . "L")
35 ("Ń" . "N") ("Ó" . "O") ("Ś" . "S") ("Ź" . "Z") ("Ż" . "Z"))))
36 (dolist (pair replacements s)
37 (setq s (replace-regexp-in-string (car pair) (cdr pair) s)))))
38 (defun org-uni-select-class ()
39 (require 'dash)
40 (let* ((choices
41 (-non-nil
42 (org-map-entries
43 (lambda ()
44 (let* ((heading (nth 4 (org-heading-components)))
45 (file (buffer-file-name))
46 (heading-path (org-get-outline-path t))
47 (heading-norm (replace-regexp-in-string
48 "[^a-z0-9]+" "_"
49 (org-uni-normalize (downcase heading)))))
50 (when (org-entry-get (point) org-uni-class-prop-name)
51 (cons (format "[%s] %s"
52 (file-name-nondirectory file)
53 heading)
54 (list :file file
55 :heading-path heading-path
56 :heading heading
57 :heading-norm heading-norm)))))
58 nil
59 'agenda)))
60 (selection (completing-read "Select class: "
61 (mapcar 'car choices) nil t)))
62 (cdr (assoc selection choices))))
63 (defun org-uni-goto-class ()
64 (interactive)
65 (let* ((sel (org-uni-select-class))
66 (file (plist-get sel :file))
67 (olp (plist-get sel :heading-path)))
68 (find-file file)
69 (let ((m (org-find-olp olp t)))
70 (when m
71 (widen)
72 (goto-char m)
73 (org-narrow-to-subtree)
74 (org-show-subtree)
75 (set-marker m nil)))))
76 (defun org-uni-open-course-link ()
77 (interactive)
78 (let* ((sel (org-uni-select-class))
79 (file (plist-get sel :file))
80 (olp (plist-get sel :heading-path)))
81 (with-temp-buffer
82 (insert-file-contents file)
83 (org-mode)
84 (let ((m (org-find-olp olp t)))
85 (when m
86 (goto-char m)
87 (let ((course-link (org-entry-get (point) ,org-uni-course-prop-name)))
88 (when course-link
89 (org-link-open-from-string course-link))))))))
90 (defun org-uni-capture-task-function ()
91 (let* ((sel (org-uni-select-class))
92 (file (plist-get sel :file))
93 (heading (plist-get sel :heading))
94 (heading-path (plist-get sel :heading-path))
95 (heading-norm (plist-get sel :heading-norm))
96 (olp (append heading-path org-uni-task-olp))
97 (path (org-capture-expand-file file))
98 (m (org-find-olp (cons path olp))))
99 (org-capture-put :uni-class-tag heading-norm)
100 (set-buffer (marker-buffer m))
101 (org-capture-put-target-region-and-position)
102 (widen)
103 (goto-char m)
104 (set-marker m nil)))
105 (defvar org-uni-map (make-sparse-keymap)
106 "Keymap for org-uni commands.")
107 (define-key org-uni-map (kbd "u") 'org-uni-goto-class)
108 (define-key org-uni-map (kbd "c") 'org-uni-open-course-link)
109 (define-key rde-app-map (kbd "u") org-uni-map)
110 (with-eval-after-load
111 'org-capture
112 (add-to-list
113 'org-capture-templates
114 '(,capture-key
115 "University task" entry
116 (function org-uni-capture-task-function)
117 "* TODO %? :%(org-capture-get :uni-class-tag):\n:PROPERTIES:\n:CREATED: %U\n:END:\n"))))
118 #:summary "This Emacs Lisp script enhances =org-mode= with a feature for managing university tasks."
119 #:commentary "This Emacs Lisp script enhances =org-mode= with a feature for managing university tasks."
120 #:authors (list "Jakub Dlugosz <jakub@jdlugosz.com>")
121 #:url "https://jdlugosz.com/"
122 #:keywords '(convenience))))
123
124 (feature
125 (name f-name)
126 (values '())
127 (home-services-getter get-home-services)))
diff --git a/src/jd/features/mail.scm b/src/jd/features/mail.scm
new file mode 100644
index 0000000..bf137e9
--- /dev/null
+++ b/src/jd/features/mail.scm
@@ -0,0 +1,147 @@
1(define-module (jd features mail)
2 #:use-module (rde packages)
3 #:use-module (rde exceptions)
4 #:use-module (rde features)
5 #:use-module (rde predicates)
6 #:use-module (rde features emacs)
7 #:use-module (rde features mail)
8 #:use-module ((rde features mail providers) #:prefix mail-providers:)
9 #:use-module (gnu packages mail)
10 #:use-module (gnu packages emacs-xyz)
11 #:use-module (rde packages emacs-xyz)
12 #:use-module (rde packages mail)
13 #:use-module (rde serializers elisp)
14 #:use-module (rde home services mail)
15 #:use-module (gnu services)
16 #:use-module (gnu services configuration)
17 #:use-module (gnu home services)
18 #:use-module (gnu home-services mail)
19 #:use-module (gnu home services mcron)
20 #:use-module (gnu home-services version-control)
21 #:use-module (gnu home services xdg)
22
23 #:use-module (ice-9 match)
24 #:use-module (srfi srfi-1)
25 #:use-module (guix gexp)
26 #:use-module (guix deprecation)
27 #:use-module (guix diagnostics)
28 #:use-module (guix i18n)
29
30 #:export (feature-l2md* feature-mail-mcron feature-octave))
31
32(define* (feature-l2md*
33 #:key
34 (l2md l2md))
35 "Configure l2md MDA."
36 (ensure-pred file-like? l2md)
37
38 (define (get-home-services config)
39 (require-value 'mail-directory-fn config)
40 (require-value 'mailing-lists config)
41 (define mail-dir ((get-value 'mail-directory-fn config) config))
42 (define mls (filter (lambda (x) (eq? (mailing-list-synchronizer x) 'l2md))
43 (get-value 'mailing-lists config)))
44 (define (get-repo-config ml)
45 (let ((repo-config (mailing-list-config ml)))
46 (if (eq? %unset-value (l2md-repo-maildir repo-config))
47 (l2md-repo
48 (inherit repo-config)
49 (maildir (string-append
50 mail-dir "/lists/" (mailing-list-fqda ml) "/archive")))
51 repo-config)))
52 ;; <https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git/about/>
53 ;; Applying patches <https://git.kyleam.com/piem/about/>
54
55 (define add-ml-tag
56 (map (lambda (x)
57 (format
58 #f "notmuch tag +~a -- path:lists/~a/**"
59 ;; TODO: Use new tag not to retag already existing entities.
60 ;; Do it before new tag will be romved
61 ;; TODO: Fix order of items in post-new hook
62 (mailing-list-id x) (mailing-list-fqda x)))
63 mls))
64
65 (list
66 (simple-service
67 'l2md-add-tags-to-mailing-list
68 home-notmuch-service-type
69 (home-notmuch-extension
70 (post-new
71 (list
72 #~(begin (for-each system '#$add-ml-tag))))))
73
74 (service
75 home-l2md-service-type
76 (home-l2md-configuration
77 (l2md l2md)
78 (oneshot 1)
79 (repos (map get-repo-config mls))))))
80
81 (feature
82 (name 'l2md)
83 (home-services-getter get-home-services)
84 (values `((l2md . ,l2md)))))
85
86(define* (feature-mail-mcron
87 #:key
88 (time-spec '(next-minute
89 (range 0 60 20))))
90 "Configure mcron to invoke other email commands based on the other
91features that have been enabled."
92 (define (get-home-services config)
93 (list
94 (when (get-value 'isync config)
95 (let* ((sync-cmd (list `(,((get-value 'mbsync config) config) "-a")))
96 (notmuch-cmd (if (get-value 'notmuch config)
97 (list `(,(file-append (get-value 'notmuch config) "/bin/notmuch")
98 "new"))
99 (list)))
100 (l2md-cmd (if (get-value 'l2md config)
101 (list `(,(file-append (get-value 'l2md config) "/bin/l2md")))
102 (list))))
103 (simple-service
104 'isync-mcron-job
105 home-mcron-service-type
106 (list
107 #~(job '#$time-spec
108 (lambda ()
109 (setenv "DISPLAY" ":0")
110 #$@(map (lambda (x) `(system* ,@x))
111 (append sync-cmd l2md-cmd notmuch-cmd))))))))))
112
113 (feature
114 (name 'mail-mcron)
115 (home-services-getter get-home-services)))
116
117(define* (feature-octave
118 #:key (octave (@ (gnu packages maths) octave-cli)))
119 (define f-name 'octave)
120 (define (get-home-services config)
121 (list
122 (rde-elisp-configuration-service
123 f-name
124 config
125 `((with-eval-after-load 'org
126 (require 'ob-octave)
127 (add-to-list 'org-structure-template-alist
128 '("octave" . "src octave"))
129 (org-babel-do-load-languages
130 'org-babel-load-languages
131 '((octave . t)))
132 (setq org-babel-default-header-args:octave
133 '((:results . "output")
134 (:session . "octave")
135 (:exports . "both")
136 (:eval . "no-export"))))))
137 (simple-service
138 'octave-packages
139 home-profile-service-type
140 (append (or (and (get-value 'python config)
141 (list (@ (gnu packages python-xyz) python-sympy)))
142 '())
143 (list octave)))))
144 (feature
145 (name f-name)
146 (values `((,f-name . #t)))
147 (home-services-getter get-home-services)))
diff --git a/src/jd/features/math.scm b/src/jd/features/math.scm
new file mode 100644
index 0000000..7609370
--- /dev/null
+++ b/src/jd/features/math.scm
@@ -0,0 +1,68 @@
1(define-module (jd features math)
2 #:use-module (rde features)
3 #:use-module (gnu services)
4 #:use-module (rde features emacs)
5 #:use-module (gnu home services)
6
7
8 #:use-module (rde packages)
9 #:use-module (rde exceptions)
10
11 #:use-module (rde predicates)
12
13 #:use-module (rde features mail)
14 #:use-module ((rde features mail providers) #:prefix mail-providers:)
15 #:use-module (gnu packages mail)
16 #:use-module (gnu packages emacs-xyz)
17 #:use-module (rde packages emacs-xyz)
18 #:use-module (rde packages mail)
19 #:use-module (rde serializers elisp)
20 #:use-module (rde home services mail)
21
22 #:use-module (gnu services configuration)
23
24 #:use-module (gnu home-services mail)
25 #:use-module (gnu home services mcron)
26 #:use-module (gnu home-services version-control)
27 #:use-module (gnu home services xdg)
28
29 #:use-module (ice-9 match)
30 #:use-module (srfi srfi-1)
31 #:use-module (guix gexp)
32 #:use-module (guix deprecation)
33 #:use-module (guix diagnostics)
34 #:use-module (guix i18n)
35
36 #:export (feature-octave))
37
38(define* (feature-octave
39 #:key (octave (@ (gnu packages maths) octave-cli)))
40 (define f-name 'octave)
41 (define (get-home-services config)
42 (list
43 (rde-elisp-configuration-service
44 f-name
45 config
46 `((with-eval-after-load 'org
47 (require 'ob-octave)
48 (add-to-list 'org-structure-template-alist
49 '("octave" . "src octave"))
50 (org-babel-do-load-languages
51 'org-babel-load-languages
52 '((octave . t)))
53 (setq org-babel-default-header-args:octave
54 '((:results . "output")
55 (:session . "octave")
56 (:exports . "both")
57 (:eval . "no-export"))))))
58 (simple-service
59 'octave-packages
60 home-profile-service-type
61 (append (or (and (get-value 'python config)
62 (list (@ (gnu packages python-xyz) python-sympy)))
63 '())
64 (list octave)))))
65 (feature
66 (name f-name)
67 (values `((,f-name . #t)))
68 (home-services-getter get-home-services)))
diff --git a/src/jd/features/networking.scm b/src/jd/features/networking.scm
new file mode 100644
index 0000000..74f8085
--- /dev/null
+++ b/src/jd/features/networking.scm
@@ -0,0 +1,95 @@
1(define-module (jd features networking)
2 #:use-module (rde features)
3 #:use-module (rde predicates)
4
5 #:use-module (gnu services)
6 #:use-module (gnu home services)
7 #:use-module (gnu home services shepherd)
8 #:use-module (rde home services i2p)
9 #:use-module (gnu services networking)
10 #:use-module (gnu services dbus)
11 #:use-module (gnu system nss)
12 ;; #:use-module (rde system services networking)
13 #:use-module (rde system services accounts)
14
15 #:use-module (gnu packages i2p)
16 #:use-module (gnu packages networking)
17 #:use-module (gnu packages ssh)
18 #:use-module (gnu packages gnome)
19 #:use-module (rde packages)
20
21 #:use-module (guix gexp)
22
23 #:export (feature-networking*))
24
25(define* (feature-networking*
26 #:key
27 (iwd-autoconnect? #t)
28 (network-manager network-manager)
29 (network-manager-applet network-manager-applet)
30 (network-manager-vpn-plugins '())
31 mdns?)
32 "Configure iwd and everything."
33 (ensure-pred file-like? network-manager)
34 (ensure-pred file-like? network-manager-applet)
35
36 (define f-name 'networking)
37 (define (get-home-services config)
38
39 (list
40 (simple-service 'network-manager-applet-package
41 home-profile-service-type
42 (list network-manager-applet))
43 ;; TODO: Disable nm-applet notification by default
44 ;; gsettings set org.gnome.nm-applet disable-connected-notifications true
45 (simple-service
46 'networking-nm-applet-shepherd-service
47 home-shepherd-service-type
48 (list
49 (shepherd-service
50 (provision '(nm-applet))
51 (requirement '(dbus))
52 (stop #~(make-kill-destructor))
53 (start #~(make-forkexec-constructor
54 (list #$(file-append network-manager-applet "/bin/nm-applet")
55 "--indicator")
56 #:log-file (string-append
57 (getenv "XDG_STATE_HOME") "/log"
58 "/nm-applet.log"))))))))
59 (define polkit-network-manager
60 (file-union
61 "polkit-network-manager"
62 `(("share/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules"
63 ,(plain-file
64 "wheel.rules"
65 "polkit.addRule(function(action, subject) {
66 if (action.id.indexOf(\"org.freedesktop.NetworkManager.\") == 0 && subject.isInGroup(\"plugdev\")) {
67 return polkit.Result.YES;
68 }
69});
70")))))
71
72 (define (get-system-services config)
73 (list
74 (service network-manager-service-type
75 (network-manager-configuration
76 (network-manager network-manager)
77 (vpn-plugins network-manager-vpn-plugins)
78 (shepherd-requirement '(iwd))))
79 (service (@@ (rde system services networking) iwd-service-type)
80 ((@@ (rde system services networking) iwd-configuration)
81 (main-conf
82 `((Settings ((AutoConnect . ,iwd-autoconnect?)))))))
83 (service modem-manager-service-type)
84 (service usb-modeswitch-service-type)
85 (simple-service 'polkit-network-manager polkit-service-type (list polkit-network-manager))))
86
87 (feature
88 (name f-name)
89 (values `((,f-name . #t)
90 ,@(if mdns?
91 `((name-service . ,%mdns-host-lookup-nss)
92 (mdns . #t))
93 '())))
94 (home-services-getter get-home-services)
95 (system-services-getter get-system-services)))
diff --git a/src/jd/features/nextcloud.scm b/src/jd/features/nextcloud.scm
new file mode 100644
index 0000000..ff3c9fb
--- /dev/null
+++ b/src/jd/features/nextcloud.scm
@@ -0,0 +1,50 @@
1(define-module (jd features nextcloud)
2 #:use-module (rde features)
3 #:use-module (rde predicates)
4
5 #:use-module (gnu packages)
6 #:use-module (gnu packages polkit)
7 #:use-module (gnu services)
8 #:use-module (gnu services configuration)
9 #:use-module (gnu home services)
10 #:use-module (gnu home services shepherd)
11 #:use-module (guix gexp)
12 #:export (feature-nextcloud))
13
14(define* (feature-nextcloud
15 #:key
16 (nextcloud-client (@ (gnu packages sync) nextcloud-client))
17 (gnome-keyring (@ (gnu packages gnome) gnome-keyring))
18 (polkit? #t))
19 (define f-name 'nextcloud)
20
21 (define (get-home-services config)
22 (list
23 (simple-service
24 'add-nextcloud-home-package
25 home-profile-service-type
26 (append
27 (if polkit? (list gnome-keyring) '())
28 (list nextcloud-client)))
29
30 (simple-service
31 'nextcloud-shepherd-service
32 home-shepherd-service-type
33 (list
34 (shepherd-service
35 (provision `(nextcloud))
36 (auto-start? #t)
37 (stop #~(make-kill-destructor))
38 (start #~(make-forkexec-constructor
39 (list #$(program-file
40 "nextcloud"
41 #~(begin
42 (setenv "QT_QPA_PLATFORM" "wayland-egl;xcb")
43 (apply system*
44 (list
45 #$(file-append (@ (gnu packages sync) nextcloud-client) "/bin/nextcloud")))))))))))))
46
47 (feature
48 (name f-name)
49 (values `((,f-name . #t)))
50 (home-services-getter get-home-services)))
diff --git a/src/jd/features/shepherd.scm b/src/jd/features/shepherd.scm
new file mode 100644
index 0000000..003e3bf
--- /dev/null
+++ b/src/jd/features/shepherd.scm
@@ -0,0 +1,33 @@
1(define-module (jd features shepherd)
2 #:use-module (guix gexp)
3 #:use-module (gnu services)
4 #:use-module (gnu home services shepherd)
5 #:use-module (rde features)
6 #:export (feature-shepherd-repl))
7
8(define-public (feature-shepherd-repl)
9 (define f-name 'shepherd-repl)
10
11 (define (shepherd-repl-service _)
12 (list
13 (shepherd-service
14 (provision '(repl))
15 (modules '((shepherd service repl)))
16 (free-form #~(repl-service)))))
17
18 (define shepherd-repl-service-type
19 (service-type
20 (name 'shepherd-repl)
21 (extensions
22 (list (service-extension home-shepherd-service-type shepherd-repl-service)))
23 (description "Create shepherd repl socket.")
24 (default-value '())))
25
26 (define (get-home-services config)
27 (list
28 (service shepherd-repl-service-type)))
29
30 (feature
31 (name f-name)
32 (values `((,f-name . #t)))
33 (home-services-getter get-home-services)))
diff --git a/src/jd/features/state.scm b/src/jd/features/state.scm
new file mode 100644
index 0000000..ef8620b
--- /dev/null
+++ b/src/jd/features/state.scm
@@ -0,0 +1,25 @@
1(define-module (jd features state)
2 #:use-module (guix gexp)
3 #:use-module (ice-9 match)
4 #:use-module (gnu services)
5 #:use-module (gnu home-services state)
6 #:use-module (rde features))
7
8(define-public (feature-state states)
9 (define f-name 'state)
10
11 (define (get-home-services config)
12 (list
13 (simple-service
14 'user-state
15 home-state-service-type
16 (map
17 (match-lambda
18 (('git local remote) (state-git local remote))
19 (#t (error "State not found")))
20 states))))
21
22 (feature
23 (name f-name)
24 (values `((,f-name . #t)))
25 (home-services-getter get-home-services)))
diff --git a/src/jd/host.scm b/src/jd/host.scm
new file mode 100644
index 0000000..4e573e4
--- /dev/null
+++ b/src/jd/host.scm
@@ -0,0 +1,71 @@
1(define-module (jd host)
2 #:use-module (rde features base)
3 #:use-module (rde features system)
4 #:use-module (rde features wm)
5 #:use-module (gnu system file-systems)
6 #:use-module (gnu system mapped-devices)
7 #:use-module (ice-9 match))
8
9(define mapped-devices
10 (list (mapped-device
11 (source (uuid "3fcc2e44-77bb-4a62-bbdc-f8c646fccbd2"))
12 (target "enc")
13 (type luks-device-mapping))))
14
15(define btrfs-subvolumes
16 (map (match-lambda
17 ((subvol . mount-point)
18 (file-system
19 (type "btrfs")
20 (device "/dev/mapper/enc")
21 (mount-point mount-point)
22 (options (format #f "subvol=~a" subvol))
23 (dependencies mapped-devices))))
24 '((@ . "/")
25 (@boot . "/boot")
26 (@gnu . "/gnu")
27 (@nix . "/nix")
28 (@home . "/home")
29 (@data . "/data")
30 (@var-log . "/var/log"))))
31
32(define data-fs
33 (car
34 (filter
35 (lambda (x) (equal? (file-system-mount-point x) "/data"))
36 btrfs-subvolumes)))
37
38(define file-systems
39 (append
40 btrfs-subvolumes
41 (list
42 (file-system
43 (device "/data/system/var/lib")
44 (type "none")
45 (mount-point "/var/lib")
46 (flags '(bind-mount))
47 (dependencies (list data-fs)))
48 (file-system
49 (mount-point "/boot/efi")
50 (type "vfat")
51 (device (uuid "82F1-2D6E" 'fat32))))))
52
53(define-public %host-features
54 (list
55 (feature-host-info
56 #:host-name "berserker"
57 #:timezone "Europe/Warsaw"
58 #:issue "Greetings, wandering soul, craving the tapping keystrokes?")
59 (feature-file-systems
60 #:mapped-devices mapped-devices
61 #:file-systems file-systems)
62 (feature-kanshi
63 #:extra-config
64 `((profile laptop ((output eDP-1 enable)))
65 (profile docked ((output eDP-1 disable)
66 (output DP-3 enable)))
67 (profile docked ((output eDP-1 disable)
68 (output DP-4 enable)))
69 (profile docked ((output eDP-1 disable)
70 (output DP-6 enable)))))
71 (feature-hidpi)))
diff --git a/src/jd/packages/python.scm b/src/jd/packages/python.scm
new file mode 100644
index 0000000..659a5ba
--- /dev/null
+++ b/src/jd/packages/python.scm
@@ -0,0 +1,170 @@
1(define-module (jd packages python)
2 #:use-module (gnu packages fontutils)
3 #:use-module (gnu packages gtk)
4 #:use-module (gnu packages python)
5 #:use-module (gnu packages python-build)
6 #:use-module (gnu packages python-web)
7 #:use-module (gnu packages python-xyz)
8 #:use-module (gnu packages xml)
9
10 #:use-module (guix build-system pyproject)
11 #:use-module (guix build-system python)
12
13 #:use-module (guix git-download)
14 #:use-module (guix hg-download)
15 #:use-module ((guix licenses) #:prefix license:)
16 #:use-module (guix packages))
17
18(define-public python-svgwrite
19 (package
20 (name "python-svgwrite")
21 (version "1.4.3")
22 (source
23 (origin
24 (method git-fetch)
25 (uri (git-reference
26 (url "https://github.com/mozman/svgwrite")
27 (commit "cd10a7ed1982de77ba85ff4556e154187d7f14bc")))
28 (file-name (git-file-name name version))
29 (sha256
30 (base32 "14nvgsdhndpsgqlcp1vbmczd7rfyiddhjav2xja0a0rx2472psxq"))))
31 (build-system python-build-system)
32 (arguments
33 (list
34 #:tests? #f))
35 (home-page "https://github.com/mozman/svgwrite")
36 (synopsis "Library to create SVG drawings using Python")
37 (description
38 "Svgwrite is a pure-Python library for creating Scalable Vector Graphics (SVG)
39files. It provides an object-oriented interface to build SVG drawings programmatically
40without external dependencies. The library supports shapes, paths, gradients, and
41style definitions compliant with the SVG 1.1 specification.")
42 (license license:expat)))
43
44(define-public python-rlpycairo
45 (package
46 (name "python-rlpycairo")
47 (version "0.4.0")
48 (source
49 (origin
50 (method hg-fetch)
51 (uri (hg-reference
52 (url "https://hg.reportlab.com/hg-public/rlPyCairo")
53 (changeset "a3e9ae26d82d")))
54 (file-name (git-file-name name version))
55 (sha256
56 (base32 "0c8px1538zwdr9hjhscv6y6k8mzlrr247f2jbsdjm4qfijchlc7n"))))
57 (build-system pyproject-build-system)
58 (arguments
59 (list
60 #:tests? #f)) ; brak zestawu testów
61 (propagated-inputs
62 (list python-pycairo
63 python-freetype-py
64 python-reportlab))
65 (native-inputs
66 (list python-setuptools
67 python-wheel))
68 (home-page "https://hg.reportlab.com/hg-public/rlPyCairo")
69 (synopsis "Cairo rendering plugin backend for ReportLab")
70 (description
71 "rlPyCairo is a ReportLab plugin that provides a Cairo-based rendering
72backend for the @code{reportlab.graphics.renderPM} module. It enables the
73use of the PyCairo library for high-quality vector and raster rendering and
74extends ReportLab's graphical output capabilities.")
75 (license license:bsd-3)))
76
77(define-public python-svglib
78 (package
79 (name "python-svglib")
80 (version "1.6.0")
81 (source
82 (origin
83 (method git-fetch)
84 (uri (git-reference
85 (url "https://github.com/deeplook/svglib")
86 (commit "1f41cc64b9b56b0868d775cdeaee0c5413abbb41")))
87 (file-name (git-file-name name version))
88 (sha256
89 (base32 "1qpn4gxfvzb326rwjz0xrrgz7r51pm1cw5xmzwjndhm6mxjbxayq"))))
90 (build-system pyproject-build-system)
91 (arguments
92 (list
93 #:tests? #f))
94 (propagated-inputs
95 (list python-cssselect2
96 python-lxml
97 python-reportlab
98 python-rlpycairo
99 python-tinycss2))
100 (native-inputs
101 (list python-hatchling))
102 (home-page "https://github.com/deeplook/svglib")
103 (synopsis "Pure-Python library for reading and converting SVG")
104 (description
105 "SVGLib is a pure-Python library for parsing and converting SVG (Scalable Vector Graphics)
106files into PDF and other vector formats. It relies on ReportLab for PDF generation
107and supports modern CSS and XML standards. It can be used both as a library and via
108its command-line tool @code{svg2pdf}.")
109 (license license:lgpl3+)))
110
111(define-public python-reportlab
112 (package
113 (name "python-reportlab")
114 (version "4.4.0")
115 (source
116 (origin
117 (method hg-fetch)
118 (uri (hg-reference
119 (url "https://hg.reportlab.com/hg-public/reportlab")
120 (changeset "7635eaecb27d")))
121 (file-name (git-file-name name version))
122 (sha256
123 (base32 "0pmgms62khyjka3gj9y1f33vmlqgyzz1d4wlq3ysksdgxpn6hmcf"))))
124 (build-system pyproject-build-system)
125 (arguments
126 (list
127 #:tests? #f))
128 (propagated-inputs
129 (list python-pillow
130 python-charset-normalizer))
131 (native-inputs
132 (list python-setuptools
133 python-wheel))
134 (home-page "https://www.reportlab.com/")
135 (synopsis "Toolkit for generating PDFs and vector graphics in Python")
136 (description
137 "The ReportLab Toolkit is a mature, open-source library for generating
138PDF documents and vector graphics directly from Python code. It provides
139high-level APIs for document layout, charts, barcodes, and graphics
140composition, used in both open source and commercial applications.")
141 (license license:bsd-3)))
142
143(define-public python-potracer
144 (package
145 (name "python-potracer")
146 (version "0.0.4")
147 (source
148 (origin
149 (method git-fetch)
150 (uri (git-reference
151 (url "https://github.com/tatarize/potrace")
152 (commit "769eadc85ab2ae6c3334686eaab0296fdfdf6abc")))
153 (file-name (git-file-name name version))
154 (sha256
155 (base32 "0g5q2klz2r5spidzhk70y2jkg10yic2ka7j5ygks1sp6nrnhac9v"))))
156 (build-system pyproject-build-system)
157 (propagated-inputs
158 (list python-numpy))
159 (native-inputs (list python-setuptools))
160 (arguments
161 (list
162 #:tests? #f))
163 (home-page "https://github.com/tatarize/potrace")
164 (synopsis "Python bindings for Potrace vectorization library")
165 (description
166 "Potracer is a Python wrapper for the Potrace vectorization library,
167allowing conversion of bitmap images into scalable vector graphics.
168It provides Pythonic access to path tracing and curve fitting
169functionalities from the original Potrace project.")
170 (license license:gpl2+)))
diff --git a/src/jd/packages/supernote.scm b/src/jd/packages/supernote.scm
new file mode 100644
index 0000000..921d0d1
--- /dev/null
+++ b/src/jd/packages/supernote.scm
@@ -0,0 +1,48 @@
1(define-module (jd packages supernote)
2 #:use-module (gnu packages python-build)
3 #:use-module (gnu packages python-xyz)
4
5 #:use-module (guix build-system pyproject)
6 #:use-module (guix git-download)
7 #:use-module ((guix licenses) #:prefix license:)
8 #:use-module (guix packages)
9
10 #:use-module (jd packages python))
11
12(define-public supernote-tool
13 (package
14 (name "supernote-tool")
15 (version "0.6.2")
16 (source
17 (origin
18 (method git-fetch)
19 (uri (git-reference
20 (url "https://github.com/jya-dev/supernote-tool")
21 (commit "73166ca4fbe23a50e188c212f7f1a8d30ce1ce66")))
22 (file-name (git-file-name name version))
23 (sha256
24 (base32 "1mzq6s8lwq3qnq3sbp2hwxkcy07j5izjf309wfx38g7ssd3b8mwd"))))
25 (build-system pyproject-build-system)
26 (arguments
27 (list
28 #:tests? #f))
29 (propagated-inputs
30 (list
31 python-colour
32 python-fusepy
33 python-numpy
34 python-pillow
35 python-potracer
36 python-pypng
37 python-reportlab
38 python-svglib
39 python-svgwrite))
40 (native-inputs
41 (list python-hatchling))
42 (home-page "https://github.com/jya-dev/supernote-tool")
43 (synopsis "An unofficial converter library for Ratta Supernote")
44 (description
45 "Supernotelib is an unofficial converter and utility library for Ratta Supernote
46devices, supporting conversion of note files, vector tracing, and export to
47standard formats like PDF and SVG.")
48 (license license:asl2.0)))
diff --git a/src/jd/user.scm b/src/jd/user.scm
new file mode 100644
index 0000000..2224712
--- /dev/null
+++ b/src/jd/user.scm
@@ -0,0 +1,567 @@
1(define-module (jd user)
2 #:use-module (gnu home services)
3 #:use-module (gnu home services shepherd)
4 #:use-module (gnu home-services ssh)
5 #:use-module (gnu home services xdg)
6 #:use-module (gnu packages)
7 #:use-module (gnu packages cups)
8 #:use-module (gnu packages emacs-xyz)
9 #:use-module (gnu packages gnome)
10 #:use-module (gnu packages gnupg)
11 #:use-module (gnu packages guile-xyz)
12 #:use-module (gnu services)
13 #:use-module (gnu services base)
14 #:use-module (gnu services cups)
15 #:use-module (gnu services desktop)
16 #:use-module (gnu services nix)
17 #:use-module (gnu system pam)
18
19 #:use-module (guix channels)
20 #:use-module (guix download)
21 #:use-module (guix gexp)
22 #:use-module (guix inferior)
23 #:use-module (guix packages)
24
25 #:use-module (jd features emacs-xyz)
26 #:use-module (jd features mail)
27 #:use-module (jd features networking)
28 #:use-module (jd features nextcloud)
29 #:use-module (jd features shepherd)
30 #:use-module (jd features state)
31 #:use-module (jd packages supernote)
32
33 #:use-module (nongnu packages linux)
34 #:use-module (nongnu system linux-initrd)
35
36 #:use-module (rde features)
37 #:use-module (rde packages)
38 #:use-module (rde packages aspell)
39
40 #:use-module (srfi srfi-1))
41
42
43(define-syntax-rule (use-rde-features-modules module ...)
44 (use-modules (rde features module) ...))
45
46(define-syntax-rule (use-rde-home-services-modules module ...)
47 (use-modules (rde home services module) ...))
48
49(use-rde-features-modules
50 android base bittorrent clojure containers
51 documentation emacs emacs-xyz finance fontutils
52 gnupg gtk guile image-viewers irc keyboard
53 libreoffice linux llm mail markup networking ocaml
54 password-utils presets security-token shells
55 shellutils sourcehut ssh system terminals tmux uml
56 version-control video virtualization web-browsers wm xdg python)
57
58(use-rde-home-services-modules i2p)
59
60(define* (mail-acc id user #:optional (type 'migadu))
61 "Make a simple mail-account with gmail type by default."
62 (mail-account
63 (id id)
64 (fqda user)
65 (type type)))
66
67(define* (mail-lst id fqda urls)
68 "Make a simple mailing-list."
69 (mailing-list
70 (id id)
71 (fqda fqda)
72 (config (l2md-repo
73 (name (symbol->string id))
74 (urls urls)))))
75
76(define-public %base-features
77 (list
78 (feature-backlight #:step 10)
79 (feature-networking* #:network-manager-vpn-plugins (list network-manager-openvpn)
80 #:mdns? #t)
81 (feature-base-services)
82 (feature-base-packages)
83 (feature-desktop-services)
84 (feature-shepherd-repl)
85 (feature-tex)
86 (feature-xdg
87 #:xdg-user-directories-configuration
88 (home-xdg-user-directories-configuration
89 (desktop "$HOME")
90 (templates "$HOME")
91 (download "$HOME/dl")
92 (publicshare "$HOME/sync")
93 (music "/data/jakub/music")
94 (videos "/data/jakub/videos")
95 (pictures "/data/jakub/pics")
96 (documents "/data/jakub/docs")
97 ))
98 (feature-pipewire)
99 (feature-shepherd)))
100
101(define-public %desktop-features
102 (list
103 (feature-sway-run-on-tty #:sway-tty-number 2)
104 (feature-gtk3 #:gtk-theme (make-theme "Adwaita-dark" gnome-themes-extra))
105 (feature-fonts #:default-font-size 14)
106 (feature-transmission #:auto-start? #f)
107 (feature-sway
108 #:extra-config
109 '((input type:touchpad
110 ((tap enabled)
111 (middle_emulation enabled)))
112 (workspace_layout tabbed)
113 (bindsym $mod+q layout tabbed)
114 (bindsym $mod+a layout stacking)
115 (bindsym $mod+z layout toggle split)
116 (default_border none)
117 (default_floating_border pixel 3)
118 ;; (default_border normal 3)
119 ;; (default_floating_border normal 3)
120 ;; (gaps inner 0)
121 (output * bg "#181818" solid_color)
122 (client.focused "#181818" "#383838" "#d8d8d8" "#7cafc2")
123 (client.focused_inactive "#181818" "#282828" "#b8b8b8" "#7cafc2")
124 (client.unfocused "#181818" "#282828" "#b8b8b8" "#7cafc2")
125 (client.urgent "#181818" "#ab4642" "#f8f8f8" "#181818")
126 (bindsym $mod+h focus left)
127 (bindsym $mod+j focus down)
128 (bindsym $mod+k focus up)
129 (bindsym $mod+l focus right)
130
131 (unbindsym --to-code $mod+Shift+l)
132 (bindsym --to-code $mod+Escape exec $lock)
133
134 (bindsym $mod+Shift+h move left)
135 (bindsym $mod+Shift+j move down)
136 (bindsym $mod+Shift+k move up)
137 (bindsym $mod+Shift+l move right)))
138 (feature-waybar
139 ;; #:base16-css base16-solarized-dark
140 #:waybar-modules
141 (list
142 (waybar-sway-workspaces
143 #:format-icons
144 `(,@(map
145 (lambda (x) (cons
146 (number->string x)
147 (number->string x)))
148 (iota 10 1))
149 ("urgent" . )
150 ("default" . )))
151 (waybar-idle-inhibitor)
152 (waybar-temperature)
153 (waybar-cpu)
154 (waybar-battery #:intense? #f)
155 (waybar-tray)
156 (waybar-clock)))
157 ;; (feature-nextcloud)
158 (feature-foot)
159 (feature-yt-dlp)
160 (feature-libreoffice)
161 (feature-emacs-power-menu)
162 (feature-sway-screenshot)
163 (feature-swaynotificationcenter)
164 (feature-swayidle)
165 (feature-swaylock)
166 (feature-batsignal)
167 (feature-imv)
168 (feature-librewolf)
169 (feature-librewolf
170 #:browser (@ (gnu packages gnuzilla) icecat)
171 #:default-browser? #f)
172 (feature-librewolf
173 #:browser (@ (nongnu packages mozilla) firefox)
174 #:default-browser? #f)
175 ;; (feature-ungoogled-chromium)
176 (feature-ledger)
177 (feature-mpv)))
178
179(define-public %mail-features
180 (list
181 (feature-isync #:isync-verbose #t)
182 (feature-mail-mcron)
183 (feature-l2md*)
184 (feature-msmtp)))
185
186(define-public %cli-features
187 (list
188 (feature-zsh #:enable-zsh-autosuggestions? #t)
189 (feature-git #:extra-config '((gpg ((program . "gpg")))))
190 (feature-manpages)
191 (feature-vterm)
192 (feature-bash)
193 (feature-direnv)
194 (feature-guile)
195 (feature-ssh)))
196
197(define* (feature-emacs-personal-config)
198 (define f-name 'personal-emacs-config)
199
200 (define (get-home-services config)
201 (list
202 (rde-elisp-configuration-service
203 f-name
204 config
205 `((with-eval-after-load 'notmuch
206 (setq-default notmuch-search-oldest-first nil))
207
208 (with-eval-after-load 'paredit
209 (defun jd/paredit-RET ()
210 "Wraps `paredit-RET' to provide a sensible minibuffer experience"
211 (interactive)
212 (cond
213 ((minibufferp)
214 (read--expression-try-read))
215 ((and (eq major-mode 'inferior-emacs-lisp-mode)
216 (string-prefix-p "*ielm*" (buffer-name)))
217 (ielm-return))
218 (t
219 (paredit-RET))))
220 (bind-key "<return>" 'jd/paredit-RET paredit-mode-map)
221
222 (dolist (hook '(emacs-lisp-mode-hook
223 eval-expression-minibuffer-setup-hook
224 ielm-mode-hook
225 lisp-mode-hook
226 lisp-interaction-mode-hook
227 scheme-mode-hook
228 clojure-mode-hook))
229 (add-hook hook 'paredit-mode)))
230
231 (with-eval-after-load 'rainbow-delimiters
232 (dolist (hook '(emacs-lisp-mode-hook
233 eval-expression-minibuffer-setup-hook
234 ielm-mode-hook
235 lisp-mode-hook
236 lisp-interaction-mode-hook
237 scheme-mode-hook
238 clojure-mode-hook))
239 (add-hook hook 'rainbow-delimiters-mode)))
240
241 (with-eval-after-load 'undo-tree
242 (setq-default undo-tree-auto-save-history nil)
243 (global-undo-tree-mode 1))
244
245 (with-eval-after-load 'multiple-cursors
246 (setq-default mc/always-run-for-all t)
247 (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
248 (global-set-key (kbd "C->") 'mc/mark-next-like-this)
249 (global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
250 (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this))
251
252 (with-eval-after-load 'page-break-lines
253 (global-page-break-lines-mode 1))
254
255 (with-eval-after-load 'gptel
256 (setq gptel-model 'gpt-4o
257 gptel-backend (gptel-make-gh-copilot "Copilot")))
258
259 (with-eval-after-load 'geiser-mode
260 (setq geiser-mode-auto-p nil))
261
262 (with-eval-after-load 'simple
263 (add-hook
264 'after-init-hook
265 (lambda ()
266 (delete-selection-mode 1)
267 (pixel-scroll-precision-mode 0)
268 (electric-pair-mode 1)
269 (setq-default truncate-lines t)
270 (setq-default cursor-in-non-selected-windows 'hollow)
271 (setq-default cursor-type 'box)
272 (require 'multiple-cursors)
273 (require 'undo-tree)
274 (require 'rainbow-delimiters)
275 (require 'paredit)
276 (require 'url)
277 (require 'json)
278 (require 'org)
279 (require 'org-pdftools)
280 (defalias 'getf 'cl-getf)
281 (defalias 'find-if 'cl-find-if)
282 (add-hook 'org-mode-hook 'org-pdftools-setup-link)))
283 (set-default 'display-fill-column-indicator-column 100)
284 (add-hook 'prog-mode-hook 'display-fill-column-indicator-mode)
285 (setq display-line-numbers-type 'relative)
286 (add-hook 'prog-mode-hook 'display-line-numbers-mode)))
287 #:elisp-packages
288 (strings->packages
289 "emacs-rainbow-mode"
290 "emacs-rainbow-delimiters"
291 "emacs-paredit"
292 "emacs-hl-todo"
293 "emacs-undo-tree"
294 "emacs-multiple-cursors"
295 "emacs-nginx-mode"
296 "emacs-yaml-mode"
297 "emacs-org-present"
298 "emacs-org-pdftools"
299 "emacs-org-pomodoro"))))
300 (feature
301 (name f-name)
302 (values `((,f-name . #t)))
303 (home-services-getter get-home-services)))
304
305(define-public %emacs-features
306 (list
307 (feature-emacs-modus-themes #:deuteranopia? #f)
308 (feature-emacs-citation #:global-bibliography (list "/data/jakub/notes/references/master.bib"))
309 (feature-emacs-completion #:mini-frame? #f ;; Dziwne kurwa bledy
310 #:marginalia-align 'right)
311 (feature-emacs-corfu #:corfu-doc-auto #f)
312 (feature-emacs #:default-application-launcher? #t)
313 (feature-emacs-elfeed #:elfeed-org-files '("/data/jakub/notes/rss.org"))
314 (feature-emacs-erc #:erc-log? #t
315 #:erc-autojoin-channels-alist '((Libera.Chat "#rde")
316 (Libera.Chat "#systemcrafters")
317 (Libera.Chat "#lisp-pl")
318 (Libera.Chat "#lispcafe")
319 (Libera.Chat "##metal")
320 (Libera.Chat "#hsp")
321 (Libera.Chat "#spritely")
322 (Libera.Chat "#guix")))
323 (feature-emacs-keycast #:turn-on? #f)
324 (feature-emacs-org-agenda #:org-agenda-files '("/data/jakub/notes/personal.org"
325 "/data/jakub/notes/s32526.org"))
326 (feature-emacs-org-uni)
327 (feature-emacs-org-dailies #:encrypted? #t)
328 (feature-emacs-org #:org-directory "/data/jakub/notes"
329 #:org-indent? #t)
330 (feature-emacs-org-roam #:org-roam-directory "/data/jakub/notes/slip-box")
331 (feature-emacs-spelling #:spelling-program (@ (gnu packages hunspell) hunspell)
332 #:spelling-dictionaries (list (@ (gnu packages hunspell) hunspell-dict-en)
333 (@ (gnu packages hunspell) hunspell-dict-pl))
334 #:ispell-standard-dictionary "pl_PL")
335 (feature-emacs-dired #:extra-switches "-h")
336 (feature-emacs-monocle #:olivetti-body-width 100)
337 (feature-emacs-denote #:denote-directory "/data/jakub/notes/denote")
338 (feature-emacs-devdocs)
339 (feature-emacs-appearance)
340 (feature-emacs-dashboard)
341 (feature-emacs-eglot)
342 (feature-emacs-eshell)
343 (feature-emacs-git)
344 (feature-emacs-gptel)
345 (feature-emacs-guix)
346 (feature-emacs-message)
347 (feature-emacs-nov-el)
348 (feature-emacs-pdf-tools)
349 (feature-emacs-personal-config)
350 (feature-emacs-project)
351 (feature-emacs-time)
352 (feature-emacs-tramp)
353 (feature-emacs-vertico)
354 (feature-emacs-webpaste)
355 (feature-emacs-which-key)
356 (feature-emacs-battery)
357 (feature-notmuch)
358 (feature-plantuml)
359 (feature-compile)))
360
361(define %dev-features
362 (list
363 (feature-markdown #:headings-scaling? #t)
364 (feature-android)
365 (feature-clojure)
366 (feature-python)
367 (feature-octave)))
368
369(define %virtualization-features
370 (list
371 (feature-distrobox)
372 (feature-podman)
373 (feature-qemu)))
374
375(define (feature-ssh-extra-config)
376 (feature-custom-services
377 #:feature-name-prefix 'jd-ssh-extra-config
378 #:home-services
379 (list
380 (simple-service
381 'ssh-extra-config
382 home-ssh-service-type
383 (home-ssh-extension
384 (extra-config
385 (append
386 (list
387 (ssh-host
388 (host "jdlugosz.com")
389 (options
390 '((user . "root")
391 (port . 22)
392 (compression . #t))))
393 (ssh-host
394 (host "git.jdlugosz.com")
395 (options
396 '((user . "git")
397 (port . 22)
398 (compression . #t))))
399 (ssh-host
400 (host "*.abaks.pl")
401 (options
402 '((user . "serwis")
403 (port . 22)
404 (compression . #t)))))))
405 (toplevel-options
406 '((host-key-algorithms . "+ssh-rsa")
407 (pubkey-accepted-key-types . "+ssh-rsa"))))))))
408
409(define (feature-additional-services)
410 (feature-custom-services
411 #:feature-name-prefix 'jd-additional-services
412 #:system-services
413 (list (service nix-service-type)
414 (service gnome-keyring-service-type)
415 (service pam-limits-service-type
416 (list
417 (pam-limits-entry "*" 'both 'nofile 100000) ;; Required for some cases when building Docker images in Nix
418 (pam-limits-entry "@users" 'both 'rtprio 99) ;; Needed for Guitarix
419 (pam-limits-entry "@users" 'both 'memlock 'unlimited)))
420 (service cups-service-type
421 (cups-configuration
422 (web-interface? #t)
423 (extensions
424 (list cups-filters)))))
425 #:home-services
426 (list
427 (simple-service
428 'home-environment-extra-variables
429 home-environment-variables-service-type
430 '(("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")))
431
432 (simple-service
433 'i2pd-add-ilita-irc
434 home-i2pd-service-type
435 (home-i2pd-extension
436 (tunnels-conf
437 `((IRC-ILITA ((type . client)
438 (address . 127.0.0.1)
439 (port . 6669)
440 (destination . irc.ilita.i2p)
441 (destinationport . 6667)
442 (keys . ilita-keys.dat)))
443 (BETA-CRAFT ((type . client)
444 (address . 192.168.122.1)
445 (port . 25565)
446 (destination . jpkqfe5q5z74i4esbcqilwozv72gbrkm4bueibblm732egjlzy6a.b32.i2p )
447 (destinationport . 25565)
448 (gzip . false)
449 (inbound.length . 1)
450 (outbound.length . 1)
451 (inbound.quantity . 3)
452 (outbound.quantity . 3)
453 (i2cp.leaseSetType . 3)
454 (i2cp.leaseSetEncType . 4)
455 (keys . betacraft.dat)))))))
456
457 (simple-service
458 'home-profile-extra-packages
459 home-profile-service-type
460 (append
461 (list
462 (@ (gnu packages tree-sitter) tree-sitter-clojure)
463 (@ (gnu packages tree-sitter) tree-sitter-html))
464 (append
465 (list supernote-tool)
466 (strings->packages
467 "figlet"
468 "calibre"
469
470 "libnotify"
471
472 "flatpak" "wine64"
473
474 "alsa-utils"
475 "pavucontrol"
476 "imagemagick"
477 "obs" "obs-wlrobs"
478 "binutils" "make" "gdb"
479
480 "hicolor-icon-theme" "adwaita-icon-theme"
481 "gnome-themes-extra" "papirus-icon-theme"
482 "arc-theme"
483
484 "xdg-desktop-portal-gnome"
485
486 "kdenlive" "gimp"
487 "freecad"
488
489 "ripgrep" "curl"
490
491 "texlive" "texlive-collection-basic"
492 "texlive-bin" "texlive-collection-latex"
493 "texlive-collection-fontsrecommended"
494 "texlive-collection-pictures"
495 "texlive-collection-latexextra"
496 "texlive-dvipng")))))))
497
498
499(define-public (feature-nonfree-kernel)
500 (feature-kernel
501 #:kernel linux
502 #:firmware (list linux-firmware)
503 #:initrd microcode-initrd))
504
505(define-public %all-features
506 (append
507 %base-features
508 %cli-features
509 %desktop-features
510 %dev-features
511 %emacs-features
512 %mail-features
513 %virtualization-features))
514
515(define-public %user-features
516 (append
517 %all-features
518 (list
519 (feature-user-info
520 #:user-name "jakub"
521 #:full-name "Jakub Dlugosz"
522 #:email "me@jdlugosz.com"
523 #:user-initial-password-hash
524 "$6$C6xUaxw3xOpsPrBF$/nmP.SXpzoAYGu7CrcIMQ02S4f8QDNZTuAyaIZusmz4e3xXTdSYpt8D1WCaLXcAuhVJA5llPf9MH7L1TTlgG81"
525 #:emacs-advanced-user? #t)
526 (feature-gnupg
527 #:gpg-primary-key "83AD9E56AE266488CA2F2598BACE123052C9E77A")
528 (feature-security-token)
529 (feature-password-store
530 #:remote-password-store-url "git@jdlugosz.com:passwords")
531 (feature-state '((git "/data/jakub/notes" "git@jdlugosz.com:notes")))
532 (feature-mail-settings
533 #:mail-directory-fn (lambda (config)
534 (string-append (get-value 'home-directory config) "/.mail"))
535 #:mail-accounts (list
536 (mail-account
537 (id 'work)
538 (type 'migadu)
539 (fqda "jakub@jdlugosz.com")
540 (aliases '("admin@jdlugosz.com" "postmaster@jdlugosz.com"))
541 (pass-cmd "pass show mail/jakub@jdlugosz.com"))
542 (mail-account
543 (id 'personal)
544 (type 'migadu)
545 (fqda "me@jdlugosz.com")
546 (aliases '("signup.*@jdlugosz.com"))
547 (pass-cmd "pass show mail/me@jdlugosz.com")))
548 #:mailing-lists (list (mail-lst 'guile-devel "guile-devel@gnu.org"
549 '("https://yhetil.org/guile-devel/0"))
550 (mail-lst 'guix-devel "guix-devel@gnu.org"
551 '("https://yhetil.org/guix-devel/0"))
552 (mail-lst 'guix-bugs "guix-bugs@gnu.org"
553 '("https://yhetil.org/guix-bugs/0"))
554 (mail-lst 'guix-patches "guix-patches@gnu.org"
555 '("https://yhetil.org/guix-patches/1"))))
556 (feature-irc-settings #:irc-accounts (list
557 (irc-account
558 (id 'libera)
559 (network "irc.libera.chat")
560 (nick "jdlugosz963"))))
561 (feature-sourcehut
562 #:user-name-fn (const "jdlugosz"))
563 (feature-keyboard
564 #:keyboard-layout (keyboard-layout "pl"))
565 (feature-ssh-extra-config)
566 (feature-additional-services)
567 )