Created
April 13, 2020 13:18
-
-
Save JekoTronik/14b5e590a91b7765f8699289500d8fdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This is a Guix deployment of a "bare bones" setup, with | |
;; no X11 display server, to a machine with an SSH daemon | |
;; listening on localhost:2222. A configuration such as this | |
;; may be appropriate for virtual machine with ports | |
;; forwarded to the host's loopback interface. | |
(use-service-modules networking ssh) | |
(use-package-modules bootloaders) | |
(define %system | |
(operating-system | |
(host-name "deployed0") | |
(timezone "Europe/Paris") | |
(locale "fr_FR.utf8") | |
;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the | |
;; target hard disk, and "my-root" is the label of the target | |
;; root file system. | |
(bootloader (bootloader-configuration | |
(bootloader grub-bootloader) | |
(target "/dev/vda"))) | |
(file-systems (cons (file-system | |
(device (file-system-label "my-root")) | |
(mount-point "/") | |
(type "ext4")) | |
%base-file-systems)) | |
;; DigitalOcean specifit configuration. | |
;; Have to investigate in the future. | |
(initrd-modules (append (list "virtio_scsi") | |
%base-initrd-modules)) | |
;; Globally-installed packages. | |
(packages (list %base-packages)) | |
;; Add services to the baseline: a DHCP client and | |
;; an SSH server. | |
(services (append (list (service dhcp-client-service-type) | |
(service openssh-service-type | |
(openssh-configuration | |
(permit-root-login #t) | |
(authorized-keys | |
`(("jeko" ,(local-file "pancake.pub") ,(local-file "patch.pub")))) | |
(port-number 2222)))) | |
%base-services)) | |
(users | |
(cons (user-account | |
(name "jeko") | |
(group "users") | |
(supplementary-groups '("wheel")) ;permet d'utiliser sudo, etc. | |
(comment "Jérémy Korwin-Zmijowski") | |
(home-directory "/home/jeko")) | |
%base-user-accounts)))) | |
(list (machine | |
(operating-system %system) | |
(environment digital-ocean-environment-type) | |
(configuration (digital-ocean-configuration | |
(region "fra1") | |
(size "s-1vcpu-1gb") | |
(enable-ipv6? #f) | |
(tags (list "deployed" "guix")) | |
(ssh-key `(,(local-file "patch.pub"))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment