diff options
| -rw-r--r-- | modules/scripts/default.nix | 15 | ||||
| -rw-r--r-- | modules/scripts/restart-network.sh | 3 | ||||
| -rw-r--r-- | modules/scripts/system-monitor.sh | 9 | ||||
| -rw-r--r-- | modules/tools/atac/default.nix | 13 | ||||
| -rw-r--r-- | modules/tools/default.nix | 3 | ||||
| -rw-r--r-- | modules/tools/libreoffice/default.nix | 13 | ||||
| -rw-r--r-- | modules/tools/vlc/default.nix | 13 | ||||
| -rw-r--r-- | users/arpit.nix | 6 |
8 files changed, 50 insertions, 25 deletions
diff --git a/modules/scripts/default.nix b/modules/scripts/default.nix index 62769c2..8cf1447 100644 --- a/modules/scripts/default.nix +++ b/modules/scripts/default.nix @@ -1,19 +1,11 @@ { config, lib, pkgs, ... }: { - options.scripts = { - enable = lib.mkEnableOption "Enable scripts."; - }; - - config = lib.mkIf config.scripts.enable { + config = { home.sessionPath = [ "${config.home.homeDirectory}/scripts" ]; - home.file."scripts/restart-network" = { - source = ./restart-network.sh; - executable = true; - }; home.file."scripts/system-monitor" = lib.mkIf (config.tools.bottom.enable && @@ -21,7 +13,10 @@ config.tools.tmux.enable && config.tools.kitty.enable) { - source = ./system-monitor.sh; + text = '' +#!${pkgs.bash}/bin/bash +${builtins.readFile ./system-monitor.sh} +''; executable = true; }; }; diff --git a/modules/scripts/restart-network.sh b/modules/scripts/restart-network.sh deleted file mode 100644 index fc2b712..0000000 --- a/modules/scripts/restart-network.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -sudo ip link set $1 down -sudo ip link set $1 up diff --git a/modules/scripts/system-monitor.sh b/modules/scripts/system-monitor.sh index 0364a14..fed9ce9 100644 --- a/modules/scripts/system-monitor.sh +++ b/modules/scripts/system-monitor.sh @@ -1,4 +1,3 @@ -#!/bin/sh SESSION="system-monitor" kitty @ set-font-size -- -4 @@ -21,14 +20,6 @@ tmux set -g status off tmux set -g mouse on tmux set -g focus-events on -# Hover over pane = instant focus -tmux bind -n MouseDown1Pane select-pane -t= \; send-keys -M -tmux bind -n MouseDrag1Pane select-pane -t= \; send-keys -M - -# Wheel always works in focused pane -tmux bind -n WheelUpPane select-pane -t= \; send-keys -M -tmux bind -n WheelDownPane select-pane -t= \; send-keys -M - # Select main pane and attach tmux select-pane -t "$SESSION:0.0" tmux attach-session -t "$SESSION" diff --git a/modules/tools/atac/default.nix b/modules/tools/atac/default.nix new file mode 100644 index 0000000..8d97fef --- /dev/null +++ b/modules/tools/atac/default.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + options.tools.atac = { + enable = lib.mkEnableOption "Enables atac."; + }; + + config = lib.mkIf config.tools.atac.enable { + home.packages = with pkgs; [ + atac + ]; + }; +} diff --git a/modules/tools/default.nix b/modules/tools/default.nix index 243d2f2..eccc063 100644 --- a/modules/tools/default.nix +++ b/modules/tools/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./atac ./bluetui ./bottom ./brave @@ -12,6 +13,7 @@ ./htop ./impala ./kitty + ./libreoffice ./lsd ./neofetch ./neovim @@ -21,6 +23,7 @@ ./playerctl ./rofi ./tmux + ./vlc ./zsh ]; } diff --git a/modules/tools/libreoffice/default.nix b/modules/tools/libreoffice/default.nix new file mode 100644 index 0000000..fe2a387 --- /dev/null +++ b/modules/tools/libreoffice/default.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + options.tools.libreoffice = { + enable = lib.mkEnableOption "Enables libreoffice."; + }; + + config = lib.mkIf config.tools.libreoffice.enable { + home.packages = with pkgs; [ + libreoffice + ]; + }; +} diff --git a/modules/tools/vlc/default.nix b/modules/tools/vlc/default.nix new file mode 100644 index 0000000..eb6f329 --- /dev/null +++ b/modules/tools/vlc/default.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + options.tools.vlc = { + enable = lib.mkEnableOption "Enables vlc."; + }; + + config = lib.mkIf config.tools.vlc.enable { + home.packages = with pkgs; [ + vlc + ]; + }; +} diff --git a/users/arpit.nix b/users/arpit.nix index d7deb23..dc98127 100644 --- a/users/arpit.nix +++ b/users/arpit.nix @@ -10,10 +10,8 @@ # Desktop environment desktop.enable = true; - # Enable scripts - scripts.enable = true; - # Tools + tools.atac.enable = true; tools.bluetui.enable = true; tools.bottom.enable = true; tools.brave.enable = true; @@ -26,6 +24,7 @@ tools.htop.enable = true; tools.impala.enable = true; tools.kitty.enable = true; + tools.libreoffice.enable = true; tools.lsd.enable = true; tools.neofetch.enable = true; tools.neovim.enable = true; @@ -36,6 +35,7 @@ tools.playerctl.enable = true; tools.rofi.enable = true; tools.tmux.enable = true; + tools.vlc.enable = true; tools.zsh.enable = true; programs.home-manager.enable = true; |
