This commit causes an error to be printed if running under a non-Linux
system when a systemd service, target, or timer is active.
It will also prevent running systemd during activation if running
under a non-Linux system.
In the activation script we expect to use the tools provided by GNU
Core Utilities and GNU Bash. This commit therefore explicitly add
these first in the `PATH` environment variable.
This module generates a `.ssh/config` file. This doesn't embed _all_
options for the ssh client, but the most common ones should be there.
Example usage:
```nix
programs.ssh = {
enable = true;
forwardAgent = true;
controlMaster = "auto";
matchBlocks = [
{
host = "something.blah.edu";
port = 1024;
user = "cleague";
identitiesOnly = true;
}
{
host = "host1 host2 host2.net host2.com";
port = 7422;
hostname = "example.com";
serverAliveInterval = 60;
}
{
host = "lucian";
forwardX11 = true;
forwardX11Trusted = true;
checkHostIP = false;
};
};
};
```
Each entry in `programs.ssh.matchBlocks` must contain a `host` field,
which will be used for the block condition.
This should reduce the risk of overwriting an existing file in the
user's home directory. A file will only be replaced if it is a link
pointing to a home-manager tree inside the Nix store.
If an existing file is detected an error is written indicating the
file's path and the activation will terminate before any mutation
occurs.
Fixes#6
Previously the home files were not linked if the generation hadn't
changed. Unfortunately, this would mean that, if a file link was
removed for some reason it would not be recreated by running a switch
command.
For example, with these settings Bash will complain if uninitialized
variables are used. Some code has been improved to run cleanly with
these settings.
Nix does not allow files whose name start with a '.' in the Nix store.
This commit makes a not of this fact in the `home.file.source` option
and also adds an assertion verifying that no such file is given.
Closes#4
If the dconf service hasn't been installed then the configuration
activation will fail. Thus, make sure the activation script is run after
packages have been installed.
If no files should be installed into the home directory then an error
would occur since the directory holding the files would never be
created. With this change the directory is unconditionally created.