This commit is contained in:
Daniel Ziltener 2023-12-18 01:05:20 +01:00
parent 3846c6425a
commit 6c3e14c66f
Signed by: zilti
GPG Key ID: B38976E82C9DAE42
7 changed files with 251 additions and 237 deletions

View File

@ -2,11 +2,10 @@
;; This adds the Nonguix channel. ;; This adds the Nonguix channel.
;; #+NAME: root-channels
;; [[file:config.org::*Channels][Channels:1]] ;; [[file:config.org::root-channels][root-channels]]
;; Copy this to ~/.config/guix/channels.scm. (cons* (channel
(append (list
(channel
(name 'nonguix) (name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix") (url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification: ;; Enable signature verification:
@ -14,6 +13,9 @@
(make-channel-introduction (make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc" "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint (openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))) "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
(channel
(name 'ziltis-channel)
(url "https://gitea.lyrion.ch/zilti/guixchannel"))
%default-channels) %default-channels)
;; Channels:1 ends here ;; root-channels ends here

View File

@ -95,36 +95,6 @@ This is to be run after setting up the partitions.
** File System ** File System
The variable ~%local-filesystem~ extracts the file system definitions from the installer-provided
=config.scm= file.
#+begin_src scheme :tangle config.scm
#;(define %local-filesystem
(call-with-input-file "/etc/config.scm"
(lambda (port)
(read port)
(read port)
(eval (cadar (last-pair (read port)))
(interaction-environment)))))
#+end_src
As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
#+begin_src scheme :tangle config.scm
#;(define %local-swap
(call-with-input-file "/etc/config.scm"
(lambda (port)
(read port)
(read port)
(let* ((os-list (read port))
(os-list-length (length os-list)))
(eval
(cadr
(list-ref os-list
(- os-list-length 2)))
(interaction-environment))))))
#+end_src
#+NAME: config-filesystems #+NAME: config-filesystems
#+begin_src scheme :noweb yes #+begin_src scheme :noweb yes
(file-systems (append (list (file-systems (append (list
@ -149,8 +119,8 @@ As a sibling to the former, the variable ~%local-swap~ does the same with the sw
This adds the Nonguix channel. This adds the Nonguix channel.
#+NAME: root-channels
#+begin_src scheme :tangle channels.scm #+begin_src scheme :tangle channels.scm
;; Copy this to ~/.config/guix/channels.scm.
(cons* (channel (cons* (channel
(name 'nonguix) (name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix") (url "https://gitlab.com/nonguix/nonguix")
@ -200,6 +170,8 @@ This adds the Nonguix channel.
<<greeter-service>>) <<greeter-service>>)
(list (list
<<screen-lock-service>>) <<screen-lock-service>>)
(list
<<unattended-upgrade>>))
)) ))
#+end_src #+end_src
@ -209,7 +181,7 @@ These services are unmodified, or have just few settings.
#+NAME: root-simple-services #+NAME: root-simple-services
| Service | Options | | Service | Options |
|-------------+------------------------------------------------------| |--------------------+------------------------------------------------------|
| tlp | () | | tlp | () |
| thermald | ((adaptive? #t)) | | thermald | ((adaptive? #t)) |
| bluetooth | () | | bluetooth | () |
@ -218,12 +190,24 @@ These services are unmodified, or have just few settings.
| libvirt | ((unix-sock-group "libvirt")) | | libvirt | ((unix-sock-group "libvirt")) |
| fstrim | () | | fstrim | () |
| fprintd | () | | fprintd | () |
| polkit | ((polkit-wheel-service)) |
#+NAME: root-simple-service-block #+NAME: root-simple-service-block
#+begin_src scheme :noweb yes :exports none :results output #+begin_src scheme :noweb yes :exports none :results output
<<service-converter(input=root-simple-services)>> <<service-converter(input=root-simple-services)>>
#+end_src #+end_src
*** Unattended Upgrade Service
#+NAME: unattended-upgrade
#+begin_src scheme :noweb no-export
(service unattended-upgrade-service-type
(unattended-upgrade-configuration
(schedule "5 12 * * 1")
(channels
<<root-channels>>)))
#+end_src
*** Modified Desktop Services *** Modified Desktop Services
#+NAME: nonguix-pubkey #+NAME: nonguix-pubkey
@ -323,7 +307,7 @@ This is the full operating system specification.
(name "zilti") (name "zilti")
(group "users") (group "users")
(supplementary-groups (supplementary-groups
'("wheel" "netdev" "audio" "video" "libvirt"))) '("users" "wheel" "netdev" "audio" "video" "libvirt")))
%base-user-accounts)) %base-user-accounts))
<<root-package-block>> <<root-package-block>>
<<root-services-block>> <<root-services-block>>

View File

@ -3,6 +3,7 @@
;; #+NAME: module-list ;; #+NAME: module-list
;; - gnu ;; - gnu
;; - gnu image ;; - gnu image
;; - gnu packages gnome
;; - gnu services authentication ;; - gnu services authentication
;; - gnu services base ;; - gnu services base
;; - gnu services dbus ;; - gnu services dbus
@ -99,6 +100,8 @@
(targets (targets
'("/boot/efi")) '("/boot/efi"))
(keyboard-layout keyboard-layout))) (keyboard-layout keyboard-layout)))
#;(file-systems %local-filesystem)
#;(swap-devices %local-swap)
(file-systems (append (list (file-systems (append (list
(file-system (file-system
(device (file-system-label "EFI")) (device (file-system-label "EFI"))
@ -117,7 +120,7 @@
(name "zilti") (name "zilti")
(group "users") (group "users")
(supplementary-groups (supplementary-groups
'("wheel" "netdev" "audio" "video" "libvirt"))) '("users" "wheel" "netdev" "audio" "video" "libvirt")))
%base-user-accounts)) %base-user-accounts))
(packages (packages
(append (append
@ -126,8 +129,8 @@
font-terminus font-terminus
git git
hwdata hwdata
network-manager
nss-certs nss-certs
network-manager
readline) readline)
%base-packages)) %base-packages))
@ -145,7 +148,7 @@
%default-substitute-urls)) %default-substitute-urls))
(authorized-keys (authorized-keys
(append (list (plain-file "non-guix.pub" (append (list (plain-file "non-guix.pub"
"<<nonguix-pubkey>>"))))))) "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")))))))
(list (service tlp-service-type (tlp-configuration)) (list (service tlp-service-type (tlp-configuration))
(service (service
thermald-service-type thermald-service-type
@ -170,7 +173,10 @@
(fstrim-configuration)) (fstrim-configuration))
(service (service
fprintd-service-type fprintd-service-type
(fprintd-configuration))) (fprintd-configuration))
(service
polkit-service-type
(polkit-configuration (polkit-wheel-service))))
(list (list
(service greetd-service-type (service greetd-service-type
@ -203,6 +209,24 @@
(program (program
(file-append swaylock-effects "/bin/swaylock")) (file-append swaylock-effects "/bin/swaylock"))
(using-setuid? #f)))) (using-setuid? #f))))
(list
(service unattended-upgrade-service-type
(unattended-upgrade-configuration
(schedule "5 12 * * 1")
(channels
(cons* (channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
(channel
(name 'ziltis-channel)
(url "https://gitea.lyrion.ch/zilti/guixchannel"))
%default-channels))))))
)) ))
(name-service-switch %mdns-host-lookup-nss)) (name-service-switch %mdns-host-lookup-nss))
;; Operating System:1 ends here ;; Operating System:1 ends here

