refactor: remove unused library functions, start removing with lib

This commit is contained in:
Kat Inskip 2022-07-10 15:18:00 -07:00
parent abbb3f8899
commit 600d890b7f
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
23 changed files with 91 additions and 248 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, nixos, kw, ... }: with lib;
{ config, lib, pkgs, nixos, kw, ... }:
let
commonSettings = {
@ -127,7 +127,7 @@ in
};
extraNativeMessagingHosts = with pkgs; [
tridactyl-native
] ++ optional config.programs.buku.enable bukubrow;
] ++ lib.optional config.programs.buku.enable bukubrow;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
sponsorblock

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }: with lib;
{ config, lib, pkgs, ... }:
{
let
inherit (lib.modules) mkMerge mkIf;
inherit (lib.attrsets) mapAttrsToList;
in {
programs.mpv = {
enable = true;
scripts = [ pkgs.mpvScripts.sponsorblock pkgs.mpvScripts.paused ];
@ -98,8 +101,8 @@
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
(lib.mapAttrsToList (k: v: "${k}=${toString v}") {
script-opts = builtins.concatStringsSep ","
(mapAttrsToList (k: v: "${k}=${toString v}") {
ytdl_hook-ytdl_path = "${pkgs.yt-dlp}/bin/yt-dlp";
osc-layout = "slimbox";
osc-vidscale = "no";

View file

@ -36,7 +36,7 @@
"listrowsfirst"
]; in
''
${if lib.hasSuffix "darwin" pkgs.stdenv.system then ''
${if lib.hasSuffix "linux" pkgs.stdenv.system then ''
eval $(dircolors)
'' else ''
''}

View file

@ -1,8 +1,8 @@
{ config, lib, tf, ... }:
with lib;
{
let
inherit (lib.modules) mkForce;
in {
kw.secrets.variables = {
syncplay-pass = {
path = "services/media/syncplay";