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
;;;
;;; 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
;;; under the terms of the GNU General Public License as published by
@ -22,41 +22,46 @@
(use-modules
(gnu)
(gnu home)
(gnu home services shells)
(gnu home services gnupg)
(gnu home services shells)
(gnu packages)
(gnu packages gnupg)
(gnu packages freedesktop)
(gnu packages cups)
(gnu packages scanner)
(gnu packages autotools)
(gnu packages avahi)
(gnu packages base)
(gnu packages bash)
(gnu packages boost)
(gnu packages build-tools)
(gnu packages compression)
(gnu packages cups)
(gnu packages freedesktop)
(gnu packages freedesktop)
(gnu packages ftp)
(gnu packages gettext)
(gnu packages ghostscript)
(gnu packages gnome)
(gnu packages glib)
(gnu packages gnome)
(gnu packages gnupg)
(gnu packages gtk)
(gnu packages image)
(gnu packages imagemagick)
(gnu packages libusb)
(gnu packages linux)
(gnu packages messaging)
(gnu packages pkg-config)
(gnu packages python)
(gnu packages scanner)
(gnu packages textutils)
(gnu packages tls)
(gnu packages xml)
(gnu services)
(srfi srfi-1)
(guix gexp)
(guix packages)
(guix git-download)
(guix build-system gnu)
(guix gexp)
(guix git-download)
(guix download)
((guix licenses) #:prefix license:)
(guix packages)
(guix utils)
((guix licenses)
#:prefix license:))
(srfi srfi-1))
(use-service-modules
cups
@ -69,7 +74,41 @@
vpn
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
(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
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
;; The '60-libsane.rules' udev rules refers to the "scanner" group.
(list (user-group (name "scanner") (system? #t))))
@ -253,15 +302,8 @@ package contains the library and drivers.")))
(service-extension account-service-type
(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
(define %sudoers-specification
(plain-file "sudoers" "\
root ALL=(ALL) ALL
@ -270,6 +312,7 @@ root ALL=(ALL) ALL
;; Configuration spice personnalisée
;; Permet le partage de périphériques USB via virt-manager
(define %spice-rules
(udev-rule
"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\"
")))
;; Fichiers de configuration du home
(define %bashrc_content
(plain-file "bashrc" "\
if [ -n \"$GUIX_ENVIRONMENT\" ]
@ -392,7 +438,8 @@ fi"))
(kernel-arguments
(list
"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)
@ -407,6 +454,7 @@ fi"))
(home-directory "/home/neox")
(supplementary-groups
'("wheel"
"dialout"
"netdev"
"audio"
"video"
@ -487,6 +535,7 @@ fi"))
"gnome-shell-extension-noannoyance"
"gnome-shell-extension-vitals"
"gnome-tweaks"
"gnulib"
"gnupg"
"gnuplot"
"gparted"
@ -513,6 +562,7 @@ fi"))
"kicad-footprints"
"kicad-symbols"
"kicad-doc"
"librecad"
"ldns"
"libreoffice"
"libtree"
@ -597,6 +647,7 @@ fi"))
"tree"
"tor"
"torbrowser"
"tuba"
"uefitool"
"ungoogled-chromium"
"unzip"
@ -618,6 +669,7 @@ fi"))
"zstd"))
(list
gnupload
sane-custom-backends
simple-scan-custom)
@ -739,10 +791,10 @@ fi"))
;; Specify a swap file for the system, which resides on the
;; root file system.
;(swap-devices
; (list
; (swap-space
; (target "/swapfile"))))
(swap-devices
(list
(swap-space
(target "/swapfile"))))
;; 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