From 6584a78556840634c5d41505d2c05f305faf5d44 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Tue, 4 Apr 2023 09:58:29 +0530 Subject: [PATCH] move everything around --- home/default.nix | 50 +------------------------ home/gnome-keyring.nix | 3 -- home/programs/default.nix | 46 +++++++++++++++++++++++ home/{ => programs}/dev.nix | 2 +- home/{ => programs}/firefox.nix | 5 +-- home/{ => programs}/kitty.nix | 0 home/{ => programs}/nixvim.nix | 0 home/{ => programs}/tmux.nix | 0 home/{terminal.nix => programs/tui.nix} | 9 +---- home/{ => programs}/virt-manager.nix | 0 home/scripts.nix | 36 +++++++++--------- home/services/default.nix | 11 ++++++ home/wm/addon/dunst.nix | 2 +- 13 files changed, 81 insertions(+), 83 deletions(-) delete mode 100644 home/gnome-keyring.nix create mode 100644 home/programs/default.nix rename home/{ => programs}/dev.nix (95%) rename home/{ => programs}/firefox.nix (99%) rename home/{ => programs}/kitty.nix (100%) rename home/{ => programs}/nixvim.nix (100%) rename home/{ => programs}/tmux.nix (100%) rename home/{terminal.nix => programs/tui.nix} (95%) rename home/{ => programs}/virt-manager.nix (100%) create mode 100644 home/services/default.nix diff --git a/home/default.nix b/home/default.nix index ea9b98c..bcdf18f 100644 --- a/home/default.nix +++ b/home/default.nix @@ -19,37 +19,15 @@ in nixvim.homeManagerModules.nixvim hyprland.homeManagerModules.default - ./dev.nix ./downloader.nix - ./firefox.nix - ./gnome-keyring.nix ./gtk.nix ./media.nix ./misc.nix ./persistence.nix ./scripts.nix - ./terminal.nix - ./virt-manager.nix ./wm - ]; - - home.packages = with pkgs; [ - _1password-gui - brightnessctl - discord - evince - gnome.eog - gnome.gnome-system-monitor - gnome3.gnome-disk-utility - libsecret - pantheon.elementary-files - pavucontrol - xdg-utils - yubioath-flutter - yubikey-manager - yubikey-manager-qt - yubikey-personalization - yubikey-personalization-gui + ./programs + ./services ]; dconf.settings = { @@ -61,30 +39,6 @@ in }; }; - programs = { - gpg = { - enable = true; - settings = { - keyserver = "hkps://keys.openpgp.org"; - }; - scdaemonSettings = { - disable-ccid = true; - }; - }; - ssh = { - enable = true; - }; - }; - - services.blueman-applet.enable = true; - services.gpg-agent = { - enable = true; - enableExtraSocket = true; - enableScDaemon = true; - enableSshSupport = true; - pinentryFlavor = "gnome3"; - }; - xdg.enable = true; xdg.mime.enable = true; xdg.mimeApps.enable = true; diff --git a/home/gnome-keyring.nix b/home/gnome-keyring.nix deleted file mode 100644 index 4538313..0000000 --- a/home/gnome-keyring.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ pkgs, ... }: { - services.gnome-keyring.enable = true; -} diff --git a/home/programs/default.nix b/home/programs/default.nix new file mode 100644 index 0000000..608ee55 --- /dev/null +++ b/home/programs/default.nix @@ -0,0 +1,46 @@ +{ pkgs, ... }: { + imports = [ + ./dev.nix + ./firefox.nix + ./kitty.nix + ./nixvim.nix + ./tmux.nix + ./tui.nix + ./virt-manager.nix + ]; + + home.packages = with pkgs; [ + _1password-gui + brightnessctl + discord + evince + gnome.eog + gnome.gnome-system-monitor + gnome3.gnome-disk-utility + libsecret + pantheon.elementary-files + pavucontrol + xdg-utils + yubioath-flutter + yubikey-manager + yubikey-manager-qt + yubikey-personalization + yubikey-personalization-gui + ]; + + programs = { + gpg = { + enable = true; + settings = { + keyserver = "hkps://keys.openpgp.org"; + }; + scdaemonSettings = { + disable-ccid = true; + }; + }; + ssh = { + enable = true; + }; + }; + +} diff --git a/home/dev.nix b/home/programs/dev.nix similarity index 95% rename from home/dev.nix rename to home/programs/dev.nix index b13a3fe..e0f442b 100644 --- a/home/dev.nix +++ b/home/programs/dev.nix @@ -1,6 +1,6 @@ { pkgs, ... }: let - user = import ../users/user.nix; + user = import ../../users/user.nix; in { imports = [ diff --git a/home/firefox.nix b/home/programs/firefox.nix similarity index 99% rename from home/firefox.nix rename to home/programs/firefox.nix index d572cca..83d6741 100644 --- a/home/firefox.nix +++ b/home/programs/firefox.nix @@ -1,7 +1,4 @@ -{ pkgs -, osConfig -, ... -}: { +{ pkgs, osConfig, ... }: { programs = { firefox = { enable = true; diff --git a/home/kitty.nix b/home/programs/kitty.nix similarity index 100% rename from home/kitty.nix rename to home/programs/kitty.nix diff --git a/home/nixvim.nix b/home/programs/nixvim.nix similarity index 100% rename from home/nixvim.nix rename to home/programs/nixvim.nix diff --git a/home/tmux.nix b/home/programs/tmux.nix similarity index 100% rename from home/tmux.nix rename to home/programs/tmux.nix diff --git a/home/terminal.nix b/home/programs/tui.nix similarity index 95% rename from home/terminal.nix rename to home/programs/tui.nix index 643a466..78d24c7 100644 --- a/home/terminal.nix +++ b/home/programs/tui.nix @@ -1,11 +1,4 @@ -{ config -, pkgs -, ... -}: { - imports = [ - ./kitty.nix - ./tmux.nix - ]; +{ config, pkgs, ... }: { xdg.desktopEntries."btop".name = "btop++"; xdg.desktopEntries."btop".exec = "btop"; diff --git a/home/virt-manager.nix b/home/programs/virt-manager.nix similarity index 100% rename from home/virt-manager.nix rename to home/programs/virt-manager.nix diff --git a/home/scripts.nix b/home/scripts.nix index efc62d5..b199f2e 100644 --- a/home/scripts.nix +++ b/home/scripts.nix @@ -5,28 +5,28 @@ let in { xdg.configFile = { - "scripts/chpaper.sh" = { - text = '' - #!/bin/sh + "scripts/chpaper.sh" = { + text = '' + #!/bin/sh - set -eu + set -eu - DIR="''${HOME}/.local/share/wallpapers" + DIR="''${HOME}/.local/share/wallpapers" - random_paper() { - find -L "''${DIR}"/ -type f -regextype egrep -regex ".*\.(jpe?g|png)$" | shuf -n1 - } + random_paper() { + find -L "''${DIR}"/ -type f -regextype egrep -regex ".*\.(jpe?g|png)$" | shuf -n1 + } - SWAYSOCK="''${SWAYSOCK:-""}" - if [ -z "''${SWAYSOCK}" ] ; then - SWAYSOCK="$(find /run/user/"$(id -u)"/ -name "sway-ipc.$(id -u).*.sock")" - export SWAYSOCK - fi - ${pkgs.imagemagick}/bin/convert "$(random_paper)" /tmp/wallpaper.jpg && swaymsg "output * bg '/tmp/wallpaper.jpg' fill" & - ${pkgs.imagemagick}/bin/convert "$(random_paper)" /tmp/lockpaper.jpg - ''; - executable = true; - }; + SWAYSOCK="''${SWAYSOCK:-""}" + if [ -z "''${SWAYSOCK}" ] ; then + SWAYSOCK="$(find /run/user/"$(id -u)"/ -name "sway-ipc.$(id -u).*.sock")" + export SWAYSOCK + fi + ${pkgs.imagemagick}/bin/convert "$(random_paper)" /tmp/wallpaper.jpg && swaymsg "output * bg '/tmp/wallpaper.jpg' fill" & + ${pkgs.imagemagick}/bin/convert "$(random_paper)" /tmp/lockpaper.jpg + ''; + executable = true; + }; "scripts/power_menu.sh" = { executable = true; text = '' diff --git a/home/services/default.nix b/home/services/default.nix new file mode 100644 index 0000000..dff8836 --- /dev/null +++ b/home/services/default.nix @@ -0,0 +1,11 @@ +{ ... }: { + services.blueman-applet.enable = true; + services.gnome-keyring.enable = true; + services.gpg-agent = { + enable = true; + enableExtraSocket = true; + enableScDaemon = true; + enableSshSupport = true; + pinentryFlavor = "gnome3"; + }; +} diff --git a/home/wm/addon/dunst.nix b/home/wm/addon/dunst.nix index aae7d53..8f97b47 100644 --- a/home/wm/addon/dunst.nix +++ b/home/wm/addon/dunst.nix @@ -1,4 +1,4 @@ -{ config, pkgs , ... }: +{ config, pkgs, ... }: let dmenu = "${config.programs.rofi.package}/bin/rofi -dmenu"; firefox = "${config.programs.firefox.package}/bin/firefox";