2023-12-03 13:18:42 -07:00
|
|
|
(use-modules (gnu)
|
|
|
|
(metznet aws)
|
2023-12-04 17:30:42 -07:00
|
|
|
(metznet services kdc)
|
2023-12-04 00:53:02 -07:00
|
|
|
(gnu services certbot)
|
2023-12-04 17:30:42 -07:00
|
|
|
(metznet packages kdc)
|
2023-12-03 13:18:42 -07:00
|
|
|
(metznet system base-system)
|
|
|
|
(gnu packages vim)
|
2023-12-03 18:17:19 -07:00
|
|
|
(gnu packages version-control)
|
2023-12-03 13:18:42 -07:00
|
|
|
(gnu packages shells))
|
|
|
|
|
2023-12-04 00:53:02 -07:00
|
|
|
(define %kerberos-dn
|
|
|
|
"uid=kerberos,ou=system,ou=accounts,dc=metznet,dc=ca")
|
|
|
|
|
2023-12-03 13:18:42 -07:00
|
|
|
(operating-system
|
2023-12-04 00:53:02 -07:00
|
|
|
(inherit %metznet-base-server-system)
|
|
|
|
(host-name "kerberos.metznet.ca")
|
2023-12-03 13:18:42 -07:00
|
|
|
(bootloader (bootloader-configuration
|
|
|
|
(bootloader grub-minimal-bootloader)
|
|
|
|
(targets '("/dev/nvme0n1"))))
|
2023-12-04 00:53:02 -07:00
|
|
|
(swap-devices (list (swap-space
|
|
|
|
(target (file-system-label "krb-guix-swap")))))
|
2023-12-03 13:18:42 -07:00
|
|
|
(file-systems (cons (file-system
|
2023-12-03 13:21:10 -07:00
|
|
|
(device (file-system-label "krb-guix-data"))
|
2023-12-03 13:18:42 -07:00
|
|
|
(mount-point "/")
|
|
|
|
(type "ext4")) %base-file-systems))
|
|
|
|
(sudoers-file (plain-file "sudoers"
|
2023-12-03 18:17:19 -07:00
|
|
|
(string-join (list
|
|
|
|
"root ALL=(ALL:ALL) NOPASSWD:ALL"
|
|
|
|
"%aws ALL=(ALL:ALL) ALL"
|
2023-12-04 00:53:02 -07:00
|
|
|
"%aws ALL=(root) NOPASSWD:/run/setuid-programs/passwd"
|
|
|
|
"") "\n")))
|
2023-12-03 13:18:42 -07:00
|
|
|
|
2023-12-03 18:17:19 -07:00
|
|
|
(packages (cons* git neovim %metznet-base-packages))
|
2023-12-03 13:18:42 -07:00
|
|
|
|
|
|
|
(services
|
2023-12-04 00:53:02 -07:00
|
|
|
(append (list (service aws-service-type)
|
|
|
|
(service kdc-service-type
|
|
|
|
(kdc-configuration (dbdefaults '("ldap_kerberos_container_dn = cn=kerberos,dc=metznet,dc=ca"))
|
|
|
|
(logging '("kdc = SYSLOG:DEBUG:DAEMON"))
|
|
|
|
(dbmodules (list (cons
|
|
|
|
"openldap_ldapconf"
|
|
|
|
(kldap-configuration
|
|
|
|
(ldap_kdc_dn
|
|
|
|
%kerberos-dn)
|
|
|
|
(ldap_kadmind_dn
|
|
|
|
%kerberos-dn)
|
|
|
|
(ldap_servers
|
|
|
|
"ldaps://ldap.metznet.ca")
|
|
|
|
(ldap_service_password_file
|
|
|
|
"/var/lib/kerberos/service.keyfile")))))
|
|
|
|
(realms (list (kdc-realm-configuration
|
|
|
|
(name "METZNET.CA")
|
|
|
|
(database_module
|
|
|
|
"openldap_ldapconf")
|
|
|
|
(default_principal_flags
|
|
|
|
"+preauth")
|
|
|
|
(acl_file (plain-file
|
|
|
|
"kadm5.acl"
|
|
|
|
"*/admin@METZNET.CA *\n")))))))
|
|
|
|
(service certbot-service-type
|
|
|
|
(certbot-configuration (email "admin@metznet.ca")
|
|
|
|
(certificates (list (certificate-configuration
|
|
|
|
(domains '
|
|
|
|
("kerberos.metznet.ca"))))))))
|
|
|
|
%metznet-server-services)))
|
2023-12-03 13:18:42 -07:00
|
|
|
|