;; (C) Copyright Collin J. Doering 2024 ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; File: balg02.scm ;; Author: Collin J. Doering ;; Date: Feb 24, 2024 (define-module (guix-na config balg02) #:use-module (gnu) #:use-module (gnu system) #:use-module (gnu packages bash) #:use-module (gnu packages shells) #:use-module (gnu services base) #:use-module (gnu services cuirass) #:use-module (gnu services networking) #:use-module (gnu services ssh) #:use-module (gnu services web) #:export (balg02 %system)) (define %automation-user "auto") (define (balg02 efi-boot-uuid) (operating-system (host-name "balg02") (timezone "US/Central") (locale "en_US.utf8") (keyboard-layout (keyboard-layout "us")) (kernel-arguments (cons* "console=ttyS0,115200" "console=tty0" %default-kernel-arguments)) (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (terminal-inputs '(console serial_1)) (terminal-outputs '(console serial_1)) (serial-unit 1) (serial-speed 115200) (targets '("/boot/efi")))) (file-systems (append (list (file-system (device (file-system-label "root")) (mount-point "/") (type "btrfs") (options "subvol=@,compress=zstd")) (file-system (device (file-system-label "root")) (mount-point "/swap") (type "btrfs") (options "subvol=@swap")) (file-system (device (uuid efi-boot-uuid 'fat)) (mount-point "/boot/efi") (type "vfat"))) %base-file-systems)) (swap-devices (list (swap-space (target "/swap/swapfile") (dependencies (filter (file-system-mount-point-predicate "/swap") file-systems))))) (users (cons* (user-account (name %automation-user) (comment "Automation User") (group "users") (shell #~(string-append #$bash "/bin/bash")) (supplementary-groups '("wheel")) (home-directory "/home/auto")) (user-account (name "collin") (comment "Admin user") (group "users") (shell #~(string-append #$zsh "/bin/zsh")) (supplementary-groups '("wheel")) (home-directory "/home/collin")) %base-user-accounts)) (packages (append (map specification->package '("nss-certs" "recutils" "openssh" "tmux" "emacs" "emacs-guix")) %base-packages)) (services (append (list (service openssh-service-type (openssh-configuration (password-authentication? #f) (allow-agent-forwarding? #t) (authorized-keys `(("auto" ,(local-file "../../../.pubkeys/deploy-key.pub")) ("collin" ,(local-file "../../../.pubkeys/collin.pub")) ("root" ,(local-file "../../../.pubkeys/collin.pub")))))) (service static-networking-service-type (list (static-networking (addresses (list (network-address (device "eno8303") (value "216.37.76.55/24")))) (routes (list (network-route (destination "default") (gateway "216.37.76.1")))) (name-servers '("216.37.64.2" "216.37.64.3"))))) (service ntp-service-type)) %base-services)))) (define %system (balg02 "3AF8-9E67"))