Compare commits

...

5 Commits

Author SHA1 Message Date
Ricard Illa 20cc9f7d24
fix: added empty placeholder settings for fusuma 2023-08-19 18:38:04 +02:00
Ricard Illa 4139badc69
feat: restructured snapcast 2023-08-19 18:38:03 +02:00
Ricard Illa 42ad65fc34
feat: restructured snapcast 2023-08-19 18:37:56 +02:00
Ricard Illa 36a64d5fdc
feat: firefox things 2023-08-19 18:37:05 +02:00
Ricard Illa 9f8742fc42
feat: fusuma 2023-08-19 18:37:04 +02:00
11 changed files with 87 additions and 30 deletions

View File

@ -9,6 +9,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
./file-systems.nix ./file-systems.nix
./home-manager.nix ./home-manager.nix
./snapcast.nix
outputs.nixosModules.common outputs.nixosModules.common
outputs.nixosModules.desktop outputs.nixosModules.desktop
]; ];

View File

@ -15,7 +15,9 @@
imports = [ imports = [
outputs.homeManagerModules.common outputs.homeManagerModules.common
outputs.homeManagerModules.extra outputs.homeManagerModules.extra
outputs.homeManagerModules.snapclient
]; ];
snapclient.enable = true;
}; };
}; };
} }

View File

@ -0,0 +1,25 @@
{ config, pkgs, ... }:
{
services.snapserver = {
enable = true;
codec = "flac";
streams = {
pipewire = {
type = "pipe";
location = "/run/snapserver/pipewire";
};
};
};
systemd.user.services.snapcast-sink = {
wantedBy = [ "pipewire.service" ];
after = [ "pipewire.service" ];
bindsTo = [ "pipewire.service" ];
path = with pkgs; [ gawk pulseaudio ];
script = ''
pactl load-module module-pipe-sink file=/run/snapserver/pipewire sink_name=Snapcast format=s16le rate=48000
'';
};
}

View File

@ -3,8 +3,11 @@
{ {
home.packages = [ pkgs.librewolf pkgs.tor-browser-bundle-bin ]; home.packages = [ pkgs.librewolf pkgs.tor-browser-bundle-bin ];
programs.firefox.enable = true; programs.firefox = {
home.sessionVariables.BROWSER = "${pkgs.firefox}/bin/firefox"; enable = true;
package = pkgs.firefox-esr;
};
home.sessionVariables.BROWSER = "${pkgs.firefox-esr}/bin/firefox";
programs.chromium = { programs.chromium = {
enable = true; enable = true;

View File

@ -29,7 +29,7 @@
neovim = import ./neovim; neovim = import ./neovim;
pass = import ./pass; pass = import ./pass;
rss = import ./rss; rss = import ./rss;
snapcast = import ./snapcast; snapclient = import ./snapclient;
sound = import ./sound; sound = import ./sound;
ssh = import ./ssh; ssh = import ./ssh;
syncthing = import ./syncthing; syncthing = import ./syncthing;

View File

@ -2,10 +2,11 @@
{ {
imports = [ imports = [
./kile
./bemenu.nix ./bemenu.nix
./fusuma.nix
./init.nix ./init.nix
./kanshi.nix ./kanshi.nix
./kile
./mako.nix ./mako.nix
./swaybg.nix ./swaybg.nix
./swaylock.nix ./swaylock.nix

View File

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
services.fusuma = {
enable = true;
extraPackages = with pkgs; [ coreutils ydotool ];
settings = {};
# settings = {
# swipe."3" = {
# left.command = "do the thing";
# };
# };
};
}

View File

@ -20,7 +20,6 @@
../msg ../msg
../music ../music
../rss ../rss
../snapcast
../sound ../sound
../syncthing ../syncthing
../theming ../theming

View File

@ -1,21 +0,0 @@
{ config, pkgs, ... }:
let snapserver_ip = "192.168.1.144";
in
{
home.packages = [ pkgs.snapcast ];
systemd.user.services.snapclient = {
Unit = {
After = [ "pipewire.service" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.snapcast}/bin/snapclient --host ${snapserver_ip}";
};
Install = {
WantedBy = [ "pipewire.service" ];
};
};
}

View File

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
cfg = config.snapclient;
in
{
options.snapclient = {
enable = lib.mkEnableOption "snapclient";
snapserver-host = lib.mkOption {
type = lib.types.str;
default = "localhost";
description = "host running snapserver to connect to";
};
package = lib.mkOption {
type = lib.types.package;
default = pkgs.snapcast;
defaultText = "pkgs.snapcast";
description = "package for snapcast";
};
};
config = lib.mkIf cfg.enable {
systemd.user.services.snapclient = {
Service = {
Type = "simple";
ExecStart = "${cfg.package}/bin/snapclient --host ${cfg.snapserver-host}";
};
Unit.After = [ "pipewire.service" ];
Install.WantedBy = [ "pipewire.service" ];
};
};
}