diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-04-18 01:02:27 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-04-18 01:02:27 -0400 |
| commit | 6288091b7fea9bb2df667612fe7a4461a6311b0b (patch) | |
| tree | 2d69764e52a64f278a8479e222cde6c09c786d08 /system.scm | |
Initial commit, more to come!
Diffstat (limited to 'system.scm')
| -rw-r--r-- | system.scm | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/system.scm b/system.scm new file mode 100644 index 0000000..90e99ab --- /dev/null +++ b/system.scm | |||
| @@ -0,0 +1,148 @@ | |||
| 1 | ;; This is an operating system configuration generated | ||
| 2 | ;; by the graphical installer. | ||
| 3 | ;; | ||
| 4 | ;; Once installation is complete, you can learn and modify | ||
| 5 | ;; this file to tweak the system configuration, and pass it | ||
| 6 | ;; to the 'guix system reconfigure' command to effect your | ||
| 7 | ;; changes. | ||
| 8 | |||
| 9 | |||
| 10 | ;; Indicate which modules to import to access the variables | ||
| 11 | ;; used in this configuration. | ||
| 12 | (use-modules (gnu) (nongnu packages linux)) | ||
| 13 | (use-modules (gnu system setuid)) | ||
| 14 | (use-modules (gnu packages admin)) | ||
| 15 | (use-modules (guix packages)) | ||
| 16 | (use-modules (gnu services authentication)) | ||
| 17 | (use-modules (gnu packages shells)) | ||
| 18 | (use-modules (srfi srfi-1)) | ||
| 19 | (use-package-modules security-token) | ||
| 20 | (use-service-modules cups desktop networking ssh xorg sound security-token) | ||
| 21 | |||
| 22 | ; Re-define the base packages to remove sudo | ||
| 23 | (define %my-base-packages | ||
| 24 | (remove (lambda (package) | ||
| 25 | (member (package-name package) | ||
| 26 | (list "sudo" "nano"))) | ||
| 27 | %base-packages )) | ||
| 28 | |||
| 29 | (operating-system | ||
| 30 | (kernel linux) | ||
| 31 | (firmware (list linux-firmware)) | ||
| 32 | (locale "en_US.utf8") | ||
| 33 | (timezone "America/New_York") | ||
| 34 | (keyboard-layout (keyboard-layout "us")) | ||
| 35 | (host-name "RyanThinkpad") | ||
| 36 | |||
| 37 | ;; The list of user accounts ('root' is implicit). | ||
| 38 | (users (cons* (user-account | ||
| 39 | (name "ryan") | ||
| 40 | (comment "Ryan") | ||
| 41 | (group "users") | ||
| 42 | ;(shell (file-append zsh "/bin/zsh")) | ||
| 43 | (home-directory "/home/ryan") | ||
| 44 | (supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "plugdev"))) | ||
| 45 | %base-user-accounts)) | ||
| 46 | |||
| 47 | ;; Packages installed system-wide. Users can also install packages | ||
| 48 | ;; under their own account: use 'guix search KEYWORD' to search | ||
| 49 | ;; for packages and 'guix install PACKAGE' to install a package. | ||
| 50 | (packages (append (map specification->package (list "sway" | ||
| 51 | "swaybg" | ||
| 52 | "swayidle" | ||
| 53 | "swaylock-effects" | ||
| 54 | "fuzzel" | ||
| 55 | "alacritty" | ||
| 56 | "pinentry-qt" | ||
| 57 | "adwaita-icon-theme" | ||
| 58 | "hicolor-icon-theme" | ||
| 59 | "git" | ||
| 60 | "nss-certs" | ||
| 61 | "waybar" | ||
| 62 | "gnupg" | ||
| 63 | "light" | ||
| 64 | "mako" | ||
| 65 | "grim" | ||
| 66 | "slurp" | ||
| 67 | "wl-clipboard" | ||
| 68 | "bluez" | ||
| 69 | "blueman" | ||
| 70 | "opendoas" | ||
| 71 | "xdg-desktop-portal-wlr" | ||
| 72 | "xdg-desktop-portal" | ||
| 73 | "pipewire" | ||
| 74 | "fprintd" | ||
| 75 | "wireplumber" | ||
| 76 | "zsh")) | ||
| 77 | %my-base-packages )) | ||
| 78 | |||
| 79 | ;; Below is the list of system services. To search for available | ||
| 80 | ;; services, run 'guix system search KEYWORD' in a terminal. | ||
| 81 | (services | ||
| 82 | (append (list | ||
| 83 | |||
| 84 | ;; To configure OpenSSH, pass an 'openssh-configuration' | ||
| 85 | ;; record as a second argument to 'service' below. | ||
| 86 | (service openssh-service-type) | ||
| 87 | (service pcscd-service-type) | ||
| 88 | (service fprintd-service-type) | ||
| 89 | (service bluetooth-service-type) | ||
| 90 | (udev-rules-service 'fido2 libfido2 #:groups '("plugdev")) | ||
| 91 | (set-xorg-configuration | ||
| 92 | (xorg-configuration (keyboard-layout keyboard-layout)))) | ||
| 93 | |||
| 94 | ;; This is the default list of services we | ||
| 95 | ;; are appending to. | ||
| 96 | (modify-services %desktop-services | ||
| 97 | (guix-service-type config => | ||
| 98 | (guix-configuration | ||
| 99 | (inherit config) | ||
| 100 | (substitute-urls | ||
| 101 | (append (list "https://substitutes.nonguix.org") | ||
| 102 | %default-substitute-urls)) | ||
| 103 | (authorized-keys | ||
| 104 | (cons* (plain-file "non-guix.pub" | ||
| 105 | "(public-key | ||
| 106 | (ecc | ||
| 107 | (curve Ed25519) | ||
| 108 | (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#) | ||
| 109 | ) | ||
| 110 | )" ) %default-authorized-guix-keys)))) | ||
| 111 | (delete pulseaudio-service-type) | ||
| 112 | (delete gdm-service-type) ))) | ||
| 113 | (setuid-programs | ||
| 114 | (append (list (file-like->setuid-program | ||
| 115 | (file-append | ||
| 116 | (specification->package "swaylock-effects") | ||
| 117 | "/bin/swaylock")) | ||
| 118 | (file-like->setuid-program | ||
| 119 | (file-append | ||
| 120 | (specification->package "opendoas") | ||
| 121 | "/bin/doas"))) | ||
| 122 | (delete sudo %setuid-programs))) | ||
| 123 | (bootloader (bootloader-configuration | ||
| 124 | (bootloader grub-efi-bootloader) | ||
| 125 | (targets (list "/boot/efi")) | ||
| 126 | (keyboard-layout keyboard-layout))) | ||
| 127 | (mapped-devices (list (mapped-device | ||
| 128 | (source (uuid | ||
| 129 | "adcaf322-7ee5-48ec-abf6-4a9b10643878")) | ||
| 130 | (target "sysroot") | ||
| 131 | (type luks-device-mapping)))) | ||
| 132 | |||
| 133 | ;; The list of file systems that get "mounted". The unique | ||
| 134 | ;; file system identifiers there ("UUIDs") can be obtained | ||
| 135 | ;; by running 'blkid' in a terminal. | ||
| 136 | (file-systems (cons* (file-system | ||
| 137 | (mount-point "/") | ||
| 138 | (device "/dev/mapper/sysroot") | ||
| 139 | (type "ext4") | ||
| 140 | (dependencies mapped-devices)) | ||
| 141 | (file-system | ||
| 142 | (mount-point "/boot/efi") | ||
| 143 | (device (uuid "DFE8-32EF" | ||
| 144 | 'fat32)) | ||
| 145 | (type "vfat")) %base-file-systems)) | ||
| 146 | (swap-devices | ||
| 147 | (list | ||
| 148 | (swap-space (target (uuid "7e1bb7c5-da2a-4509-8263-f707fc752993"))) ))) | ||
