diff options
-rw-r--r-- | flake.nix | 2 | ||||
-rw-r--r-- | hosts/config.nix | 3 | ||||
-rw-r--r-- | hosts/jonbox/default.nix | 1 | ||||
-rw-r--r-- | hosts/jontop/default.nix | 1 | ||||
-rw-r--r-- | modules/desktop/awesome/rc.lua | 73 | ||||
-rw-r--r-- | modules/music/default.nix | 3 | ||||
-rw-r--r-- | modules/music/mpd.nix | 34 |
7 files changed, 74 insertions, 43 deletions
@@ -22,7 +22,7 @@ nixosConfigurations = ( import ./hosts { inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-unstable nurpkgs home-manager stateVersion; + inherit inputs nixpkgs nixpkgs-unstable nixos-hardware nurpkgs home-manager stateVersion; } ); }; diff --git a/hosts/config.nix b/hosts/config.nix index de49a45..9bd3922 100644 --- a/hosts/config.nix +++ b/hosts/config.nix @@ -7,7 +7,8 @@ import ../modules/shell ++ import ../modules/terminal ++ import ../modules/programs ++ - import ../modules/vpn + import ../modules/vpn ++ + import ../modules/music ); users.users.${user} = { diff --git a/hosts/jonbox/default.nix b/hosts/jonbox/default.nix index ce5f4a3..9d1a475 100644 --- a/hosts/jonbox/default.nix +++ b/hosts/jonbox/default.nix @@ -40,4 +40,5 @@ awesome.enable = true; mullvad-vpn.enable = true; + mpd.enable = true; } diff --git a/hosts/jontop/default.nix b/hosts/jontop/default.nix index 4e53279..c916696 100644 --- a/hosts/jontop/default.nix +++ b/hosts/jontop/default.nix @@ -27,6 +27,5 @@ programs.light.enable = true; awesome.enable = true; - mullvad-vpn.enable = true; } diff --git a/modules/desktop/awesome/rc.lua b/modules/desktop/awesome/rc.lua index 9c2bdc5..1fb1ea5 100644 --- a/modules/desktop/awesome/rc.lua +++ b/modules/desktop/awesome/rc.lua @@ -657,65 +657,58 @@ client.connect_signal("request::titlebars", function(c) end) ) - awful.titlebar(c, {size = 20}) : setup { + awful.titlebar(c, {size = dpi(20), position = "left"}) : setup { { -- Left awful.titlebar.widget.iconwidget(c), + widget = wibox.container.margin, + top = dpi(6), + bottom = dpi(6), buttons = buttons, - layout = wibox.layout.fixed.horizontal + layout = wibox.layout.fixed.vertical, }, { -- Middle - { -- Title - align = "center", - widget = awful.titlebar.widget.titlewidget(c) - }, +-- { -- Title +-- align = "center", +-- widget = awful.titlebar.widget.titlewidget(c) +-- }, buttons = buttons, layout = wibox.layout.flex.horizontal }, { -- Right - { { { - widget = awful.titlebar.widget.maximizedbutton(c), + { + widget = awful.titlebar.widget.maximizedbutton(c), + }, + widget = wibox.container.background, + shape = gears.shape.circle, + shape_border_width = 1, + shape_border_color = "#12ac28", + bg = "#28c940", + forced_height = dpi(14), }, - widget = wibox.container.background, - shape = gears.shape.circle, - shape_border_width = 1, - shape_border_color = "#12ac28", - bg = "#28c940", - forced_width = dpi(14), - }, - { { - widget = awful.titlebar.widget.closebutton(c), + { + widget = awful.titlebar.widget.closebutton(c), + }, + widget = wibox.container.background, + shape = gears.shape.circle, + shape_border_width = 1, + shape_border_color = "#ad3934", + bg = "#bf4943", + forced_height = dpi(14), }, - widget = wibox.container.background, - shape = gears.shape.circle, - shape_border_width = 1, - shape_border_color = "#ad3934", - bg = "#bf4943", - forced_width = dpi(14), + spacing = dpi(6), + layout = wibox.layout.fixed.vertical }, - spacing = dpi(6), - layout = wibox.layout.fixed.horizontal - }, - widget = wibox.container.margin; - left = dpi(6); - right = dpi(6); + widget = wibox.container.margin; + top = dpi(6); + bottom = dpi(6); }, - layout = wibox.layout.align.horizontal + layout = wibox.layout.align.vertical } end) -client.connect_signal("property::floating", function(c) - local tb = awful.titlebar(c) - - if c.floating then - awful.titlebar.show(c) - else - awful.titlebar.hide(c) - end -end) - -- Enable sloppy focus, so that focus follows mouse. client.connect_signal("mouse::enter", function(c) c:emit_signal("request::activate", "mouse_enter", {raise = false}) diff --git a/modules/music/default.nix b/modules/music/default.nix new file mode 100644 index 0000000..cce3744 --- /dev/null +++ b/modules/music/default.nix @@ -0,0 +1,3 @@ +[ + ./mpd.nix +] diff --git a/modules/music/mpd.nix b/modules/music/mpd.nix new file mode 100644 index 0000000..8ee1f1b --- /dev/null +++ b/modules/music/mpd.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, user, ... }: +with lib; +let + +in +{ + options = { + mpd = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + }; + + config.home-manager.users.${user} = mkIf (config.mpd.enable) + { + services.mpd = { + enable = true; + musicDirectory = "/home/${user}/mus"; + extraConfig = '' +audio_output { + type "pipewire" + name "Pipewire Output" +} + ''; + }; + + home.packages = with pkgs; [ + mpc-cli + ncmpcpp + ]; + }; +} |