Skip to content

Commit

Permalink
Clean up config-base.
Browse files Browse the repository at this point in the history
* examples/config-base.scm (cidr->netmask): Remove unused procedure.
(default-os)[packages]: Remove everything except nss-certs.
  • Loading branch information
mbakke committed Nov 8, 2022
1 parent 168ad62 commit 8ff0372
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions examples/config-base.scm
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
(use-modules (gnu)
(ice-9 match)
(srfi srfi-60)
(ice-9 textual-ports)
(guix build utils)
(rnrs io ports))
(use-package-modules certs screen linux cryptsetup)
(use-service-modules networking ssh sysctl)

(define (cidr->netmask address)
"Convert a CIDR specification such as 10.0.0.0/24 to 255.255.255.0."
(let ((mask (string->number (match (string-split address #\/)
((address mask) mask)
(_ "32")))))
(inet-ntop AF_INET
(arithmetic-shift (inet-pton AF_INET "255.255.255.255")
(- 32 mask)))))

(define %target-uuid (getenv "TARGET_UUID"))

(define %mapped-devices
Expand Down Expand Up @@ -172,13 +161,10 @@
(users %base-user-accounts)

;; Globally-installed packages.
(packages (cons* cryptsetup
lvm2
screen
nss-certs
btrfs-progs
xfsprogs
%base-packages))
(packages
(append (map specification->package
'("nss-certs"))
%base-packages))

;; Add services to the baseline
(services
Expand Down

0 comments on commit 8ff0372

Please sign in to comment.