Compare commits

...

2 Commits

Author SHA1 Message Date
noah metz 0a5e0a3c60 Use openvpn client service for desktop vpn 2023-12-07 17:35:02 -07:00
noah metz 3e7e0e5008 Revert "Removed go packages that already existed in syncthing"
This reverts commit fdfb0db159.
2023-12-07 17:21:18 -07:00
2 changed files with 94 additions and 21 deletions

@ -2,7 +2,6 @@
#:use-module (guix packages)
#:use-module (gnu packages golang)
#:use-module (gnu packages golang-check)
#:use-module (gnu packages syncthing)
#:use-module (guix build download)
#:use-module (guix git-download)
#:use-module (guix memoization)
@ -155,6 +154,85 @@
(("testenv.MustHaveExecPath\\(t, \"whoami\"\\)")
"t.Skipf(\"no passwd file present\")"))))))))))
(define-public go-github-com-azure-go-ntlmssp
(package
(name "go-github-com-azure-go-ntlmssp")
(version "0.0.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Azure/go-ntlmssp.git")
(commit "754e69321358ada85ce213a4ec971d3e4d1bfdf7")))
(file-name (git-file-name name version))
(sha256
(base32 "0dg20fwylf5lpsc5fgnnzw7jxz0885bg97lla1b5wrlhjas6lidn"))))
(build-system go-build-system)
(native-inputs `(("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
(arguments
'(#:phases (modify-phases %standard-phases
(delete 'check))
#:import-path "github.com/Azure/go-ntlmssp"))
(home-page "https://github.com/Azure/go-ntlmssp")
(synopsis
"Golang package that provides NTLM/Negotiate authentication over HTTP")
(description
"Protocol details from https://msdn.microsoft.com/en-us/library/cc236621.aspx Implementation hints from http://davenport.sourceforge.net/ntlm.html
This package only implements authentication, no key exchange or encryption. It only supports Unicode (UTF16LE) encoding of protocol strings, no OEM encoding. This package implements NTLMv2.")
(license license:expat)))
(define-public go-github-com-go-asn1-ber
(package
(name "go-github-com-go-asn1-ber")
(version "1.5.5")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/go-asn1-ber/asn1-ber.git")
(commit "04301b4b1c5ff66221f8f8a394f814a9917d678a")))
(file-name (git-file-name name version))
(sha256
(base32 "1k9yqv963jqwl3i14069pf62il2kjqhg096f6sq55s4qykklpz98"))))
(build-system go-build-system)
(arguments
'(#:import-path "github.com/go-asn1-ber/asn1-ber"))
(home-page "https://github.com/go-asn1-ber/asn1-ber")
(synopsis
"ASN1 BER Encoding / Decoding Library for the GO programming language.")
(description
"Working: Very basic encoding / decoding needed for LDAP protocol")
(license license:expat)))
(define-public go-github-com-go-ldap-ldap
(package
(name "go-github-com-go-ldap-ldap")
(version "3.4.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/go-ldap/ldap.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "019j58rhkqp3dnn3c9nj7bjc1h52fs7i0lml5gdwhwn837c0aahb"))))
(build-system go-build-system)
(propagated-inputs `(("go-github-com-azure-go-ntlmssp" ,go-github-com-azure-go-ntlmssp)
("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
("go-github-com-google-uuid" ,go-github-com-google-uuid)
("go-github-com-go-asn1-ber" ,go-github-com-go-asn1-ber)
("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify)))
(arguments
'(#:phases (modify-phases %standard-phases
(delete 'check))
#:import-path "github.com/go-ldap/ldap"))
(home-page "https://github.com/go-ldap/ldap")
(synopsis "Basic LDAP v3 functionality for the GO programming language.")
(description
"Basic LDAP v3 functionality for the GO programming language.")
(license license:expat)))
(define-public metznet-pubkey
(package
(name "metznet-pubkey")
@ -172,7 +250,7 @@
(arguments
`(#:import-path "git.metznet.ca/Metznet/pubkey"))
(native-inputs `(("go-github-com-go-ldap-ldap" ,go-github-com-go-ldap-ldap)
("go-github-com-go-asn1-ber-asn1-ber" ,go-github-com-go-asn1-ber-asn1-ber)))
("go-github-com-go-asn1-ber" ,go-github-com-go-asn1-ber)))
(synopsis "Get public key from ldap")
(description
"This package provides a command-line tool to get public keys from an ldap server")

@ -331,6 +331,18 @@
"KerberosAuthentication yes")
"\n"))))
(service krb5-service-type %metznet-krb5-config)
(service openvpn-client-service-type
(openvpn-client-configuration (ca "/var/lib/openvpn/ca.crt")
(cert
"/var/lib/openvpn/client.crt")
(key
"/var/lib/openvpn/client.key")
(tls-auth
"/var/lib/openvpn/ta.key")
(persist-key? #f)
(remote (list (openvpn-remote-configuration
(name
"vpn.metznet.ca"))))))
(service pam-krb5-service-type
(pam-krb5-configuration (pam-krb5 pam-krb5)
(minimum-uid 1000)))
@ -358,11 +370,7 @@
(sddm-configuration)))
(modify-services %desktop-services
(delete gdm-service-type)
(nscd-service-type config => %metznet-nscd-configuration)
(network-manager-service-type config =>
(network-manager-configuration (vpn-plugins
(list
network-manager-openvpn)))))))
(nscd-service-type config => %metznet-nscd-configuration))))
(define %base-services-nscd
(modify-services %base-services
@ -371,20 +379,7 @@
(define %server-services
(append %metznet-services
(list (service dbus-root-service-type)
(service dhcp-client-service-type)
(service openvpn-client-service-type
(openvpn-client-configuration (ca
"/var/lib/openvpn/ca.crt")
(cert
"/var/lib/openvpn/client.crt")
(key
"/var/lib/openvpn/client.key")
(tls-auth
"/var/lib/openvpn/ta.key")
(persist-key? #f)
(remote (list (openvpn-remote-configuration
(name
"vpn.metznet.ca")))))))))
(service dhcp-client-service-type))))
(define %metznet-server-services
(append %server-services %base-services-nscd))