Lisää levykuva käyttöjärjestelmäpohjalle
This commit is contained in:
parent
a3665902d4
commit
9368d9625f
20
channels.lock.scm
Normal file
20
channels.lock.scm
Normal file
@ -0,0 +1,20 @@
|
||||
(list (channel
|
||||
(name 'guix)
|
||||
(url "https://git.guix.gnu.org/guix.git")
|
||||
(branch "master")
|
||||
(commit "8aa82da48c219d3e9b47b209660215e4ddd33d09")
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
||||
(openpgp-fingerprint
|
||||
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
|
||||
(channel
|
||||
(name 'nonguix)
|
||||
(url "https://gitlab.com/nonguix/nonguix")
|
||||
(branch "master")
|
||||
(commit "653504e6551198c9b2b998c143d7cf2675b22547")
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
|
||||
(openpgp-fingerprint
|
||||
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
|
||||
18
channels.scm
Normal file
18
channels.scm
Normal file
@ -0,0 +1,18 @@
|
||||
(list (channel
|
||||
(name 'guix)
|
||||
(url "https://git.guix.gnu.org/guix.git")
|
||||
(branch "master")
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
||||
(openpgp-fingerprint
|
||||
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
|
||||
(channel
|
||||
(name 'nonguix)
|
||||
(url "https://gitlab.com/nonguix/nonguix")
|
||||
(branch "master")
|
||||
(introduction
|
||||
(make-channel-introduction
|
||||
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
|
||||
(openpgp-fingerprint
|
||||
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
|
||||
4
files/keys/guix/nonguix.pub
Normal file
4
files/keys/guix/nonguix.pub
Normal file
@ -0,0 +1,4 @@
|
||||
(public-key
|
||||
(ecc
|
||||
(curve Ed25519)
|
||||
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))
|
||||
6
files/keys/guix/saku-laesvuori-x-kone.pub
Normal file
6
files/keys/guix/saku-laesvuori-x-kone.pub
Normal file
@ -0,0 +1,6 @@
|
||||
(public-key
|
||||
(ecc
|
||||
(curve Ed25519)
|
||||
(q #24B936F16F885AA15419CA6E57C2D402AE2887135167FEFE18B90DC15C6B8AAD#)
|
||||
)
|
||||
)
|
||||
1
files/keys/ssh/saku-laesvuori-x-kone.pub
Normal file
1
files/keys/ssh/saku-laesvuori-x-kone.pub
Normal file
@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtvgHIqHsLPh+X2OqdUUiTnWn8vtgMrpV3UHluAF26l4YEjEpoh7NBI9QFaILkK68jcyiJ/0O+ikJnqjRZg3zm4mmvnhP+1UypuoMeZq3GR2WUdmUV58c6Y37SYTXICXFDKgKZIBEFbMi/J6HuHIyt/t1fl5htiDah594rxRaB3QoE3KqqHTIAeFncj/bwkyRRkBMSrI0Z0+OpEZ6qzlXYgWmAHsra4iuTxvTssIJdBfEKzqDeKGTjCcyUbyz/XaCShES6XSDnuFNT4wQfFx3SRT99VzXIAFwskRRb/B7Yx0NgR6WGHcFm4qsUay/95wK9R6DXP1rLAXzbJVrC8Y1de2D3Lo4bkVU3lh4JyRAyYybHq9qGQ4DNZ0tMiADfd3w1ZuoURUpjEYaa9FkLvIA36VQINGqRMQ/PXYVpppFqe8Y7CNdLWtdDOjJEq0QSkSmdolTMcxzWLdqyt+TSlCoRgMdbafzxQx184ij7+QZ8wa/M/xNytgru4zM+/wQhd9c= saku@X-kone
|
||||
19
modules/oms/channel-file.scm
Normal file
19
modules/oms/channel-file.scm
Normal file
@ -0,0 +1,19 @@
|
||||
(define-module (oms channel-file)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix utils)
|
||||
#:export (channel-file))
|
||||
|
||||
(define (channel-path file)
|
||||
(string-append (current-source-directory) "/../../files/" file))
|
||||
|
||||
(define-syntax channel-file
|
||||
(lambda (s)
|
||||
(syntax-case s ()
|
||||
((channel-file file rest ...)
|
||||
(string? (syntax->datum #'file))
|
||||
(with-syntax ((file* (datum->syntax #'file (channel-path
|
||||
(syntax->datum #'file)))))
|
||||
#'(local-file file* rest ...)))
|
||||
((channel-file file rest ...)
|
||||
#'(local-file (channel-path file)
|
||||
rest ...)))))
|
||||
31
modules/oms/image.scm
Normal file
31
modules/oms/image.scm
Normal file
@ -0,0 +1,31 @@
|
||||
(define-module (oms image)
|
||||
#:use-module (guix)
|
||||
#:use-module (gnu image)
|
||||
#:use-module (gnu packages bootloaders)
|
||||
#:use-module (oms systems))
|
||||
|
||||
(define-public base-image
|
||||
(image
|
||||
(name 'oms-base)
|
||||
(format 'disk-image)
|
||||
(operating-system (base-operating-system "OMS-pohja"))
|
||||
(partition-table-type 'gpt)
|
||||
(partitions
|
||||
(list (partition
|
||||
(file-system "vfat")
|
||||
(flags '(esp))
|
||||
(initializer #~(lambda* (root #:key #:allow-other-keys)
|
||||
(initialize-efi-partition root #:grub-efi #+grub-efi)))
|
||||
(label "OMS-F32-EFI")
|
||||
(size (expt 2 28))) ; 256 MiB
|
||||
(partition
|
||||
(file-system "swap")
|
||||
(initializer #~(const #t)) ; default is initialize-root-partition
|
||||
(label "oms-guix-swap")
|
||||
(size (expt 2 34))) ; 16 GiB
|
||||
(partition
|
||||
(file-system "btrfs")
|
||||
(flags '(boot))
|
||||
(initializer #~initialize-root-partition)
|
||||
(label "oms-guix-system-btrfs-root"))))
|
||||
(volatile-root? #f)))
|
||||
96
modules/oms/systems.scm
Normal file
96
modules/oms/systems.scm
Normal file
@ -0,0 +1,96 @@
|
||||
(define-module (oms systems)
|
||||
#:use-module (gnu)
|
||||
#:use-module (gnu packages cups)
|
||||
#:use-module (gnu services base)
|
||||
#:use-module (gnu services cups)
|
||||
#:use-module (gnu services desktop)
|
||||
#:use-module (gnu services guix)
|
||||
#:use-module (gnu services ssh)
|
||||
#:use-module (gnu services xorg)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (nongnu packages linux)
|
||||
#:use-module (nongnu system linux-initrd)
|
||||
#:use-module (oms channel-file)
|
||||
#:export (base-operating-system))
|
||||
|
||||
(define* (base-operating-system host-name #:key (firmware (list linux-firmware)))
|
||||
(operating-system
|
||||
(kernel linux)
|
||||
(kernel-arguments
|
||||
(append '("resume=oms-guix-swap") %default-kernel-arguments))
|
||||
(initrd microcode-initrd)
|
||||
(firmware firmware)
|
||||
(locale "fi_FI.utf8")
|
||||
(timezone "Europe/Helsinki")
|
||||
(keyboard-layout (keyboard-layout "fi"))
|
||||
(host-name host-name)
|
||||
(users (cons* (user-account
|
||||
(name "oms")
|
||||
(comment "Olarinmäen samoojat")
|
||||
(group "users")
|
||||
(home-directory "/home/oms")
|
||||
(supplementary-groups '("wheel" "netdev" "audio" "video")))
|
||||
%base-user-accounts))
|
||||
(services
|
||||
(append
|
||||
(list (service gnome-desktop-service-type)
|
||||
(service openssh-service-type
|
||||
(openssh-configuration
|
||||
(permit-root-login 'prohibit-password)
|
||||
(authorized-keys
|
||||
`(("root" ,(channel-file "keys/ssh/saku-laesvuori-x-kone.pub"))))))
|
||||
(service guix-publish-service-type
|
||||
(guix-publish-configuration
|
||||
(port 8001)
|
||||
(host "0.0.0.0")
|
||||
(advertise? #t)))
|
||||
(service cups-service-type
|
||||
(cups-configuration
|
||||
(web-interface? #t)
|
||||
(extensions (list cups-filters epson-inkjet-printer-escpr))))
|
||||
(set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))))
|
||||
(modify-services %desktop-services
|
||||
(guix-service-type config =>
|
||||
(guix-configuration
|
||||
(inherit config)
|
||||
(discover? #t)
|
||||
(substitute-urls
|
||||
(append %default-substitute-urls ; more often used servers first
|
||||
(list "https://substitutes.nonguix.org")))
|
||||
(authorized-keys
|
||||
(append (list (channel-file "keys/guix/nonguix.pub")
|
||||
(channel-file "keys/guix/saku-laesvuori-x-kone.pub"))
|
||||
%default-authorized-guix-keys))))
|
||||
(gdm-service-type config =>
|
||||
(gdm-configuration
|
||||
(inherit config)
|
||||
(auto-login? #t)
|
||||
(default-user "oms"))))))
|
||||
(bootloader (bootloader-configuration
|
||||
(bootloader grub-efi-bootloader)
|
||||
(targets (list "/boot/efi"))
|
||||
(keyboard-layout keyboard-layout)))
|
||||
(swap-devices
|
||||
(list (swap-space
|
||||
(target (file-system-label "oms-guix-swap"))
|
||||
(discard? #t))))
|
||||
(file-systems
|
||||
(append (list (file-system
|
||||
(mount-point "/")
|
||||
(device (file-system-label "oms-btrfs-root"))
|
||||
(flags '(no-atime))
|
||||
(options "compress-force=zstd")
|
||||
(type "btrfs"))
|
||||
(file-system
|
||||
(mount-point "/boot/efi")
|
||||
(device (file-system-label "OMS-F32-EFI"))
|
||||
(type "vfat"))
|
||||
(file-system
|
||||
(mount-point "/tmp")
|
||||
(device "tmpfs")
|
||||
(type "tmpfs")
|
||||
(check? #f)
|
||||
(flags '(no-dev no-suid))
|
||||
(options "size=70%")
|
||||
(create-mount-point? #t)))
|
||||
%base-file-systems))))
|
||||
Loading…
Reference in New Issue
Block a user