Refactor: inject the username into the source path
This commit is contained in:
parent
ce5b4fa0a1
commit
4d4d65d812
|
@ -25,7 +25,12 @@ let
|
|||
;
|
||||
};
|
||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
||||
inherit desktop inputs pkgs;
|
||||
inherit
|
||||
desktop
|
||||
inputs
|
||||
pkgs
|
||||
username
|
||||
;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
desktop,
|
||||
inputs,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -12,7 +13,7 @@ let
|
|||
|
||||
_timer = writeShellApplication (import ./scripts/_timer.nix);
|
||||
export-video-list = writeShellApplication (
|
||||
import ./scripts/export-video-list.nix { inherit pkgs; }
|
||||
import ./scripts/export-video-list.nix { inherit pkgs username; }
|
||||
);
|
||||
notetaker = writeShellApplication (import ./scripts/notetaker.nix);
|
||||
run = writeShellApplication (import ./scripts/run.nix { inherit pkgs; });
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, username, ... }:
|
||||
{
|
||||
name = "export-video-list";
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
device_name="/dev/sda2"
|
||||
device_label="UNTITLED"
|
||||
|
||||
source_path="/run/media/opdavies/$device_label"
|
||||
source_path="/run/media/${username}/$device_label"
|
||||
|
||||
# If the source path doesn't exist, try mounting the device.
|
||||
if [[ ! -d "$source_path" ]]; then
|
||||
|
|
|
@ -18,7 +18,7 @@ let
|
|||
};
|
||||
|
||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
||||
inherit inputs pkgs;
|
||||
inherit inputs pkgs username;
|
||||
desktop = false;
|
||||
};
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue