add gnupload

This commit is contained in:
neox 2024-11-30 21:11:39 +01:00
parent d63380fc21
commit e6492fbcd9
No known key found for this signature in database
GPG Key ID: 57BC26A3687116F6
1 changed files with 79 additions and 27 deletions

View File

@ -1,7 +1,7 @@
;;; ;;;
;;; Configurations GNU Guix des ordinateurs de neox ;;; Configurations GNU Guix des ordinateurs de neox
;;; ;;;
;;; Copyright (C) 2023 Adrien 'neox' Bourmault <neox@a-lec.org> ;;; Copyright (C) 2024 Adrien 'neox' Bourmault <neox@gnu.org>
;;; ;;;
;;; This is free software; you can redistribute it and/or modify it ;;; This is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by ;;; under the terms of the GNU General Public License as published by
@ -22,41 +22,46 @@
(use-modules (use-modules
(gnu) (gnu)
(gnu home) (gnu home)
(gnu home services shells)
(gnu home services gnupg) (gnu home services gnupg)
(gnu home services shells)
(gnu packages) (gnu packages)
(gnu packages gnupg)
(gnu packages freedesktop)
(gnu packages cups)
(gnu packages scanner)
(gnu packages autotools) (gnu packages autotools)
(gnu packages avahi) (gnu packages avahi)
(gnu packages base)
(gnu packages bash)
(gnu packages boost) (gnu packages boost)
(gnu packages build-tools)
(gnu packages compression) (gnu packages compression)
(gnu packages cups)
(gnu packages freedesktop) (gnu packages freedesktop)
(gnu packages freedesktop)
(gnu packages ftp)
(gnu packages gettext) (gnu packages gettext)
(gnu packages ghostscript) (gnu packages ghostscript)
(gnu packages gnome)
(gnu packages glib) (gnu packages glib)
(gnu packages gnome)
(gnu packages gnupg)
(gnu packages gtk) (gnu packages gtk)
(gnu packages image) (gnu packages image)
(gnu packages imagemagick) (gnu packages imagemagick)
(gnu packages libusb) (gnu packages libusb)
(gnu packages linux) (gnu packages linux)
(gnu packages messaging)
(gnu packages pkg-config) (gnu packages pkg-config)
(gnu packages python) (gnu packages python)
(gnu packages scanner)
(gnu packages textutils) (gnu packages textutils)
(gnu packages tls) (gnu packages tls)
(gnu packages xml) (gnu packages xml)
(gnu services) (gnu services)
(srfi srfi-1)
(guix gexp)
(guix packages)
(guix git-download)
(guix build-system gnu) (guix build-system gnu)
(guix gexp)
(guix git-download)
(guix download)
((guix licenses) #:prefix license:)
(guix packages)
(guix utils) (guix utils)
((guix licenses) (srfi srfi-1))
#:prefix license:))
(use-service-modules (use-service-modules
cups cups
@ -69,7 +74,41 @@
vpn vpn
security-token) security-token)
;; Service SANE personnalisé ;; Paquets personnalisés
(define gnupload
(package
(name "gnupload")
(version (package-version gnulib))
(source (package-source gnulib))
(arguments
(list #:tests? #f
#:phases
#~(modify-phases
%standard-phases
(add-after 'unpack 'chdir
(lambda _ (chdir "build-aux")))
(delete 'bootstrap)
(delete 'configure)
(delete 'build)
(replace
'install
(lambda _
(install-file
"gnupload"
(string-append #$output "/bin/")))))))
(build-system gnu-build-system)
(inputs (list
bash ;; case esac break read eval shift exit
coreutils ;; echo test shift rm cat
gnupg ;; gpg gpg-agent
grep ;; grep
ncftp ;; ncftpput
sed)) ;; sed
(synopsis "")
(description "")
(home-page "")
(license license:gpl2+)))
(define sane-custom-minimal (define sane-custom-minimal
(package (package
@ -225,6 +264,16 @@ proving access to any raster image scanner hardware (flatbed scanner,
hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The
package contains the library and drivers."))) package contains the library and drivers.")))
(define simple-scan-custom
(package
(inherit simple-scan) ; Inherit from the original 'simple-scan'
(name "simple-scan-custom") ; Override the package name
(inputs
(modify-inputs (package-inputs simple-scan)
(replace "sane-backends" sane-custom-backends))))) ; Replace the input
;; Service personnalisé
(define %sane-custom-accounts (define %sane-custom-accounts
;; The '60-libsane.rules' udev rules refers to the "scanner" group. ;; The '60-libsane.rules' udev rules refers to the "scanner" group.
(list (user-group (name "scanner") (system? #t)))) (list (user-group (name "scanner") (system? #t))))
@ -253,15 +302,8 @@ package contains the library and drivers.")))
(service-extension account-service-type (service-extension account-service-type
(const %sane-custom-accounts)))))) (const %sane-custom-accounts))))))
(define simple-scan-custom
(package
(inherit simple-scan) ; Inherit from the original 'simple-scan'
(name "simple-scan-custom") ; Override the package name
(inputs
(modify-inputs (package-inputs simple-scan)
(replace "sane-backends" sane-custom-backends))))) ; Replace the input
;; Configuration sudoer personnalisée ;; Configuration sudoer personnalisée
(define %sudoers-specification (define %sudoers-specification
(plain-file "sudoers" "\ (plain-file "sudoers" "\
root ALL=(ALL) ALL root ALL=(ALL) ALL
@ -270,6 +312,7 @@ root ALL=(ALL) ALL
;; Configuration spice personnalisée ;; Configuration spice personnalisée
;; Permet le partage de périphériques USB via virt-manager ;; Permet le partage de périphériques USB via virt-manager
(define %spice-rules (define %spice-rules
(udev-rule (udev-rule
"41-spice.rules" "41-spice.rules"
@ -308,6 +351,9 @@ ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"5512\", MODE=\"664\", GROUP=\"plu
KERNEL==\"sd?1\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"4109\", SYMLINK+=\"nitrospace\" KERNEL==\"sd?1\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"4109\", SYMLINK+=\"nitrospace\"
"))) ")))
;; Fichiers de configuration du home
(define %bashrc_content (define %bashrc_content
(plain-file "bashrc" "\ (plain-file "bashrc" "\
if [ -n \"$GUIX_ENVIRONMENT\" ] if [ -n \"$GUIX_ENVIRONMENT\" ]
@ -392,7 +438,8 @@ fi"))
(kernel-arguments (kernel-arguments
(list (list
"modprobe.blacklist=usbmouse,usbkbd,i2c-hid" "modprobe.blacklist=usbmouse,usbkbd,i2c-hid"
"psmouse.synaptics_intertouch=1")) "psmouse.synaptics_intertouch=1"
"lsm=landlock,yama,loadpin,safesetid,integrity,apparmor,selinux,smack,tomoyo"))
(sudoers-file %sudoers-specification) (sudoers-file %sudoers-specification)
@ -407,6 +454,7 @@ fi"))
(home-directory "/home/neox") (home-directory "/home/neox")
(supplementary-groups (supplementary-groups
'("wheel" '("wheel"
"dialout"
"netdev" "netdev"
"audio" "audio"
"video" "video"
@ -487,6 +535,7 @@ fi"))
"gnome-shell-extension-noannoyance" "gnome-shell-extension-noannoyance"
"gnome-shell-extension-vitals" "gnome-shell-extension-vitals"
"gnome-tweaks" "gnome-tweaks"
"gnulib"
"gnupg" "gnupg"
"gnuplot" "gnuplot"
"gparted" "gparted"
@ -513,6 +562,7 @@ fi"))
"kicad-footprints" "kicad-footprints"
"kicad-symbols" "kicad-symbols"
"kicad-doc" "kicad-doc"
"librecad"
"ldns" "ldns"
"libreoffice" "libreoffice"
"libtree" "libtree"
@ -597,6 +647,7 @@ fi"))
"tree" "tree"
"tor" "tor"
"torbrowser" "torbrowser"
"tuba"
"uefitool" "uefitool"
"ungoogled-chromium" "ungoogled-chromium"
"unzip" "unzip"
@ -618,6 +669,7 @@ fi"))
"zstd")) "zstd"))
(list (list
gnupload
sane-custom-backends sane-custom-backends
simple-scan-custom) simple-scan-custom)
@ -739,10 +791,10 @@ fi"))
;; Specify a swap file for the system, which resides on the ;; Specify a swap file for the system, which resides on the
;; root file system. ;; root file system.
;(swap-devices (swap-devices
; (list (list
; (swap-space (swap-space
; (target "/swapfile")))) (target "/swapfile"))))
;; La liste des systèmes de fichiers montés au démarrage ;; La liste des systèmes de fichiers montés au démarrage
;; On configure ici le montage des partitions chiffrées et non chiffrées ;; On configure ici le montage des partitions chiffrées et non chiffrées