diff options
| author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-15 14:03:46 +0200 |
|---|---|---|
| committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-15 14:03:46 +0200 |
| commit | e43f3c403ff49e87641bb6c745080760f272446f (patch) | |
| tree | c964d54e79c87ec466658e289e10303c861be5cd | |
| parent | e62c8a78ec0b8727d138fbe4144cf718b7da867d (diff) | |
| download | dotfiles-e43f3c403ff49e87641bb6c745080760f272446f.tar.gz dotfiles-e43f3c403ff49e87641bb6c745080760f272446f.zip | |
Update dotfiles
| -rw-r--r-- | .bash_profile | 3 | ||||
| -rw-r--r-- | .config/emacs/init.el | 50 | ||||
| -rw-r--r-- | .config/emacs/jd/jd-mu4e.el | 30 | ||||
| -rw-r--r-- | .config/guix/channels.scm | 19 | ||||
| -rw-r--r-- | .config/guix/manifests/desktop.scm | 22 | ||||
| -rw-r--r-- | .config/guix/manifests/emacs.scm | 77 | ||||
| -rw-r--r-- | .config/guix/systems/base-system.scm | 115 | ||||
| -rw-r--r-- | .config/guix/systems/viking.scm | 27 | ||||
| -rw-r--r-- | .config/ranger/rc.conf | 760 | ||||
| -rw-r--r-- | Guix.org | 276 | ||||
| -rwxr-xr-x | bin/activate-profiles | 39 | ||||
| -rwxr-xr-x | bin/update-profiles | 22 |
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 @@ | |||
| 1 | export PATH="$PATH:$HOME/.local/bin" | export PATH="$HOME/bin:$PATH" | |
| 2 | export 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 | ||
| 27 | set viewmode miller | ||
| 28 | #set viewmode multipane | ||
| 29 | |||
| 30 | # How many columns are there, and what are their relative widths? | ||
| 31 | set column_ratios 1,3,4 | ||
| 32 | |||
| 33 | # Which files should be hidden? (regular expression) | ||
| 34 | set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ | ||
| 35 | |||
| 36 | # Show hidden files? You can toggle this by typing 'zh' | ||
| 37 | set 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. | ||
| 42 | set 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? | ||
| 50 | set use_preview_script true | ||
| 51 | |||
| 52 | # Automatically count files in the directory, even before entering them? | ||
| 53 | set 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. | ||
| 57 | set open_all_images true | ||
| 58 | |||
| 59 | # Be aware of version control systems and display information. | ||
| 60 | set 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). | ||
| 65 | set vcs_backend_git enabled | ||
| 66 | set vcs_backend_hg disabled | ||
| 67 | set vcs_backend_bzr disabled | ||
| 68 | set vcs_backend_svn disabled | ||
| 69 | |||
| 70 | # Truncate the long commit messages to this length when shown in the statusbar. | ||
| 71 | set vcs_msg_length 50 | ||
| 72 | |||
| 73 | # Use one of the supported image preview protocols | ||
| 74 | set 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 | ||
| 118 | set 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. | ||
| 122 | set w3m_delay 0.02 | ||
| 123 | |||
| 124 | # Manually adjust the w3mimg offset when using a terminal which needs this | ||
| 125 | set w3m_offset 0 | ||
| 126 | |||
| 127 | # Default iTerm2 font size (see: preview_images_method: iterm2) | ||
| 128 | set iterm2_font_width 8 | ||
| 129 | set iterm2_font_height 11 | ||
| 130 | |||
| 131 | # Use a unicode "..." character to mark cut-off filenames? | ||
| 132 | set 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 | ||
| 136 | set bidi_support false | ||
| 137 | |||
| 138 | # Show dotfiles in the bookmark preview box? | ||
| 139 | set show_hidden_bookmarks true | ||
| 140 | |||
| 141 | # Which colorscheme to use? These colorschemes are available by default: | ||
| 142 | # default, jungle, snow, solarized | ||
| 143 | set colorscheme default | ||
| 144 | |||
| 145 | # Preview files on the rightmost column? | ||
| 146 | # And collapse (shrink) the last column if there is nothing to preview? | ||
| 147 | set preview_files true | ||
| 148 | set preview_directories true | ||
| 149 | set collapse_preview true | ||
| 150 | |||
| 151 | # Wrap long lines in plain text previews? | ||
| 152 | set wrap_plaintext_previews false | ||
| 153 | |||
| 154 | # Save the console history on exit? | ||
| 155 | set save_console_history true | ||
| 156 | |||
| 157 | # Draw the status bar on top of the browser window (default: bottom) | ||
| 158 | set 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? | ||
| 162 | set 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. | ||
| 168 | set draw_borders none | ||
| 169 | |||
| 170 | # Display the directory name in tabs? | ||
| 171 | set dirname_in_tabs false | ||
| 172 | |||
| 173 | # Enable the mouse support? | ||
| 174 | set mouse_enabled true | ||
| 175 | |||
| 176 | # Display the file size in the main column or status bar? | ||
| 177 | set display_size_in_main_column true | ||
| 178 | set display_size_in_status_bar true | ||
| 179 | |||
| 180 | # Display the free disk space in the status bar? | ||
| 181 | set display_free_space_in_status_bar true | ||
| 182 | |||
| 183 | # Display files tags in all columns or only in main column? | ||
| 184 | set display_tags_in_all_columns true | ||
| 185 | |||
| 186 | # Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME` | ||
| 187 | set update_title false | ||
| 188 | |||
| 189 | # Set the tmux/screen window-name to "ranger"? | ||
| 190 | set 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. | ||
| 194 | set shorten_title 3 | ||
| 195 | |||
| 196 | # Show hostname in titlebar? | ||
| 197 | set hostname_in_titlebar true | ||
| 198 | |||
| 199 | # Abbreviate $HOME with ~ in the titlebar (first line) of ranger? | ||
| 200 | set tilde_in_titlebar false | ||
| 201 | |||
| 202 | # How many directory-changes or console-commands should be kept in history? | ||
| 203 | set max_history_size 20 | ||
| 204 | set max_console_history_size 50 | ||
| 205 | |||
| 206 | # Try to keep so much space between the top/bottom border when scrolling: | ||
| 207 | set scroll_offset 8 | ||
| 208 | |||
| 209 | # Flush the input after each key hit? (Noticeable when ranger lags) | ||
| 210 | set 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. | ||
| 214 | set 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. | ||
| 220 | set autosave_bookmarks true | ||
| 221 | |||
| 222 | # Save the "`" bookmark to disk. This can be used to switch to the last | ||
| 223 | # directory by typing "``". | ||
| 224 | set 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: | ||
| 230 | set autoupdate_cumulative_size false | ||
| 231 | |||
| 232 | # Turning this on makes sense for screen readers: | ||
| 233 | set show_cursor false | ||
| 234 | |||
| 235 | # One of: size, natural, basename, atime, ctime, mtime, type, random | ||
| 236 | set sort natural | ||
| 237 | |||
| 238 | # Additional sorting options | ||
| 239 | set sort_reverse false | ||
| 240 | set sort_case_insensitive true | ||
| 241 | set sort_directories_first true | ||
| 242 | set sort_unicode false | ||
| 243 | |||
| 244 | # Enable this if key combinations with the Alt Key don't work for you. | ||
| 245 | # (Especially on xterm) | ||
| 246 | set xterm_alt_key false | ||
| 247 | |||
| 248 | # Whether to include bookmarks in cd command | ||
| 249 | set cd_bookmarks true | ||
| 250 | |||
| 251 | # Changes case sensitivity for the cd command tab completion | ||
| 252 | set 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". | ||
| 256 | set 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. | ||
| 260 | set 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 "...". | ||
| 264 | set hint_collapse_threshold 10 | ||
| 265 | |||
| 266 | # Add the highlighted file to the path in the titlebar | ||
| 267 | set 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. | ||
| 272 | set 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? | ||
| 277 | set metadata_deep_search false | ||
| 278 | |||
| 279 | # Clear all existing filters when leaving a directory | ||
| 280 | set clear_filters_on_dir_change false | ||
| 281 | |||
| 282 | # Disable displaying line numbers in main column. | ||
| 283 | # Possible values: false, absolute, relative. | ||
| 284 | set line_numbers false | ||
| 285 | |||
| 286 | # When line_numbers=relative show the absolute line number in the | ||
| 287 | # current line. | ||
| 288 | set relative_current_zero false | ||
| 289 | |||
| 290 | # Start line numbers from 1 instead of 0 | ||
| 291 | set one_indexed false | ||
| 292 | |||
| 293 | # Save tabs on exit | ||
| 294 | set 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. | ||
| 298 | set 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. | ||
| 302 | set 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. | ||
| 306 | set freeze_files false | ||
| 307 | |||
| 308 | # Print file sizes in bytes instead of the default human-readable format. | ||
| 309 | set 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. | ||
| 314 | set 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 | |||
| 328 | alias e edit | ||
| 329 | alias q quit | ||
| 330 | alias q! quit! | ||
| 331 | alias qa quitall | ||
| 332 | alias qa! quitall! | ||
| 333 | alias qall quitall | ||
| 334 | alias qall! quitall! | ||
| 335 | alias setl setlocal | ||
| 336 | |||
| 337 | alias filter scout -prts | ||
| 338 | alias find scout -aets | ||
| 339 | alias mark scout -mr | ||
| 340 | alias unmark scout -Mr | ||
| 341 | alias search scout -rs | ||
| 342 | alias search_inc scout -rts | ||
| 343 | alias travel scout -aefklst | ||
| 344 | |||
| 345 | # =================================================================== | ||
| 346 | # == Define keys for the browser | ||
| 347 | # =================================================================== | ||
| 348 | |||
| 349 | # Basic | ||
| 350 | map Q quitall | ||
| 351 | map q quit | ||
| 352 | copymap q ZZ ZQ | ||
| 353 | |||
| 354 | map R reload_cwd | ||
| 355 | map F set freeze_files! | ||
| 356 | map <C-r> reset | ||
| 357 | map <C-l> redraw_window | ||
| 358 | map <C-c> abort | ||
| 359 | map <esc> change_mode normal | ||
| 360 | map ~ set viewmode! | ||
| 361 | |||
| 362 | map i display_file | ||
| 363 | map <A-j> scroll_preview 1 | ||
| 364 | map <A-k> scroll_preview -1 | ||
| 365 | map ? help | ||
| 366 | map W display_log | ||
| 367 | map w taskview_open | ||
| 368 | map S shell $SHELL | ||
| 369 | |||
| 370 | map : console | ||
| 371 | map ; console | ||
| 372 | map ! console shell%space | ||
| 373 | map @ console -p6 shell %%s | ||
| 374 | map # console shell -p%space | ||
| 375 | map s console shell%space | ||
| 376 | map r chain draw_possible_programs; console open_with%space | ||
| 377 | map f console find%space | ||
| 378 | map cd console cd%space | ||
| 379 | |||
| 380 | map <C-p> chain console; eval fm.ui.console.history_move(-1) | ||
| 381 | |||
| 382 | # Change the line mode | ||
| 383 | map Mf linemode filename | ||
| 384 | map Mi linemode fileinfo | ||
| 385 | map Mm linemode mtime | ||
| 386 | map Mh linemode humanreadablemtime | ||
| 387 | map Mp linemode permissions | ||
| 388 | map Ms linemode sizemtime | ||
| 389 | map MH linemode sizehumanreadablemtime | ||
| 390 | map Mt linemode metatitle | ||
| 391 | |||
| 392 | # Tagging / Marking | ||
| 393 | map t tag_toggle | ||
| 394 | map ut tag_remove | ||
| 395 | map "<any> tag_toggle tag=%any | ||
| 396 | map <Space> mark_files toggle=True | ||
| 397 | map v mark_files all=True toggle=True | ||
| 398 | map uv mark_files all=True val=False | ||
| 399 | map V toggle_visual_mode | ||
| 400 | map uV toggle_visual_mode reverse=True | ||
| 401 | |||
| 402 | # For the nostalgics: Midnight Commander bindings | ||
| 403 | map <F1> help | ||
| 404 | map <F2> rename_append | ||
| 405 | map <F3> display_file | ||
| 406 | map <F4> edit | ||
| 407 | map <F5> copy | ||
| 408 | map <F6> cut | ||
| 409 | map <F7> console mkdir%space | ||
| 410 | map <F8> console delete | ||
| 411 | #map <F8> console trash | ||
| 412 | map <F10> exit | ||
| 413 | |||
| 414 | # In case you work on a keyboard with dvorak layout | ||
| 415 | map <UP> move up=1 | ||
| 416 | map <DOWN> move down=1 | ||
| 417 | map <LEFT> move left=1 | ||
| 418 | map <RIGHT> move right=1 | ||
| 419 | map <HOME> move to=0 | ||
| 420 | map <END> move to=-1 | ||
| 421 | map <PAGEDOWN> move down=1 pages=True | ||
| 422 | map <PAGEUP> move up=1 pages=True | ||
| 423 | map <CR> move right=1 | ||
| 424 | #map <DELETE> console delete | ||
| 425 | map <INSERT> console touch%space | ||
| 426 | |||
| 427 | # VIM-like | ||
| 428 | copymap <UP> k | ||
| 429 | copymap <DOWN> j | ||
| 430 | copymap <LEFT> h | ||
| 431 | copymap <RIGHT> l | ||
| 432 | copymap <HOME> gg | ||
| 433 | copymap <END> G | ||
| 434 | copymap <PAGEDOWN> <C-F> | ||
| 435 | copymap <PAGEUP> <C-B> | ||
| 436 | |||
| 437 | map J move down=0.5 pages=True | ||
| 438 | map K move up=0.5 pages=True | ||
| 439 | copymap J <C-D> | ||
| 440 | copymap K <C-U> | ||
| 441 | |||
| 442 | # Jumping around | ||
| 443 | map H history_go -1 | ||
| 444 | map L history_go 1 | ||
| 445 | map ] move_parent 1 | ||
| 446 | map [ move_parent -1 | ||
| 447 | map } traverse | ||
| 448 | map { traverse_backwards | ||
| 449 | map ) jump_non | ||
| 450 | |||
| 451 | map gh cd ~ | ||
| 452 | map ge cd /etc | ||
| 453 | map gu cd /usr | ||
| 454 | map gd cd /dev | ||
| 455 | map gl cd -r . | ||
| 456 | map gL cd -r %f | ||
| 457 | map go cd /opt | ||
| 458 | map gv cd /var | ||
| 459 | map gm cd /media | ||
| 460 | map gi eval fm.cd('/run/media/' + os.getenv('USER')) | ||
| 461 | map gM cd /mnt | ||
| 462 | map gs cd /srv | ||
| 463 | map gp cd /tmp | ||
| 464 | map gr cd / | ||
| 465 | map gR eval fm.cd(ranger.RANGERDIR) | ||
| 466 | map g/ cd / | ||
| 467 | map g? cd /usr/share/doc/ranger | ||
| 468 | |||
| 469 | # External Programs | ||
| 470 | map E edit | ||
| 471 | map du shell -p du --max-depth=1 -h --apparent-size | ||
| 472 | map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh | ||
| 473 | map yp yank path | ||
| 474 | map yd yank dir | ||
| 475 | map yn yank name | ||
| 476 | map y. yank name_without_extension | ||
| 477 | |||
| 478 | # Filesystem Operations | ||
| 479 | map = chmod | ||
| 480 | |||
| 481 | map cw console rename%space | ||
| 482 | map a rename_append | ||
| 483 | map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) | ||
| 484 | map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) | ||
| 485 | |||
| 486 | map pp paste | ||
| 487 | map po paste overwrite=True | ||
| 488 | map pP paste append=True | ||
| 489 | map pO paste overwrite=True append=True | ||
| 490 | map pl paste_symlink relative=False | ||
| 491 | map pL paste_symlink relative=True | ||
| 492 | map phl paste_hardlink | ||
| 493 | map pht paste_hardlinked_subtree | ||
| 494 | map pd console paste dest= | ||
| 495 | map p`<any> paste dest=%any_path | ||
| 496 | map p'<any> paste dest=%any_path | ||
| 497 | |||
| 498 | map dD console delete | ||
| 499 | map dT console trash | ||
| 500 | |||
| 501 | map dd cut | ||
| 502 | map ud uncut | ||
| 503 | map da cut mode=add | ||
| 504 | map dr cut mode=remove | ||
| 505 | map dt cut mode=toggle | ||
| 506 | |||
| 507 | map yy copy | ||
| 508 | map uy uncut | ||
| 509 | map ya copy mode=add | ||
| 510 | map yr copy mode=remove | ||
| 511 | map yt copy mode=toggle | ||
| 512 | |||
| 513 | # Temporary workarounds | ||
| 514 | map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) | ||
| 515 | map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) | ||
| 516 | map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) | ||
| 517 | map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) | ||
| 518 | map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) | ||
| 519 | map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) | ||
| 520 | map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) | ||
| 521 | map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) | ||
| 522 | |||
| 523 | # Searching | ||
| 524 | map / console search%space | ||
| 525 | map n search_next | ||
| 526 | map N search_next forward=False | ||
| 527 | map ct search_next order=tag | ||
| 528 | map cs search_next order=size | ||
| 529 | map ci search_next order=mimetype | ||
| 530 | map cc search_next order=ctime | ||
| 531 | map cm search_next order=mtime | ||
| 532 | map ca search_next order=atime | ||
| 533 | |||
| 534 | # Tabs | ||
| 535 | map <C-n> tab_new | ||
| 536 | map <C-w> tab_close | ||
| 537 | map <TAB> tab_move 1 | ||
| 538 | map <S-TAB> tab_move -1 | ||
| 539 | map <A-Right> tab_move 1 | ||
| 540 | map <A-Left> tab_move -1 | ||
| 541 | map gt tab_move 1 | ||
| 542 | map gT tab_move -1 | ||
| 543 | map gn tab_new | ||
| 544 | map gc tab_close | ||
| 545 | map uq tab_restore | ||
| 546 | map <a-1> tab_open 1 | ||
| 547 | map <a-2> tab_open 2 | ||
| 548 | map <a-3> tab_open 3 | ||
| 549 | map <a-4> tab_open 4 | ||
| 550 | map <a-5> tab_open 5 | ||
| 551 | map <a-6> tab_open 6 | ||
| 552 | map <a-7> tab_open 7 | ||
| 553 | map <a-8> tab_open 8 | ||
| 554 | map <a-9> tab_open 9 | ||
| 555 | map <a-r> tab_shift 1 | ||
| 556 | map <a-l> tab_shift -1 | ||
| 557 | |||
| 558 | # Sorting | ||
| 559 | map or set sort_reverse! | ||
| 560 | map oz set sort=random | ||
| 561 | map os chain set sort=size; set sort_reverse=False | ||
| 562 | map ob chain set sort=basename; set sort_reverse=False | ||
| 563 | map on chain set sort=natural; set sort_reverse=False | ||
| 564 | map om chain set sort=mtime; set sort_reverse=False | ||
| 565 | map oc chain set sort=ctime; set sort_reverse=False | ||
| 566 | map oa chain set sort=atime; set sort_reverse=False | ||
| 567 | map ot chain set sort=type; set sort_reverse=False | ||
| 568 | map oe chain set sort=extension; set sort_reverse=False | ||
| 569 | |||
| 570 | map oS chain set sort=size; set sort_reverse=True | ||
| 571 | map oB chain set sort=basename; set sort_reverse=True | ||
| 572 | map oN chain set sort=natural; set sort_reverse=True | ||
| 573 | map oM chain set sort=mtime; set sort_reverse=True | ||
| 574 | map oC chain set sort=ctime; set sort_reverse=True | ||
| 575 | map oA chain set sort=atime; set sort_reverse=True | ||
| 576 | map oT chain set sort=type; set sort_reverse=True | ||
| 577 | map oE chain set sort=extension; set sort_reverse=True | ||
| 578 | |||
| 579 | map dc get_cumulative_size | ||
| 580 | |||
| 581 | # Settings | ||
| 582 | map zc set collapse_preview! | ||
| 583 | map zd set sort_directories_first! | ||
| 584 | map zh set show_hidden! | ||
| 585 | map <C-h> set show_hidden! | ||
| 586 | copymap <C-h> <backspace> | ||
| 587 | copymap <backspace> <backspace2> | ||
| 588 | map zI set flushinput! | ||
| 589 | map zi set preview_images! | ||
| 590 | map zm set mouse_enabled! | ||
| 591 | map zp set preview_files! | ||
| 592 | map zP set preview_directories! | ||
| 593 | map zs set sort_case_insensitive! | ||
| 594 | map zu set autoupdate_cumulative_size! | ||
| 595 | map zv set use_preview_script! | ||
| 596 | map zf console filter%space | ||
| 597 | copymap zf zz | ||
| 598 | |||
| 599 | # Filter stack | ||
| 600 | map .d filter_stack add type d | ||
| 601 | map .f filter_stack add type f | ||
| 602 | map .l filter_stack add type l | ||
| 603 | map .m console filter_stack add mime%space | ||
| 604 | map .n console filter_stack add name%space | ||
| 605 | map .# console filter_stack add hash%space | ||
| 606 | map ." filter_stack add duplicate | ||
| 607 | map .' filter_stack add unique | ||
| 608 | map .| filter_stack add or | ||
| 609 | map .& filter_stack add and | ||
| 610 | map .! filter_stack add not | ||
| 611 | map .r filter_stack rotate | ||
| 612 | map .c filter_stack clear | ||
| 613 | map .* filter_stack decompose | ||
| 614 | map .p filter_stack pop | ||
| 615 | map .. filter_stack show | ||
| 616 | |||
| 617 | # Bookmarks | ||
| 618 | map `<any> enter_bookmark %any | ||
| 619 | map '<any> enter_bookmark %any | ||
| 620 | map m<any> set_bookmark %any | ||
| 621 | map um<any> unset_bookmark %any | ||
| 622 | |||
| 623 | map m<bg> draw_bookmarks | ||
| 624 | copymap m<bg> um<bg> `<bg> '<bg> | ||
| 625 | |||
| 626 | # Generate all the chmod bindings with some python help: | ||
| 627 | eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) | ||
| 628 | eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) | ||
| 629 | eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) | ||
| 630 | eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) | ||
| 631 | eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) | ||
| 632 | |||
| 633 | eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) | ||
| 634 | eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) | ||
| 635 | eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) | ||
| 636 | eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) | ||
| 637 | eval 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 | ||
| 645 | cmap <tab> eval fm.ui.console.tab() | ||
| 646 | cmap <s-tab> eval fm.ui.console.tab(-1) | ||
| 647 | cmap <ESC> eval fm.ui.console.close() | ||
| 648 | cmap <CR> eval fm.ui.console.execute() | ||
| 649 | cmap <C-l> redraw_window | ||
| 650 | |||
| 651 | copycmap <ESC> <C-c> | ||
| 652 | copycmap <CR> <C-j> | ||
| 653 | |||
| 654 | # Move around | ||
| 655 | cmap <up> eval fm.ui.console.history_move(-1) | ||
| 656 | cmap <down> eval fm.ui.console.history_move(1) | ||
| 657 | cmap <left> eval fm.ui.console.move(left=1) | ||
| 658 | cmap <right> eval fm.ui.console.move(right=1) | ||
| 659 | cmap <home> eval fm.ui.console.move(right=0, absolute=True) | ||
| 660 | cmap <end> eval fm.ui.console.move(right=-1, absolute=True) | ||
| 661 | cmap <a-b> eval fm.ui.console.move_word(left=1) | ||
| 662 | cmap <a-f> eval fm.ui.console.move_word(right=1) | ||
| 663 | |||
| 664 | copycmap <a-b> <a-left> | ||
| 665 | copycmap <a-f> <a-right> | ||
| 666 | |||
| 667 | # Line Editing | ||
| 668 | cmap <backspace> eval fm.ui.console.delete(-1) | ||
| 669 | cmap <delete> eval fm.ui.console.delete(0) | ||
| 670 | cmap <C-w> eval fm.ui.console.delete_word() | ||
| 671 | cmap <A-d> eval fm.ui.console.delete_word(backward=False) | ||
| 672 | cmap <C-k> eval fm.ui.console.delete_rest(1) | ||
| 673 | cmap <C-u> eval fm.ui.console.delete_rest(-1) | ||
| 674 | cmap <C-y> eval fm.ui.console.paste() | ||
| 675 | |||
| 676 | # And of course the emacs way | ||
| 677 | copycmap <ESC> <C-g> | ||
| 678 | copycmap <up> <C-p> | ||
| 679 | copycmap <down> <C-n> | ||
| 680 | copycmap <left> <C-b> | ||
| 681 | copycmap <right> <C-f> | ||
| 682 | copycmap <home> <C-a> | ||
| 683 | copycmap <end> <C-e> | ||
| 684 | copycmap <delete> <C-d> | ||
| 685 | copycmap <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. | ||
| 689 | copycmap <backspace> <backspace2> | ||
| 690 | |||
| 691 | # This special expression allows typing in numerals: | ||
| 692 | cmap <allow_quantifiers> false | ||
| 693 | |||
| 694 | # =================================================================== | ||
| 695 | # == Pager Keybindings | ||
| 696 | # =================================================================== | ||
| 697 | |||
| 698 | # Movement | ||
| 699 | pmap <down> pager_move down=1 | ||
| 700 | pmap <up> pager_move up=1 | ||
| 701 | pmap <left> pager_move left=4 | ||
| 702 | pmap <right> pager_move right=4 | ||
| 703 | pmap <home> pager_move to=0 | ||
| 704 | pmap <end> pager_move to=-1 | ||
| 705 | pmap <pagedown> pager_move down=1.0 pages=True | ||
| 706 | pmap <pageup> pager_move up=1.0 pages=True | ||
| 707 | pmap <C-d> pager_move down=0.5 pages=True | ||
| 708 | pmap <C-u> pager_move up=0.5 pages=True | ||
| 709 | |||
| 710 | copypmap <UP> k <C-p> | ||
| 711 | copypmap <DOWN> j <C-n> <CR> | ||
| 712 | copypmap <LEFT> h | ||
| 713 | copypmap <RIGHT> l | ||
| 714 | copypmap <HOME> g | ||
| 715 | copypmap <END> G | ||
| 716 | copypmap <C-d> d | ||
| 717 | copypmap <C-u> u | ||
| 718 | copypmap <PAGEDOWN> n f <C-F> <Space> | ||
| 719 | copypmap <PAGEUP> p b <C-B> | ||
| 720 | |||
| 721 | # Basic | ||
| 722 | pmap <C-l> redraw_window | ||
| 723 | pmap <ESC> pager_close | ||
| 724 | copypmap <ESC> q Q i <F3> | ||
| 725 | pmap E edit_file | ||
| 726 | |||
| 727 | # =================================================================== | ||
| 728 | # == Taskview Keybindings | ||
| 729 | # =================================================================== | ||
| 730 | |||
| 731 | # Movement | ||
| 732 | tmap <up> taskview_move up=1 | ||
| 733 | tmap <down> taskview_move down=1 | ||
| 734 | tmap <home> taskview_move to=0 | ||
| 735 | tmap <end> taskview_move to=-1 | ||
| 736 | tmap <pagedown> taskview_move down=1.0 pages=True | ||
| 737 | tmap <pageup> taskview_move up=1.0 pages=True | ||
| 738 | tmap <C-d> taskview_move down=0.5 pages=True | ||
| 739 | tmap <C-u> taskview_move up=0.5 pages=True | ||
| 740 | |||
| 741 | copytmap <UP> k <C-p> | ||
| 742 | copytmap <DOWN> j <C-n> <CR> | ||
| 743 | copytmap <HOME> g | ||
| 744 | copytmap <END> G | ||
| 745 | copytmap <C-u> u | ||
| 746 | copytmap <PAGEDOWN> n f <C-F> <Space> | ||
| 747 | copytmap <PAGEUP> p b <C-B> | ||
| 748 | |||
| 749 | # Changing priority and deleting tasks | ||
| 750 | tmap J eval -q fm.ui.taskview.task_move(-1) | ||
| 751 | tmap K eval -q fm.ui.taskview.task_move(0) | ||
| 752 | tmap dd eval -q fm.ui.taskview.task_remove() | ||
| 753 | tmap <pagedown> eval -q fm.ui.taskview.task_move(-1) | ||
| 754 | tmap <pageup> eval -q fm.ui.taskview.task_move(0) | ||
| 755 | tmap <delete> eval -q fm.ui.taskview.task_remove() | ||
| 756 | |||
| 757 | # Basic | ||
| 758 | tmap <C-l> redraw_window | ||
| 759 | tmap <ESC> taskview_close | ||
| 760 | copytmap <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 | ||
| 8 | Source: [[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 | |||
| 4 | GREEN='\033[1;32m' | ||
| 5 | RED='\033[1;30m' | ||
| 6 | NC='\033[0m' | ||
| 7 | GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles | ||
| 8 | |||
| 9 | profiles=$* | ||
| 10 | if [[ $# -eq 0 ]]; then | ||
| 11 | profiles="$HOME/.config/guix/manifests/*.scm"; | ||
| 12 | fi | ||
| 13 | |||
| 14 | for 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 | ||
| 39 | done | ||
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 | |||
| 4 | GREEN='\033[1;32m' | ||
| 5 | NC='\033[0m' | ||
| 6 | GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles | ||
| 7 | |||
| 8 | profiles=$* | ||
| 9 | if [[ $# -eq 0 ]]; then | ||
| 10 | profiles="$GUIX_EXTRA_PROFILES/*"; | ||
| 11 | fi | ||
| 12 | |||
| 13 | for 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" | ||
| 22 | done | ||
