From 1508d388c7e50d506cea74e4eed3da3e308b44ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 24 Oct 2022 20:31:23 -0300 Subject: [PATCH] extract syncthing and bmenu module --- user/bmenu.nix | 21 +++++++++++++++++++++ user/home.nix | 24 ++---------------------- user/syncthing.nix | 8 ++++++++ 3 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 user/bmenu.nix create mode 100644 user/syncthing.nix diff --git a/user/bmenu.nix b/user/bmenu.nix new file mode 100644 index 0000000..1be3ee7 --- /dev/null +++ b/user/bmenu.nix @@ -0,0 +1,21 @@ +{ config, pkgs, lib, inputs, ... }: +let inherit (import ./variables.nix) key theme color accent font; +in { + # My bemenu wrapper + xdg.configFile = { + "bmenu.conf".text = '' + set fn "${font.mono} ${toString font.size.small}" + + set tb "${color.bg}${theme.opacityHex}" + set tf "${accent.color}" + + set fb "${color.bg}${theme.opacityHex}" + set ff "${color.txt}" + + set nb "${color.bg}${theme.opacityHex}" + set nf "${color.txt}" + set hb "${accent.color}" + set hf "${accent.fg}" + ''; + }; +} diff --git a/user/home.nix b/user/home.nix index 1bdd2c6..c7728ae 100644 --- a/user/home.nix +++ b/user/home.nix @@ -20,6 +20,8 @@ in { ./rnnoise.nix ./mimeapps.nix ./chat.nix + ./syncthing.nix + ./bmenu.nix inputs.hyprland.homeManagerModules.default ]; # Home Manager needs a bit of information about you and the @@ -183,28 +185,6 @@ in { # # style.name = "gtk2"; # }; - services.syncthing = { - enable = true; - tray.enable = true; - }; - # My bemenu wrapper - xdg.configFile = { - "bmenu.conf".text = '' - set fn "${font.mono} ${toString font.size.small}" - - set tb "${color.bg}${theme.opacityHex}" - set tf "${accent.color}" - - set fb "${color.bg}${theme.opacityHex}" - set ff "${color.txt}" - - set nb "${color.bg}${theme.opacityHex}" - set nf "${color.txt}" - set hb "${accent.color}" - set hf "${accent.fg}" - ''; - }; - # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new Home Manager release introduces backwards diff --git a/user/syncthing.nix b/user/syncthing.nix new file mode 100644 index 0000000..8559728 --- /dev/null +++ b/user/syncthing.nix @@ -0,0 +1,8 @@ +{ config, pkgs, lib, inputs, ... }: +let inherit (import ./variables.nix) key theme color accent font; +in { + services.syncthing = { + enable = true; + tray.enable = true; + }; +}