- Install the Nix package manager and enable Flakes
- On the target system, use the provided template to create an initial home-manager configuration with batteries included:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' > ~/.config/nix/nix.conf
nix flake new --template github:active-group/nix-starter-kit ~/.config/home-manager- Adapt
~/.config/home-manager/flake.nixaccording to your username and other details - If you wish to use LaTeX with batteries included, then you need to clone the
howtorepository to~/howto(or configure the path in yourhome.nixaccording to your checkout path). If you already have a working LaTeX setup, you don't need to change anything. - Now execute the following commands from a shell:
nix run github:active-group/nix-starter-kit#home-manager -- switchTo make use of some common configuration for Emacs that we've written, you can
create a reasonable starting point by coping the contents of
example-init.el to ~/.emacs.d/init.el. Note that
you might have to mkdir -p ~/.emacs.d first.
Especially on macOS it might be useful to configure its default shell, zsh, to
work well with Nix and maybe dispatch to the easier-to-use-by-default shell fish
when used interactively.
(NOTE: if you have an existing ~/.zshrc file that you wish to keep, don't do the
following; I trust that you should know what you're doing already in this case.)
Install our example zsh configuration file as a starting point by copying the
contents of example-zshrc to ~/.zshrc. It calls a couple
of pre-installed (after having run home-manager switch with this module
enabled) functions to add functionality. You can edit it to your liking.
For the controlling-related software, change controlling.enable = false to
controlling.enable = true in home.nix.
Configure the module to point to a directory containing vcf files. The vcf dir inside the active group addresses repo can be used for example.
active-group = {
khard = {
enable = true;
# Example storagePath: /home/<mitarbeity>/ag/addresses/vcf
storagePath = "/<absolute>/<path>/<to>/<dir>/<with>/<vcf-files>";
};
};The file file:message.template contains a template for
the message you wish to be shown. Copy it somewhere on your own machine (the
module's assumed default location is
~/.config/home-manager/abwesenheitsnotiz) and configure the module
accordingly. For instance:
active-group.sieve = {
enable = true;
userName = "foo.bar@active-group.de";
messagePath = "<path>/<to>/<abwesenheitsnotiz>";
};In order to activate the note of absence, execute the installed ag-sieve
command:
ag-sieve activateTo deactivate the notifications, execute
ag-sieve deactivateIn case you wish to interact with the REPL mode of sieve-connect directly,
you can call ag-sieve without any arguments instead.
This module provides thunderbird with the following things already set up:
- AG address book
- AG calendars
- AG eMail
This module currently allows management of AGly calendars via nix.
IMPORTANT Thunderbird manages its config config in a two stage process, which does not allow the removal of calendars. Therefore when removing a calendar via nix, it has to be deleted in thunderbird as well. So first remove the calendar from the nix config, then after a switch remove it thunderbird and restart.
It provides several usefull options (option prefix active-group.thunderbird omitted):
enableenables the moduleuserNamethe username used for calender syncprofilethe thunderbird profile under which the setup should be doneadresses.enableenables address book management via thunderbird, defaults totruecalendars.enableenables calendar management via thunderbird, defaults totruecalendars.agCalendars.enableenables all AG calendars, defaults totruecalendars.agCalendars.hidehides the enabled AG calendars, defaults tofalsecalendars.generateColors- a function taking two argument the calendar index and the total number of calendars
- returning a string representing a color
- defaults to a grayscale function
- e.g.
generateColors = i: n: "#FF00CC"
calendars.<name>.enableenable specific AGly calendar, defaults tocalendars.agCalendars.enablecalendars.<name>.nameset the name for the calendar, defaults to the value set in calendar.nixcalendars.<name>.readOnlywheather the calendar is editable, defaults totruecalendars.<name>.supressAlarmswheather alarms on this calendar should be supressed, defaults totruecalendars.<name>.colorhex code for the color to be used for the calendarcalendars.<name>.notificationsa list of string specifying the notifications for the calendar- notification can be:
-PTXXMfor a notification XX minutes before the start of the event-PTXXHfor a notification XX hours before the start of the event-PXXDfor a notification XX days before the start of the event
- notification can be:
calendars.<name>.hidehides specific AGly calendar, defaults tocalendars.agCalendars.hideemail.enableenables email management via thunderbird, defaults totrue
The <name> of a calendar is the attribute set key in calendars.nix.
When agCalendars.enable is set to true, all calendars are active unless they are disabled explicitly by setting calendars.<name>.enable = false.
If agCalendars.enable is set to false, all calendars are inactive unless they are enabled explicitly by setting calendars.<name>.enable = true.
Add something like the following to the corresponding configuration section in
your home.nix file:
active-group = {
thunderbird = {
enable = true;
calendars = {
agCalendars.enable = true;
felix = {
readOnly = false;
suppressAlarms = false;
color = "#ff2968";
};
geburtstage.color = "#0000ff";
regeltermine.color = "#0000ff";
pr.enable = false;
};
};
};Add something like the following to the corresponding configuration section in
your home.nix file:
active-group.timetracking = {
enable = true;
timetracking-token = "<path-to-timetracking-api-token>";
arbeitszeiten-token = "<path-to-arbeitszeiten-api-token>";
abrechenbare-zeiten-token = "<path-to-abrechenbare-zeiten-api-token>";
};The timetracking module provides all the scripts from active-timetracking.
If timetracking-token and arbeitszeiten-token and
abrechenbare-zeiten-token options are set, the module will additionally
provide the wrapped scripts
tt-synctt-import-arbeitszeitentt-import-abwesenheitentt-import-abrechenbare-zeitentt-report-timetrackingtt-report-arbeitszeitentt-report-abrechenbare-zeiten
which have the API tokens and API URLs already set.
If the admin tokens timetracking-admin-token and arbeitszeiten-admin-token
and abrechenbare-zeiten-admin-token options are set, the module will
additionally provide the wrapped scripts
tt-admin-synctt-admin-export-to-stundenzetteltt-admin-delete-old-recordstt-report-report-timetrackingtt-report-report-arbeitszeitentt-report-report-abrechenbare-zeitentt-admin-kimai-config-sync
which have the API tokens and API URLs already set.
We use nixpkgs to manage the packages Emacs comes equipped with. If you need
additional packages, use the additionalEmacsPackages attribute in home.nix.
On https://search.nixos.org/packages you can search for packages you'd like to
have available on your system. Add those packages to your home.nix in
home.packages. Check out the home-manager
manual or ask someone if in
trouble :)
To "activate" a new configuration, always execute
home-manager switchWhen asked to update your configuration (usually when something has changed in the starter kit), do the following:
cd ~/.config/home-manager
nix flake update
home-manager switch
nix run github:active-group/nix-starter-kit#update-daemonSee the note on updating the Mac trampolines in the README for mac-app-util.
If you see errors related to "sandbox initialization", you might need to turn
off sandboxing temporarily in /etc/nix/nix.conf.
nix flake updateIf there's a new Nix version, consider updating the version number in
flake.nix. Then git push.