Compare commits

..

1 Commits

Author SHA1 Message Date
18f0a37407 wip 2024-10-05 19:00:35 -07:00
7 changed files with 34 additions and 38 deletions

View File

@@ -6,13 +6,13 @@ let
cfg = config.home.i3_sway;
i3_cfg = config.xsession.windowManager.i3.config;
shared_config = recursiveUpdate rec {
shared_config = recursiveUpdate {
modifier = "Mod4";
terminal = "kitty";
defaultWorkspace = "workspace number 1";
keybindings = {
"${shared_config.modifier}+Return" = "exec ${terminal}";
"${shared_config.modifier}+Return" = "exec ${i3_cfg.terminal}";
"${shared_config.modifier}+Shift+q" = "kill";
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";

View File

@@ -19,10 +19,6 @@ with lib;
autologin = true;
wayland = true;
};
spotifyd = {
enable = true;
deviceType = "t_v";
};
users.enable = true;
};

View File

@@ -13,15 +13,16 @@ in
config = mkIf cfg.enable
{
environment.systemPackages = with pkgs; [
alsa-utils
paprefs
pavucontrol
pulsemixer
];
hardware.pulseaudio.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
};
hardware.pulseaudio.package = pkgs.pulseaudioFull;
hardware.pulseaudio.support32Bit = true;
hardware.pulseaudio.extraConfig = "
load-module module-combine-sink
load-module module-switch-on-connect

View File

@@ -1,7 +1,10 @@
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.roles;
in
{
imports = [
./audio
@@ -16,6 +19,10 @@ with lib;
./virtualisation
];
options.roles = {
enable = mkEnableOption "Enable roles";
};
config = {
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
@@ -58,6 +65,9 @@ with lib;
substituters = [
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};

View File

@@ -37,7 +37,7 @@ in
};
};
config = mkIf cfg.enable
config =
{
services.xserver.xkb = {
layout = "us";

View File

@@ -35,7 +35,7 @@ in
};
services = if cfg.autologin then mkMerge [
(mkIf cfg.wayland {
mkIf cfg.wayland {
cage = mkIf cfg.wayland {
user = "kodi";
program = "${kodiPkg}/bin/kodi-standalone";
@@ -45,9 +45,9 @@ in
enable = false;
autorun = false;
};
})
}
(mkIf (!cfg.wayland) {
mkIf (!cfg.wayland) {
xserver = {
enable = true;
desktopManager.kodi = {
@@ -65,7 +65,7 @@ in
defaultSession = "kodi";
sessionData.autologinSession = "kodi";
};
})
}
] else {};
};
}

View File

@@ -4,44 +4,33 @@ with lib;
let
cfg = config.roles.spotifyd;
spotifyd = pkgs.spotifyd.override { withMpris = true; withPulseAudio = true; };
spotifydConf = pkgs.writeText "spotifyd-config" ''
[global]
backend = "pulseaudio"
bitrate = 320
use_mpris = false
zeroconf_port = 5354
autoplay = false
device_type = "${cfg.deviceType}"
'';
in
{
options.roles.spotifyd = {
enable = mkEnableOption "Enable the spotifyd role";
deviceType = mkOption {
default = "computer";
};
};
config = mkIf cfg.enable
{
roles.audio.enable = true;
systemd.user.services.spotifyd = {
services.spotifyd = {
enable = true;
wantedBy = [ "default.target" ];
after = [ "network-online.target" "sound.target" ];
description = "spotifyd, a Spotify playing daemon";
serviceConfig = {
ExecStart = "${spotifyd}/bin/spotifyd --no-daemon --cache-path=\${HOME}/.cache/spotifyd --config-path=${spotifydConf}";
Restart = "always";
RestartSec = 12;
settings = {
global = {
use_mpris = false;
backend = "alsa";
device = "sysdefault";
bitrate = 320;
cache_path = "";
zeroconf_port = 1234;
autoplay = false;
};
};
};
users.users."kodi".linger = true;
networking.firewall.allowedTCPPorts = [
5354
1234
57621
];
networking.firewall.allowedUDPPorts = [