diff --git a/flake.nix b/flake.nix index 712dbc8..fdf69c2 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ { nixosConfigurations = { eva-01 = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs pkgs-unstable configPath;}; + specialArgs = {inherit inputs pkgs-unstable configPath;} // {hostname = "eva-01";}; system = system; modules = [ ./hosts/eva-01/configuration.nix @@ -53,7 +53,8 @@ }; eva-03 = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs pkgs-unstable configPath;}; + hostname = "eva-03"; + specialArgs = {inherit inputs pkgs-unstable configPath;} // {hostname = "eva-03";}; system = system; modules = [ ./hosts/eva-03/configuration.nix diff --git a/home-manager/commands/commands.nix b/home-manager/commands/commands.nix index 902e853..451999a 100644 --- a/home-manager/commands/commands.nix +++ b/home-manager/commands/commands.nix @@ -1,5 +1,7 @@ { pkgs, + lib, + hostname, ... }: @@ -51,9 +53,9 @@ wireguard-tools wget yazi - yazi yt-dlp - + ] + ++ lib.optionals (hostname == "eva-01") [ # cyber amass bettercap @@ -78,8 +80,13 @@ recon-ng steghide thc-hydra + ] + + ++ lib.optionals (hostname == "eva-03") [ + ]; + programs = { ssh = { enable = true; diff --git a/home-manager/programs/programs.nix b/home-manager/programs/programs.nix index 6d5b791..440e2bb 100644 --- a/home-manager/programs/programs.nix +++ b/home-manager/programs/programs.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, hostname, ... }: { imports = [ @@ -53,6 +53,14 @@ vscode wireshark yubikey-agent + ] + + ++ lib.optionals (hostname == "eva-01") [ + + ] + + ++ lib.optionals (hostname == "eva-03") [ + ]; # environment.sessionVariables.NIXOS_OZONE_WL = "1"; diff --git a/hosts/eva-01/configuration.nix b/hosts/eva-01/configuration.nix index 86f9e59..672d411 100644 --- a/hosts/eva-01/configuration.nix +++ b/hosts/eva-01/configuration.nix @@ -8,6 +8,7 @@ pkgs-unstable, inputs, configPath, + hostname, ... }: @@ -36,6 +37,17 @@ persistent = true; options = "--delete-older-than 30d"; }; +#let +# system = pkgs.system; +# unstable = import (builtins.fetchTarball { +# url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; +# sha256 = "09dahi81cn02gnzsc8a00n945dxc18656ar0ffx5vgxjj1nhgsvy"; +# }) { +# inherit system; +# config.allowUnfree = true; +# }; +#in + # Dynamic power managment # powerManagement = { @@ -264,6 +276,7 @@ configPath inputs pkgs-unstable + hostname ; }; users = { diff --git a/hosts/eva-03/configuration.nix b/hosts/eva-03/configuration.nix index 7ed7248..2b8421b 100644 --- a/hosts/eva-03/configuration.nix +++ b/hosts/eva-03/configuration.nix @@ -2,18 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, pkgs-unstable, inputs, ... }: - -#let -# system = pkgs.system; -# unstable = import (builtins.fetchTarball { -# url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; -# sha256 = "09dahi81cn02gnzsc8a00n945dxc18656ar0ffx5vgxjj1nhgsvy"; -# }) { -# inherit system; -# config.allowUnfree = true; -# }; -#in +{ config, pkgs, pkgs-unstable, inputs, hostname, ... }: { imports = @@ -306,7 +295,7 @@ ]; home-manager = { - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs hostname; }; users = { "rogueking" = import ./../../home-manager/home.nix; };