(use-modules (gnu) ((gnu packages cups) #:prefix pc:) ((gnu packages gnome) #:prefix pg:) ((gnu packages package-management) #:prefix pp:) ((gnu services cups) #:prefix sc:) ((gnu services desktop) #:prefix sd:) ((gnu services networking) #:prefix sn:) ((gnu services ssh) #:prefix ss:) ((gnu services xorg) #:prefix sx:) ((guix channels) #:prefix channels:) ((nongnu packages linux) #:prefix npl:) ((nongnu system linux-initrd) #:prefix nsl:)) (define user-name "baptiste") (define channels (cons* (channels:channel (name 'nonguix) (url "https://gitlab.com/nonguix/nonguix") (introduction (channels:make-channel-introduction "897c1a470da759236cc11798f4e0a5f7d4d59fbc" (channels:openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) channels:%default-channels)) (define modified-desktop-services (modify-services sd:%desktop-services (delete sx:gdm-service-type) (mingetty-service-type config => (if (equal? "tty1" (mingetty-configuration-tty config)) (mingetty-configuration (inherit config) (auto-login user-name) (login-pause? #t)) config)) (sd:elogind-service-type config => (sd:elogind-configuration (inherit config) (handle-lid-switch-docked 'suspend) (handle-lid-switch-external-power 'suspend))) (guix-service-type config => (guix-configuration (inherit config) (substitute-urls (cons* "https://substitutes.nonguix.org" %default-substitute-urls)) (authorized-keys (cons* (plain-file "non-guix.pub" "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))") %default-authorized-guix-keys)) (channels channels) (guix (pp:guix-for-channels channels)))) (sn:network-manager-service-type config => (sn:network-manager-configuration (inherit config) (vpn-plugins (list pg:network-manager-openvpn)))))) (operating-system (timezone "Europe/Paris") (keyboard-layout (keyboard-layout "fr" "bepo")) (host-name "guix") (users (cons* (user-account (name user-name) (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video" "input" "tty" "lp" "docker"))) %base-user-accounts)) (services (cons* (service ss:openssh-service-type) (service sn:tor-service-type) (service sc:cups-service-type (sc:cups-configuration (web-interface? #t) (extensions (list pc:cups-filters pc:brlaser)))) (service (@ (gnu services databases) postgresql-service-type) ((@ (gnu services databases) postgresql-configuration) (postgresql (@ (gnu packages databases) postgresql)) (config-file ((@ (gnu services databases) postgresql-config-file) (hba-file (plain-file "pg_hba.conf" " local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust")))))) (service (@ (gnu services docker) containerd-service-type)) (service (@ (gnu services docker) docker-service-type)) (service sx:startx-command-service-type (sx:xorg-configuration (keyboard-layout keyboard-layout) (extra-config (list " Section \"Extensions\" Option \"DPMS\" \"Disable\" EndSection" " Section \"ServerFlags\" Option \"StandbyTime\" \"0\" Option \"SuspendTime\" \"0\" Option \"OffTime\" \"0\" Option \"BlankTime\" \"0\" EndSection")))) modified-desktop-services)) (kernel npl:linux) (initrd nsl:microcode-initrd) (firmware (list npl:linux-firmware)) (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets (list "/boot/efi")) (extra-initrd "/@/key-file.cpio"))) (mapped-devices (list (mapped-device (source (uuid "90b49da5-a317-4892-acf1-07c98f5bbc46")) (target "cryptpart") (type luks-device-mapping) (arguments '(#:key-file "/key-file.bin"))))) (file-systems (cons* (file-system (mount-point "/boot/efi") (device (file-system-label "BOOTPART")) (type "vfat")) (file-system (mount-point "/") (device "/dev/mapper/cryptpart") (options "subvol=@") (type "btrfs") (dependencies mapped-devices)) (file-system (mount-point "/home") (device "/dev/mapper/cryptpart") (options "subvol=@home") (type "btrfs") (dependencies mapped-devices)) %base-file-systems)))