diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 3119916c..443e45a5 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -15,10 +15,14 @@ desktop = { kitty.enable = true; bspwm.enable = true; + apps = { + qutebrowser.enable = true; + }; }; hardware = { nvidia.enable = true; pipewire.enable = true; + bluetooth.enable = true; }; shell = { nix = { @@ -29,19 +33,6 @@ }; }; - # Bluetooth - hardware.bluetooth = { - enable = true; - settings = { - General = { - ControllerMode = "bredr"; - }; - }; - # i barely use bluetooth so keep it on demand - powerOnBoot = false; - }; - services.blueman.enable = true; - # Enable CUPS to print documents. # services.printing.enable = true; @@ -56,13 +47,6 @@ extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ firefox - # qutebrowser - qutebrowser-qt6 - # qute-keepassxc - python310Packages.pynacl - # adblock - python310Packages.adblock - # end qutebrowser keepassxc tree dmenu diff --git a/modules/desktop/apps/default.nix b/modules/desktop/apps/default.nix new file mode 100644 index 00000000..6a80c727 --- /dev/null +++ b/modules/desktop/apps/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./qutebrowser + ]; +} diff --git a/modules/desktop/apps/qutebrowser/default.nix b/modules/desktop/apps/qutebrowser/default.nix new file mode 100644 index 00000000..6e4adb40 --- /dev/null +++ b/modules/desktop/apps/qutebrowser/default.nix @@ -0,0 +1,30 @@ +{ options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.apps.qutebrowser; +in +{ + options.modules.desktop.apps.qutebrowser = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + qutebrowser-qt6 + python310Packages.pynacl + python310Packages.adblock + ]; + + home-manager.users.sako = { pkgs , ...}: { + xdg.configFile = { + "qutebrowser/config.py" = { + source = ../../../config/qutebrowser/config.py; + }; + "qutebrowser/greasemonkey" = { + source = ../../../config/qutebrowser/greasemonkey; + recursive = true; + }; + }; + }; + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index c6b5ecb6..2defac94 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -2,5 +2,6 @@ imports = [ ./kitty ./bspwm + ./apps ]; } diff --git a/modules/hardware/bluetooth/default.nix b/modules/hardware/bluetooth/default.nix new file mode 100644 index 00000000..66731d71 --- /dev/null +++ b/modules/hardware/bluetooth/default.nix @@ -0,0 +1,23 @@ +{ options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.hardware.bluetooth; +in +{ + options.modules.hardware.bluetooth = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + hardware.bluetooth = { + enable = true; + settings = { + General = { + ControllerMode = "bredr"; + }; + }; + powerOnBoot = false; + }; + services.blueman.enable = true; + }; +} diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 472edd74..11f18646 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -2,5 +2,6 @@ imports = [ ./nvidia ./pipewire + ./bluetooth ]; }