Updated makefile, fixed base-server

master
noah metz 2023-11-30 19:48:47 -07:00
parent d40578487e
commit 59926c02ef
3 changed files with 26 additions and 15 deletions

@ -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

@ -1,4 +1,4 @@
(define-module (machines base-desktop)
(define-module (machines base-server)
#:use-module (system base-system))
%metznet-base-server-system

@ -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)