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.
;; #+NAME: root-channels
;; [[file:config.org::*Channels][Channels:1]]
;; Copy this to ~/.config/guix/channels.scm.
(append (list
(channel
;; [[file:config.org::root-channels][root-channels]]
(cons* (channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
@ -14,6 +13,9 @@
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(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)
;; 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
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
#+begin_src scheme :noweb yes
(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.
#+NAME: root-channels
#+begin_src scheme :tangle channels.scm
;; Copy this to ~/.config/guix/channels.scm.
(cons* (channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
@ -200,6 +170,8 @@ This adds the Nonguix channel.
<<greeter-service>>)
(list
<<screen-lock-service>>)
(list
<<unattended-upgrade>>))
))
#+end_src
@ -209,7 +181,7 @@ These services are unmodified, or have just few settings.
#+NAME: root-simple-services
| Service | Options |
|-------------+------------------------------------------------------|
|--------------------+------------------------------------------------------|
| tlp | () |
| thermald | ((adaptive? #t)) |
| bluetooth | () |
@ -218,12 +190,24 @@ These services are unmodified, or have just few settings.
| libvirt | ((unix-sock-group "libvirt")) |
| fstrim | () |
| fprintd | () |
| polkit | ((polkit-wheel-service)) |
#+NAME: root-simple-service-block
#+begin_src scheme :noweb yes :exports none :results output
<<service-converter(input=root-simple-services)>>
#+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
#+NAME: nonguix-pubkey
@ -323,7 +307,7 @@ This is the full operating system specification.
(name "zilti")
(group "users")
(supplementary-groups
'("wheel" "netdev" "audio" "video" "libvirt")))
'("users" "wheel" "netdev" "audio" "video" "libvirt")))
%base-user-accounts))
<<root-package-block>>
<<root-services-block>>

View File

@ -3,6 +3,7 @@
;; #+NAME: module-list
;; - gnu
;; - gnu image
;; - gnu packages gnome
;; - gnu services authentication
;; - gnu services base
;; - gnu services dbus
@ -99,6 +100,8 @@
(targets
'("/boot/efi"))
(keyboard-layout keyboard-layout)))
#;(file-systems %local-filesystem)
#;(swap-devices %local-swap)
(file-systems (append (list
(file-system
(device (file-system-label "EFI"))
@ -117,7 +120,7 @@
(name "zilti")
(group "users")
(supplementary-groups
'("wheel" "netdev" "audio" "video" "libvirt")))
'("users" "wheel" "netdev" "audio" "video" "libvirt")))
%base-user-accounts))
(packages
(append
@ -126,8 +129,8 @@
font-terminus
git
hwdata
network-manager
nss-certs
network-manager
readline)
%base-packages))
@ -145,7 +148,7 @@
%default-substitute-urls))
(authorized-keys
(append (list (plain-file "non-guix.pub"
"<<nonguix-pubkey>>")))))))
"(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")))))))
(list (service tlp-service-type (tlp-configuration))
(service
thermald-service-type
@ -170,7 +173,10 @@
(fstrim-configuration))
(service
fprintd-service-type
(fprintd-configuration)))
(fprintd-configuration))
(service
polkit-service-type
(polkit-configuration (polkit-wheel-service))))
(list
(service greetd-service-type
@ -203,6 +209,24 @@
(program
(file-append swaylock-effects "/bin/swaylock"))
(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))
;; Operating System:1 ends here

View File

@ -1,4 +1,3 @@
eval "$(starship init bash)"
# Commands that should be applied only for interactive shells.
[[ $- == *i* ]] || return
@ -12,22 +11,12 @@ shopt -s extglob
shopt -s globstar
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
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
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)"

View File

@ -41,22 +41,6 @@
;; I use `pass` as password storage.
(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
;;;;; Installation
@ -147,7 +131,8 @@
(tool-bar-mode nil)
:custom-face
;;(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
(minibuffer-setup . cursor-intangible-mode)
:config
@ -158,10 +143,12 @@
;;;; Org Mode
(use-package org
:elpaca (:repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" :branch "emacs-sync")
:after visual-fill-column
:ensure t
:custom
(org-babel-load-languages '((emacs-lisp . t)
(scheme . t)))
(visual-fill-column-center-text t)
:hook
(org-mode . org-indent-mode)
(org-src-mode . hack-local-variables)
@ -250,8 +237,8 @@
))
(global-ligature-mode t))
(set-frame-parameter nil 'alpha-background 80)
(add-to-list 'default-frame-alist '(alpha-background . 80))
(set-frame-parameter nil 'alpha-background 90)
(add-to-list 'default-frame-alist '(alpha-background . 90))
(use-package lambda-line
;;:straight (:type git :host github :repo "lambda-emacs/lambda-line")
@ -301,14 +288,20 @@
;; load preferred theme
(load-theme 'lambda-dark))
;;;;; Long line handling
(use-package visual-fill-column
:custom
(visual-fill-column-center-text 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
:hook visual-fill-column)
:config
(setq-default adaptive-wrap-extra-indent 4)
:hook
(visual-line-mode . adaptive-wrap-prefix-mode))
;;;; Security
(use-package keychain-environment
@ -498,7 +491,6 @@
:hook
evil-mode
(evil-mode . evil-snipe-override-mode)
(evil-mode . evil-snipe-mode)
(magit-mode . turn-off-evil-snipe-override-mode)
;; See https://github.com/hlissner/evil-snipe/issues/95
;; :config
@ -570,7 +562,7 @@ Point must be at the beginning of balanced expression (sexp)."
(use-package paredit
:hook
clojure-mode
clojure-ts-mode
emacs-lisp-mode
scheme-mode
:config
@ -722,15 +714,27 @@ Point must be at the beginning of balanced expression (sexp)."
;;;;; Clojure
(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 ""
:after tree-sitter
:after (tree-sitter embark)
:config
(require 'sesman)
(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
((clojure-ts-mode . eglot-ensure)
(clojure-ts-mode . prettify-symbols-mode)
(clojure-ts-mode . (lambda ()
(setq-local sesman-system 'CIDER)))
(setq-local sesman-system 'CIDER)
(setq-local prettify-symbols-alist '(("fn" . "λ")))))
(clojure-ts-mode . (lambda ()
(sesman-install-menu clojure-mode-map)))
(clojurec-ts-mode . (lambda ()
@ -792,11 +796,12 @@ Point must be at the beginning of balanced expression (sexp)."
;;;;;; Chicken Scheme
(use-package scheme
:elpaca nil
:config
(setq prettify-symbols-alist
'(("lambda" . "λ")))
: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 ()
(add-hook 'flymake-diagnostic-functions
@ -845,7 +850,17 @@ Point must be at the beginning of balanced expression (sexp)."
;;;; Version Control
;;;;; 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
:after transient
:init
(progn (unload-feature 'transient t)
(require 'transient))
:autoload
magit)

View File

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

View File

@ -5,5 +5,7 @@ mkdir -p /mnt/boot/efi
mount /dev/disk/by-label/EFI /mnt/boot/efi
herd start cow-store /mnt
guix pull -C./channels.scm
$GUIX_PROFILE="/root/.config/guix/current"
. "$GUIX_PROFILE/etc/profile"
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"