- Scheme 99.3%
- Shell 0.7%
| firefly | firefly home services emacs: use source-module-closure instead of manual list | |
| .dir-locals.el | Initial commit | |
| .gitignore | add guix-cache? integration for protection against guix gc | |
| .guix-authorizations | add news file | |
| .guix-channel | add news file | |
| news-firefly.txt | add news file | |
| README.md | add webring to README | |
| test-pull | gitini (and probably other inis) file type | |
Firefly
My guix channel!
A collection of packages and services that I have found useful.
I am also a part of the toys webring! It's cool, check it out!
The end goal of all of these is to eventually be included upstream. As such, one file is generally equivalent to what needs to be included in one file for a patch. So that it is easier.
To use this channel, include this in your channels.scm:
(channel
(name 'firefly)
(url "https://codeberg.org/Firefly707/firefly-channel.git")
(branch "main")
(introduction
(make-channel-introduction
"8fd3d165ad053eda93ddb915d5dedc9e880c8fb5"
(openpgp-fingerprint
"E76F D6F5 4BCF 096F 28BB C2A0 A026 E5A7 C382 793E"))))
There is also a dev branch, but be warned, that's where the fuck-shit (like downgrades)
happens! Use at your own risk.
I assume you have some amount of knowledge of guix for this 'documentation'.
The best documentation may always be my personal config, which should always work with
the latest commit on dev.
Packages
- qman in
(firefly packages qman): modern text-based terminal man page viewer. Has some issues on the guix system, I'm not certain how to fix. - font-monocraft in
(firefly packages monocraft): monospaced programming font inspired by the minecraft typeface - xplr in
(firefly packages rust): A hackable, minimal, fast TUI file explorer
Note: due to relying on Ratatui, this cannot be included in upstream Guix. This is because one of the main devs of Ratatui uses a large amount of AI code, and as of the time of writing, there is a conversation on whether upstream Guix does not consider LLM-generated code to be free. To be clear, I agree with this. Relatedly, I'm aware xplr has 1 copilot commit but it doesn't look significant and seems the author hasn't used copilot in the project again. Also, I currently have no other reason to switch off it. Purism doesn't help me.
Home Services
add-to-bin:
from (firefly home services add-to-bin)
adds a series of executables to the home profile bin directory, and path.
either can be used as a service:
(service home-add-to-bin-service-type
<config>)
or defined into a variable, and later added as a package
(define bonus-bin (bin <config>))
...
(home-environment
(packages
(list
...
bonus-bin
...)))
in either case, the configuration value is the same.
It is an alist of program names to one of a gexp, a string,
a file-like object, a pair of a guile interpreter and a gexp,
or a pair of an interpreter and a string.
A gexp and a string will be written to a program-file and plain-file
respectively. A file-like object will be taken as-is. Both pairs are used
to specify what interpreter is used for the other value, through a shebang.
All the files are marked as executable.
home-arbitrary-process:
from (firefly home services arbitrary)
runs arbitrary processes at user login.
(service home-arbitrary-process-type
<config>)
where the configuration value can be either a single home-arbitrary-process-configuration
or a list of them.
service-name(symbol): The name of the shepherd service to manage the process, to be used in commands such asherd status NAME.one-shot(bool): see the guix service documentation.command(list string): The command that the service runs.requirements(list symbol): see the guix service documentation.pwd(stringorgexp): What PWD the service should run in.
home-desktop-autostart-service-type:
from (firefly home services desktop-autostart)
generates .desktop files to run a desktop environment on startup.
(service home-desktop-autostart-service-type
(list
(autostart-desktop-entry
(command <command>)
(path [path])
(name [name])
(comment [comment])
(terminal? [terminal?])
(prefer-dgpu? [prefer-dgpu?]))
...))
The .desktop files that are generated are marked to be hidden, as they
should not be managed by outside environments. Some desktop environments
might still show them.
The files produced by this service are in conformation with the
freedesktop.org specifications version 1.5.
command(string,gexporfile-like): The command to run, as passed tosh -c. If it is agexp, it should evaluate to a string, and if it isfile-like, it should point to an executable.path(string,gexporfile-like): ThePWDthatcommandshould be run in. If not specified, it uses whatever the desktop environment has default.name(string): The name to give the.desktopfile. If left blank, uses thecommand, which will error ifcommandis not a string.comment(string): A description or tooltip. By default, is the empty string.terminal?(bool): Whether or not to run the program with a terminal.prefer-dgpu?(bool): Whether or not to prefer a non-default, usually discrete, gpu.
This service can be extended with the same values as normal configuration.
direnv:
from (firefly home services direnv)
configures direnv, installs it to the home profile, and hooks into multiple shells.
There are two ways to use it.
(service home-direnv-service-type [home-direnv-configuration])
or
(home-direnv [home-direnv-configuration])
only the second one is able to configure shells. This is due to a limitation of guix, not providing ways to conditionally extend services, and not wishing to polute profiles with configuration files of shells that the user does not use.
home-direnv-configuration is a configuration record with the following fields:
direnv(file-like): the direnv package to add to the home profile. By default, the latestdirenv.direnv-bash(file-like): thebashpackage fordirenvto evaluate.envrcfiles with.bash-integration?(bool): Whether or not to set up abashhook fordirenv. Note: this may have issues if there are other extensions that manipulate the prompt. Check the docs.zsh-integration?(bool): Whether or not to set up azshhook fordirenv.fish-integration?(boolorstring): Whether or not to set up afishhook. Can either be abool, or one of the three modes thatfishsupports:eval_on_arrow,eval_after_arrowordisable_arrow.
note: I would love to add more shell hooks, however these are the only ones that have services for them in
guix, as of yet.
nix-direnv?(bool): Usenix-direnvfornixintegration withdirenv. Conflicts with stdlib.guix-cache?(bool): Use an implementation ofuse guixthat adds a root for protection against garbage collection. Conflicts with stdlib.erlang?(bool): Add support forerlang, usingkerlthroughuse kerl.golang?(bool): Add support for thegbtool throughlayout golangcommand.haskell?(bool): Add support forhaskellthroughcabalandlayout haskell.opam?(bool): Add support foropamthroughuse opam.wine?(bool): Add support forwinethroughuse wine [wine-exe].
note: No language or tool integrations install packages to the profile.
global(string alist): Theglobalsection of thedirenv.toml. Should be an alist of keys to values. All datatypes should be entered as theirguilecounterparts. Check the docs: https://direnv.net/man/direnv.toml.1.htmlwhitelist(string alist): Thewhitelistsection of thedirenv.toml. Should be an alist of keys to values. All datatypes should be entered as theirguilecounterparts. Check the docs: https://direnv.net/man/direnv.toml.1.htmlextra-content(stringorgexp): Extra content to add to the end of thedirenvrcfile.
emacs:
from (firefly home services emacs)
runs the emacs server at user login.
(service emacs-server-service-type
(emacs-server-configuration
(emacs [emacs])
(packages [packages])
(args [args])
(server-name [server-name])
(service-name [service-name])))
emacs(file-like): Theemacspackage to use. By default, the most recent fullemacs. Adds this package to the profile.packages(manifest): A manifest ofemacspackages/extensions to generate a profile for the server to run in. By default, empty.args(list string): Any additional arguments to pass to the server on startup. By default, empty.server-name(string): The name of the emacs server to open up. By default, doesn't specify a name so it's whateveremacsdecides.service-name(symbol): The name to give the shepherd service. By default, emacs-server. This is useful if you want to run multiple servers, for example if one is a computational server. This andserver-nameare meant to be used together.
load-profiles:
from (firefly home services load-profiles)
loads other profiles alongside the home profile in the .profile file.
(service home-load-profiles-service-type
(list
[path-to-profile] ...))
xbindkeys:
from (firefly home services xbindkeys)
runs the xbindkeys daemon at login.
(service home-xbindkeys-service-type
(home-xbindkeys-configuration
(xbindkeys [xbindkeys])
(rc <rc>)))
xbindkeys(file-like): Thexbindkeyspackage to use. By default, the most recent.rc(file-likeorgexp): The configuration file. Should be in theguilestyle ofxbindkeysrcs, or agexp. Usexbindkeys --default-guilefor an example.
This service provides a couple of utility actions to interact with xbindkeys without
needing to include xbindkeys in the home profile, or symlink the rc.
xplr:
from (firefly home services xplr)
installs and configures xplr with plugins.
plugins are available in (firefly packages xplr)
Note: see notes on the
xplrpackage for why this can't be upstreamed.
(service home-xplr-service-type
(home-xplr-configuration
(xplr [xplr])
(version [version])
(plugins (list [plugin]
...))
(config [config])))
xplr(file-like): Thexplrpackage to use. By default, the only one I have packaged.version(file-like): The version ofxplrto put in the config. If not supplied, will take from the given package.plugins(listfile-likeorxplr-plugin-configuration): Thexplrplugins to use. A list ofpackages orxplr-plugin-configurationrecords. If apackageis given, then setup will be called with no arguments.config(stringorfile-like)
(xplr-plugin-configuration
(plugin <plugin>)
(setup [setup])
(cleanup? [cleanup?]))
plugin(file-like): The plugin to set up. To use arbitrary plugins, useguix downloadand the belowxplr-pluginprocedure.setup(string): The code to callsetupwith. Defaults to"()".cleanup?(bool): Whether or not to clean the package path before and after setting up the plugin. Set to#fif you need torequireit later manually.