moses.scm (4804B)
1 (define-module (system moses) 2 #:use-module (guix gexp) 3 #:use-module (guix packages) 4 #:use-module (gnu bootloader) 5 #:use-module (gnu bootloader grub) 6 #:use-module (gnu packages admin) 7 #:use-module (gnu packages linux) 8 #:use-module (gnu packages wm) 9 #:use-module (gnu services) 10 #:use-module (gnu services base) 11 #:use-module (gnu services desktop) 12 #:use-module (gnu services guix) 13 #:use-module (gnu services sddm) 14 #:use-module (gnu system) 15 #:use-module (gnu system keyboard) 16 #:use-module (gnu system linux-initrd) 17 #:use-module (gnu system nss) 18 #:use-module (gnu system shadow) 19 #:use-module (nongnu packages linux) 20 #:use-module (nongnu system linux-initrd) 21 #:use-module (mt artwork) 22 #:use-module (mt hosts) 23 #:use-module (mt services) 24 #:use-module (mt system) 25 #:use-module (mt packages desktop) 26 #:use-module (home lukejw) 27 #:export (moses-os)) 28 29 (define %issue " 30 \"Keep thy mind in hell and despair not.\" 31 ") 32 33 (define %vial-udev-rules 34 (file->udev-rule 35 "59-vial.rules" 36 (plain-file "59-vial.rules" "\ 37 KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{serial}==\"*vial:f64c2b3c*\",\ 38 MODE=\"0660\", GROUP=\"users\", TAG+=\"uaccess\", TAG+=\"udev-acl\""))) 39 40 (define moses-os 41 (operating-system 42 (host-name "moses") 43 (timezone "America/New_York") 44 (locale "en_US.utf8") 45 46 (issue %issue) 47 48 (keyboard-layout (keyboard-layout "us")) 49 50 (kernel linux-lts) 51 52 ;; Intel is not used on this machine, only AMD and Qualcomm. 53 (initrd (lambda (file-systems . rest) 54 (apply microcode-initrd file-systems 55 #:initrd base-initrd 56 #:microcode-packages (list amd-microcode) 57 rest))) 58 (firmware (list amdgpu-firmware 59 atheros-firmware)) 60 61 (name-service-switch %mdns-host-lookup-nss) 62 63 (bootloader (bootloader-configuration 64 (bootloader grub-efi-bootloader) 65 (targets '("/boot/efi")) 66 (theme (grub-theme 67 (inherit (grub-theme)) 68 (image (file-append %mt-artwork 69 "/grub/monochrome-16-10.svg")) 70 (color-normal '((fg . dark-gray) 71 (bg . black))) 72 (color-highlight '((fg . white) 73 (bg . black))) 74 (resolution '(1920 . 1200)))) 75 (keyboard-layout keyboard-layout))) 76 77 (swap-devices %mt-swap-devices) 78 79 (file-systems %mt-file-systems) 80 81 (users 82 (cons* 83 (user-account 84 (name "lukejw") 85 (comment "Luke Willis") 86 (group "users") 87 (home-directory "/home/lukejw") 88 (supplementary-groups '("wheel" "netdev" "audio" "video" "kvm"))) 89 (user-account 90 (name "jaynw") 91 (comment "Jay Willis") 92 (group "users") 93 (home-directory "/home/jaynw") 94 (supplementary-groups '("netdev" "audio" "video" "kvm"))) 95 ;; Demo users 96 (user-account 97 (name "caseydc") 98 (comment "Casey") 99 (group "users") 100 (home-directory "/home/casey") 101 (supplementary-groups '("wheel" "netdev" "audio" "video"))) 102 %base-user-accounts)) 103 104 (skeletons '()) 105 106 (packages 107 (append 108 (list sway-with-options 109 labwc) 110 %mt-base-packages)) 111 112 (services 113 (append 114 (list 115 ;; For use with the mt-update script. 116 (etc-mt-client-service "loquatdev") 117 ;; Blacklist the worst parts of the internet 118 (simple-service 'hosts-blacklist hosts-service-type 119 %hosts-porn-social-only) 120 ;; Allow reconfiguration of my VIAL-based keyboard 121 (udev-rules-service 'vial-udev-rules 122 %vial-udev-rules) 123 ;; Prevent MonasTech home-environments from using NVIDIA drivers. 124 ;; This is purely for the purpose of dogfooding clients' configurations 125 ;; in the case they have a NVIDIA machine. 126 (simple-service 'global-env-vars etc-profile-d-service-type 127 (list (plain-file "global-env-vars.sh" 128 "MT_DISABLE_NVIDIA=1"))) 129 (greetd-helper-service)) 130 %mt-clergy-services 131 (modify-services %mt-desktop-services 132 ;; I prefer my computer to only suspend if asked to explicitly 133 (elogind-service-type config => (elogind-configuration 134 (inherit config) 135 (handle-lid-switch 'ignore) 136 (handle-lid-switch-external-power 'ignore)))))))) 137 138 moses-os