tweaked automount.nix
This commit is contained in:
parent
345d35ef5c
commit
a2e7501f23
2 changed files with 25 additions and 5 deletions
|
|
@ -14,11 +14,11 @@
|
||||||
file = {
|
file = {
|
||||||
|
|
||||||
## Path to automount disks to
|
## Path to automount disks to
|
||||||
"Disks" = {
|
#"Disks" = {
|
||||||
source = ./Disks;
|
#source = ./Disks;
|
||||||
target = "${disksPath}";
|
#target = "${disksPath}";
|
||||||
#recursive = true;
|
#recursive = true;
|
||||||
};
|
#};
|
||||||
|
|
||||||
## (current) Flake path
|
## (current) Flake path
|
||||||
#"flakes/nixdots" = {
|
#"flakes/nixdots" = {
|
||||||
|
|
|
||||||
20
home/scripts/automount/postActivation.nix
Normal file
20
home/scripts/automount/postActivation.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, flakePath, disksPath, primaryUser, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
## Activation Scripts
|
||||||
|
## - these run after using `sudo nixos-rebuild switch --flake .#<hostname>`
|
||||||
|
## - assumes command is run from the flake directory
|
||||||
|
system.activationScripts.diff = {
|
||||||
|
supportsDryActivation = false;
|
||||||
|
## Prints diff of the nix store and a cute message if rebuild successful
|
||||||
|
text = ''
|
||||||
|
cp home/scripts/automount/Disks /home/${primaryUser}/
|
||||||
|
|
||||||
|
echo "disksPaths linked successfully <3"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue