Emacs configuration also for root user, add aliases for nix desktop functions
This commit is contained in:
parent
20dc3e1c0f
commit
c77fde7906
|
|
@ -78,4 +78,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.bash.shellAliases = {
|
||||||
|
sudo = "sudo ";
|
||||||
|
doas = "doas ";
|
||||||
|
edit = "$EDITOR";
|
||||||
|
nixos-rebuild-system-flake = "sudo nixos-rebuild switch --flake /etc/nixos#desktop";
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,11 @@ in
|
||||||
systemd.user.services.emacs-config-initialiser = let
|
systemd.user.services.emacs-config-initialiser = let
|
||||||
script = pkgs.writeShellScript "emacs-config-initialiser-script"
|
script = pkgs.writeShellScript "emacs-config-initialiser-script"
|
||||||
''
|
''
|
||||||
[[ ! -d %/.emacs.d ]] && git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
|
if [[ ! -d $HOME/.emacs.d ]]; then
|
||||||
|
git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
19
global.nix
19
global.nix
|
|
@ -62,6 +62,25 @@
|
||||||
VST3_PATH = makePluginPath "vst3";
|
VST3_PATH = makePluginPath "vst3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Emacs Config Init Service - For root user also
|
||||||
|
systemd.services.emacs-config-initialiser = {
|
||||||
|
description = "Initialises default emacs configuration if not available";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
path = [ pkgs.coreutils pkgs.git ];
|
||||||
|
enable = true;
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
Group = "root";
|
||||||
|
};
|
||||||
|
script = "
|
||||||
|
if [[ ! -d $HOME/.emacs.d ]]; then
|
||||||
|
git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue