From c9f084dac78f4b100a564f733cdf21fdffdbe065 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 2 Oct 2020 00:48:27 +0300 Subject: [PATCH] minidlna --- modules/default.nix | 1 + modules/minidlna.nix | 7 +++++ modules/services.nix | 2 ++ modules/workspace/i3blocks/default.nix | 42 ++++++++++++++------------ 4 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 modules/minidlna.nix diff --git a/modules/default.nix b/modules/default.nix index 5326d11..c49148b 100755 --- a/modules/default.nix +++ b/modules/default.nix @@ -43,5 +43,6 @@ device: ./workspace/kanshi.nix ./nginx.nix ./gitea.nix + ./minidlna.nix ]; } diff --git a/modules/minidlna.nix b/modules/minidlna.nix new file mode 100644 index 0000000..ff07566 --- /dev/null +++ b/modules/minidlna.nix @@ -0,0 +1,7 @@ +{ + services.minidlna = { + enable = true; + announceInterval = 10; + mediaDirs = [ "A,/var/lib/music" ]; + }; +} diff --git a/modules/services.nix b/modules/services.nix index b39084e..01cb6b4 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -67,4 +67,6 @@ enableACME = true; forceSSL = true; }; + + virtualisation.spiceUSBRedirection.enable = true; } diff --git a/modules/workspace/i3blocks/default.nix b/modules/workspace/i3blocks/default.nix index a8f10fd..038c604 100644 --- a/modules/workspace/i3blocks/default.nix +++ b/modules/workspace/i3blocks/default.nix @@ -6,6 +6,7 @@ in { home-manager.users.balsoft = { wayland.windowManager.sway.config.bars = [{ id = "default"; + trayOutput = "primary"; command = "true"; colors = let thm = config.themes.colors; @@ -27,7 +28,7 @@ in { fonts = [ "IBM Plex Mono 11" "Material Icons 11" "Roboto Mono 11" ]; mode = "hide"; position = "bottom"; - workspaceNumbers = false; + workspaceNumbers = false; }]; xdg.configFile."i3blocks/config".text = let scr = x: { @@ -39,29 +40,30 @@ in { interval=60 markup=pango '' + genIniOrdered (optional (!isNull config.secrets.mail) (scr "email") - ++ [ (scrint "weather" 600) (scr "calendar") (scr "emacs") (scr "nixos") ] - ++ optional (!isNull config.secrets.wage) (scrint "youtrack-wage" 3600) - ++ [ (scrint "music" 3) (scrint "sound" 1) ] ++ [ - (scrint "cpu" 5) - (scrint "freq" 10) - (scr "temperature") - (scrint "free" 10) - ] ++ optionals config.deviceSpecific.isLaptop [ - (scr "battery") - (scrint "brightness" 5) - ] - ++ optional (config.deviceSpecific.devInfo ? bigScreen) (scrint "network" 1) - ++ [ (scrint "bluetooth" 3) (scrint "connections" 3) (scr "df") (scr "date") (scrint "time" 1) ]); + ++ [ (scrint "weather" 600) (scr "calendar") (scr "emacs") (scr "nixos") ] + ++ optional (!isNull config.secrets.wage) (scrint "youtrack-wage" 3600) + ++ [ (scrint "music" 3) (scrint "sound" 1) ] ++ [ + (scrint "cpu" 5) + (scrint "freq" 10) + (scr "temperature") + (scrint "free" 10) + ] ++ optionals config.deviceSpecific.isLaptop [ + (scr "battery") + (scrint "brightness" 5) + ] ++ optional (config.deviceSpecific.devInfo ? bigScreen) + (scrint "network" 1) ++ [ + (scrint "bluetooth" 3) + (scrint "connections" 3) + (scr "df") + (scr "date") + (scrint "time" 1) + ]); systemd.user.services.swaybar = { - Unit = { - Description = "Start default bar"; - }; + Unit = { Description = "Start default bar"; }; Install.WantedBy = [ "sway-session.target" ]; - Service = { - ExecStart = "${pkgs.sway}/bin/swaybar -b default"; - }; + Service = { ExecStart = "${pkgs.sway}/bin/swaybar -b default"; }; }; }; }