Fix audiotube
This commit is contained in:
parent
e52dcef401
commit
f6c6ba872c
19
flake.lock
19
flake.lock
@ -1040,7 +1040,8 @@
|
|||||||
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
||||||
"simple-osd-daemons": "simple-osd-daemons",
|
"simple-osd-daemons": "simple-osd-daemons",
|
||||||
"sonoff-lan": "sonoff-lan",
|
"sonoff-lan": "sonoff-lan",
|
||||||
"tridactyl-native-messenger": "tridactyl-native-messenger"
|
"tridactyl-native-messenger": "tridactyl-native-messenger",
|
||||||
|
"yt-dlp": "yt-dlp"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
@ -1213,6 +1214,22 @@
|
|||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"yt-dlp": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676639476,
|
||||||
|
"narHash": "sha256-+rVcHpSCu2Wa8Noy4uINdx4S5iftYKrh1wQqpb67RQg=",
|
||||||
|
"owner": "yt-dlp",
|
||||||
|
"repo": "yt-dlp",
|
||||||
|
"rev": "18d295c9e0f95adc179eef345b7af64d6372db78",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "yt-dlp",
|
||||||
|
"repo": "yt-dlp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
@ -106,6 +106,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
nixos-hardware.url = "github:balsoft/nixos-hardware/add-librem-5";
|
nixos-hardware.url = "github:balsoft/nixos-hardware/add-librem-5";
|
||||||
|
|
||||||
|
yt-dlp.url = "github:yt-dlp/yt-dlp";
|
||||||
|
yt-dlp.flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, self, nix, deploy-rs, ... }@inputs:
|
outputs = { nixpkgs, self, nix, deploy-rs, ... }@inputs:
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
power
|
power
|
||||||
hardware
|
hardware
|
||||||
sound
|
sound
|
||||||
|
|
||||||
plasma-mobile
|
plasma-mobile
|
||||||
|
# phosh
|
||||||
|
|
||||||
nheko
|
nheko
|
||||||
okular
|
okular
|
||||||
@ -28,6 +30,7 @@
|
|||||||
fonts
|
fonts
|
||||||
gtk
|
gtk
|
||||||
qt
|
qt
|
||||||
|
shadowsocks
|
||||||
|
|
||||||
pass-secret-service
|
pass-secret-service
|
||||||
];
|
];
|
||||||
|
@ -9,6 +9,10 @@ with types; {
|
|||||||
default =
|
default =
|
||||||
!isNull (builtins.match ".*Laptop" config.networking.hostName);
|
!isNull (builtins.match ".*Laptop" config.networking.hostName);
|
||||||
};
|
};
|
||||||
|
isPhone = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = !isNull (builtins.match ".*Phone" config.networking.hostName);
|
||||||
|
};
|
||||||
devInfo = {
|
devInfo = {
|
||||||
cpu = {
|
cpu = {
|
||||||
arch = mkOption { type = enum [ "x86_64" "aarch64" ]; };
|
arch = mkOption { type = enum [ "x86_64" "aarch64" ]; };
|
||||||
|
@ -45,23 +45,28 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
activate-secrets = pkgs.writeShellScriptBin "activate-secrets" ''
|
activate-secrets = pkgs.writeShellApplication {
|
||||||
|
name = "activate-secrets";
|
||||||
|
text = ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# Make sure card is available and unlocked
|
# Make sure card is available and unlocked
|
||||||
echo fetch | gpg --card-edit --no-tty --command-fd=0
|
echo fetch | gpg --card-edit --no-tty --command-fd=0
|
||||||
${pkgs.gnupg}/bin/gpg --card-status
|
gpg --card-status
|
||||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
if [ -d "${password-store}/.git" ]; then
|
if [ -d "${password-store}/.git" ]; then
|
||||||
cd "${password-store}"; ${pkgs.git}/bin/git pull
|
cd "${password-store}"; git pull
|
||||||
else
|
else
|
||||||
${pkgs.git}/bin/git clone ${
|
git clone ${
|
||||||
lib.escapeShellArg config.secretsConfig.repo
|
lib.escapeShellArg config.secretsConfig.repo
|
||||||
} "${password-store}"
|
} "${password-store}"
|
||||||
fi
|
fi
|
||||||
cat ${password-store}/email/balsoft@balsoft.ru.gpg | ${pkgs.gnupg}/bin/gpg --decrypt > /dev/null
|
gpg --decrypt < ${password-store}/email/balsoft@balsoft.ru.gpg > /dev/null
|
||||||
sudo systemctl restart ${allServices}
|
/run/wrappers/bin/sudo systemctl restart ${allServices}
|
||||||
'';
|
'';
|
||||||
|
runtimeInputs = [ pkgs.gnupg pkgs.git pkgs.systemd pkgs.openssh ];
|
||||||
|
|
||||||
|
};
|
||||||
decrypt = name: cfg:
|
decrypt = name: cfg:
|
||||||
with cfg; {
|
with cfg; {
|
||||||
"${name}-secrets" = rec {
|
"${name}-secrets" = rec {
|
||||||
|
43
overlay.nix
43
overlay.nix
@ -21,28 +21,9 @@ in rec {
|
|||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
mopidy
|
mopidy
|
||||||
(python3Packages.ytmusicapi.overrideAttrs (oa: rec {
|
python3Packages.ytmusicapi
|
||||||
name = "python3.9-ytmusicapi-${version}";
|
python3Packages.pytube
|
||||||
version = "0.19.1";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "sigma67";
|
|
||||||
repo = "ytmusicapi";
|
|
||||||
rev = "fd9f57750de103202106f02be1696bd440f2c05b";
|
|
||||||
sha256 = "/NMy2cGe0K/14OZd+/dXKA6Ez1ivrtrZ6Lwl0P8dioA=";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
|
||||||
}))
|
|
||||||
(python3Packages.pytube.overrideAttrs (oa: rec {
|
|
||||||
name = "python3.9-pytube-${version}";
|
|
||||||
version = "11.0.1";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "pytube";
|
|
||||||
repo = "pytube";
|
|
||||||
rev = "f06e0710dcf5089e582487fee94f7bb0afbf7ba9";
|
|
||||||
sha256 = "sha256-yQCgrnoPOSdTnTPEsVkgLYpPLiHq7kXRUO72TxD152k=";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
|
||||||
}))
|
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
@ -183,5 +164,23 @@ in rec {
|
|||||||
maintainers = with maintainers; [ balsoft ];
|
maintainers = with maintainers; [ balsoft ];
|
||||||
};
|
};
|
||||||
}) { };
|
}) { };
|
||||||
|
|
||||||
|
audiotube = prev'.audiotube.overrideAttrs (_: {
|
||||||
|
desktopItem = final.makeDesktopItem {
|
||||||
|
name = "Audiotube";
|
||||||
|
exec = "https_proxy=socks5://localhost:5555 audiotube";
|
||||||
|
icon = "org.kde.audiotube";
|
||||||
|
type = "Application";
|
||||||
|
categories = [ "Qt" "KDE" "AudioVideo" "Player" ];
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
okularMobile = final.okular.overrideAttrs
|
||||||
|
(oa: { cmakeFlags = oa.cmakeFlags or [ ] ++ [ "-DOKULAR_UI=mobile" ]; });
|
||||||
|
|
||||||
|
python3Packages = prev.python3Packages.overrideScope (final': prev': {
|
||||||
|
yt-dlp = prev'.yt-dlp.overrideAttrs (_: { src = inputs.yt-dlp; });
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
with (pkgs.my-lib.thmDec config.themes.colors); {
|
with (pkgs.my-lib.thmDec config.themes.colors); {
|
||||||
home-manager.users.balsoft = {
|
home-manager.users.balsoft = {
|
||||||
home.packages = [ pkgs.okular ];
|
home.packages = [
|
||||||
|
(if config.deviceSpecific.isPhone then
|
||||||
|
pkgs.okularMobile
|
||||||
|
else
|
||||||
|
pkgs.okular)
|
||||||
|
];
|
||||||
xdg.configFile."okularpartrc".text = pkgs.my-lib.genIni {
|
xdg.configFile."okularpartrc".text = pkgs.my-lib.genIni {
|
||||||
"Dlg Accessibility" = {
|
"Dlg Accessibility" = {
|
||||||
RecolorBackground = base00;
|
RecolorBackground = base00;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
"wireshark"
|
"wireshark"
|
||||||
"lp"
|
"lp"
|
||||||
"scanner"
|
"scanner"
|
||||||
|
"feedbackd"
|
||||||
];
|
];
|
||||||
description = "Александр Бантьев";
|
description = "Александр Бантьев";
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
kwallet = null;
|
||||||
|
kwallet-pam = null;
|
||||||
|
kwalletmanager = null;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
desktopManager.plasma5 = {
|
desktopManager.plasma5 = {
|
||||||
@ -22,7 +30,9 @@
|
|||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.enable = true;
|
programs.feedbackd.enable = true;
|
||||||
|
|
||||||
|
services.upower.enable = true;
|
||||||
|
|
||||||
home-manager.users.balsoft = {
|
home-manager.users.balsoft = {
|
||||||
home.activation.removeGtkRc = {
|
home.activation.removeGtkRc = {
|
||||||
|
@ -197,6 +197,7 @@ in {
|
|||||||
QT_SCALE_FACTOR = "1";
|
QT_SCALE_FACTOR = "1";
|
||||||
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
||||||
QT_QPA_PLATFORMTHEME = "kde";
|
QT_QPA_PLATFORMTHEME = "kde";
|
||||||
|
QT_QUICK_CONTROLS_STYLE = "org.kde.breeze";
|
||||||
KDEDIRS =
|
KDEDIRS =
|
||||||
"/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5";
|
"/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5";
|
||||||
};
|
};
|
||||||
@ -216,6 +217,6 @@ in {
|
|||||||
home.packages = [ pkgs.ark pkgs.dolphin ];
|
home.packages = [ pkgs.ark pkgs.dolphin ];
|
||||||
|
|
||||||
xdg.configFile."kdeglobals".text = lib.generators.toGitINI
|
xdg.configFile."kdeglobals".text = lib.generators.toGitINI
|
||||||
(builtins.foldl' lib.recursiveUpdate { } [ colorTheme misc ]);
|
(builtins.foldl' lib.recursiveUpdate { } [ colorTheme effects misc ]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }: {
|
||||||
{
|
|
||||||
secrets.mopidy_ytmusic_auth = {
|
secrets.mopidy_ytmusic_auth = {
|
||||||
owner = "mopidy:mopidy";
|
owner = "mopidy:mopidy";
|
||||||
services = [ "mopidy" ];
|
services = [ "mopidy" ];
|
||||||
@ -7,7 +6,7 @@
|
|||||||
|
|
||||||
services.mopidy = {
|
services.mopidy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensionPackages = with pkgs; [ mopidy-mpd mopidy-ytmusic ];
|
extensionPackages = with pkgs; [ mopidy-mpd /*mopidy-ytmusic*/ ];
|
||||||
configuration = ''
|
configuration = ''
|
||||||
[ytmusic]
|
[ytmusic]
|
||||||
enabled=true
|
enabled=true
|
||||||
@ -16,12 +15,10 @@
|
|||||||
hostname = 0.0.0.0
|
hostname = 0.0.0.0
|
||||||
port = 6600
|
port = 6600
|
||||||
[audio]
|
[audio]
|
||||||
output = pulsesink server=127.0.0.1
|
output = autoaudiosink
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.mopidy = {
|
systemd.services.mopidy = { after = [ "network-online.target" ]; environment.https_proxy = "socks5://localhost:5555"; };
|
||||||
after = [ "network-online.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
24
profiles/workspace/shadowsocks.nix
Normal file
24
profiles/workspace/shadowsocks.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
secrets.shadowsocks_options = {
|
||||||
|
owner = "shadowsocks:shadowsocks";
|
||||||
|
services = [ "shadowsocks" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.shadowsocks = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "shadowsocks";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.shadowsocks = { };
|
||||||
|
|
||||||
|
systemd.services.shadowsocks = {
|
||||||
|
script = "ss-local -l 5555 $(cat ${config.secrets.shadowsocks_options})";
|
||||||
|
path = [ pkgs.shadowsocks-libev ];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "shadowsocks";
|
||||||
|
Group = "shadowsocks";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
}
|
@ -49,5 +49,6 @@
|
|||||||
simple-osd-daemons
|
simple-osd-daemons
|
||||||
sway
|
sway
|
||||||
yubikey-touch-detector
|
yubikey-touch-detector
|
||||||
|
shadowsocks
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user