View File

@ -1,4 +1,3 @@
eval "$(starship init bash)"
# Commands that should be applied only for interactive shells. # Commands that should be applied only for interactive shells.
[[ $- == *i* ]] || return [[ $- == *i* ]] || return
@ -12,22 +11,12 @@ shopt -s extglob
shopt -s globstar shopt -s globstar
shopt -s checkjobs shopt -s checkjobs
if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then
. "/nix/store/fnbf9g79mngi1sxdncizsvdr6xa8dmqc-bash-completion-2.11/etc/profile.d/bash_completion.sh"
fi
if [[ $TERM != "dumb" ]]; then
eval "$(/etc/profiles/per-user/zilti/bin/starship init bash --print-full-init)"
fi
if test -n "$KITTY_INSTALLATION_DIR"; then if test -n "$KITTY_INSTALLATION_DIR"; then
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash" source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
fi fi
eval "$(SHELL=bash /nix/store/vrcxmwrgsdgwm51rxdpyzp6ppslavn3n-keychain-2.8.5/bin/keychain --eval --quiet --agents ssh,gpg id_rsa personal_ed 37F655BAF43BC0FF300A91A1B38976E82C9DAE42)" #eval "$(SHELL=bash /nix/store/vrcxmwrgsdgwm51rxdpyzp6ppslavn3n-keychain-2.8.5/bin/keychain --eval --quiet --agents ssh,gpg id_rsa personal_ed 37F655BAF43BC0FF300A91A1B38976E82C9DAE42)"
eval "$(/nix/store/h9m0s8n535y69jg4vpj41i8alhilld8c-hstr-3.1/bin/hstr --show-configuration)" eval "$(hstr --show-configuration)"
eval "$(direnv hook bash)" eval "$(direnv hook bash)"

View File

