Silvan Mosberger
8d360c5a57
systemd: remove filename hack
2017-12-12 18:05:04 +01:00
Cornelius Mika
8759a5a63e
systemd: add option to automatically start services
2017-12-11 18:25:49 +01:00
Cornelius Mika
52bdbc42bb
systemd: move activation script to separate file
...
This makes the following commit more readable.
2017-12-11 18:08:33 +01:00
Robert Helgesson
2ff09158f3
systemd: fix systemctl command
...
The command's path should be taken from the configuration, not be
assumed to be in `PATH`.
2017-12-11 16:58:50 +01:00
Robert Helgesson
bc2f2ad546
systemd: honor RefuseManualStart and RefuseManualStop
...
Fixes https://github.com/rycee/home-manager/issues/140
2017-11-16 15:37:53 +01:00
Robert Helgesson
7a9c873093
files: add special handling of systemd files
...
Unfortunately systemd derives nonsensical unit names when the unit
file is a link to a link to a file. This commit ensures that any file
whose target path matches the pattern `*/systemd/user/*` will be
reachable with only one link hop.
This also reverts f52ec0df7c
, which
contained a temporary fix. This commit is an improvements in that it
is more explicit and also handles unit files given directly as a home
file source.
2017-11-12 00:56:34 +01:00
Robert Helgesson
f52ec0df7c
systemd: force copying of unit files
...
This is done by exploiting the fact that home files will be copied if
the executable bit of the source file and the target file is
different. This should be considered a hack until some nicer solution
is found.
2017-11-09 17:14:37 +01:00
Robert Helgesson
d70715a635
use xdg.configFile
for files in XDG config home
2017-10-29 01:59:34 +02:00
Robert Helgesson
30b9d7f00e
Use only tools from Nixpkgs in activation script
...
Note, we still pull in the user's `PATH` in case the user has defined
their own activation blocks that depend on additional tools.
Eventually this will be deprecated and removed.
See #99 .
2017-10-20 19:04:33 +02:00
Robert Helgesson
a8e08d14bb
Mark rycee as maintainer for a bunch of modules
2017-09-26 23:40:31 +02:00
Robert Helgesson
742d1889c5
lib: make dag.nix take lib
as argument
2017-09-21 13:19:29 +02:00
Robert Helgesson
61042c7606
lib: use generators from Nixpkgs
2017-09-21 13:18:33 +02:00
Cornelius Mika
286d678785
systemd: don't fail on activation when services changed
...
The diff command exits with status 1 when detecting differences.
Because of 'set -e', this caused the activation to fail.
2017-08-23 20:07:06 +02:00
Robert Helgesson
acf813cadc
systemd: add support for socket units
2017-06-29 01:06:08 +02:00
Robert Helgesson
f60a1ed689
systemd: handle non-Linux systems better
...
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.
2017-05-16 22:05:02 +02:00
Robert Helgesson
8fab2a5d9b
Add basic directed acyclic graph data structure
...
Also make use of this instead of Nixpkgs's strings-with-deps library
in activation script generation.
2017-05-04 00:39:36 +02:00
Robert Helgesson
4f1eec8180
Avoid undefined variables in activation script
2017-03-29 00:11:01 +02:00
Robert Helgesson
deaa6d3dd4
Add configurable verbosity during activation
2017-01-21 12:27:50 +01:00
Robert Helgesson
550d0e81c9
systemd: handle missing service directories
...
Before it suggested to restart a service `*.service`, which is quite
silly.
2017-01-18 09:27:28 +01:00
Robert Helgesson
f35b9a9970
Add initial section of activation script
...
The initial section creates some useful variables for use by later
activation sections.
2017-01-16 20:33:53 +01:00
Robert Helgesson
b1f84ada60
Support dry run in activation script
...
If the `DRY_RUN` variable is set then no actual change should be
performed. Only printing what actions would be taken.
2017-01-16 00:16:22 +01:00
Robert Helgesson
4efbf0e090
systemd: minor activation output fix
2017-01-15 23:42:03 +01:00
Robert Helgesson
8a196bb62b
systemd: fix quoting in glob pattern
2017-01-15 23:42:02 +01:00
Robert Helgesson
06a24c37e5
systemd: add support for creating target files
2017-01-15 23:41:52 +01:00
Robert Helgesson
43fd747ba7
Use a generation directory
...
Before we put only user files in the generation directory but that was
quite limiting. In particular, we lost track of the activation script.
2017-01-15 23:41:20 +01:00
Robert Helgesson
d7d02c3ce8
Initial import
2017-01-14 13:15:24 +01:00