From 59926c02ef36383c89b0bba74b276059f1f207a9 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Thu, 30 Nov 2023 19:48:47 -0700 Subject: [PATCH] Updated makefile, fixed base-server --- Makefile | 6 +++--- machines/base-server.scm | 2 +- system/base-system.scm | 33 ++++++++++++++++++++++----------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 3041fbe..3b44ba3 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,11 @@ GUIX_IMAGE_CMD ?= guix system image $(GUIX_SUBSTITUTE_FLAG) --image-type=qcow2 $ VM_RAM ?= 4000 VM_CPU ?= 4 -machines/%.qcow2: machines/%.scm +%.qcow2: %.scm $(eval RO := $(shell $(GUIX_IMAGE_CMD) $<)) install -C -m 666 -o $(LIBVIRT_USER) -g $(LIBVIRT_GROUP) $(RO) $@ -.PHONY: machines/% -machines/%: machines/%.scm +.PHONY: % +%: %.scm $(eval VM_SCRIPT := $(shell guix system $(GUIX_LIB_FLAGS) $(GUIX_SUBSTITUTE_FLAG) vm $<)) $(VM_SCRIPT) -m $(VM_RAM) -smp $(VM_CPU) -nic user,model=virtio-net-pci diff --git a/machines/base-server.scm b/machines/base-server.scm index 1788802..eae9c7f 100644 --- a/machines/base-server.scm +++ b/machines/base-server.scm @@ -1,4 +1,4 @@ -(define-module (machines base-desktop) +(define-module (machines base-server) #:use-module (system base-system)) %metznet-base-server-system diff --git a/system/base-system.scm b/system/base-system.scm index b645061..54002a7 100644 --- a/system/base-system.scm +++ b/system/base-system.scm @@ -152,13 +152,23 @@ (define-configuration/no-serialization metznet-system-configuration (certs (file-like le-certs) "certificate package") - (pam-services (list-of-strings (list - "su" - "gdm-password" - "login" - "sshd" - "passwd")) - "list of pam services to configure")) + (channels-file (file-like (scheme-file + "channels.scm" + #~(append (list + (channel + (name 'metznet-channel) + (url + "https://git.metznet.ca/MetzNet/metznet-channel.git")) + (channel + (name 'nonguix) + (url + "https://gitlab.com/nonguix/nonguix.git")) + %default-channels))))) + "channels.scm") +(pam-services (list-of-strings (list "su" "gdm-password" "login" "sshd" + "passwd")) + "list of pam services to configure") +unbalanced (define (pam-mkhomedir-service configuration) (lambda (pam) @@ -181,10 +191,11 @@ (symlink (string-append #$zsh "/bin/zsh") "/bin/zsh")))) (define (metznet-etc-service configuration) - `(("openvpn/ta.key" ,(local-file "ta.key")) - ("openvpn/ca.crt" ,(local-file "ca.crt")) - ("openvpn/client.crt" ,(local-file "client.crt")) - ("openvpn/client.key" ,(local-file "client.key")))) + (("guix/channels.scm" ,()) + ("openvpn/ta.key" ,(local-file "ta.key")) + ("openvpn/ca.crt" ,(local-file "ca.crt")) + ("openvpn/client.crt" ,(local-file "client.crt")) + ("openvpn/client.key" ,(local-file "client.key")))) (define metznet-service-type (service-type (name 'metznet-service)