From a02f5bb68bbc7c6205c5c61c4890ddcf3c1a51fc Mon Sep 17 00:00:00 2001 From: Oliver Davies <oliver@oliverdavies.uk> Date: Tue, 27 Sep 2022 18:37:05 +0100 Subject: [PATCH] refactor: extract a common module diff --git a/configuration/pop-os/default.nix b/configuration/pop-os/default.nix index 9ed9e69..2287793 100644 --- a/configuration/pop-os/default.nix +++ b/configuration/pop-os/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../home-manager/modules/alacritty.nix + ../../home-manager/modules/common.nix ../../home-manager/modules/git.nix ../../home-manager/modules/home-manager.nix ../../home-manager/modules/tmux.nix @@ -15,9 +16,5 @@ docker docker-compose jetbrains-mono - just - neovim ]; - - programs.bat.enable = true; } diff --git a/configuration/wsl2/default.nix b/configuration/wsl2/default.nix index 84c1242..de6afe3 100644 --- a/configuration/wsl2/default.nix +++ b/configuration/wsl2/default.nix @@ -2,17 +2,10 @@ { imports = [ + ../../home-manager/modules/common.nix ../../home-manager/modules/git.nix ../../home-manager/modules/home-manager.nix ../../home-manager/modules/tmux.nix ../../home-manager/modules/zsh.nix ]; - - home.packages = with pkgs; [ - just - neovim - zsh - ]; - - programs.bat.enable = true; } diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix new file mode 100644 index 0000000..0a77fe8 --- /dev/null +++ b/home-manager/modules/common.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: +{ + home.packages = with pkgs; [ + just + neovim + ]; + + programs.bat.enable = true; +} --- configuration/pop-os/default.nix | 5 +---- configuration/wsl2/default.nix | 9 +-------- home-manager/modules/common.nix | 9 +++++++++ 3 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 home-manager/modules/common.nix diff --git a/configuration/pop-os/default.nix b/configuration/pop-os/default.nix index 9ed9e698..2287793b 100644 --- a/configuration/pop-os/default.nix +++ b/configuration/pop-os/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../home-manager/modules/alacritty.nix + ../../home-manager/modules/common.nix ../../home-manager/modules/git.nix ../../home-manager/modules/home-manager.nix ../../home-manager/modules/tmux.nix @@ -15,9 +16,5 @@ docker docker-compose jetbrains-mono - just - neovim ]; - - programs.bat.enable = true; } diff --git a/configuration/wsl2/default.nix b/configuration/wsl2/default.nix index 84c12423..de6afe33 100644 --- a/configuration/wsl2/default.nix +++ b/configuration/wsl2/default.nix @@ -2,17 +2,10 @@ { imports = [ + ../../home-manager/modules/common.nix ../../home-manager/modules/git.nix ../../home-manager/modules/home-manager.nix ../../home-manager/modules/tmux.nix ../../home-manager/modules/zsh.nix ]; - - home.packages = with pkgs; [ - just - neovim - zsh - ]; - - programs.bat.enable = true; } diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix new file mode 100644 index 00000000..0a77fe82 --- /dev/null +++ b/home-manager/modules/common.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: +{ + home.packages = with pkgs; [ + just + neovim + ]; + + programs.bat.enable = true; +}