summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-10-15 14:03:46 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-10-15 14:03:46 +0200
commite43f3c403ff49e87641bb6c745080760f272446f (patch)
treec964d54e79c87ec466658e289e10303c861be5cd
parente62c8a78ec0b8727d138fbe4144cf718b7da867d (diff)
downloaddotfiles-e43f3c403ff49e87641bb6c745080760f272446f.tar.gz
dotfiles-e43f3c403ff49e87641bb6c745080760f272446f.zip
Update dotfiles
-rw-r--r--.bash_profile3
-rw-r--r--.config/emacs/init.el50
-rw-r--r--.config/emacs/jd/jd-mu4e.el30
-rw-r--r--.config/guix/channels.scm19
-rw-r--r--.config/guix/manifests/desktop.scm22
-rw-r--r--.config/guix/manifests/emacs.scm77
-rw-r--r--.config/guix/systems/base-system.scm115
-rw-r--r--.config/guix/systems/viking.scm27
-rw-r--r--.config/ranger/rc.conf760
-rw-r--r--Guix.org276
-rwxr-xr-xbin/activate-profiles39
-rwxr-xr-xbin/update-profiles22
12 files changed, 38 insertions, 1402 deletions
diff --git a/.bash_profile b/.bash_profile
index debd6e7..8182e2b 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1,2 +1 @@
1export PATH="$PATH:$HOME/.local/bin" export PATH="$HOME/bin:$PATH"
2export TERM=xterm
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 011d660..c77dbe8 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -4,7 +4,7 @@
4 (message "Emacs loaded in %s with %d garbage collections." 4 (message "Emacs loaded in %s with %d garbage collections."
5 (format "%.2f seconds" 5 (format "%.2f seconds"
6 (float-time 6 (float-time
7 (time-subtract after-init-time before-init-time))) 7 (time-subtract after-init-time before-init-time)))
8 gcs-done)) 8 gcs-done))
9 9
10(defun jd/startup () 10(defun jd/startup ()
@@ -27,23 +27,23 @@
27(setq user-emacs-directory "~/.cache/emacs") 27(setq user-emacs-directory "~/.cache/emacs")
28 28
29(require 'package) 29(require 'package)
30 (setq package-archives '(("melpa" . "https://melpa.org/packages/") 30(setq package-archives '(("melpa" . "https://melpa.org/packages/")
31 ("org" . "https://orgmode.org/elpa/") 31 ("org" . "https://orgmode.org/elpa/")
32 ("gnu-devel" . "https://elpa.gnu.org/devel/") 32 ("gnu-devel" . "https://elpa.gnu.org/devel/")
33 ("elpa" . "https://elpa.gnu.org/packages/"))) 33 ("elpa" . "https://elpa.gnu.org/packages/")))
34 (package-initialize) 34(package-initialize)
35 35
36 (unless package-archive-contents 36(unless package-archive-contents
37 (package-refresh-contents)) 37 (package-refresh-contents))
38 38
39 (unless (package-installed-p 'use-package) 39(unless (package-installed-p 'use-package)
40 (package-install 'use-package)) 40 (package-install 'use-package))
41 41
42;; (setq use-package-always-ensure t) 42(setq use-package-always-ensure t)
43 43
44 (add-to-list 'load-path ".config/emacs/jd/") 44(add-to-list 'load-path ".config/emacs/jd/")
45 45
46 (require 'use-package) 46(require 'use-package)
47 47
48(use-package general 48(use-package general
49 :config 49 :config
@@ -135,7 +135,7 @@
135 ("C-k" . ivy-previous-line) 135 ("C-k" . ivy-previous-line)
136 ("C-j" . ivy-next-line) 136 ("C-j" . ivy-next-line)
137 :map ivy-switch-buffer-map 137 :map ivy-switch-buffer-map
138 ("C-k" . ivy-previous-line)) 138 ("C-k" . ivy-previous-line))
139 :config 139 :config
140 (ivy-mode 1)) 140 (ivy-mode 1))
141 141
@@ -405,10 +405,10 @@
405 :after lsp) 405 :after lsp)
406 406
407(defun jd/python-mode-setup () 407(defun jd/python-mode-setup ()
408 (let ((project-venv-path (concat (projectile-project-root) "venv/"))) 408 (let ((project-venv-path (concat (projectile-project-root) "venv/")))
409 (when (projectile--directory-p project-venv-path) 409 (when (projectile--directory-p project-venv-path)
410 (pyvenv-activate project-venv-path) 410 (pyvenv-activate project-venv-path)
411 (pyvenv-mode)))) 411 (pyvenv-mode))))
412 412
413;; (use-package python-mode ;;TODO: find alternative 413;; (use-package python-mode ;;TODO: find alternative
414;; :hook (python-mode . lsp-deferred) 414;; :hook (python-mode . lsp-deferred)
@@ -416,8 +416,8 @@
416;; :config 416;; :config
417;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) 417;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)))
418 418
419 (use-package pyvenv 419(use-package pyvenv
420 :after python-mode) 420 :after python-mode)
421 421
422(use-package typescript-mode 422(use-package typescript-mode
423 :mode ("\\.ts\\'") 423 :mode ("\\.ts\\'")
@@ -465,9 +465,9 @@
465 :after lsp-mode 465 :after lsp-mode
466 :hook (lsp-mode . company-mode) 466 :hook (lsp-mode . company-mode)
467 :bind (:map company-active-map 467 :bind (:map company-active-map
468 ("<tab>" . company-complete-selection)) 468 ("<tab>" . company-complete-selection))
469 (:map lsp-mode-map 469 (:map lsp-mode-map
470 ("<tab>" . company-indent-or-complete-common)) 470 ("<tab>" . company-indent-or-complete-common))
471 :custom 471 :custom
472 (company-minimum-prefix-length 1) 472 (company-minimum-prefix-length 1)
473 (company-idle-delay 0.0) 473 (company-idle-delay 0.0)
@@ -551,8 +551,6 @@
551 551
552(use-package dired-ranger) 552(use-package dired-ranger)
553 553
554(use-package dired-single)
555
556(use-package dired 554(use-package dired
557 :ensure nil 555 :ensure nil
558 :commands (dired dired-jump) 556 :commands (dired dired-jump)
@@ -565,7 +563,7 @@
565 "h" 'dired-up-directory 563 "h" 'dired-up-directory
566 "t" 'dired-create-empty-file 564 "t" 'dired-create-empty-file
567 "T" 'dired-toggle-marks 565 "T" 'dired-toggle-marks
568 "l" 'dired-single-buffer) 566 "l" 'dired-find-file)
569 (setq dired-kill-when-opening-new-dired-buffer t) 567 (setq dired-kill-when-opening-new-dired-buffer t)
570 (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer)) 568 (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer))
571 569
diff --git a/.config/emacs/jd/jd-mu4e.el b/.config/emacs/jd/jd-mu4e.el
index 084354d..cda39f2 100644
--- a/.config/emacs/jd/jd-mu4e.el
+++ b/.config/emacs/jd/jd-mu4e.el
@@ -1,8 +1,4 @@
1(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") 1(use-package org-msg)
2
3
4(use-package org-msg
5 :ensure t)
6 2
7(use-package mu4e 3(use-package mu4e
8 :defer 20 4 :defer 20
@@ -33,18 +29,18 @@
33 (mu4e-sent-messages-behavior . sent) 29 (mu4e-sent-messages-behavior . sent)
34 )) 30 ))
35 ,(make-mu4e-context 31 ,(make-mu4e-context
36 :name "Gmail" 32 :name "Gmail"
37 :match-func (lambda (msg) (when msg 33 :match-func (lambda (msg) (when msg
38 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) 34 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
39 :vars '( 35 :vars '(
40 (user-full-name . "Jakub Dlugosz") 36 (user-full-name . "Jakub Dlugosz")
41 (user-mail-address . "jdlugosz963@gmail.pl") 37 (user-mail-address . "jdlugosz963@gmail.pl")
42 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane") 38 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
43 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz") 39 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
44 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze") 40 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
45 (mu4e-refile-folder . "/gmail/Archive") 41 (mu4e-refile-folder . "/gmail/Archive")
46 (mu4e-sent-messages-behavior . sent) 42 (mu4e-sent-messages-behavior . sent)
47 )))) 43 ))))
48 44
49 (setq mail-user-agent 'mu4e-user-agent 45 (setq mail-user-agent 'mu4e-user-agent
50 message-send-mail-function 'smtpmail-send-it 46 message-send-mail-function 'smtpmail-send-it
diff --git a/.config/guix/channels.scm b/.config/guix/channels.scm
deleted file mode 100644
index ab15010..0000000
--- a/.config/guix/channels.scm
+++ /dev/null
@@ -1,19 +0,0 @@
1(list
2 (channel
3 (name 'guix)
4 (url "https://git.savannah.gnu.org/git/guix.git")
5 ;; (url "file:///home/daviwil/Projects/Code/guix"))
6 (introduction
7 (make-channel-introduction
8 "9edb3f66fd807b096b48283debdcddccfea34bad"
9 (openpgp-fingerprint
10 "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
11 (channel
12 (name 'nonguix)
13 (url "https://gitlab.com/nonguix/nonguix")
14 ;; Enable signature verification:
15 (introduction
16 (make-channel-introduction
17 "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
18 (openpgp-fingerprint
19 "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
diff --git a/.config/guix/manifests/desktop.scm b/.config/guix/manifests/desktop.scm
deleted file mode 100644
index 17f7fef..0000000
--- a/.config/guix/manifests/desktop.scm
+++ /dev/null
@@ -1,22 +0,0 @@
1(specifications->manifest
2 '(
3
4 "flatpak"
5
6 "pulsemixer"
7
8 "blueman"
9
10 "xev"
11 "xset"
12 "xrdb"
13 "xhost"
14 "xmodmap"
15 "setxkbmap"
16 "xrandr"
17 "arandr"
18 "xss-lock"
19 "libinput"
20 "xinput"
21
22))
diff --git a/.config/guix/manifests/emacs.scm b/.config/guix/manifests/emacs.scm
deleted file mode 100644
index c6ff413..0000000
--- a/.config/guix/manifests/emacs.scm
+++ /dev/null
@@ -1,77 +0,0 @@
1(specifications->manifest
2 '("emacs"
3 ;;"emacs-native-comp"
4
5 "emacs-general"
6
7 "emacs-undo-tree"
8 "emacs-evil"
9 "emacs-evil-collection"
10
11 "emacs-diminish"
12 "emacs-doom-themes"
13 "font-hack"
14
15 "emacs-hl-todo"
16
17 "emacs-counsel"
18 "emacs-ivy"
19
20 "emacs-which-key"
21
22 "emacs-doom-modeline"
23
24 "emacs-hydra"
25
26 "emacs-beacon"
27
28 "emacs-org"
29
30 "emacs-evil-org"
31
32 "emacs-toc-org"
33
34 "emacs-visual-fill-column"
35
36 "emacs-org-superstar"
37
38 "emacs-org-roam"
39
40 "emacs-lsp-mode"
41 "emacs-lsp-ivy"
42
43 "emacs-pyvenv"
44 ;; "emacs-python-mode"
45
46 "emacs-typescript-mode"
47 "emacs-web-mode"
48 "emacs-tide"
49 "emacs-flycheck"
50
51 "emacs-yaml-mode"
52
53 "emacs-docker"
54
55 "emacs-company"
56
57 "emacs-projectile"
58
59 "emacs-neotree"
60
61 "emacs-magit"
62
63 "emacs-vterm"
64
65 ; "emacs-dired-single"
66 "emacs-dired-hacks"
67 "emacs-all-the-icons-dired"
68
69 "emacs-emms"
70
71 "emacs-pdf-tools"
72
73 "mu"
74
75 "emacs-elfeed"
76
77))
diff --git a/.config/guix/systems/base-system.scm b/.config/guix/systems/base-system.scm
deleted file mode 100644
index 7c67fad..0000000
--- a/.config/guix/systems/base-system.scm
+++ /dev/null
@@ -1,115 +0,0 @@
1(define-module (base-system)
2 #:use-module (gnu)
3 #:use-module (gnu services pm)
4 #:use-module (gnu services docker)
5 #:use-module (gnu services networking)
6 #:use-module (gnu services virtualization) ; todo make
7 #:use-module (gnu packages vim)
8 #:use-module (gnu services desktop)
9 #:use-module (gnu packages xorg)
10 #:use-module (gnu packages emacs)
11 #:use-module (gnu packages file-systems)
12 #:use-module (gnu packages linux)
13 #:use-module (gnu packages audio)
14 #:use-module (gnu packages pulseaudio)
15 #:use-module (gnu packages version-control)
16 #:use-module (gnu packages package-management))
17 ; #:use-module (nongnu packages linux)
18 ; #:use-module (nongnu system linux-initrd))
19
20(use-service-modules ssh)
21(use-package-modules certs)
22(use-service-modules desktop xorg)
23
24(define-public base-operating-system
25 (operating-system
26 (host-name "base")
27 (timezone "Europe/Warsaw")
28 (locale "en_US.utf8")
29 (keyboard-layout (keyboard-layout "pl"))
30
31 ;; Use non-free Linux and firmware
32 ;; (kernel linux)
33 ;; (firmware (list linux-firmware))
34 ;; (initrd microcode-initrd)
35
36 (bootloader (bootloader-configuration
37 (bootloader grub-efi-bootloader)
38 (targets "/boot/efi")))
39 ;; (keyboard-layout keyboard-layout)))
40
41 ;; Guix doesn't like it when there isn't a file-systems
42 ;; entry, so add one that is meant to be overridden
43 (file-systems (cons*
44 (file-system
45 (mount-point "/tmp")
46 (device "none")
47 (type "tmpfs")
48 (check? #f))
49 %base-file-systems))
50
51 ;; Users
52 (users (cons (user-account
53 (name "jakub")
54 (comment "Jakub Dlugosz")
55 (group "users")
56 (home-directory "/home/jakub")
57 (supplementary-groups '(
58 "wheel"
59 "netdev"
60 "kvm"
61 "tty"
62 "input"
63 "docker"
64 "lp"
65 "audio"
66 "video")))
67 %base-user-accounts))
68
69
70 ;; Packages
71 (packages (append (list
72 git
73 exfat-utils
74 fuse-exfat
75 stow
76 vim
77 emacs
78 bluez
79 bluez-alsa
80 pulseaudio
81 tlp
82 ncurses
83 xf86-input-libinput
84 nss-certs) ;; For https connection
85 %base-packages))
86
87
88 ;; Services
89 (services
90 (append
91 (list
92
93 (service elogind-service-type)
94 (service openssh-service-type)
95 (service network-manager-service-type)
96 (service slim-service-type)
97 (service tlp-service-type
98 (tlp-configuration
99 (cpu-boost-on-ac? #t)
100 (wifi-pwr-on-bat? #t)))
101 (bluetooth-service #:auto-enable? #t)
102 (service docker-service-type)
103 (service wpa-supplicant-service-type))
104 (service libvirt-service-type
105 (libvirt-configuration
106 (unix-sock-group "libvirt")
107 (tls-port "16555")))
108 (set-xorg-configuration
109 (xorg-configuration
110 (keyboard-layout keyboard-layout)))
111
112 %base-services))
113
114 ;; Allow resolution of '.local' host names with mDNS
115 (name-service-switch %mdns-host-lookup-nss)))
diff --git a/.config/guix/systems/viking.scm b/.config/guix/systems/viking.scm
deleted file mode 100644
index 00b279e..0000000
--- a/.config/guix/systems/viking.scm
+++ /dev/null
@@ -1,27 +0,0 @@
1(define-module (viking)
2 #:use-module (base-system)
3 #:use-module (gnu))
4
5(operating-system
6 (inherit base-operating-system)
7 (host-name "viking")
8
9 (bootloader
10 (bootloader-configuration
11 (bootloader grub-bootloader)
12 (target "/dev/sda")))
13
14 (mapped-devices
15 (list (mapped-device
16 (source
17 (uuid "75a1ebd7-13c2-442f-80ff-1b5e59522e29"))
18 (target "cryptroot")
19 (type luks-device-mapping))))
20
21 (file-systems
22 (cons* (file-system
23 (mount-point "/")
24 (device "/dev/mapper/cryptroot")
25 (type "ext4")
26 (dependencies mapped-devices))
27 %base-file-systems)))
diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf
deleted file mode 100644
index ac7ca93..0000000
--- a/.config/ranger/rc.conf
+++ /dev/null
@@ -1,760 +0,0 @@
1# ===================================================================
2# This file contains the default startup commands for ranger.
3# To change them, it is recommended to create either /etc/ranger/rc.conf
4# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
5# commands there.
6#
7# If you copy this whole file there, you may want to set the environment
8# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
9#
10# The purpose of this file is mainly to define keybindings and settings.
11# For running more complex python code, please create a plugin in "plugins/" or
12# a command in "commands.py".
13#
14# Each line is a command that will be run before the user interface
15# is initialized. As a result, you can not use commands which rely
16# on the UI such as :delete or :mark.
17# ===================================================================
18
19# ===================================================================
20# == Options
21# ===================================================================
22
23# Which viewmode should be used? Possible values are:
24# miller: Use miller columns which show multiple levels of the hierarchy
25# multipane: Midnight-commander like multipane view showing all tabs next
26# to each other
27set viewmode miller
28#set viewmode multipane
29
30# How many columns are there, and what are their relative widths?
31set column_ratios 1,3,4
32
33# Which files should be hidden? (regular expression)
34set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
35
36# Show hidden files? You can toggle this by typing 'zh'
37set show_hidden false
38
39# Ask for a confirmation when running the "delete" command?
40# Valid values are "always", "never", "multiple" (default)
41# With "multiple", ranger will ask only if you delete multiple files at once.
42set confirm_on_delete multiple
43
44# Use non-default path for file preview script?
45# ranger ships with scope.sh, a script that calls external programs (see
46# README.md for dependencies) to preview images, archives, etc.
47#set preview_script ~/.config/ranger/scope.sh
48
49# Use the external preview script or display simple plain text or image previews?
50set use_preview_script true
51
52# Automatically count files in the directory, even before entering them?
53set automatically_count_files true
54
55# Open all images in this directory when running certain image viewers
56# like feh or sxiv? You can still open selected files by marking them.
57set open_all_images true
58
59# Be aware of version control systems and display information.
60set vcs_aware false
61
62# State of the four backends git, hg, bzr, svn. The possible states are
63# disabled, local (only show local info), enabled (show local and remote
64# information).
65set vcs_backend_git enabled
66set vcs_backend_hg disabled
67set vcs_backend_bzr disabled
68set vcs_backend_svn disabled
69
70# Truncate the long commit messages to this length when shown in the statusbar.
71set vcs_msg_length 50
72
73# Use one of the supported image preview protocols
74set preview_images true
75
76# Set the preview image method. Supported methods:
77#
78# * w3m (default):
79# Preview images in full color with the external command "w3mimgpreview"?
80# This requires the console web browser "w3m" and a supported terminal.
81# It has been successfully tested with "xterm" and "urxvt" without tmux.
82#
83# * iterm2:
84# Preview images in full color using iTerm2 image previews
85# (http://iterm2.com/images.html). This requires using iTerm2 compiled
86# with image preview support.
87#
88# This feature relies on the dimensions of the terminal's font. By default, a
89# width of 8 and height of 11 are used. To use other values, set the options
90# iterm2_font_width and iterm2_font_height to the desired values.
91#
92# * terminology:
93# Previews images in full color in the terminology terminal emulator.
94# Supports a wide variety of formats, even vector graphics like svg.
95#
96# * urxvt:
97# Preview images in full color using urxvt image backgrounds. This
98# requires using urxvt compiled with pixbuf support.
99#
100# * urxvt-full:
101# The same as urxvt but utilizing not only the preview pane but the
102# whole terminal window.
103#
104# * kitty:
105# Preview images in full color using kitty image protocol.
106# Requires python PIL or pillow library.
107# If ranger does not share the local filesystem with kitty
108# the transfer method is changed to encode the whole image;
109# while slower, this allows remote previews,
110# for example during an ssh session.
111# Tmux is unsupported.
112#
113# * ueberzug:
114# Preview images in full color with the external command "ueberzug".
115# Images are shown by using a child window.
116# Only for users who run X11 in GNU/Linux.
117# set preview_images_method w3m
118set preview_images_method ueberzug
119
120# Delay in seconds before displaying an image with the w3m method.
121# Increase it in case of experiencing display corruption.
122set w3m_delay 0.02
123
124# Manually adjust the w3mimg offset when using a terminal which needs this
125set w3m_offset 0
126
127# Default iTerm2 font size (see: preview_images_method: iterm2)
128set iterm2_font_width 8
129set iterm2_font_height 11
130
131# Use a unicode "..." character to mark cut-off filenames?
132set unicode_ellipsis false
133
134# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
135# Requires the python-bidi pip package
136set bidi_support false
137
138# Show dotfiles in the bookmark preview box?
139set show_hidden_bookmarks true
140
141# Which colorscheme to use? These colorschemes are available by default:
142# default, jungle, snow, solarized
143set colorscheme default
144
145# Preview files on the rightmost column?
146# And collapse (shrink) the last column if there is nothing to preview?
147set preview_files true
148set preview_directories true
149set collapse_preview true
150
151# Wrap long lines in plain text previews?
152set wrap_plaintext_previews false
153
154# Save the console history on exit?
155set save_console_history true
156
157# Draw the status bar on top of the browser window (default: bottom)
158set status_bar_on_top false
159
160# Draw a progress bar in the status bar which displays the average state of all
161# currently running tasks which support progress bars?
162set draw_progress_bar_in_status_bar true
163
164# Draw borders around columns? (separators, outline, both, or none)
165# Separators are vertical lines between columns.
166# Outline draws a box around all the columns.
167# Both combines the two.
168set draw_borders none
169
170# Display the directory name in tabs?
171set dirname_in_tabs false
172
173# Enable the mouse support?
174set mouse_enabled true
175
176# Display the file size in the main column or status bar?
177set display_size_in_main_column true
178set display_size_in_status_bar true
179
180# Display the free disk space in the status bar?
181set display_free_space_in_status_bar true
182
183# Display files tags in all columns or only in main column?
184set display_tags_in_all_columns true
185
186# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
187set update_title false
188
189# Set the tmux/screen window-name to "ranger"?
190set update_tmux_title true
191
192# Shorten the title if it gets long? The number defines how many
193# directories are displayed at once, 0 turns off this feature.
194set shorten_title 3
195
196# Show hostname in titlebar?
197set hostname_in_titlebar true
198
199# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
200set tilde_in_titlebar false
201
202# How many directory-changes or console-commands should be kept in history?
203set max_history_size 20
204set max_console_history_size 50
205
206# Try to keep so much space between the top/bottom border when scrolling:
207set scroll_offset 8
208
209# Flush the input after each key hit? (Noticeable when ranger lags)
210set flushinput true
211
212# Padding on the right when there's no preview?
213# This allows you to click into the space to run the file.
214set padding_right true
215
216# Save bookmarks (used with mX and `X) instantly?
217# This helps to synchronize bookmarks between multiple ranger
218# instances but leads to *slight* performance loss.
219# When false, bookmarks are saved when ranger is exited.
220set autosave_bookmarks true
221
222# Save the "`" bookmark to disk. This can be used to switch to the last
223# directory by typing "``".
224set save_backtick_bookmark true
225
226# You can display the "real" cumulative size of directories by using the
227# command :get_cumulative_size or typing "dc". The size is expensive to
228# calculate and will not be updated automatically. You can choose
229# to update it automatically though by turning on this option:
230set autoupdate_cumulative_size false
231
232# Turning this on makes sense for screen readers:
233set show_cursor false
234
235# One of: size, natural, basename, atime, ctime, mtime, type, random
236set sort natural
237
238# Additional sorting options
239set sort_reverse false
240set sort_case_insensitive true
241set sort_directories_first true
242set sort_unicode false
243
244# Enable this if key combinations with the Alt Key don't work for you.
245# (Especially on xterm)
246set xterm_alt_key false
247
248# Whether to include bookmarks in cd command
249set cd_bookmarks true
250
251# Changes case sensitivity for the cd command tab completion
252set cd_tab_case sensitive
253
254# Use fuzzy tab completion with the "cd" command. For example,
255# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
256set cd_tab_fuzzy false
257
258# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
259# disable this feature.
260set preview_max_size 0
261
262# The key hint lists up to this size have their sublists expanded.
263# Otherwise the submaps are replaced with "...".
264set hint_collapse_threshold 10
265
266# Add the highlighted file to the path in the titlebar
267set show_selection_in_titlebar true
268
269# The delay that ranger idly waits for user input, in milliseconds, with a
270# resolution of 100ms. Lower delay reduces lag between directory updates but
271# increases CPU load.
272set idle_delay 2000
273
274# When the metadata manager module looks for metadata, should it only look for
275# a ".metadata.json" file in the current directory, or do a deep search and
276# check all directories above the current one as well?
277set metadata_deep_search false
278
279# Clear all existing filters when leaving a directory
280set clear_filters_on_dir_change false
281
282# Disable displaying line numbers in main column.
283# Possible values: false, absolute, relative.
284set line_numbers false
285
286# When line_numbers=relative show the absolute line number in the
287# current line.
288set relative_current_zero false
289
290# Start line numbers from 1 instead of 0
291set one_indexed false
292
293# Save tabs on exit
294set save_tabs_on_exit false
295
296# Enable scroll wrapping - moving down while on the last item will wrap around to
297# the top and vice versa.
298set wrap_scroll false
299
300# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
301# directories, files and symlinks respectively.
302set global_inode_type_filter
303
304# This setting allows to freeze the list of files to save I/O bandwidth. It
305# should be 'false' during start-up, but you can toggle it by pressing F.
306set freeze_files false
307
308# Print file sizes in bytes instead of the default human-readable format.
309set size_in_bytes false
310
311# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
312# give a warning when you nest ranger in a subshell started by ranger.
313# Special value "error" makes the warning more visible.
314set nested_ranger_warning true
315
316# ===================================================================
317# == Local Options
318# ===================================================================
319# You can set local options that only affect a single directory.
320
321# Examples:
322# setlocal path=~/downloads sort mtime
323
324# ===================================================================
325# == Command Aliases in the Console
326# ===================================================================
327
328alias e edit
329alias q quit
330alias q! quit!
331alias qa quitall
332alias qa! quitall!
333alias qall quitall
334alias qall! quitall!
335alias setl setlocal
336
337alias filter scout -prts
338alias find scout -aets
339alias mark scout -mr
340alias unmark scout -Mr
341alias search scout -rs
342alias search_inc scout -rts
343alias travel scout -aefklst
344
345# ===================================================================
346# == Define keys for the browser
347# ===================================================================
348
349# Basic
350map Q quitall
351map q quit
352copymap q ZZ ZQ
353
354map R reload_cwd
355map F set freeze_files!
356map <C-r> reset
357map <C-l> redraw_window
358map <C-c> abort
359map <esc> change_mode normal
360map ~ set viewmode!
361
362map i display_file
363map <A-j> scroll_preview 1
364map <A-k> scroll_preview -1
365map ? help
366map W display_log
367map w taskview_open
368map S shell $SHELL
369
370map : console
371map ; console
372map ! console shell%space
373map @ console -p6 shell %%s
374map # console shell -p%space
375map s console shell%space
376map r chain draw_possible_programs; console open_with%space
377map f console find%space
378map cd console cd%space
379
380map <C-p> chain console; eval fm.ui.console.history_move(-1)
381
382# Change the line mode
383map Mf linemode filename
384map Mi linemode fileinfo
385map Mm linemode mtime
386map Mh linemode humanreadablemtime
387map Mp linemode permissions
388map Ms linemode sizemtime
389map MH linemode sizehumanreadablemtime
390map Mt linemode metatitle
391
392# Tagging / Marking
393map t tag_toggle
394map ut tag_remove
395map "<any> tag_toggle tag=%any
396map <Space> mark_files toggle=True
397map v mark_files all=True toggle=True
398map uv mark_files all=True val=False
399map V toggle_visual_mode
400map uV toggle_visual_mode reverse=True
401
402# For the nostalgics: Midnight Commander bindings
403map <F1> help
404map <F2> rename_append
405map <F3> display_file
406map <F4> edit
407map <F5> copy
408map <F6> cut
409map <F7> console mkdir%space
410map <F8> console delete
411#map <F8> console trash
412map <F10> exit
413
414# In case you work on a keyboard with dvorak layout
415map <UP> move up=1
416map <DOWN> move down=1
417map <LEFT> move left=1
418map <RIGHT> move right=1
419map <HOME> move to=0
420map <END> move to=-1
421map <PAGEDOWN> move down=1 pages=True
422map <PAGEUP> move up=1 pages=True
423map <CR> move right=1
424#map <DELETE> console delete
425map <INSERT> console touch%space
426
427# VIM-like
428copymap <UP> k
429copymap <DOWN> j
430copymap <LEFT> h
431copymap <RIGHT> l
432copymap <HOME> gg
433copymap <END> G
434copymap <PAGEDOWN> <C-F>
435copymap <PAGEUP> <C-B>
436
437map J move down=0.5 pages=True
438map K move up=0.5 pages=True
439copymap J <C-D>
440copymap K <C-U>
441
442# Jumping around
443map H history_go -1
444map L history_go 1
445map ] move_parent 1
446map [ move_parent -1
447map } traverse
448map { traverse_backwards
449map ) jump_non
450
451map gh cd ~
452map ge cd /etc
453map gu cd /usr
454map gd cd /dev
455map gl cd -r .
456map gL cd -r %f
457map go cd /opt
458map gv cd /var
459map gm cd /media
460map gi eval fm.cd('/run/media/' + os.getenv('USER'))
461map gM cd /mnt
462map gs cd /srv
463map gp cd /tmp
464map gr cd /
465map gR eval fm.cd(ranger.RANGERDIR)
466map g/ cd /
467map g? cd /usr/share/doc/ranger
468
469# External Programs
470map E edit
471map du shell -p du --max-depth=1 -h --apparent-size
472map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
473map yp yank path
474map yd yank dir
475map yn yank name
476map y. yank name_without_extension
477
478# Filesystem Operations
479map = chmod
480
481map cw console rename%space
482map a rename_append
483map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
484map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
485
486map pp paste
487map po paste overwrite=True
488map pP paste append=True
489map pO paste overwrite=True append=True
490map pl paste_symlink relative=False
491map pL paste_symlink relative=True
492map phl paste_hardlink
493map pht paste_hardlinked_subtree
494map pd console paste dest=
495map p`<any> paste dest=%any_path
496map p'<any> paste dest=%any_path
497
498map dD console delete
499map dT console trash
500
501map dd cut
502map ud uncut
503map da cut mode=add
504map dr cut mode=remove
505map dt cut mode=toggle
506
507map yy copy
508map uy uncut
509map ya copy mode=add
510map yr copy mode=remove
511map yt copy mode=toggle
512
513# Temporary workarounds
514map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
515map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
516map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
517map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
518map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
519map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
520map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
521map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
522
523# Searching
524map / console search%space
525map n search_next
526map N search_next forward=False
527map ct search_next order=tag
528map cs search_next order=size
529map ci search_next order=mimetype
530map cc search_next order=ctime
531map cm search_next order=mtime
532map ca search_next order=atime
533
534# Tabs
535map <C-n> tab_new
536map <C-w> tab_close
537map <TAB> tab_move 1
538map <S-TAB> tab_move -1
539map <A-Right> tab_move 1
540map <A-Left> tab_move -1
541map gt tab_move 1
542map gT tab_move -1
543map gn tab_new
544map gc tab_close
545map uq tab_restore
546map <a-1> tab_open 1
547map <a-2> tab_open 2
548map <a-3> tab_open 3
549map <a-4> tab_open 4
550map <a-5> tab_open 5
551map <a-6> tab_open 6
552map <a-7> tab_open 7
553map <a-8> tab_open 8
554map <a-9> tab_open 9
555map <a-r> tab_shift 1
556map <a-l> tab_shift -1
557
558# Sorting
559map or set sort_reverse!
560map oz set sort=random
561map os chain set sort=size; set sort_reverse=False
562map ob chain set sort=basename; set sort_reverse=False
563map on chain set sort=natural; set sort_reverse=False
564map om chain set sort=mtime; set sort_reverse=False
565map oc chain set sort=ctime; set sort_reverse=False
566map oa chain set sort=atime; set sort_reverse=False
567map ot chain set sort=type; set sort_reverse=False
568map oe chain set sort=extension; set sort_reverse=False
569
570map oS chain set sort=size; set sort_reverse=True
571map oB chain set sort=basename; set sort_reverse=True
572map oN chain set sort=natural; set sort_reverse=True
573map oM chain set sort=mtime; set sort_reverse=True
574map oC chain set sort=ctime; set sort_reverse=True
575map oA chain set sort=atime; set sort_reverse=True
576map oT chain set sort=type; set sort_reverse=True
577map oE chain set sort=extension; set sort_reverse=True
578
579map dc get_cumulative_size
580
581# Settings
582map zc set collapse_preview!
583map zd set sort_directories_first!
584map zh set show_hidden!
585map <C-h> set show_hidden!
586copymap <C-h> <backspace>
587copymap <backspace> <backspace2>
588map zI set flushinput!
589map zi set preview_images!
590map zm set mouse_enabled!
591map zp set preview_files!
592map zP set preview_directories!
593map zs set sort_case_insensitive!
594map zu set autoupdate_cumulative_size!
595map zv set use_preview_script!
596map zf console filter%space
597copymap zf zz
598
599# Filter stack
600map .d filter_stack add type d
601map .f filter_stack add type f
602map .l filter_stack add type l
603map .m console filter_stack add mime%space
604map .n console filter_stack add name%space
605map .# console filter_stack add hash%space
606map ." filter_stack add duplicate
607map .' filter_stack add unique
608map .| filter_stack add or
609map .& filter_stack add and
610map .! filter_stack add not
611map .r filter_stack rotate
612map .c filter_stack clear
613map .* filter_stack decompose
614map .p filter_stack pop
615map .. filter_stack show
616
617# Bookmarks
618map `<any> enter_bookmark %any
619map '<any> enter_bookmark %any
620map m<any> set_bookmark %any
621map um<any> unset_bookmark %any
622
623map m<bg> draw_bookmarks
624copymap m<bg> um<bg> `<bg> '<bg>
625
626# Generate all the chmod bindings with some python help:
627eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
628eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
629eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
630eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
631eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
632
633eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
634eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
635eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
636eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
637eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
638
639# ===================================================================
640# == Define keys for the console
641# ===================================================================
642# Note: Unmapped keys are passed directly to the console.
643
644# Basic
645cmap <tab> eval fm.ui.console.tab()
646cmap <s-tab> eval fm.ui.console.tab(-1)
647cmap <ESC> eval fm.ui.console.close()
648cmap <CR> eval fm.ui.console.execute()
649cmap <C-l> redraw_window
650
651copycmap <ESC> <C-c>
652copycmap <CR> <C-j>
653
654# Move around
655cmap <up> eval fm.ui.console.history_move(-1)
656cmap <down> eval fm.ui.console.history_move(1)
657cmap <left> eval fm.ui.console.move(left=1)
658cmap <right> eval fm.ui.console.move(right=1)
659cmap <home> eval fm.ui.console.move(right=0, absolute=True)
660cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
661cmap <a-b> eval fm.ui.console.move_word(left=1)
662cmap <a-f> eval fm.ui.console.move_word(right=1)
663
664copycmap <a-b> <a-left>
665copycmap <a-f> <a-right>
666
667# Line Editing
668cmap <backspace> eval fm.ui.console.delete(-1)
669cmap <delete> eval fm.ui.console.delete(0)
670cmap <C-w> eval fm.ui.console.delete_word()
671cmap <A-d> eval fm.ui.console.delete_word(backward=False)
672cmap <C-k> eval fm.ui.console.delete_rest(1)
673cmap <C-u> eval fm.ui.console.delete_rest(-1)
674cmap <C-y> eval fm.ui.console.paste()
675
676# And of course the emacs way
677copycmap <ESC> <C-g>
678copycmap <up> <C-p>
679copycmap <down> <C-n>
680copycmap <left> <C-b>
681copycmap <right> <C-f>
682copycmap <home> <C-a>
683copycmap <end> <C-e>
684copycmap <delete> <C-d>
685copycmap <backspace> <C-h>
686
687# Note: There are multiple ways to express backspaces. <backspace> (code 263)
688# and <backspace2> (code 127). To be sure, use both.
689copycmap <backspace> <backspace2>
690
691# This special expression allows typing in numerals:
692cmap <allow_quantifiers> false
693
694# ===================================================================
695# == Pager Keybindings
696# ===================================================================
697
698# Movement
699pmap <down> pager_move down=1
700pmap <up> pager_move up=1
701pmap <left> pager_move left=4
702pmap <right> pager_move right=4
703pmap <home> pager_move to=0
704pmap <end> pager_move to=-1
705pmap <pagedown> pager_move down=1.0 pages=True
706pmap <pageup> pager_move up=1.0 pages=True
707pmap <C-d> pager_move down=0.5 pages=True
708pmap <C-u> pager_move up=0.5 pages=True
709
710copypmap <UP> k <C-p>
711copypmap <DOWN> j <C-n> <CR>
712copypmap <LEFT> h
713copypmap <RIGHT> l
714copypmap <HOME> g
715copypmap <END> G
716copypmap <C-d> d
717copypmap <C-u> u
718copypmap <PAGEDOWN> n f <C-F> <Space>
719copypmap <PAGEUP> p b <C-B>
720
721# Basic
722pmap <C-l> redraw_window
723pmap <ESC> pager_close
724copypmap <ESC> q Q i <F3>
725pmap E edit_file
726
727# ===================================================================
728# == Taskview Keybindings
729# ===================================================================
730
731# Movement
732tmap <up> taskview_move up=1
733tmap <down> taskview_move down=1
734tmap <home> taskview_move to=0
735tmap <end> taskview_move to=-1
736tmap <pagedown> taskview_move down=1.0 pages=True
737tmap <pageup> taskview_move up=1.0 pages=True
738tmap <C-d> taskview_move down=0.5 pages=True
739tmap <C-u> taskview_move up=0.5 pages=True
740
741copytmap <UP> k <C-p>
742copytmap <DOWN> j <C-n> <CR>
743copytmap <HOME> g
744copytmap <END> G
745copytmap <C-u> u
746copytmap <PAGEDOWN> n f <C-F> <Space>
747copytmap <PAGEUP> p b <C-B>
748
749# Changing priority and deleting tasks
750tmap J eval -q fm.ui.taskview.task_move(-1)
751tmap K eval -q fm.ui.taskview.task_move(0)
752tmap dd eval -q fm.ui.taskview.task_remove()
753tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
754tmap <pageup> eval -q fm.ui.taskview.task_move(0)
755tmap <delete> eval -q fm.ui.taskview.task_remove()
756
757# Basic
758tmap <C-l> redraw_window
759tmap <ESC> taskview_close
760copytmap <ESC> q Q w <C-c>
diff --git a/Guix.org b/Guix.org
deleted file mode 100644
index e2c9ef8..0000000
--- a/Guix.org
+++ /dev/null
@@ -1,276 +0,0 @@
1#+TITLE: Guix Configuration file
2
3* Resources
4[[https://guix.gnu.org/manual/en/html_node/index.html][guix]]
5[[https://github.com/daviwil/dotfiles/blob/master/Systems.org][daviwil/dotfiles]]
6
7* Managing profiles
8Source: [[https://github.com/daviwil/dotfiles/blob/master/Systems.org#profile-management][daviwil/dotfiles]]
9** Activate profiles
10
11#+begin_src sh :tangle bin/activate-profiles :shebang #!/bin/sh
12 # Source: https://github.com/daviwil/dotfiles/blob/master/Systems.org#profile-management
13
14 GREEN='\033[1;32m'
15 RED='\033[1;30m'
16 NC='\033[0m'
17 GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
18
19 profiles=$*
20 if [[ $# -eq 0 ]]; then
21 profiles="$HOME/.config/guix/manifests/*.scm";
22 fi
23
24 for profile in $profiles; do
25 # Remove the path and file extension, if any
26 profileName=$(basename $profile)
27 profileName="${profileName%.*}"
28 profilePath="$GUIX_EXTRA_PROFILES/$profileName"
29 manifestPath=$HOME/.config/guix/manifests/$profileName.scm
30
31 if [ -f $manifestPath ]; then
32 echo
33 echo -e "${GREEN}Activating profile:" $manifestPath "${NC}"
34 echo
35
36 mkdir -p $profilePath
37 guix package --manifest=$manifestPath --profile="$profilePath/$profileName"
38
39 # Source the new profile
40 GUIX_PROFILE="$profilePath/$profileName"
41 if [ -f $GUIX_PROFILE/etc/profile ]; then
42 . "$GUIX_PROFILE"/etc/profile
43 else
44 echo -e "${RED}Couldn't find profile:" $GUIX_PROFILE/etc/profile "${NC}"
45 fi
46 else
47 echo "No profile found at path" $profilePath
48 fi
49 done
50
51#+end_src
52
53** Update profiles
54
55#+begin_src sh :tangle bin/update-profiles :shebang #!/bin/sh
56 # Source: https://github.com/daviwil/dotfiles/blob/master/Systems.org#profile-management
57
58 GREEN='\033[1;32m'
59 NC='\033[0m'
60 GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
61
62 profiles=$*
63 if [[ $# -eq 0 ]]; then
64 profiles="$GUIX_EXTRA_PROFILES/*";
65 fi
66
67 for profile in $profiles; do
68 profileName=$(basename $profile)
69 profilePath=$GUIX_EXTRA_PROFILES/$profileName
70
71 echo
72 echo -e "${GREEN}Updating profile:" $profilePath "${NC}"
73 echo
74
75 guix package --profile="$profilePath/$profileName" --manifest="$HOME/.config/guix/manifests/$profileName.scm"
76 done
77
78#+end_src
79
80* Channels
81#+begin_src scheme :tangle .config/guix/channels.scm
82 (list
83 (channel
84 (name 'guix)
85 (url "https://git.savannah.gnu.org/git/guix.git")
86 ;; (url "file:///home/daviwil/Projects/Code/guix"))
87 (introduction
88 (make-channel-introduction
89 "9edb3f66fd807b096b48283debdcddccfea34bad"
90 (openpgp-fingerprint
91 "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
92 (channel
93 (name 'nonguix)
94 (url "https://gitlab.com/nonguix/nonguix")
95 ;; Enable signature verification:
96 (introduction
97 (make-channel-introduction
98 "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
99 (openpgp-fingerprint
100 "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
101#+end_src
102
103* Systems
104** Base
105
106#+begin_src scheme :tangle .config/guix/systems/base-system.scm
107
108 (define-module (base-system)
109 #:use-module (gnu)
110 #:use-module (gnu services pm)
111 #:use-module (gnu services docker)
112 #:use-module (gnu services networking)
113 #:use-module (gnu services virtualization) ; todo make
114 #:use-module (gnu packages vim)
115 #:use-module (gnu services desktop)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages emacs)
118 #:use-module (gnu packages file-systems)
119 #:use-module (gnu packages linux)
120 #:use-module (gnu packages audio)
121 #:use-module (gnu packages pulseaudio)
122 #:use-module (gnu packages version-control)
123 #:use-module (gnu packages package-management))
124 ; #:use-module (nongnu packages linux)
125 ; #:use-module (nongnu system linux-initrd))
126
127 (use-service-modules ssh)
128 (use-package-modules certs)
129 (use-service-modules desktop xorg)
130#+end_src
131
132*Packages*
133 #+begin_src scheme :noweb-ref packages :noweb yes
134
135 ;; Packages
136 (packages (append (list
137 git
138 exfat-utils
139 fuse-exfat
140 stow
141 vim
142 emacs
143 bluez
144 bluez-alsa
145 pulseaudio
146 tlp
147 ncurses
148 xf86-input-libinput
149 nss-certs) ;; For https connection
150 %base-packages))
151
152 #+end_src
153
154 *Services*
155 #+begin_src scheme :noweb-ref services :noweb yes
156
157 ;; Services
158 (services
159 (append
160 (list
161
162 (service elogind-service-type)
163 (service openssh-service-type)
164 (service network-manager-service-type)
165 (service slim-service-type)
166 (service tlp-service-type
167 (tlp-configuration
168 (cpu-boost-on-ac? #t)
169 (wifi-pwr-on-bat? #t)))
170 (bluetooth-service #:auto-enable? #t)
171 (service docker-service-type)
172 (service wpa-supplicant-service-type))
173 (service libvirt-service-type
174 (libvirt-configuration
175 (unix-sock-group "libvirt")
176 (tls-port "16555")))
177 (set-xorg-configuration
178 (xorg-configuration
179 (keyboard-layout keyboard-layout)))
180
181 %base-services))
182
183 #+end_src
184
185 *Users Accounts*
186 #+begin_src scheme :noweb-ref users :noweb yes
187
188 ;; Users
189 (users (cons (user-account
190 (name "jakub")
191 (comment "Jakub Dlugosz")
192 (group "users")
193 (home-directory "/home/jakub")
194 (supplementary-groups '(
195 "wheel"
196 "netdev"
197 "kvm"
198 "tty"
199 "input"
200 "docker"
201 "lp"
202 "audio"
203 "video")))
204 %base-user-accounts))
205
206#+end_src
207
208*Base operating system*
209#+begin_src scheme :tangle .config/guix/systems/base-system.scm :noweb yes
210
211 (define-public base-operating-system
212 (operating-system
213 (host-name "base")
214 (timezone "Europe/Warsaw")
215 (locale "en_US.utf8")
216 (keyboard-layout (keyboard-layout "pl"))
217
218 ;; Use non-free Linux and firmware
219 ;; (kernel linux)
220 ;; (firmware (list linux-firmware))
221 ;; (initrd microcode-initrd)
222
223 (bootloader (bootloader-configuration
224 (bootloader grub-efi-bootloader)
225 (targets "/boot/efi")))
226 ;; (keyboard-layout keyboard-layout)))
227
228 ;; Guix doesn't like it when there isn't a file-systems
229 ;; entry, so add one that is meant to be overridden
230 (file-systems (cons*
231 (file-system
232 (mount-point "/tmp")
233 (device "none")
234 (type "tmpfs")
235 (check? #f))
236 %base-file-systems))
237 <<users>>
238 <<packages>>
239 <<services>>
240 ;; Allow resolution of '.local' host names with mDNS
241 (name-service-switch %mdns-host-lookup-nss)))
242
243#+end_src
244
245** Systems
246*** Viking
247
248#+begin_src scheme :tangle .config/guix/systems/viking.scm
249 (define-module (viking)
250 #:use-module (base-system)
251 #:use-module (gnu))
252
253 (operating-system
254 (inherit base-operating-system)
255 (host-name "viking")
256
257 (bootloader
258 (bootloader-configuration
259 (bootloader grub-bootloader)
260 (target "/dev/sda")))
261
262 (mapped-devices
263 (list (mapped-device
264 (source
265 (uuid "75a1ebd7-13c2-442f-80ff-1b5e59522e29"))
266 (target "cryptroot")
267 (type luks-device-mapping))))
268
269 (file-systems
270 (cons* (file-system
271 (mount-point "/")
272 (device "/dev/mapper/cryptroot")
273 (type "ext4")
274 (dependencies mapped-devices))
275 %base-file-systems)))
276#+end_src
diff --git a/bin/activate-profiles b/bin/activate-profiles
deleted file mode 100755
index a4373cf..0000000
--- a/bin/activate-profiles
+++ /dev/null
@@ -1,39 +0,0 @@
1#!/bin/sh
2# Source: https://github.com/daviwil/dotfiles/blob/master/Systems.org#profile-management
3
4GREEN='\033[1;32m'
5RED='\033[1;30m'
6NC='\033[0m'
7GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
8
9profiles=$*
10if [[ $# -eq 0 ]]; then
11 profiles="$HOME/.config/guix/manifests/*.scm";
12fi
13
14for profile in $profiles; do
15 # Remove the path and file extension, if any
16 profileName=$(basename $profile)
17 profileName="${profileName%.*}"
18 profilePath="$GUIX_EXTRA_PROFILES/$profileName"
19 manifestPath=$HOME/.config/guix/manifests/$profileName.scm
20
21 if [ -f $manifestPath ]; then
22 echo
23 echo -e "${GREEN}Activating profile:" $manifestPath "${NC}"
24 echo
25
26 mkdir -p $profilePath
27 guix package --manifest=$manifestPath --profile="$profilePath/$profileName"
28
29 # Source the new profile
30 GUIX_PROFILE="$profilePath/$profileName"
31 if [ -f $GUIX_PROFILE/etc/profile ]; then
32 . "$GUIX_PROFILE"/etc/profile
33 else
34 echo -e "${RED}Couldn't find profile:" $GUIX_PROFILE/etc/profile "${NC}"
35 fi
36 else
37 echo "No profile found at path" $profilePath
38 fi
39done
diff --git a/bin/update-profiles b/bin/update-profiles
deleted file mode 100755
index 81129ec..0000000
--- a/bin/update-profiles
+++ /dev/null
@@ -1,22 +0,0 @@
1#!/bin/sh
2# Source: https://github.com/daviwil/dotfiles/blob/master/Systems.org#profile-management
3
4GREEN='\033[1;32m'
5NC='\033[0m'
6GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
7
8profiles=$*
9if [[ $# -eq 0 ]]; then
10 profiles="$GUIX_EXTRA_PROFILES/*";
11fi
12
13for profile in $profiles; do
14 profileName=$(basename $profile)
15 profilePath=$GUIX_EXTRA_PROFILES/$profileName
16
17 echo
18 echo -e "${GREEN}Updating profile:" $profilePath "${NC}"
19 echo
20
21 guix package --profile="$profilePath/$profileName" --manifest="$HOME/.config/guix/manifests/$profileName.scm"
22done