Documentation: document a bit the repo

This commit is contained in:
Picnoir 2024-04-30 21:46:01 +02:00
parent 118a653e9e
commit f378ed7ad7
3 changed files with 41 additions and 9 deletions

18
README.md Normal file
View file

@ -0,0 +1,18 @@
# Personal Guix System Configuration
This repository contains my personal Guix configuration.
Subdirectories:
- `systems`: contain top-level systems definitions.
- `home`: contains the guix home configuration.
- `modules`: guile modules meants to be loaded while evaluating the system/home configurations.
I usually build the home and system config using the `home/bin/guix-rebuild-all` script, but the configs can also be manually built from this directory:
```sh
# Laptop home config
$ guix home reconfigure home/framework-home.scm -L ./modules/
# Laptop system config
$ guix system reconfigure systems/framework.scm -L ./modules/
```

8
home/README.md Normal file
View file

@ -0,0 +1,8 @@
# Home Configuration
This folder contains my guix home configurations.
Subdirectories:
- `conf-files`: contain the raw config files linked to my home directory.
- `bin`: a collection of bash scripts added to my user `$PATH`.

View file

@ -1,3 +1,7 @@
;;; Collection of writers, analogous to
;;; https://nixos.wiki/wiki/Nix-writers
(define-module (lib writers)
#:use-module (gnu)
#:use-module (gnu packages haskell-apps)
@ -8,6 +12,8 @@
#:use-module (guix build utils)
#:export (write-bash-bin))
(define* (write-bash-bin script name #:optional (packages '()))
"Creates a new store path having SCRIPT-FILE as a executable file in
/bin. The PACKAGES list is injected to the script PATH."
@ -20,15 +26,15 @@
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((bin-name (string-append #$output "/bin/" #$name))
(script-in-store #$(local-file script)))
(invoke/quiet #+(file-append shellcheck "/bin/shellcheck") script-in-store)
(mkdir-p (string-append #$output "/bin"))
(copy-file script-in-store bin-name)
(chmod bin-name #o0555)
#t))))
#~(begin
(use-modules (guix build utils))
(let ((bin-name (string-append #$output "/bin/" #$name))
(script-in-store #$(local-file script)))
(invoke/quiet #+(file-append shellcheck "/bin/shellcheck") script-in-store)
(mkdir-p (string-append #$output "/bin"))
(copy-file script-in-store bin-name)
(chmod bin-name #o0555)
#t))))
(home-page #f)
(synopsis #f)
(description #f)