diff --git a/hosts/darwin/shared.nix b/hosts/darwin/shared.nix index 87f8138..ad82181 100644 --- a/hosts/darwin/shared.nix +++ b/hosts/darwin/shared.nix @@ -1,5 +1,5 @@ { imports = [ - ../../modules/platform/darwin + ../../modules/darwin ]; } diff --git a/hosts/nixos/tahani/default.nix b/hosts/nixos/tahani/default.nix index 42c070d..b028823 100644 --- a/hosts/nixos/tahani/default.nix +++ b/hosts/nixos/tahani/default.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ../../../modules/platform/nixos + ../../../modules/nixos ]; boot = { diff --git a/modules/core/default.nix b/modules/core.nix similarity index 96% rename from modules/core/default.nix rename to modules/core.nix index 9269b5b..df487e9 100644 --- a/modules/core/default.nix +++ b/modules/core.nix @@ -6,7 +6,7 @@ allowUnfree = true; }; overlays = let - path = ../../overlays; + path = ../overlays; in with builtins; map (n: import (path + ("/" + n))) ( diff --git a/modules/platform/darwin/default.nix b/modules/darwin/default.nix similarity index 88% rename from modules/platform/darwin/default.nix rename to modules/darwin/default.nix index 96b2b6b..9308526 100644 --- a/modules/platform/darwin/default.nix +++ b/modules/darwin/default.nix @@ -8,9 +8,9 @@ ... }: { imports = [ - ../../core - ../../networking/tailscale.nix - ../../services/syncthing.nix + ../core.nix + ../tailscale.nix + ../syncthing.nix ./dock ./homebrew.nix ./system.nix @@ -49,13 +49,13 @@ _module.args = {inherit user;}; imports = [ nixvim.homeModules.nixvim - ../../home-manager/base - ../../home-manager/darwin + ../home-manager + ../home-manager/darwin ]; fonts.fontconfig.enable = true; home = { packages = - pkgs.callPackage ../../packages {} + pkgs.callPackage ../packages.nix {} ++ pkgs.callPackage ./packages.nix {}; stateVersion = constants.stateVersions.homeManager; }; diff --git a/modules/platform/darwin/dock/default.nix b/modules/darwin/dock/default.nix similarity index 100% rename from modules/platform/darwin/dock/default.nix rename to modules/darwin/dock/default.nix diff --git a/modules/platform/darwin/homebrew.nix b/modules/darwin/homebrew.nix similarity index 100% rename from modules/platform/darwin/homebrew.nix rename to modules/darwin/homebrew.nix diff --git a/modules/platform/darwin/packages.nix b/modules/darwin/packages.nix similarity index 100% rename from modules/platform/darwin/packages.nix rename to modules/darwin/packages.nix diff --git a/modules/platform/darwin/system.nix b/modules/darwin/system.nix similarity index 100% rename from modules/platform/darwin/system.nix rename to modules/darwin/system.nix diff --git a/modules/home-manager/base/tools/atuin.nix b/modules/home-manager/atuin.nix similarity index 100% rename from modules/home-manager/base/tools/atuin.nix rename to modules/home-manager/atuin.nix diff --git a/modules/home-manager/base/default.nix b/modules/home-manager/base/default.nix deleted file mode 100644 index fdfbeb1..0000000 --- a/modules/home-manager/base/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - imports = [ - ./shell/aliases.nix - ./shell/fish.nix - ./shell/starship.nix - ./shell/zsh.nix - ./tools/atuin.nix - ./tools/bat.nix - ./tools/eza.nix - ./tools/git.nix - ./tools/lazygit.nix - ./tools/mise.nix - ./tools/ssh.nix - ./tools/zellij.nix - ./tools/zoxide.nix - ./editors/neovim - ]; - - programs.home-manager.enable = true; - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; -} diff --git a/modules/home-manager/base/shell/aliases.nix b/modules/home-manager/base/shell/aliases.nix deleted file mode 100644 index 076eca1..0000000 --- a/modules/home-manager/base/shell/aliases.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - home.shellAliases = { - v = "nvim"; - lg = "lazygit"; - }; -} diff --git a/modules/home-manager/base/tools/bat.nix b/modules/home-manager/bat.nix similarity index 100% rename from modules/home-manager/base/tools/bat.nix rename to modules/home-manager/bat.nix diff --git a/modules/home-manager/darwin/default.nix b/modules/home-manager/darwin/default.nix index 650b264..380f597 100644 --- a/modules/home-manager/darwin/default.nix +++ b/modules/home-manager/darwin/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./terminal/ghostty.nix + ./ghostty.nix ]; } diff --git a/modules/home-manager/darwin/terminal/ghostty.nix b/modules/home-manager/darwin/ghostty.nix similarity index 100% rename from modules/home-manager/darwin/terminal/ghostty.nix rename to modules/home-manager/darwin/ghostty.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..faab906 --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,28 @@ +{ + imports = [ + ./fish.nix + ./starship.nix + ./zsh.nix + ./atuin.nix + ./bat.nix + ./eza.nix + ./git.nix + ./lazygit.nix + ./mise.nix + ./ssh.nix + ./zellij.nix + ./zoxide.nix + ./neovim + ]; + + programs.home-manager.enable = true; + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + + home.shellAliases = { + v = "nvim"; + lg = "lazygit"; + }; +} diff --git a/modules/home-manager/base/tools/eza.nix b/modules/home-manager/eza.nix similarity index 100% rename from modules/home-manager/base/tools/eza.nix rename to modules/home-manager/eza.nix diff --git a/modules/home-manager/base/shell/fish.nix b/modules/home-manager/fish.nix similarity index 100% rename from modules/home-manager/base/shell/fish.nix rename to modules/home-manager/fish.nix diff --git a/modules/home-manager/base/tools/git.nix b/modules/home-manager/git.nix similarity index 100% rename from modules/home-manager/base/tools/git.nix rename to modules/home-manager/git.nix diff --git a/modules/home-manager/base/tools/lazygit.nix b/modules/home-manager/lazygit.nix similarity index 100% rename from modules/home-manager/base/tools/lazygit.nix rename to modules/home-manager/lazygit.nix diff --git a/modules/home-manager/base/tools/mise.nix b/modules/home-manager/mise.nix similarity index 100% rename from modules/home-manager/base/tools/mise.nix rename to modules/home-manager/mise.nix diff --git a/modules/home-manager/base/editors/neovim/autocmd.nix b/modules/home-manager/neovim/autocmd.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/autocmd.nix rename to modules/home-manager/neovim/autocmd.nix diff --git a/modules/home-manager/base/editors/neovim/default.nix b/modules/home-manager/neovim/default.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/default.nix rename to modules/home-manager/neovim/default.nix diff --git a/modules/home-manager/base/editors/neovim/mappings.nix b/modules/home-manager/neovim/mappings.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/mappings.nix rename to modules/home-manager/neovim/mappings.nix diff --git a/modules/home-manager/base/editors/neovim/options.nix b/modules/home-manager/neovim/options.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/options.nix rename to modules/home-manager/neovim/options.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/blink-cmp.nix b/modules/home-manager/neovim/plugins/blink-cmp.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/blink-cmp.nix rename to modules/home-manager/neovim/plugins/blink-cmp.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/conform.nix b/modules/home-manager/neovim/plugins/conform.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/conform.nix rename to modules/home-manager/neovim/plugins/conform.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/grug-far.nix b/modules/home-manager/neovim/plugins/grug-far.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/grug-far.nix rename to modules/home-manager/neovim/plugins/grug-far.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/lazygit.nix b/modules/home-manager/neovim/plugins/lazygit.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/lazygit.nix rename to modules/home-manager/neovim/plugins/lazygit.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/lsp.nix b/modules/home-manager/neovim/plugins/lsp.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/lsp.nix rename to modules/home-manager/neovim/plugins/lsp.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/mini.nix b/modules/home-manager/neovim/plugins/mini.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/mini.nix rename to modules/home-manager/neovim/plugins/mini.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/oil.nix b/modules/home-manager/neovim/plugins/oil.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/oil.nix rename to modules/home-manager/neovim/plugins/oil.nix diff --git a/modules/home-manager/base/editors/neovim/plugins/treesitter.nix b/modules/home-manager/neovim/plugins/treesitter.nix similarity index 100% rename from modules/home-manager/base/editors/neovim/plugins/treesitter.nix rename to modules/home-manager/neovim/plugins/treesitter.nix diff --git a/modules/home-manager/nixos/default.nix b/modules/home-manager/nixos/default.nix index b360719..5d60337 100644 --- a/modules/home-manager/nixos/default.nix +++ b/modules/home-manager/nixos/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./terminal/zellij.nix + ./zellij.nix ]; } diff --git a/modules/home-manager/nixos/terminal/zellij.nix b/modules/home-manager/nixos/zellij.nix similarity index 100% rename from modules/home-manager/nixos/terminal/zellij.nix rename to modules/home-manager/nixos/zellij.nix diff --git a/modules/home-manager/base/tools/ssh.nix b/modules/home-manager/ssh.nix similarity index 100% rename from modules/home-manager/base/tools/ssh.nix rename to modules/home-manager/ssh.nix diff --git a/modules/home-manager/base/shell/starship.nix b/modules/home-manager/starship.nix similarity index 100% rename from modules/home-manager/base/shell/starship.nix rename to modules/home-manager/starship.nix diff --git a/modules/home-manager/base/tools/zellij.nix b/modules/home-manager/zellij.nix similarity index 100% rename from modules/home-manager/base/tools/zellij.nix rename to modules/home-manager/zellij.nix diff --git a/modules/home-manager/base/tools/zoxide.nix b/modules/home-manager/zoxide.nix similarity index 100% rename from modules/home-manager/base/tools/zoxide.nix rename to modules/home-manager/zoxide.nix diff --git a/modules/home-manager/base/shell/zsh.nix b/modules/home-manager/zsh.nix similarity index 100% rename from modules/home-manager/base/shell/zsh.nix rename to modules/home-manager/zsh.nix diff --git a/modules/services/adguard.nix b/modules/nixos/adguard.nix similarity index 100% rename from modules/services/adguard.nix rename to modules/nixos/adguard.nix diff --git a/modules/platform/nixos/default.nix b/modules/nixos/default.nix similarity index 79% rename from modules/platform/nixos/default.nix rename to modules/nixos/default.nix index 7383400..6e00faa 100644 --- a/modules/platform/nixos/default.nix +++ b/modules/nixos/default.nix @@ -7,12 +7,12 @@ ... }: { imports = [ - ../../core - ../../networking/firewall.nix - ../../networking/ssh.nix - ../../networking/tailscale.nix - ../../services/adguard.nix - ../../services/syncthing.nix + ../core.nix + ./firewall.nix + ./ssh.nix + ./adguard.nix + ../tailscale.nix + ../syncthing.nix sops-nix.nixosModules.sops ]; @@ -57,12 +57,12 @@ _module.args = {inherit user;}; imports = [ nixvim.homeModules.nixvim - ../../home-manager/base - ../../home-manager/nixos + ../home-manager + ../home-manager/nixos ]; home = { packages = - pkgs.callPackage ../../packages {} + pkgs.callPackage ../packages.nix {} ++ pkgs.callPackage ./packages.nix {}; stateVersion = constants.stateVersions.homeManager; }; diff --git a/modules/networking/firewall.nix b/modules/nixos/firewall.nix similarity index 100% rename from modules/networking/firewall.nix rename to modules/nixos/firewall.nix diff --git a/modules/platform/nixos/packages.nix b/modules/nixos/packages.nix similarity index 100% rename from modules/platform/nixos/packages.nix rename to modules/nixos/packages.nix diff --git a/modules/networking/ssh.nix b/modules/nixos/ssh.nix similarity index 100% rename from modules/networking/ssh.nix rename to modules/nixos/ssh.nix diff --git a/modules/packages/default.nix b/modules/packages.nix similarity index 100% rename from modules/packages/default.nix rename to modules/packages.nix diff --git a/modules/services/syncthing.nix b/modules/syncthing.nix similarity index 100% rename from modules/services/syncthing.nix rename to modules/syncthing.nix diff --git a/modules/networking/tailscale.nix b/modules/tailscale.nix similarity index 100% rename from modules/networking/tailscale.nix rename to modules/tailscale.nix