home/gui | mpv - utube being utube

This commit is contained in:
Don Harper 2025-09-29 19:41:29 -05:00
parent e23cc7b874
commit 7ed4afdf9d
3 changed files with 64 additions and 37 deletions

View file

@ -1,4 +1,9 @@
{ ... }: { {
inputs,
outputs,
pkgs,
...
}: {
programs = { programs = {
mpv = { mpv = {
enable = true; enable = true;
@ -30,8 +35,8 @@
ytdl = "yes"; ytdl = "yes";
ytdl-format = "bestvideo+bestaudio"; ytdl-format = "bestvideo+bestaudio";
# Only needed when/if youtube blocks annon access again # Only needed when/if youtube blocks annon access again
# ytdl-raw-options = "no-playlist=,cookies-from-browser=firefox,force-ipv4="; ytdl-raw-options = "no-playlist=,cookies-from-browser=firefox,force-ipv4=";
ytdl-raw-options = "no-playlist="; # ytdl-raw-options = "no-playlist=";
}; };
profiles = { profiles = {
utube = { utube = {

View file

@ -1,5 +1,11 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
let inputs,
outputs,
lib,
config,
pkgs,
...
}: let
my-python-packages = python-packages: my-python-packages = python-packages:
with python-packages; [ with python-packages; [
pip pip
@ -12,10 +18,10 @@ let
in { in {
nix = { nix = {
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
warn-dirty = false; warn-dirty = false;
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ "root" "don" ]; trusted-users = ["root" "don"];
}; };
gc = { gc = {
automatic = true; automatic = true;
@ -25,6 +31,7 @@ in {
}; };
imports = [ imports = [
../../home ../../home
./services.nix
./systemd.nix ./systemd.nix
../vars.nix ../vars.nix
./upgrade-diff.nix ./upgrade-diff.nix
@ -48,14 +55,14 @@ in {
inputMethod = { inputMethod = {
enable = true; enable = true;
type = "fcitx5"; type = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-gtk ]; fcitx5.addons = with pkgs; [fcitx5-mozc fcitx5-gtk];
}; };
}; };
# Bootloader. # Bootloader.
boot = { boot = {
kernelPackages = pkgs.linuxPackages_rpi4; kernelPackages = pkgs.linuxPackages_rpi4;
kernelParams = [ "consoleblank=60" ]; kernelParams = ["consoleblank=60"];
#loader = { #loader = {
#systemd-boot = { #systemd-boot = {
#enable = true; #enable = true;
@ -65,34 +72,36 @@ in {
#efiSysMountPoint = "/boot"; #efiSysMountPoint = "/boot";
#}; #};
#}; #};
plymouth = { enable = true; }; plymouth = {enable = true;};
kernel = { sysctl = { "vm.swappiness" = 10; }; }; kernel = {sysctl = {"vm.swappiness" = 10;};};
}; };
security = { security = {
polkit = { enable = true; }; polkit = {enable = true;};
sudo.enable = false; sudo.enable = false;
doas = { doas = {
enable = true; enable = true;
extraRules = [{ extraRules = [
users = [ "don" ]; {
keepEnv = true; users = ["don"];
noPass = true; keepEnv = true;
}]; noPass = true;
}
];
}; };
}; };
services = { services = {
pcscd = { enable = true; }; pcscd = {enable = true;};
beszel-agent = { enable = true; }; beszel-agent = {enable = true;};
avahi = { avahi = {
enable = true; enable = true;
nssmdns4 = true; nssmdns4 = true;
}; };
printing = { enable = true; }; printing = {enable = true;};
udisks2 = { enable = true; }; udisks2 = {enable = true;};
nscd = { enableNsncd = true; }; nscd = {enableNsncd = true;};
tailscale = { enable = true; }; tailscale = {enable = true;};
locate = { locate = {
enable = true; enable = true;
package = pkgs.mlocate; package = pkgs.mlocate;
@ -176,8 +185,8 @@ in {
]; ];
programs = { programs = {
dconf = { enable = true; }; dconf = {enable = true;};
mtr = { enable = true; }; mtr = {enable = true;};
gnupg = { gnupg = {
agent = { agent = {
enable = true; enable = true;
@ -189,7 +198,7 @@ in {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: super: { (final: super: {
khal = super.khal.overridePythonAttrs (_: { doCheck = false; }); khal = super.khal.overridePythonAttrs (_: {doCheck = false;});
}) })
]; ];
@ -197,22 +206,26 @@ in {
networking.firewall = { networking.firewall = {
enable = true; enable = true;
# always allow traffic from your Tailscale network # always allow traffic from your Tailscale network
trustedInterfaces = [ "tailscale0" ]; trustedInterfaces = ["tailscale0"];
checkReversePath = "loose"; checkReversePath = "loose";
# allow the Tailscale UDP port through the firewall # allow the Tailscale UDP port through the firewall
allowedUDPPorts = [ config.services.tailscale.port ]; allowedUDPPorts = [config.services.tailscale.port];
allowedTCPPortRanges = [{ allowedTCPPortRanges = [
from = 1714; {
to = 1764; from = 1714;
}]; to = 1764;
allowedUDPPortRanges = [{ }
from = 1714; ];
to = 1764; allowedUDPPortRanges = [
}]; {
from = 1714;
to = 1764;
}
];
# allow you to SSH in over the public internet # allow you to SSH in over the public internet
allowedTCPPorts = [ 22 ]; allowedTCPPorts = [22];
}; };
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View file

@ -0,0 +1,9 @@
{...}: {
services = {
wlsunset = {
enable = true;
latitude = 29.74;
longitude = 95.77;
};
};
}