From 6cf34c66c898ee5693b96dc048fa0a4769590a6d Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Fri, 2 Aug 2024 20:31:39 -0700 Subject: [PATCH] Converted rofi to a home module --- homes/x86_64-linux/alejandro/default.nix | 1 + modules/home/programs/rofi/default.nix | 26 ++++++++++++++++++ modules/nixos/desktop/addons/rofi/default.nix | 27 ------------------- modules/nixos/desktop/sway/default.nix | 1 - 4 files changed, 27 insertions(+), 28 deletions(-) create mode 100644 modules/home/programs/rofi/default.nix delete mode 100644 modules/nixos/desktop/addons/rofi/default.nix diff --git a/homes/x86_64-linux/alejandro/default.nix b/homes/x86_64-linux/alejandro/default.nix index f2c3826..cae4d1a 100644 --- a/homes/x86_64-linux/alejandro/default.nix +++ b/homes/x86_64-linux/alejandro/default.nix @@ -18,6 +18,7 @@ firefox.enable = true; gpg.enable = true; kitty.enable = true; + rofi.enable = true; }; tools = { diff --git a/modules/home/programs/rofi/default.nix b/modules/home/programs/rofi/default.nix new file mode 100644 index 0000000..c3d371e --- /dev/null +++ b/modules/home/programs/rofi/default.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + namespace, + ... +}: let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.programs.rofi; +in { + options.${namespace}.programs.rofi = { + enable = mkEnableOption "rofi"; + }; + + config = mkIf cfg.enable { + programs.rofi = { + enable = true; + # TODO: How to ensure this font is installed? + font = "Hack Nerd Font 10"; + theme = "gruvbox-dark-hard"; + extraConfig = { + show-icons = true; + }; + }; + }; +} diff --git a/modules/nixos/desktop/addons/rofi/default.nix b/modules/nixos/desktop/addons/rofi/default.nix deleted file mode 100644 index f7af828..0000000 --- a/modules/nixos/desktop/addons/rofi/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - options, - config, - pkgs, - lib, - ... -}: -with lib; let - cfg = config.aa.desktop.addons.rofi; -in { - options.aa.desktop.addons.rofi = with types; { - enable = mkEnableOption "rofi"; - }; - - config = mkIf cfg.enable { - aa.home.extraOptions = { - programs.rofi = { - enable = true; - font = "Hack Nerd Font 10"; - theme = "gruvbox-dark-hard"; - extraConfig = { - show-icons = true; - }; - }; - }; - }; -} diff --git a/modules/nixos/desktop/sway/default.nix b/modules/nixos/desktop/sway/default.nix index f4a5088..c70995f 100644 --- a/modules/nixos/desktop/sway/default.nix +++ b/modules/nixos/desktop/sway/default.nix @@ -39,7 +39,6 @@ in { alacritty.enable = true; gammastep.enable = true; playerctl.enable = true; - rofi.enable = true; swayidle.enable = true; swaylock.enable = true;