Adjust Home Manager examples for Ubuntu host path
This commit is contained in:
parent
6cdfab05c0
commit
d7e6451a14
2 changed files with 5 additions and 5 deletions
|
|
@ -21,12 +21,12 @@ Add this to your Home Manager configuration:
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
/home/ltadeu6/music-light/home-manager/music-light.nix
|
/home/vini/music-light/home-manager/music-light.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.music-light = {
|
programs.music-light = {
|
||||||
enable = true;
|
enable = true;
|
||||||
scriptDir = "/home/ltadeu6/music-light";
|
scriptDir = "/home/vini/music-light";
|
||||||
pythonPath = "/usr/bin/python3";
|
pythonPath = "/usr/bin/python3";
|
||||||
playerctlPath = "/usr/bin/playerctl";
|
playerctlPath = "/usr/bin/playerctl";
|
||||||
enableDesktopEntry = true;
|
enableDesktopEntry = true;
|
||||||
|
|
@ -44,7 +44,7 @@ On the Ubuntu host, install the runtime used by the service:
|
||||||
```bash
|
```bash
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y python3 python3-venv playerctl
|
sudo apt install -y python3 python3-venv playerctl
|
||||||
cd /home/ltadeu6/music-light
|
cd /home/vini/music-light
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
@ -53,7 +53,7 @@ pip install -r requirements.txt
|
||||||
Then point Home Manager at the venv interpreter:
|
Then point Home Manager at the venv interpreter:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
programs.music-light.pythonPath = "/home/ltadeu6/music-light/.venv/bin/python";
|
programs.music-light.pythonPath = "/home/vini/music-light/.venv/bin/python";
|
||||||
```
|
```
|
||||||
|
|
||||||
If you prefer system-wide Python packages instead of a venv, keep `pythonPath = "/usr/bin/python3"` and make sure `requests` and `Pillow` are installed on the host.
|
If you prefer system-wide Python packages instead of a venv, keep `pythonPath = "/usr/bin/python3"` and make sure `requests` and `Pillow` are installed on the host.
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ in
|
||||||
scriptDir = lib.mkOption {
|
scriptDir = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "${config.home.homeDirectory}/music-light";
|
default = "${config.home.homeDirectory}/music-light";
|
||||||
example = "/home/ltadeu6/music-light";
|
example = "/home/vini/music-light";
|
||||||
description = "Directory that contains `luz-musica.py`.";
|
description = "Directory that contains `luz-musica.py`.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue