tweaked automount.nix
This commit is contained in:
parent
1dc6e378af
commit
31a940c82c
1 changed files with 4 additions and 12 deletions
|
|
@ -4,21 +4,13 @@
|
||||||
|
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
## Activation Scripts
|
## Runs after using `sudo nixos-rebuild switch --flake .#<hostname>`
|
||||||
## - these run after using `sudo nixos-rebuild switch --flake .#<hostname>`
|
|
||||||
## - assumes command is run from the flake directory
|
|
||||||
system.activationScripts.disksLink = {
|
system.activationScripts.disksLink = {
|
||||||
supportsDryActivation = false;
|
supportsDryActivation = false;
|
||||||
## Prints diff of the nix store and a cute message if rebuild successful
|
## Prints status of run commmand with a cute message if successful
|
||||||
text = ''
|
text = ''
|
||||||
{
|
|
||||||
cd ~ && ln -s Disks /run/media/${primaryUser}/*
|
cd ~ && ln -s Disks /run/media/${primaryUser}/*
|
||||||
echo "disksPaths linked successfully <3"
|
echo "disksPaths linked successfully <3"
|
||||||
} || {
|
|
||||||
echo "diskPaths linking failed </3"
|
|
||||||
echo "Disable this module if paths have already been linked."
|
|
||||||
echo "(run `cd ~/Disks` to see if paths are linked)"
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue