+22
-22
flake.lock
+22
-22
flake.lock
···
131
131
},
132
132
"darwin-stable": {
133
133
"locked": {
134
-
"lastModified": 1764560356,
135
-
"narHash": "sha256-M5aFEFPppI4UhdOxwdmceJ9bDJC4T6C6CzCK1E2FZyo=",
136
-
"owner": "NixOS",
134
+
"lastModified": 1766101392,
135
+
"narHash": "sha256-UC9kmuWYesytXlGWXUEsCk6dotiQzQMb9xMWeDdobo0=",
136
+
"owner": "nixos",
137
137
"repo": "nixpkgs",
138
-
"rev": "6c8f0cca84510cc79e09ea99a299c9bc17d03cb6",
138
+
"rev": "1a967e151e20260380c1457e584292a3712fd1fb",
139
139
"type": "github"
140
140
},
141
141
"original": {
142
-
"owner": "NixOS",
142
+
"owner": "nixos",
143
143
"ref": "nixpkgs-25.05-darwin",
144
-
"repo": "nixpkgs",
145
-
"type": "github"
146
-
}
147
-
},
148
-
"darwin-unstable": {
149
-
"locked": {
150
-
"lastModified": 1764642553,
151
-
"narHash": "sha256-mvbFFzVBhVK1FjyPHZGMAKpNiqkr7k++xIwy+p/NQvA=",
152
-
"owner": "NixOS",
153
-
"repo": "nixpkgs",
154
-
"rev": "f720de59066162ee879adcc8c79e15c51fe6bfb4",
155
-
"type": "github"
156
-
},
157
-
"original": {
158
-
"owner": "NixOS",
159
-
"ref": "nixpkgs-unstable",
160
144
"repo": "nixpkgs",
161
145
"type": "github"
162
146
}
···
518
502
"type": "github"
519
503
}
520
504
},
505
+
"nixpkgs-unstable": {
506
+
"locked": {
507
+
"lastModified": 1766125104,
508
+
"narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=",
509
+
"owner": "nixos",
510
+
"repo": "nixpkgs",
511
+
"rev": "7d853e518814cca2a657b72eeba67ae20ebf7059",
512
+
"type": "github"
513
+
},
514
+
"original": {
515
+
"owner": "nixos",
516
+
"ref": "nixpkgs-unstable",
517
+
"repo": "nixpkgs",
518
+
"type": "github"
519
+
}
520
+
},
521
521
"nixpkgs_2": {
522
522
"locked": {
523
523
"lastModified": 1764642553,
···
599
599
"agenix": "agenix",
600
600
"catppuccin": "catppuccin",
601
601
"darwin-stable": "darwin-stable",
602
-
"darwin-unstable": "darwin-unstable",
603
602
"firefox-cascade": "firefox-cascade",
604
603
"flake-utils": "flake-utils",
605
604
"home-manager": "home-manager",
···
610
609
"nixos-unstable": "nixos-unstable",
611
610
"nixos-wsl": "nixos-wsl",
612
611
"nixpkgs": "nixpkgs_2",
612
+
"nixpkgs-unstable": "nixpkgs-unstable",
613
613
"quickshell": "quickshell",
614
614
"spicetify-nix": "spicetify-nix",
615
615
"stylix": "stylix",
+2
-3
flake.nix
+2
-3
flake.nix
···
53
53
nixos-stable.url = "github:nixos/nixpkgs/nixos-25.05";
54
54
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
55
55
56
-
darwin-stable.url = "github:NixOS/nixpkgs/nixpkgs-25.05-darwin";
57
-
darwin-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
56
+
darwin-stable.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin";
57
+
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
58
58
59
59
nix-darwin = {
60
60
url = "github:nix-darwin/nix-darwin/nix-darwin-25.05";
61
-
# url = "github:nix-darwin/nix-darwin/master";
62
61
inputs.nixpkgs.follows = "darwin-stable";
63
62
};
64
63
+1
-1
hosts/anemone/default.nix
+1
-1
hosts/anemone/default.nix
···
8
8
in {
9
9
imports = [
10
10
./hardware.nix
11
-
./klipper.nix
12
11
./mainsail.nix
13
12
./moonraker.nix
13
+
./klipper
14
14
inputs.nixos-hardware.nixosModules.raspberry-pi-3
15
15
(modulesPath + "/installer/scan/not-detected.nix")
16
16
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
+22
hosts/anemone/klipper/default.nix
+22
hosts/anemone/klipper/default.nix
···
1
+
{pkgs, ...}: let
2
+
mainsail-config = pkgs.fetchFromGitHub {
3
+
owner = "mainsail-crew";
4
+
repo = "mainsail-config";
5
+
rev = "ff3869a621db17ce3ef660adbbd3fa321995ac42";
6
+
hash = "sha256-gDMAUDqf8no66Jc/jutFNwu7RbD+/qD/6Q6GLWOAA/k=";
7
+
};
8
+
in {
9
+
services.klipper = {
10
+
enable = true;
11
+
# user = "klipper";
12
+
# group = "klipper";
13
+
# configDir =
14
+
15
+
configFile = pkgs.writeText "klipper.cfg" ''
16
+
[include ${mainsail-config}/client.cfg]
17
+
[include ${./printer.cfg}]
18
+
'';
19
+
20
+
# environment.etc
21
+
};
22
+
}
+181
hosts/anemone/klipper/printer.cfg
+181
hosts/anemone/klipper/printer.cfg
···
1
+
# This file contains pin mappings for the stock 2020 Creality Ender 3
2
+
# V2. To use this config, during "make menuconfig" select the
3
+
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
4
+
# communication.
5
+
6
+
# If you prefer a direct serial connection, in "make menuconfig"
7
+
# select "Enable extra low-level configuration options" and select
8
+
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
9
+
# cable used for the LCD module as follows:
10
+
# 3: Tx, 4: Rx, 9: GND, 10: VCC
11
+
12
+
# Flash this firmware by copying "out/klipper.bin" to a SD card and
13
+
# turning on the printer with the card inserted. The firmware
14
+
# filename must end in ".bin" and must not match the last filename
15
+
# that was flashed.
16
+
17
+
# See docs/Config_Reference.md for a description of parameters.
18
+
19
+
[stepper_x]
20
+
step_pin: PC2
21
+
dir_pin: PB9
22
+
enable_pin: !PC3
23
+
microsteps: 16
24
+
rotation_distance: 40
25
+
endstop_pin: ^PA5
26
+
position_endstop: 0
27
+
position_max: 247
28
+
homing_speed: 50
29
+
30
+
[stepper_y]
31
+
step_pin: PB8
32
+
dir_pin: PB7
33
+
enable_pin: !PC3
34
+
microsteps: 16
35
+
rotation_distance: 40
36
+
endstop_pin: ^PA6
37
+
position_endstop: 0
38
+
position_max: 235
39
+
homing_speed: 50
40
+
41
+
[stepper_z]
42
+
step_pin: PB6
43
+
dir_pin: !PB5
44
+
enable_pin: !PC3
45
+
microsteps: 16
46
+
rotation_distance: 8
47
+
endstop_pin: probe:z_virtual_endstop
48
+
; position_min: -3 # for calibrating bltouch z_offset
49
+
position_max: 250
50
+
homing_speed: 4
51
+
second_homing_speed: 1
52
+
homing_retract_dist: 2.0
53
+
54
+
[extruder]
55
+
max_extrude_only_distance: 350
56
+
step_pin: PB4
57
+
dir_pin: PB3
58
+
enable_pin: !PC3
59
+
microsteps: 16
60
+
rotation_distance: 34.406
61
+
nozzle_diameter: 0.400
62
+
filament_diameter: 1.750
63
+
heater_pin: PA1
64
+
sensor_type: EPCOS 100K B57560G104F
65
+
sensor_pin: PC5
66
+
control: pid
67
+
# tuned for stock hardware with 200 degree Celsius target
68
+
pid_Kp: 21.527
69
+
pid_Ki: 1.063
70
+
pid_Kd: 108.982
71
+
min_temp: 0
72
+
max_temp: 250
73
+
74
+
[heater_bed]
75
+
heater_pin: PA2
76
+
sensor_type: EPCOS 100K B57560G104F
77
+
sensor_pin: PC4
78
+
control: pid
79
+
# tuned for stock hardware with 50 degree Celsius target
80
+
pid_Kp: 54.027
81
+
pid_Ki: 0.770
82
+
pid_Kd: 948.182
83
+
min_temp: 0
84
+
max_temp: 130
85
+
86
+
[fan]
87
+
pin: PA0
88
+
89
+
[mcu]
90
+
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
91
+
restart_method: command
92
+
93
+
[printer]
94
+
kinematics: cartesian
95
+
max_velocity: 180
96
+
max_accel: 1500
97
+
max_z_velocity: 5
98
+
max_z_accel: 100
99
+
100
+
# ABL specific settings
101
+
102
+
[bltouch]
103
+
sensor_pin: ^PB1
104
+
control_pin: PB0
105
+
x_offset: -46.8 # -45 on ender 3 v2 neo
106
+
y_offset: -6 # -10 on ender 3 v2 neo
107
+
z_offset: 1.434 # lower this number to move the nozzle higher
108
+
speed: 20
109
+
samples: 1
110
+
sample_retract_dist: 8.0
111
+
112
+
[safe_z_home]
113
+
home_xy_position: 160,120
114
+
speed: 150
115
+
z_hop: 10
116
+
z_hop_speed: 10
117
+
118
+
[bed_mesh]
119
+
speed: 120
120
+
mesh_min: 30,30
121
+
mesh_max: 189, 189
122
+
probe_count: 5,5
123
+
fade_start: 1
124
+
fade_end: 10
125
+
fade_target: 0
126
+
algorithm: bicubic
127
+
128
+
[bed_screws]
129
+
screw1:30,25
130
+
screw1_name:1
131
+
screw2:200,25
132
+
screw2_name:2
133
+
screw3:200,195
134
+
screw3_name:3
135
+
screw4:30,195
136
+
screw4_name:4
137
+
138
+
[screws_tilt_adjust]
139
+
screw1_name: front left screw
140
+
screw1: 75, 32
141
+
screw2_name: front right screw
142
+
screw2: 246, 32
143
+
screw3_name: rear right screw
144
+
screw3: 246, 204
145
+
screw4_name: rear left screw
146
+
screw4: 75, 204
147
+
horizontal_move_z: 10
148
+
speed: 200
149
+
screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise
150
+
151
+
[output_pin beeper]
152
+
pin: PB13
153
+
154
+
[virtual_sdcard]
155
+
path: /var/lib/moonraker/gcodes
156
+
157
+
[gcode_macro LOAD_FILAMENT]
158
+
variable_load_distance: 350
159
+
variable_purge_distance: 50
160
+
gcode:
161
+
{% set purge_speed = params.PURGE_SPEED|default(300) %}
162
+
{% set load_speed = params.LOAD_SPEED|default(printer.configfile.settings['extruder'].max_extrude_only_velocity * 10) %}
163
+
SAVE_GCODE_STATE NAME=load_state
164
+
G91
165
+
G92 E0
166
+
G1 E{load_distance} F{load_speed} # fast-load
167
+
G1 E{purge_distance} F{purge_speed} # purge
168
+
RESTORE_GCODE_STATE NAME=load_state
169
+
170
+
[gcode_macro UNLOAD_FILAMENT]
171
+
variable_unload_distance: 350
172
+
variable_purge_distance: 50
173
+
gcode:
174
+
{% set purge_speed = params.PURGE_SPEED|default(300) %}
175
+
{% set unload_speed = params.LOAD_SPEED|default(printer.configfile.settings['extruder'].max_extrude_only_velocity * 10) %}
176
+
SAVE_GCODE_STATE NAME=unload_state
177
+
G91
178
+
G92 E0
179
+
G1 E{purge_distance} F{purge_speed} # purge
180
+
G1 E-{unload_distance} F{unload_speed} # fast-unload
181
+
RESTORE_GCODE_STATE NAME=unload_state
-8
hosts/anemone/klipper.nix
-8
hosts/anemone/klipper.nix
+3
-9
hosts/anemone/mainsail.nix
+3
-9
hosts/anemone/mainsail.nix
···
1
-
{pkgs, ...}: let
2
-
mainsail-config = pkgs.fetchFromGitHub {
3
-
owner = "mainsail-crew";
4
-
repo = "mainsail-config";
5
-
rev = "ff3869a621db17ce3ef660adbbd3fa321995ac42";
6
-
hash = "sha256-gDMAUDqf8no66Jc/jutFNwu7RbD+/qD/6Q6GLWOAA/k=";
7
-
};
8
-
in {
1
+
{
9
2
services.mainsail = {
10
3
enable = true;
4
+
nginx.extraConfig = "client_max_body_size 1000M;";
11
5
};
6
+
12
7
networking.firewall.allowedTCPPorts = [80];
13
-
environment.etc."mainsail.cfg".source = "${mainsail-config}/client.cfg";
14
8
}
+3
-3
hosts/anemone/moonraker.nix
+3
-3
hosts/anemone/moonraker.nix
-183
hosts/anemone/printer.cfg
-183
hosts/anemone/printer.cfg
···
1
-
# This file contains pin mappings for the stock 2020 Creality Ender 3
2
-
# V2. To use this config, during "make menuconfig" select the
3
-
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
4
-
# communication.
5
-
6
-
# If you prefer a direct serial connection, in "make menuconfig"
7
-
# select "Enable extra low-level configuration options" and select
8
-
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
9
-
# cable used for the LCD module as follows:
10
-
# 3: Tx, 4: Rx, 9: GND, 10: VCC
11
-
12
-
# Flash this firmware by copying "out/klipper.bin" to a SD card and
13
-
# turning on the printer with the card inserted. The firmware
14
-
# filename must end in ".bin" and must not match the last filename
15
-
# that was flashed.
16
-
17
-
# See docs/Config_Reference.md for a description of parameters.
18
-
19
-
[include mainsail.cfg]
20
-
21
-
[stepper_x]
22
-
step_pin: PC2
23
-
dir_pin: PB9
24
-
enable_pin: !PC3
25
-
microsteps: 16
26
-
rotation_distance: 40
27
-
endstop_pin: ^PA5
28
-
position_endstop: 0
29
-
position_max: 247
30
-
homing_speed: 50
31
-
32
-
[stepper_y]
33
-
step_pin: PB8
34
-
dir_pin: PB7
35
-
enable_pin: !PC3
36
-
microsteps: 16
37
-
rotation_distance: 40
38
-
endstop_pin: ^PA6
39
-
position_endstop: 0
40
-
position_max: 235
41
-
homing_speed: 50
42
-
43
-
[stepper_z]
44
-
step_pin: PB6
45
-
dir_pin: !PB5
46
-
enable_pin: !PC3
47
-
microsteps: 16
48
-
rotation_distance: 8
49
-
endstop_pin: probe:z_virtual_endstop
50
-
; position_min: -3 # for calibrating bltouch z_offset
51
-
position_max: 250
52
-
homing_speed: 4
53
-
second_homing_speed: 1
54
-
homing_retract_dist: 2.0
55
-
56
-
[extruder]
57
-
max_extrude_only_distance: 350
58
-
step_pin: PB4
59
-
dir_pin: PB3
60
-
enable_pin: !PC3
61
-
microsteps: 16
62
-
rotation_distance: 34.406
63
-
nozzle_diameter: 0.400
64
-
filament_diameter: 1.750
65
-
heater_pin: PA1
66
-
sensor_type: EPCOS 100K B57560G104F
67
-
sensor_pin: PC5
68
-
control: pid
69
-
# tuned for stock hardware with 200 degree Celsius target
70
-
pid_Kp: 21.527
71
-
pid_Ki: 1.063
72
-
pid_Kd: 108.982
73
-
min_temp: 0
74
-
max_temp: 250
75
-
76
-
[heater_bed]
77
-
heater_pin: PA2
78
-
sensor_type: EPCOS 100K B57560G104F
79
-
sensor_pin: PC4
80
-
control: pid
81
-
# tuned for stock hardware with 50 degree Celsius target
82
-
pid_Kp: 54.027
83
-
pid_Ki: 0.770
84
-
pid_Kd: 948.182
85
-
min_temp: 0
86
-
max_temp: 130
87
-
88
-
[fan]
89
-
pin: PA0
90
-
91
-
[mcu]
92
-
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
93
-
restart_method: command
94
-
95
-
[printer]
96
-
kinematics: cartesian
97
-
max_velocity: 180
98
-
max_accel: 1500
99
-
max_z_velocity: 5
100
-
max_z_accel: 100
101
-
102
-
# ABL specific settings
103
-
104
-
[bltouch]
105
-
sensor_pin: ^PB1
106
-
control_pin: PB0
107
-
x_offset: -46.8 # -45 on ender 3 v2 neo
108
-
y_offset: -6 # -10 on ender 3 v2 neo
109
-
z_offset: 1.434 # lower this number to move the nozzle higher
110
-
speed: 20
111
-
samples: 1
112
-
sample_retract_dist: 8.0
113
-
114
-
[safe_z_home]
115
-
home_xy_position: 160,120
116
-
speed: 150
117
-
z_hop: 10
118
-
z_hop_speed: 10
119
-
120
-
[bed_mesh]
121
-
speed: 120
122
-
mesh_min: 30,30
123
-
mesh_max: 189, 189
124
-
probe_count: 5,5
125
-
fade_start: 1
126
-
fade_end: 10
127
-
fade_target: 0
128
-
algorithm: bicubic
129
-
130
-
[bed_screws]
131
-
screw1:30,25
132
-
screw1_name:1
133
-
screw2:200,25
134
-
screw2_name:2
135
-
screw3:200,195
136
-
screw3_name:3
137
-
screw4:30,195
138
-
screw4_name:4
139
-
140
-
[screws_tilt_adjust]
141
-
screw1_name: front left screw
142
-
screw1: 75, 32
143
-
screw2_name: front right screw
144
-
screw2: 246, 32
145
-
screw3_name: rear right screw
146
-
screw3: 246, 204
147
-
screw4_name: rear left screw
148
-
screw4: 75, 204
149
-
horizontal_move_z: 10
150
-
speed: 200
151
-
screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise
152
-
153
-
[output_pin beeper]
154
-
pin: PB13
155
-
156
-
[virtual_sdcard]
157
-
path: /var/lib/moonraker/gcodes
158
-
159
-
[gcode_macro LOAD_FILAMENT]
160
-
variable_load_distance: 350
161
-
variable_purge_distance: 50
162
-
gcode:
163
-
{% set purge_speed = params.PURGE_SPEED|default(300) %}
164
-
{% set load_speed = params.LOAD_SPEED|default(printer.configfile.settings['extruder'].max_extrude_only_velocity * 10) %}
165
-
SAVE_GCODE_STATE NAME=load_state
166
-
G91
167
-
G92 E0
168
-
G1 E{load_distance} F{load_speed} # fast-load
169
-
G1 E{purge_distance} F{purge_speed} # purge
170
-
RESTORE_GCODE_STATE NAME=load_state
171
-
172
-
[gcode_macro UNLOAD_FILAMENT]
173
-
variable_unload_distance: 350
174
-
variable_purge_distance: 50
175
-
gcode:
176
-
{% set purge_speed = params.PURGE_SPEED|default(300) %}
177
-
{% set unload_speed = params.LOAD_SPEED|default(printer.configfile.settings['extruder'].max_extrude_only_velocity * 10) %}
178
-
SAVE_GCODE_STATE NAME=unload_state
179
-
G91
180
-
G92 E0
181
-
G1 E{purge_distance} F{purge_speed} # purge
182
-
G1 E-{unload_distance} F{unload_speed} # fast-unload
183
-
RESTORE_GCODE_STATE NAME=unload_state
+16
-1
hosts/earthy/default.nix
+16
-1
hosts/earthy/default.nix
···
11
11
"${self}/modules/nixos"
12
12
];
13
13
14
-
settings.system.hostName = "earthy";
14
+
settings = {
15
+
system = {
16
+
hostName = "earthy";
17
+
services = {
18
+
sync.enable = true;
19
+
navidrome.enable = true;
20
+
};
21
+
};
22
+
};
23
+
24
+
services.openssh = {
25
+
enable = true;
26
+
settings = {
27
+
PermitRootLogin = "yes";
28
+
};
29
+
};
15
30
16
31
# samba
17
32
environment.systemPackages = [pkgs.cifs-utils];
+9
hosts/starling/default.nix
+9
hosts/starling/default.nix
···
25
25
group = "staff";
26
26
home = "/Users/${cfg.system.user.name}";
27
27
};
28
+
services.sync.enable = true;
29
+
};
30
+
};
31
+
32
+
nix = {
33
+
linux-builder = {
34
+
enable = true;
35
+
# systems = ["aarch64-linux"];
36
+
# config.boot.binfmt.emulatedSystems = ["x86_64-linux" "aarch64-linux"];
28
37
};
29
38
};
30
39
-1
modules/darwin/homebrew.nix
-1
modules/darwin/homebrew.nix
+1
-1
modules/darwin/nix/default.nix
+1
-1
modules/darwin/nix/default.nix
-1
modules/nixos/home/default.nix
-1
modules/nixos/home/default.nix
-60
modules/nixos/home/programs/cli/beets.nix
-60
modules/nixos/home/programs/cli/beets.nix
···
1
-
{
2
-
lib,
3
-
osConfig,
4
-
config,
5
-
...
6
-
}: let
7
-
cfg = osConfig.settings.programs;
8
-
in {
9
-
config = lib.mkIf (cfg.cli.enable
10
-
&& cfg.categories.music.enable) {
11
-
systemd.user.services.mpdstats = {
12
-
Unit = {
13
-
Description = "Beets MPDStats daemon";
14
-
Requires = ["mpd.service"];
15
-
After = ["mpd.service"];
16
-
};
17
-
18
-
Install.WantedBy = ["default.target"];
19
-
20
-
Service = {
21
-
ExecStart = "${config.programs.beets.package}/bin/beet mpdstats";
22
-
Restart = "on-failure";
23
-
};
24
-
};
25
-
programs.beets = {
26
-
enable = true;
27
-
mpdIntegration.enableUpdate = true;
28
-
settings = {
29
-
plugins = [
30
-
"fetchart"
31
-
"thumbnails"
32
-
"mbsync"
33
-
"edit"
34
-
];
35
-
directory = "${config.xdg.userDirs.music}";
36
-
library = "${config.home.homeDirectory}/media/music_library.db";
37
-
import = {
38
-
copy = true;
39
-
write = true;
40
-
autotag = true;
41
-
};
42
-
paths = {
43
-
default = "Albums/%upper{%left{$albumartist,1}}/$albumartist/$album%aunique{}/$track. $title";
44
-
singleton = "Singles/$artist/$title";
45
-
comp = "Compilations/$album%aunique{}/$track. $title";
46
-
};
47
-
fetchart = {
48
-
auto = true;
49
-
sources = [
50
-
"filesystem"
51
-
"amazon"
52
-
"itunes"
53
-
"coverart"
54
-
"albumart"
55
-
];
56
-
};
57
-
};
58
-
};
59
-
};
60
-
}
-1
modules/nixos/home/programs/cli/default.nix
-1
modules/nixos/home/programs/cli/default.nix
-34
modules/nixos/home/scripts/spotdl.nix
-34
modules/nixos/home/scripts/spotdl.nix
···
1
-
{
2
-
pkgs,
3
-
osConfig,
4
-
lib,
5
-
...
6
-
}: let
7
-
cfg = osConfig.settings.programs.categories.music;
8
-
9
-
# TODO)) Add queuing for multiple URLs
10
-
bdl = pkgs.writeShellScriptBin "bdl" ''
11
-
echo "Please enter the Spotify URL:"
12
-
read -r url
13
-
14
-
tmpdir=$(mktemp -d) || { echo "Failed to create temporary directory"; exit 1; }
15
-
cd "$tmpdir" || { echo "Failed to change directory to $tmpdir"; exit 1; }
16
-
17
-
${pkgs.spotdl}/bin/spotdl "$url"
18
-
19
-
if [ $? -eq 0 ]; then
20
-
echo "Download complete. Now running 'beet im -m ~/tmpmusic'..."
21
-
${pkgs.beets}/bin/beet im -m "$tmpdir"
22
-
else
23
-
echo "Download failed. Please check the URL or your internet connection."
24
-
exit 1
25
-
fi
26
-
27
-
rm -r "$tmpdir"
28
-
echo "All operations completed successfully."
29
-
'';
30
-
in {
31
-
config = lib.mkIf cfg.enable {
32
-
home.packages = [bdl];
33
-
};
34
-
}
-1
modules/nixos/programs/default.nix
-1
modules/nixos/programs/default.nix
-15
modules/nixos/programs/ssh.nix
-15
modules/nixos/programs/ssh.nix
+1
modules/nixos/services/default.nix
+1
modules/nixos/services/default.nix