Use modules

This commit is contained in:
Aleksandr Lebedev 2025-11-05 20:33:23 +01:00
parent b93f4c3a5f
commit 95794c3bf6
9 changed files with 161 additions and 255 deletions

View file

@ -0,0 +1,11 @@
(list (channel
(name 'guix)
(url "https://git.guix.gnu.org/guix.git")
(branch "master")
(commit
"47df71794f7ee9fc09398382feac12a5d39e6ddd")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))

4
guix-config/channels.scm Normal file
View file

@ -0,0 +1,4 @@
(cons (channel
(name 'quickshell)
(url "https://git.outfoxxed.me/quickshell/quickshell"))
%default-channels)

View file

@ -0,0 +1,76 @@
(define-module (guix-config home workstation)
#:use-module (gnu home)
#:use-module (gnu packages emacs)
#:use-module (gnu packages gnuzilla)
#:use-module (gnu packages mail)
#:use-module (gnu packages messaging)
#:use-module (gnu packages sync)
#:use-module (gnu packages pdf)
#:use-module (gnu packages gnome)
#:use-module (gnu packages wm)
#:use-module (gnu packages terminals)
#:use-module (gnu packages xorg)
#:use-module (gnu packages linux)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages rust-apps)
#:use-module (gnu packages qt)
#:use-module (gnu packages version-control)
#:use-module (gnu packages librewolf)
#:use-module (gnu packages audio)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages admin)
#:use-module (gnu packages fonts)
#:use-module (gnu services)
#:use-module (guix gexp)
#:use-module (gnu home services shells)
#:use-module (gnu home services dotfiles)
#:use-module (gnu home services sound)
#:use-module (gnu home services desktop)
#:use-module (gnu home services niri))
(home-environment
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (list emacs-pgtk
font-iosevka
git
kitty
btop
fastfetch
librewolf
icecat
nheko
;birdtray
nextcloud-client
nautilus
xournalpp
ripgrep
quickshell
cava
wl-clipboard
brightnessctl
qtmultimedia
accountsservice
matugen
wayland
xwayland-satellite
qtwayland))
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services
(append (list (service home-niri-service-type)
(service home-pipewire-service-type)
(service home-dbus-service-type)
(service home-bash-service-type
(home-bash-configuration
(environment-variables '(("PS1" . "\\[\\e[1;32m\\]\\u \\[\\e[1;34m\\]\\w \\[\\e[0m\\] ")
("EDITOR" . "emacsclient -c")))
(aliases '(("gs" . "git status")
("system-reconfigure" . "sudo -E guix time-machine -C ~/dotfiles/guix-config/channels-lock.scm -- system -L ~/dotfiles reconfigure ~/dotfiles/guix-config/system/$(hostname).scm")
("home-reconfigure" . "guix time-machine -C ~/dotfiles/guix-config/channels-lock.scm -- home -L ~/dotfiles reconfigure ~/dotfiles/guix-config/home/workstation.scm")
("guix-pull" . "guix pull --channels=~/dotfiles/guix-system/channels.scm; guix describe --format=channels > ~/dotfiles/guix-system/channels-lock.scm")))))
(service home-dotfiles-service-type
(home-dotfiles-configuration
(directories '("../../files")))))
%base-home-services)))

View file

@ -0,0 +1,55 @@
(define-module (guix-config system base-system)
#:use-module (gnu)
#:use-module (guix)
#:export (base-system))
(use-service-modules cups desktop networking ssh xorg pm)
(define %my-desktop-services
(modify-services %desktop-services
(delete gdm-service-type)))
(define base-system
(operating-system
(locale "ru_RU.utf8")
(timezone "Europe/Berlin")
(keyboard-layout (keyboard-layout "eu,ru"
#:options '("grp:alt_shift_toggle")))
(host-name "base-system")
(users (cons* (user-account
(name "kylekrein")
(comment "Aleksandr Lebedev")
(group "users")
(home-directory "/home/kylekrein")
(supplementary-groups '("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list
;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below.
(service openssh-service-type)
(service cups-service-type)
(service gnome-keyring-service-type)
(service bluetooth-service-type)
(service power-profiles-daemon-service-type)
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))))
;; This is the default list of services we
;; are appending to.
%my-desktop-services))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets '("/dev/vda"))
(terminal-outputs '(console))
(keyboard-layout keyboard-layout)))
(file-systems (cons (file-system
(mount-point "/")
(device "/dev/vda1")
(type "ext4"))
%base-file-systems))))

View file

@ -0,0 +1,29 @@
(define-module (guix-config system iuseguixbtw)
#:use-module (gnu)
#:use-module (guix-config system base-system))
(operating-system
(inherit base-system)
(host-name "iuseguixbtw")
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))))
(mapped-devices (list (mapped-device
(source (uuid
"e6686154-def0-41d3-a724-c89a36a5b3ed"))
(target "cryptroot")
(type luks-device-mapping))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "ext4")
(dependencies mapped-devices))
(file-system
(mount-point "/boot/efi")
(device (uuid "B677-E030"
'fat32))
(type "vfat")) %base-file-systems)))