@ -41,22 +41,6 @@
;; I use `pass` as password storage. ;; I use `pass` as password storage.
(auth-source-pass-enable) (auth-source-pass-enable)
;;;; Straight.el
;; (defvar bootstrap-version)
;; (let ((bootstrap-file
;; (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
;; (bootstrap-version 6))
;; (unless (file-exists-p bootstrap-file)
;; (with-current-buffer
;; (url-retrieve-synchronously
;; "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
;; 'silent 'inhibit-cookies)
;; (goto-char (point-max))
;; (eval-print-last-sexp)))
;; (load bootstrap-file nil 'nomessage))
;; (setq straight-use-package-by-default t)
;;;; Elpaca ;;;; Elpaca
;;;;; Installation ;;;;; Installation
@ -147,7 +131,8 @@
(tool-bar-mode nil) (tool-bar-mode nil)
:custom-face :custom-face
;;(default ((t (:weight bold :height 113 :width normal :family "VictorMono Nerd Font")))) ;;(default ((t (:weight bold :height 113 :width normal :family "VictorMono Nerd Font"))))
(default ((t (:weight regular :height 105 :width normal :family "MonaspiceXe Nerd Font Mono")))) (default ((t (:weight normal :height 105 :width narrow :family "MonaspiceXe Nerd Font Mono"))))
(variable-pitch ((t (:weight normal :height 105 :width narrow :family "MonaspiceXe Nerd Font Propo"))))
:hook :hook
(minibuffer-setup . cursor-intangible-mode) (minibuffer-setup . cursor-intangible-mode)
:config :config
@ -158,10 +143,12 @@
;;;; Org Mode ;;;; Org Mode
(use-package org (use-package org
:elpaca (:repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" :branch "emacs-sync") :elpaca (:repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" :branch "emacs-sync")
:after visual-fill-column
:ensure t :ensure t
:custom :custom
(org-babel-load-languages '((emacs-lisp . t) (org-babel-load-languages '((emacs-lisp . t)
(scheme . t))) (scheme . t)))
(visual-fill-column-center-text t)
:hook :hook
(org-mode . org-indent-mode) (org-mode . org-indent-mode)
(org-src-mode . hack-local-variables) (org-src-mode . hack-local-variables)
@ -250,8 +237,8 @@
)) ))
(global-ligature-mode t)) (global-ligature-mode t))
(set-frame-parameter nil 'alpha-background 80) (set-frame-parameter nil 'alpha-background 90)
(add-to-list 'default-frame-alist '(alpha-background . 80)) (add-to-list 'default-frame-alist '(alpha-background . 90))
(use-package lambda-line (use-package lambda-line
;;:straight (:type git :host github :repo "lambda-emacs/lambda-line") ;;:straight (:type git :host github :repo "lambda-emacs/lambda-line")
@ -301,14 +288,20 @@
;; load preferred theme ;; load preferred theme
(load-theme 'lambda-dark)) (load-theme 'lambda-dark))
;;;;; Long line handling
(use-package visual-fill-column (use-package visual-fill-column
:custom :custom
(visual-fill-column-center-text t)
(visual-fill-column-enable-sensible-window-split t) (visual-fill-column-enable-sensible-window-split t)
:hook visual-line-mode) :hook
(prog-mode . visual-line-mode)
visual-line-mode)
(use-package adaptive-wrap (use-package adaptive-wrap
:hook visual-fill-column) :config
(setq-default adaptive-wrap-extra-indent 4)
:hook
(visual-line-mode . adaptive-wrap-prefix-mode))
;;;; Security ;;;; Security
(use-package keychain-environment (use-package keychain-environment
@ -498,7 +491,6 @@
:hook :hook
evil-mode evil-mode
(evil-mode . evil-snipe-override-mode) (evil-mode . evil-snipe-override-mode)
(evil-mode . evil-snipe-mode)
(magit-mode . turn-off-evil-snipe-override-mode) (magit-mode . turn-off-evil-snipe-override-mode)
;; See https://github.com/hlissner/evil-snipe/issues/95 ;; See https://github.com/hlissner/evil-snipe/issues/95
;; :config ;; :config
@ -570,7 +562,7 @@ Point must be at the beginning of balanced expression (sexp)."
(use-package paredit (use-package paredit
:hook :hook
clojure-mode clojure-ts-mode
emacs-lisp-mode emacs-lisp-mode
scheme-mode scheme-mode
:config :config
@ -722,15 +714,27 @@ Point must be at the beginning of balanced expression (sexp)."
;;;;; Clojure ;;;;; Clojure
(use-package clojure-ts-mode (use-package clojure-ts-mode
:preface
(defun embark-eglot-rename (from to)
"Renames the symbol at point."
(interactive "sRename: \nsRename %s to: ")
(funcall-interactively #'eglot-rename to))
:delight "" :delight ""
:after tree-sitter :after (tree-sitter embark)
:config :config
(require 'sesman) (require 'sesman)
(sesman-install-menu clojure-mode-map) (sesman-install-menu clojure-mode-map)
(defvar-keymap embark-clj-identifier-map
:parent embark-identifier-map
"c" #'embark-eglot-rename)
(add-to-list 'embark-keymap-alist '(identifier . embark-clj-identifier-map))
:hook :hook
((clojure-ts-mode . eglot-ensure) ((clojure-ts-mode . eglot-ensure)
(clojure-ts-mode . prettify-symbols-mode)
(clojure-ts-mode . (lambda () (clojure-ts-mode . (lambda ()
(setq-local sesman-system 'CIDER))) (setq-local sesman-system 'CIDER)
(setq-local prettify-symbols-alist '(("fn" . "λ")))))
(clojure-ts-mode . (lambda () (clojure-ts-mode . (lambda ()
(sesman-install-menu clojure-mode-map))) (sesman-install-menu clojure-mode-map)))
(clojurec-ts-mode . (lambda () (clojurec-ts-mode . (lambda ()
@ -792,11 +796,12 @@ Point must be at the beginning of balanced expression (sexp)."
;;;;;; Chicken Scheme ;;;;;; Chicken Scheme
(use-package scheme (use-package scheme
:elpaca nil :elpaca nil
:config
(setq prettify-symbols-alist
'(("lambda" . "λ")))
:hook :hook
(scheme-mode . eglot-ensure)) (scheme-mode . eglot-ensure)
(scheme-mode . prettify-symbols-mode)
(scheme-mode . (lambda ()
(setq-local prettify-symbols-alist
'(("lambda" . "λ"))))))
(defun flymake-chicken-init () (defun flymake-chicken-init ()
(add-hook 'flymake-diagnostic-functions (add-hook 'flymake-diagnostic-functions
@ -845,7 +850,17 @@ Point must be at the beginning of balanced expression (sexp)."
;;;; Version Control ;;;; Version Control
;;;;; Git ;;;;; Git
;; Magit requires 'transient' >= 0.5.0, but due to bad defaults, Emacs' package manager refuses to
;; upgrade this and other built-in packages to higher releases from GNU Elpa.
;; To fix this, you have to add this to your init file:
;; (setq package-install-upgrade-built-in t)
;; You must also make sure the updated version is loaded, by evaluating the `progn` form below.
(use-package magit (use-package magit
:after transient
:init
(progn (unload-feature 'transient t)
(require 'transient))
:autoload :autoload
magit) magit)

View File

@ -32,24 +32,25 @@
"bolt" "bolt"
"browserpass-native" "browserpass-native"
"chicken" "chicken"
;; "chicken-apropos" "chicken-apropos"
;; "chicken-chicken-doc" "chicken-chicken-doc"
;; "chicken-srfi-18" "chicken-srfi-18"
"curl" "curl"
"direnv" "direnv"
"emacs" "emacs-pgtk-xwidgets"
"entr" "entr"
"eternalterminal" "eternalterminal"
"diff-so-fancy" "diff-so-fancy"
"firefox" "firefox"
"flatpak" "flatpak"
;; "font-nerdfont-monaspice" "font-nerdfont-monaspice"
"fuzzel" "fuzzel"
"fzf" "fzf"
"gammastep" "gammastep"
"grim" "grim"
"guile" "guile"
"glibc-locales" "glibc-locales"
"hstr"
"icecat" "icecat"
"icedove-wayland" "icedove-wayland"
"kitty" "kitty"
@ -58,6 +59,7 @@
"nm-tray" "nm-tray"
"nnn" "nnn"
#;"nss-certs" ; This package is broken #;"nss-certs" ; This package is broken
"openssh"
"password-store" "password-store"
"pass-otp" "pass-otp"
"passff-icecat" "passff-icecat"
@ -65,6 +67,7 @@
"pinentry-qt" "pinentry-qt"
"pipewire" "pipewire"
"pv" "pv"
"rsync"
"rust" "rust"
"rust-cargo" "rust-cargo"
"senpai" "senpai"
@ -159,12 +162,7 @@
(list (list
(local-file (local-file
"./.bashrc" "./.bashrc"
"bashrc"))) "bashrc")))))
(bash-profile
(list
(local-file
"./.bash_profile"
"bash_profile")))))
(service home-batsignal-service-type (service home-batsignal-service-type
(home-batsignal-configuration (home-batsignal-configuration
(ignore-missing? #t))) (ignore-missing? #t)))

View File

@ -5,5 +5,7 @@ mkdir -p /mnt/boot/efi
mount /dev/disk/by-label/EFI /mnt/boot/efi mount /dev/disk/by-label/EFI /mnt/boot/efi
herd start cow-store /mnt herd start cow-store /mnt
guix pull -C./channels.scm guix pull -C./channels.scm
$GUIX_PROFILE="/root/.config/guix/current"
. "$GUIX_PROFILE/etc/profile"
hash guix hash guix
guix system -L. init config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org" guix system -L. init config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org"