From 45bb0d11161b1c5077a1415eed6dbd0fd25ccb6a Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 20 Sep 2024 14:16:56 +0200 Subject: Change dotfiles structure, and add guix-channels declaration. --- guix/jd/desktops/base.scm | 55 +++++++++++++++++++++++---------------- guix/jd/desktops/berserker.scm | 36 ++++++++++++++----------- guix/jd/home/services/desktop.scm | 20 +++++++++----- guix/jd/packages/linux.scm | 51 ++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 43 deletions(-) create mode 100644 guix/jd/packages/linux.scm (limited to 'guix/jd') diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm index c613c26..079d57e 100644 --- a/guix/jd/desktops/base.scm +++ b/guix/jd/desktops/base.scm @@ -18,7 +18,7 @@ #:use-module (nongnu system linux-initrd)) (use-package-modules wm gnome networking virtualization - lisp lisp-xyz cups fonts gnupg) + lisp lisp-xyz cups fonts gnupg android) (use-service-modules cups desktop networking ssh xorg docker virtualization pm sound dbus @@ -68,6 +68,7 @@ "audio" ;; control audio devices "video" ;; access to webcam "dialout" ;; access to /dev/ttyUSBX devices + "adbusers" )))) (define-public %jd-base-user-accounts @@ -147,7 +148,7 @@ (map (lambda (tty) (cons tty (file-append font-terminus - "/share/consolefonts/ter-112n"))) + "/share/consolefonts/ter-122n.psf.gz"))) '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) (service screen-locker-service-type @@ -167,6 +168,7 @@ (bluetooth-configuration (auto-enable? #t))) + (service containerd-service-type) (service docker-service-type) (service libvirt-service-type (libvirt-configuration @@ -188,29 +190,38 @@ (service nix-service-type) polkit-network-manager-service + + (udev-rules-service 'android android-udev-rules + #:groups '("adbusers")) + + (udev-rules-service 'microbit (udev-rule + "69-microbit.rules" + (string-append "ACTION!=\"add|change\", GOTO=\"microbit_rules_end\"" + "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0d28\", ATTR{idProduct}==\"0204\", TAG+=\"uaccess\"" + "LABEL=\"microbit_rules_end\""))) ;; %desktop-services (modify-services %desktop-services - (guix-service-type config => (guix-configuration - (inherit config) - (substitute-urls - (append (list "https://substitutes.nonguix.org") - %default-substitute-urls)) - (authorized-keys - (append (list (plain-file "non-guix.pub" - "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) - %default-authorized-guix-keys)))) - (delete network-manager-service-type) - ;; (delete mingetty-service-type) - (delete console-font-service-type) - - (delete pulseaudio-service-type) - (delete alsa-service-type) - (delete (if (string-prefix? "x86_64" - (or (%current-target-system) - (%current-system))) - gdm-service-type - sddm-service-type))))) + (guix-service-type config => (guix-configuration + (inherit config) + (substitute-urls + (append (list "https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (append (list (plain-file "non-guix.pub" + "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) + %default-authorized-guix-keys)))) + (delete network-manager-service-type) + ;; (delete mingetty-service-type) + (delete console-font-service-type) + + (delete pulseaudio-service-type) + (delete alsa-service-type) + (delete (if (string-prefix? "x86_64" + (or (%current-target-system) + (%current-system))) + gdm-service-type + sddm-service-type))))) ;; Odin is a base for my operating systems (define-public odin-free diff --git a/guix/jd/desktops/berserker.scm b/guix/jd/desktops/berserker.scm index ed673db..37e7adc 100755 --- a/guix/jd/desktops/berserker.scm +++ b/guix/jd/desktops/berserker.scm @@ -1,5 +1,6 @@ (define-module (jd desktops berserker) #:use-module (jd desktops base) + #:use-module (jd packages linux) #:use-module (gnu) #:use-module (gnu home)) @@ -10,30 +11,35 @@ (define system (operating-system (inherit odin-non-free) + (kernel-loadable-modules (list xmm7360-pci)) (host-name "berserker") - (bootloader (bootloader-configuration + + (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets (list "/boot/efi")))) + (mapped-devices (list (mapped-device + (source (uuid + "1f2b1bf2-89fe-4e2c-8b40-c460572bb776")) + (target "crypthome") + (type luks-device-mapping)))) - (swap-devices (list (swap-space - (target (uuid - "70ee2477-66ff-4856-aebf-8a77053c4462"))))) - - (file-systems (cons* (file-system - (mount-point "/boot/efi") - (device (uuid "BE9B-69F0" - 'fat32)) - (type "vfat")) - - (file-system + (file-systems (cons* (file-system (mount-point "/") (device (uuid - "d8783299-c180-4ca3-9c56-9826797f928d" + "66396ba1-bda9-46bd-ab26-5edc46b437d6" 'ext4)) (type "ext4")) - - %base-file-systems)))) + (file-system + (mount-point "/boot/efi") + (device (uuid "482A-B117" + 'fat32)) + (type "vfat")) + (file-system + (mount-point "/home") + (device "/dev/mapper/crypthome") + (type "ext4") + (dependencies mapped-devices)) %base-file-systems)))) (if (getenv "JD_HOME") home system) diff --git a/guix/jd/home/services/desktop.scm b/guix/jd/home/services/desktop.scm index ec3a53a..32c8059 100644 --- a/guix/jd/home/services/desktop.scm +++ b/guix/jd/home/services/desktop.scm @@ -20,10 +20,11 @@ (define (desktop-profile-service config) (append (list font-terminus-ttf) - (specifications->packages '( ;; sway - "swayfx" + (specifications->packages '("sway" + ;; "swayfx" "swaylock" "swayidle" + "swaynotificationcenter" "waybar" "fuzzel" "foot" @@ -31,6 +32,7 @@ "wl-clipboard" "wlsunset" "grimshot" + "swappy" "udiskie" ;; rest @@ -54,6 +56,8 @@ "blueman" + "nomacs" + "xdg-utils" "xdg-dbus-proxy" "xdg-desktop-portal-gtk" @@ -68,8 +72,8 @@ "dunst" - "gimp" - "inkscape" + ; "gimp" + ; "inkscape" "mpv" "youtube-dl" @@ -107,7 +111,11 @@ "rlwrap" "nheko" - "quassel")))) + "quassel" + "inkscape" + "gimp" + "libreoffice" + "steam")))) (define (desktop-environment-variables-service config) `(("GTK_THEME" . "Adwaita:dark") @@ -126,7 +134,7 @@ ("CLUTTER_BACKEND" . "wayland") ("ELM_ENGINE" . "wayland_egl") ("ECORE_EVAS_ENGINE" . "wayland-egl") - ("QT_QPA_PLATFORM" . "wayland-egl"))) + ("QT_QPA_PLATFORM" . "wayland-egl"))) ;; QT_QPA_PLATFORM=xcb (define (desktop-xdg-mime-applications-service config) (home-xdg-mime-applications-configuration diff --git a/guix/jd/packages/linux.scm b/guix/jd/packages/linux.scm new file mode 100644 index 0000000..94549c3 --- /dev/null +++ b/guix/jd/packages/linux.scm @@ -0,0 +1,51 @@ +(define-module (jd packages linux) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system linux-module) + #:use-module (guix git-download) + #:use-module (guix gexp) + #:use-module (gnu packages linux) + #:use-module (gnu packages pciutils) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages autotools) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public xmm7360-pci + (package + (name "xmm7360-pci") + (version "0.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xmm7360/xmm7360-pci.git") + (commit "a8ff2c6ceee84cbe74df8a78cfaa5a016d362ed4"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1aals95hk76rgd21rknqc9qfjva6g6gwicw6wz19m20bn08bs2f3")))) + (build-system linux-module-build-system) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-makefile + (lambda _ + (substitute* (find-files + "." "^Makefile(\\.include)?$") + (("^ccflags-y := .*$") + "ccflags-y := -Wno-multichar -Wno-incompatible-pointer-types"))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("autoconf" ,autoconf) + ("automake" ,automake))) + (inputs + `(("kernel" ,linux-libre) + ("pciutils" ,pciutils))) + (synopsis "Kernel module for Intel XMM7360 LTE modem") + (description + "This package provides a kernel module for the Intel XMM7360 LTE modem, allowing it to function in Linux.") + (home-page "https://github.com/xmm7360/xmm7360-pci") + (license license:gpl3+))) + -- cgit v1.2.3