mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
nixos/window-managers/i3: write config file to /etc/i3/config
The default config of i3 provides a key binding to reload, so changes take effect immediately: ``` bindsym $mod+Shift+c reload ``` Unfortunately the current module uses the store path of the `configFile` option. So when I change the config in NixOS, a store path will be created, but the current i3 process will continue to use the old one, hence a restart of i3 is required currently. This change links the config to `/etc/i3/config` and alters the X startup script accordingly so after each rebuild, the config can be reloaded.
This commit is contained in:
parent
5d2775156b
commit
a1ffabe4de
@ -60,12 +60,15 @@ in
|
||||
${cfg.extraSessionCommands}
|
||||
|
||||
${cfg.package}/bin/i3 ${optionalString (cfg.configFile != null)
|
||||
"-c \"${cfg.configFile}\""
|
||||
"-c /etc/i3/config"
|
||||
} &
|
||||
waitPID=$!
|
||||
'';
|
||||
}];
|
||||
environment.systemPackages = [ cfg.package ] ++ cfg.extraPackages;
|
||||
environment.etc."i3/config" = mkIf (cfg.configFile != null) {
|
||||
source = cfg.configFile;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
Loading…
Reference in New Issue
Block a user