Compare commits

...

2 Commits

Author SHA1 Message Date
noah metz 4e5a5a06ed Cleanup and styling 2023-12-05 23:14:19 -07:00
noah metz 66c2d6470e Conditionally create sssd.conf 2023-12-05 23:13:42 -07:00
2 changed files with 17 additions and 12 deletions

@ -70,8 +70,7 @@
(define-configuration sssd-configuration (define-configuration sssd-configuration
(sssd (file-like sssd) "sssd package to use") (sssd (file-like sssd) "sssd package to use")
(pam-services (list-of-strings (list "su" "sddm" "login" "sshd" (pam-services (list-of-strings (list "su" "sddm" "login" "sshd" "passwd"))
"passwd"))
"list of pam services to configure login for" "list of pam services to configure login for"
(lambda (a b) (lambda (a b)
"")) ""))
@ -139,8 +138,11 @@
(user (getpw "root"))) (user (getpw "root")))
(mkdir-p/perms dbusdir user 493) (mkdir-p/perms dbusdir user 493)
(mkdir-p/perms dbdir user 493) (mkdir-p/perms dbdir user 493)
(copy-file #$(sssd-configuration-file config) "/var/lib/sss/sssd.conf") (unless (file-exists? "/var/lib/sss/sssd.conf")
(chmod "/var/lib/sss/sssd.conf" #o600)))) (begin
(copy-file #$(sssd-configuration-file config)
"/var/lib/sss/sssd.conf")
(chmod "/var/lib/sss/sssd.conf" #o600))))))
(define-public sssd-service-type (define-public sssd-service-type
(service-type (name 'sssd) (service-type (name 'sssd)

@ -234,16 +234,18 @@
(sssd-configuration (domains (list (cons "metznet.ca" (sssd-configuration (domains (list (cons "metznet.ca"
(sssd-domain-configuration (id_provider (sssd-domain-configuration (id_provider
"ldap") "ldap")
(debug_level "10") (debug_level
"10")
(auth_provider (auth_provider
"ldap") "ldap")
(cache_credentials (cache_credentials
#t) #t)
(ldap_schema "rfc2307bis") (ldap_schema
"rfc2307bis")
(ldap_group_member (ldap_group_member
"member") "member")
(ldap_group_object_class (ldap_group_object_class
"posixGroupAux") "posixGroupAux")
(ldap_uri (ldap_uri
"ldaps://ldap.metznet.ca") "ldaps://ldap.metznet.ca")
(ldap_tls_reqcert (ldap_tls_reqcert
@ -312,6 +314,7 @@
"") "")
"dc=metznet,dc=ca" "dc=metznet,dc=ca"
(list-ref (list-ref
(command-line) (command-line)
1)) 1))
@ -350,14 +353,14 @@
%nscd-default-caches)))) %nscd-default-caches))))
(define %metznet-desktop-services (define %metznet-desktop-services
(append %metznet-services (list (service sddm-service-type (sddm-configuration))) (append %metznet-services
(list (service sddm-service-type
(sddm-configuration)))
(modify-services %desktop-services (modify-services %desktop-services
(delete gdm-service-type) (delete gdm-service-type)
(nscd-service-type config => %metznet-nscd-configuration) (nscd-service-type config => %metznet-nscd-configuration)
(network-manager-service-type config => (network-manager-service-type config =>
(network-manager-configuration (inherit (network-manager-configuration (vpn-plugins
config)
(vpn-plugins
(list (list
network-manager-openvpn))))))) network-manager-openvpn)))))))