From 3c0d21d4dde17e6144ba64bb632b37f89e8795cc Mon Sep 17 00:00:00 2001 From: Tissevert Date: Wed, 15 Feb 2023 23:11:22 +0100 Subject: [PATCH] Adapt config to pine --- files/authorized_keys | 1 + packages.scm | 4 +++- pine.system.scm | 32 +++++++++++++++++++------------- rose.system.scm | 2 +- system.common.scm => system.scm | 18 ++++++++++++++---- 5 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 files/authorized_keys rename system.common.scm => system.scm (88%) diff --git a/files/authorized_keys b/files/authorized_keys new file mode 100644 index 0000000..12d7207 --- /dev/null +++ b/files/authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGOChJhdXFjPLFb218mVPSD9IsL7kyHqFdh/u2qcyJsjc5hFNPdnTvHHjQhsX33PaA5IfKM830AziWX/pwnePQQHR1nfw8knEpQaCNPmmHLQkepTeHlXKdSIXrv5fa9I27AWH+8NtAtJIY1F8jbEAGWXF8F6p8vZLybEljsmVOygWrkQmKtmYn/aOo+R7DlX4SnBfXmqWkzoilgI9FmNfaomv6FeU9VVQtemO4XPz/PMIYYvUNCJ2zaVbjNBmA6ZhHmZf3XlK4swnMW49Py2HboKs/MXLPpfwfU+KlLXYUs2wAtL+UFK/6/IUcIpaFdfTid183KQ07jf+uxtpUTEVT kook@burra diff --git a/packages.scm b/packages.scm index 9be6112..a02cf05 100644 --- a/packages.scm +++ b/packages.scm @@ -23,6 +23,7 @@ (gnu packages vim) (gnu packages virtualization) (gnu packages wm) + (gnu packages web) (gnu packages xfce) (gnu packages xorg) (loom packages eyecandy)) @@ -56,7 +57,8 @@ (list gcc-toolchain ghc - git)) + git + jq)) (define %web (list diff --git a/pine.system.scm b/pine.system.scm index b754464..4871c88 100644 --- a/pine.system.scm +++ b/pine.system.scm @@ -1,30 +1,36 @@ (use-modules (gnu) + (gnu services desktop) + (gnu services ssh) (gnu system)) (use-modules (nongnu packages linux) (nongnu system linux-initrd)) -(load "system.common.scm") +(load "system.scm") -(let ((os (install-to (uuid "???" 'ext4)))) +(let ((os (install-to (uuid "a942a6ac-012a-46c5-984e-5f53532a3253" 'ext4)))) (operating-system (inherit os) (host-name "pine") (services - (modify-services - (xfce-desktop-services os))) + (append + (list + (pam-mount "kook" "/dev/md0") + pam-audio + (ssh-only `(("kook" ,(local-file "files/authorized_keys"))))) + (desktop-environment (operating-system-keyboard-layout os)) + (nonguix %desktop-services))) + (kernel linux) + (initrd microcode-initrd) + (firmware (list linux-firmware)) (mapped-devices (list (mapped-device - (source (uuid "???")) - (target "HOME") - (type luks-device-mapping)))) + (source (list "/dev/sdb" "/dev/sdc")) + (target "/dev/md0") + (type raid-device-mapping)) + )) (file-systems (cons* (file-system - (mount-point "/home") - (device (uuid "???" 'ext4)) - (type "ext4") - (dependencies mapped-devices)) - (file-system (mount-point "/boot/efi") - (device (uuid "???" 'fat32)) + (device (uuid "7974-61F4" 'fat32)) (type "vfat")) (operating-system-file-systems os))))) diff --git a/rose.system.scm b/rose.system.scm index 96c8fa4..dc7c932 100644 --- a/rose.system.scm +++ b/rose.system.scm @@ -4,7 +4,7 @@ (use-modules (nongnu packages linux) (nongnu system linux-initrd)) -(load "system.common.scm") +(load "system.scm") (let ((os (install-to (uuid "60c115b5-08f2-435b-95e5-d3b81ffba4f4" 'ext4)))) (operating-system diff --git a/system.common.scm b/system.scm similarity index 88% rename from system.common.scm rename to system.scm index d933871..859ed5b 100644 --- a/system.common.scm +++ b/system.scm @@ -8,10 +8,7 @@ ((gnu services desktop) #:select (xfce-desktop-service-type)) ((gnu services pam-mount) #:select (pam-mount-service-type pam-mount-configuration)) ((gnu services xorg) #:select (set-xorg-configuration xorg-configuration)) - (gnu system) - (rnrs io ports)) -(use-modules (nongnu packages linux) - (nongnu system linux-initrd)) + (gnu system)) (define %utils (list anthy davfs2 gvfs i3-wm ibus ibus-anthy nss-certs)) @@ -44,6 +41,12 @@ (type "ext4")) %base-file-systems)))) +(define pam-audio + (pam-limits-service + (list + (pam-limits-entry "@audio" 'both 'rtprio 99) + (pam-limits-entry "@audio" 'both 'memlock 'unlimited)))) + (define (pam-mount userName device) (service pam-mount-service-type (pam-mount-configuration @@ -71,6 +74,13 @@ (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))))) +(define (ssh-only authorized-keys) + (service openssh-service-type + (openssh-configuration + (password-authentication? #f) + (permit-root-login #f) + (authorized-keys authorized-keys)))) + (define nonguix (lambda (services) (modify-services services