diff --git a/home/modules/fastfetch/default.nix b/common/fastfetch/default.nix similarity index 93% rename from home/modules/fastfetch/default.nix rename to common/fastfetch/default.nix index 07c6e92..87c34e5 100644 --- a/home/modules/fastfetch/default.nix +++ b/common/fastfetch/default.nix @@ -1,8 +1,7 @@ -{ lib, pkgs, osConfig, ... }: +{ lib, pkgs, config, ... }: { programs.fastfetch = let - # TODO: move home mnager out of standalone so i dont need so use --impure for this - hostname = builtins.getEnv "HOSTNAME"; + hostname = config.home.sessionVariables.HOSTNAME; logoFile = ./. + "/host/${hostname}.txt"; in { enable = true; diff --git a/home/modules/fastfetch/host/caenus.txt b/common/fastfetch/host/caenus.txt similarity index 100% rename from home/modules/fastfetch/host/caenus.txt rename to common/fastfetch/host/caenus.txt diff --git a/home/modules/fastfetch/host/cloud.txt b/common/fastfetch/host/cloud.txt similarity index 100% rename from home/modules/fastfetch/host/cloud.txt rename to common/fastfetch/host/cloud.txt diff --git a/home/modules/fastfetch/host/dockge.txt b/common/fastfetch/host/dockge.txt similarity index 100% rename from home/modules/fastfetch/host/dockge.txt rename to common/fastfetch/host/dockge.txt diff --git a/home/modules/fastfetch/host/images/caenus.png b/common/fastfetch/host/images/caenus.png similarity index 100% rename from home/modules/fastfetch/host/images/caenus.png rename to common/fastfetch/host/images/caenus.png diff --git a/home/modules/fastfetch/host/images/cloud.png b/common/fastfetch/host/images/cloud.png similarity index 100% rename from home/modules/fastfetch/host/images/cloud.png rename to common/fastfetch/host/images/cloud.png diff --git a/home/modules/fastfetch/host/images/nix.png b/common/fastfetch/host/images/nix.png similarity index 100% rename from home/modules/fastfetch/host/images/nix.png rename to common/fastfetch/host/images/nix.png diff --git a/home/modules/fastfetch/host/nix.txt b/common/fastfetch/host/nix.txt similarity index 100% rename from home/modules/fastfetch/host/nix.txt rename to common/fastfetch/host/nix.txt diff --git a/home/modules/fastfetch/host/proxy.txt b/common/fastfetch/host/proxy.txt similarity index 100% rename from home/modules/fastfetch/host/proxy.txt rename to common/fastfetch/host/proxy.txt diff --git a/home/modules/fish/default.nix b/common/fish/default.nix similarity index 100% rename from home/modules/fish/default.nix rename to common/fish/default.nix diff --git a/home/modules/fish/init.fish b/common/fish/init.fish similarity index 100% rename from home/modules/fish/init.fish rename to common/fish/init.fish diff --git a/home/default.nix b/common/home/default.nix similarity index 53% rename from home/default.nix rename to common/home/default.nix index 87828d5..d1a4919 100644 --- a/home/default.nix +++ b/common/home/default.nix @@ -1,32 +1,18 @@ -{ pkgs, ... }: +{ pkgs, hostName, ... }: { # Module imports imports = [ - ./modules/fastfetch - ./modules/fish + # Common Modules + ../fish + ../fastfetch ]; home = { username = "toph"; homeDirectory = "/home/toph"; stateVersion = "24.05"; - # Packages - packages = with pkgs; [ - fastfetch - fish - fishPlugins.grc - fishPlugins.tide - grc - ]; - - # file = { - # ".config" = { - # recursive = true; - # source = ../.config; - # }; - # }; - sessionVariables = { + HOSTNAME = hostName; EDITOR = "micro"; VISUAL = "micro"; XDG_CONFIG_HOME = "$HOME/.config"; diff --git a/flake.nix b/flake.nix index 51a02e1..aa24a98 100644 --- a/flake.nix +++ b/flake.nix @@ -67,29 +67,54 @@ # overlays = [ (import ./nixos/overlays) ]; }; in { - "toph@caenus" = home-manager.lib.homeManagerConfiguration { - pkgs = armPkgs; - modules = [ ./home ]; + "toph@caenus" = let + hostName = "caenus"; + pkgs = armPkgs; + home = ./. + "/host/${hostName}/home"; + in home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { inherit hostName; }; + modules = [ home ]; }; - "toph@cloud" = home-manager.lib.homeManagerConfiguration { - pkgs = x86Pkgs; - modules = [ ./home ]; + "toph@cloud" = let + hostName = "cloud"; + pkgs = x86Pkgs; + home = ./. + "/host/${hostName}/home"; + in home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { inherit hostName; }; + modules = [ home ]; }; - "toph@dockge" = home-manager.lib.homeManagerConfiguration { - pkgs = x86Pkgs; - modules = [ ./home ]; + "toph@dockge" = let + hostName = "dockge"; + pkgs = x86Pkgs; + home = ./. + "/host/${hostName}/home"; + in home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { inherit hostName; }; + modules = [ home ]; }; - "toph@nix" = home-manager.lib.homeManagerConfiguration { - pkgs = x86Pkgs; - modules = [ ./home ]; + "toph@nix" = let + hostName = "nix"; + pkgs = x86Pkgs; + home = ./. + "/host/${hostName}/home"; + in home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { inherit hostName; }; + modules = [ home ]; }; - "toph@proxy" = home-manager.lib.homeManagerConfiguration { - pkgs = x86Pkgs; - modules = [ ./home ]; + "toph@proxy" = let + hostName = "proxy"; + pkgs = x86Pkgs; + home = ./. + "/host/${hostName}/home"; + in home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { inherit hostName; }; + modules = [ home ]; }; }; }; diff --git a/host/caenus/home/default.nix b/host/caenus/home/default.nix new file mode 100644 index 0000000..492f4d1 --- /dev/null +++ b/host/caenus/home/default.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + # Module imports + imports = [ + # Common Modules + ../../../common/home + ]; + + home.packages = with pkgs; [ + fastfetch + fish + fishPlugins.grc + fishPlugins.tide + grc + ]; +} \ No newline at end of file diff --git a/host/cloud/home/default.nix b/host/cloud/home/default.nix new file mode 100644 index 0000000..492f4d1 --- /dev/null +++ b/host/cloud/home/default.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + # Module imports + imports = [ + # Common Modules + ../../../common/home + ]; + + home.packages = with pkgs; [ + fastfetch + fish + fishPlugins.grc + fishPlugins.tide + grc + ]; +} \ No newline at end of file diff --git a/host/dockge/home/default.nix b/host/dockge/home/default.nix new file mode 100644 index 0000000..492f4d1 --- /dev/null +++ b/host/dockge/home/default.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + # Module imports + imports = [ + # Common Modules + ../../../common/home + ]; + + home.packages = with pkgs; [ + fastfetch + fish + fishPlugins.grc + fishPlugins.tide + grc + ]; +} \ No newline at end of file diff --git a/host/nix/default.nix b/host/nix/default.nix index a4aaa6a..d1ff9f7 100644 --- a/host/nix/default.nix +++ b/host/nix/default.nix @@ -43,11 +43,8 @@ in { environment.systemPackages = with pkgs; [ git micro - nodejs_22 openbox openssh - pnpm - prettierd ranger sshfs wget diff --git a/host/nix/home/default.nix b/host/nix/home/default.nix new file mode 100644 index 0000000..abfdab8 --- /dev/null +++ b/host/nix/home/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + # Module imports + imports = [ + # Common Modules + ../../../common/home + ]; + + home.packages = with pkgs; [ + fastfetch + fish + fishPlugins.grc + fishPlugins.tide + grc + nodejs_22 + pnpm + prettierd + ]; +} \ No newline at end of file diff --git a/host/proxy/home/default.nix b/host/proxy/home/default.nix new file mode 100644 index 0000000..492f4d1 --- /dev/null +++ b/host/proxy/home/default.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + # Module imports + imports = [ + # Common Modules + ../../../common/home + ]; + + home.packages = with pkgs; [ + fastfetch + fish + fishPlugins.grc + fishPlugins.tide + grc + ]; +} \ No newline at end of file