From bd818dd219c5fb2b0542932fca93070fc3b8e9d7 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Wed, 28 Sep 2022 15:40:15 -0600 Subject: [PATCH] Added ci.scm and updated other systme files with better naming --- system/base-system.scm | 16 ++++++++-------- system/clients/otto.scm | 22 ++-------------------- system/servers/ci.scm | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 28 deletions(-) create mode 100644 system/servers/ci.scm diff --git a/system/base-system.scm b/system/base-system.scm index 53ec876..98c0cf5 100644 --- a/system/base-system.scm +++ b/system/base-system.scm @@ -72,9 +72,9 @@ (define-public %my-base-packages (append (list metznet-system openldap git neovim zsh nss-certs mit-krb5 openvpn openresolv) %base-packages)) -(define-public %my-desktop-packages (append (list i3-wm i3status dmenu alacritty icecat) %my-base-packages)) +(define-public %metznet-desktop-packages (append (list i3-wm i3status dmenu alacritty icecat) %my-base-packages)) -(define-public %my-server-packages (append (list isc-dhcp) %my-base-packages)) +(define-public %metznet-server-packages (append (list isc-dhcp) %my-base-packages)) (define-public %desktop-setuid-programs (append (list (setuid-program @@ -119,7 +119,7 @@ "55-backlight.rules" "RUN+=\"/bin/chgrp video /sys/class/backlight/intel_backlight/brightness\"")) -(define-public %my-desktop-services +(define-public %metznet-desktop-services (append (list (service openssh-service-type) (service krb5-service-type (krb5-config %domain-kdc %domain-kadmin)) (service pam-krb5-service-type pam-krb5-config) @@ -158,7 +158,7 @@ (service pam-krb5-service-type pam-krb5-config)) %base-services)) -(define-public %my-server-services (append (list +(define-public %metznet-server-services (append (list (service dhcp-client-service-type) (openvpn-client-service #:config (openvpn-client-configuration @@ -207,13 +207,13 @@ (operating-system (inherit base-operating-system) (host-name "base-server") - (packages %my-server-packages) - (services %my-server-services))) + (packages %metznet-server-packages) + (services %metznet-server-services))) (define-public base-desktop-system (operating-system (inherit base-operating-system) (host-name "base-desktop") (setuid-programs %desktop-setuid-programs) - (packages %my-desktop-packages) - (services %my-desktop-services))) + (packages %metznet-desktop-packages) + (services %metznet-desktop-services))) diff --git a/system/clients/otto.scm b/system/clients/otto.scm index 2fa6be0..a92bc1f 100644 --- a/system/clients/otto.scm +++ b/system/clients/otto.scm @@ -34,24 +34,6 @@ #:use-module (gnu services base) #:export (otto-operating-system)) - -; (define (nvidia-insmod-shepherd-service config) -; (list (shepherd-service -; (provision '(nvidia-insmod)) -; (requirement '()) -; (start #~(lambda _ (and -; (zero? (system* (string-append #$nvidia-driver "/bin/nvidia-insmod")))))) -; (one-shot? #t) -; (auto-start? #t) -; (respawn? #f)))) -; -;(define nvidia-insmod-service-type -; (service-type -; (name 'nvidia-insmod-name) -; (extensions -; (list (service-extension shepherd-root-service-type nvidia-insmod-shepherd-service))) -; (default-value '()))) - (define otto-operating-system (operating-system (inherit base-desktop-system) @@ -61,7 +43,7 @@ qemu texlive firefox pavucontrol mupdf gcc-toolchain gnu-make gcc-arm-none-eabi-7-2018-q2-update sane-backends-minimal xsane cups xf86-video-nv xf86-input-libinput vulkan-loader vulkan-tools - (list isc-bind "utils")) %my-desktop-packages)) + (list isc-bind "utils")) %metznet-desktop-packages)) (services (append (list (simple-service 'blueman dbus-root-service-type (list blueman)) (bluetooth-service #:auto-enable? #t) @@ -74,7 +56,7 @@ (service cups-service-type (cups-configuration (web-interface? #t)))) - (modify-services %my-desktop-services + (modify-services %metznet-desktop-services (udev-service-type config => (udev-configuration (inherit config) (rules (append (list diff --git a/system/servers/ci.scm b/system/servers/ci.scm new file mode 100644 index 0000000..e67957d --- /dev/null +++ b/system/servers/ci.scm @@ -0,0 +1,37 @@ +(define-module (system clients otto) + #:use-module (gnu) + #:use-module (gnu packages ci) + #:use-module (gnu services cuirass) + #:use-module (system base-system) + #:export (ci-operating-system)) + +(define ci-operating-system + (operating-system + (inherit base-server-system) + (host-name "ci") + (packages (append (list cuirass) %metznet-server-packages)) + (services (append (list + (service cuirass-service-type + (cuirass-configuration + (specifications #~(list (specification + (name "metznet-channel") + (build '(channels metznet-channel)) + (channels + (cons (channel + (name 'metznet-channel) + (url "git://git.metznet.ca:metznet-channel.git")) + %default-channels)))))))) %metznet-server-services)) + (file-systems + (cons* (file-system + (mount-point "/boot/efi") + (device (uuid "6E88-FE62" 'fat32)) + (type "vfat")) + (file-system + (mount-point "/") + (device + (uuid "ba93a043-9e58-466f-b90f-bf2a6bbf91fe" + 'ext4)) + (type "ext4")) + %base-file-systems)))) + +ci-operating-system