Add deemix + config
This commit is contained in:
parent
2858ec8363
commit
4fd6205b88
10 changed files with 40 additions and 5 deletions
|
@ -13,15 +13,15 @@
|
||||||
oxalica.url = github:oxalica/rust-overlay;
|
oxalica.url = github:oxalica/rust-overlay;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, oxalica, ... }: with nixpkgs; {
|
outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, oxalica, ... }: with nixpkgs; rec {
|
||||||
|
|
||||||
# Configurations for NixOS machines.
|
# Configurations for NixOS machines.
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
let mkUserConfig = path: {
|
let mkUserConfig = path: { config, ... }: {
|
||||||
imports = [ home-manager.nixosModules.home-manager ];
|
imports = [ home-manager.nixosModules.home-manager ];
|
||||||
config = {
|
config = {
|
||||||
home-manager.users."riley" = (import "${path}/home.nix");
|
home-manager.users."riley" = (import "${path}/home.nix");
|
||||||
home-manager.extraSpecialArgs = args;
|
home-manager.extraSpecialArgs = args // { age = config.age; };
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
# Configurations for non-NixOS machines.
|
# Configurations for non-NixOS machines.
|
||||||
homeConfigurations = with home-manager.lib; {
|
homeConfigurations = with home-manager.lib; {
|
||||||
"dev-lt-63" = homeManagerConfiguration {
|
"dev-lt-63" = homeManagerConfiguration {
|
||||||
extraSpecialArgs = args;
|
extraSpecialArgs = args // { age = args.config.age; };
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
modules = [
|
modules = [
|
||||||
./system/dev-lt-63/home.nix
|
./system/dev-lt-63/home.nix
|
||||||
|
|
BIN
secret/arl.age
Normal file
BIN
secret/arl.age
Normal file
Binary file not shown.
Binary file not shown.
|
@ -13,4 +13,6 @@ let strawberry = [
|
||||||
in {
|
in {
|
||||||
# Secrets for backup cloud storage provider
|
# Secrets for backup cloud storage provider
|
||||||
"secret/backblaze.age".publicKeys = all;
|
"secret/backblaze.age".publicKeys = all;
|
||||||
|
# The ARL for my deezer account
|
||||||
|
"secret/arl.age".publicKeys = all;
|
||||||
}
|
}
|
|
@ -9,6 +9,7 @@ in with lib; {
|
||||||
# TODO: Add strawberry as a build machine here
|
# TODO: Add strawberry as a build machine here
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.overlays = [ (import ../overlay.nix) ];
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
# needed to do extra configuration for example, consider putting
|
# needed to do extra configuration for example, consider putting
|
||||||
# the affected programs in their own modules.
|
# the affected programs in their own modules.
|
||||||
|
|
||||||
{ pkgs, ... }: {
|
{ pkgs, age, ... }: {
|
||||||
|
|
||||||
home.packages = (with pkgs; [
|
home.packages = (with pkgs; [
|
||||||
eva
|
eva
|
||||||
hyperfine
|
hyperfine
|
||||||
du-dust
|
du-dust
|
||||||
pijul
|
pijul
|
||||||
|
python311Packages.deemix
|
||||||
]) ++ (import ../env.nix pkgs);
|
]) ++ (import ../env.nix pkgs);
|
||||||
|
|
||||||
# CLI for accessing my passwords
|
# CLI for accessing my passwords
|
||||||
|
@ -44,4 +45,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile."deemix/.arl".source = age.secrets."arl".path;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,7 @@ with (import ./lib.nix final); {
|
||||||
prev.tor-browser-bundle-bin.override {
|
prev.tor-browser-bundle-bin.override {
|
||||||
useHardenedMalloc = false;
|
useHardenedMalloc = false;
|
||||||
};
|
};
|
||||||
|
python311Packages.deemix = prev.python311Packages.deemix.overrideAttrs (old: {
|
||||||
|
patches = [./patch/dont_write_arl.patch];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
18
shared/patch/dont_write_arl.patch
Normal file
18
shared/patch/dont_write_arl.patch
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
diff --git a/deemix/__main__.py b/deemix/__main__.py
|
||||||
|
index 39a878a..74acf8d 100644
|
||||||
|
--- a/deemix/__main__.py
|
||||||
|
+++ b/deemix/__main__.py
|
||||||
|
@@ -47,9 +47,10 @@ def download(url, bitrate, portable, path):
|
||||||
|
with open(configFolder / '.arl', 'r', encoding="utf-8") as f:
|
||||||
|
arl = f.readline().rstrip("\n").strip()
|
||||||
|
if not dz.login_via_arl(arl): arl = requestValidArl()
|
||||||
|
- else: arl = requestValidArl()
|
||||||
|
- with open(configFolder / '.arl', 'w', encoding="utf-8") as f:
|
||||||
|
- f.write(arl)
|
||||||
|
+ else:
|
||||||
|
+ arl = requestValidArl()
|
||||||
|
+ with open(configFolder / '.arl', 'w', encoding="utf-8") as f:
|
||||||
|
+ f.write(arl)
|
||||||
|
|
||||||
|
plugins = {}
|
||||||
|
if Spotify:
|
|
@ -1,5 +1,10 @@
|
||||||
{
|
{
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
"backblaze".file = ../secret/backblaze.age;
|
"backblaze".file = ../secret/backblaze.age;
|
||||||
|
"arl" = {
|
||||||
|
file = ../secret/arl.age;
|
||||||
|
owner = "riley";
|
||||||
|
mode = "777"; # Fuck it we ball
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -26,5 +26,8 @@
|
||||||
|
|
||||||
home-manager.users."riley".home.stateVersion = "22.11";
|
home-manager.users."riley".home.stateVersion = "22.11";
|
||||||
|
|
||||||
|
programs.adb.enable = true;
|
||||||
|
users.users."riley".extraGroups = ["adbusers"];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue