diff --git a/flake.nix b/flake.nix index b1cb8ef..bf5430b 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,11 @@ extraSpecialArgs = { inherit inputs rootPath; }; modules = [ ./home/hosts/wsl.nix ]; }; + "android@y2q" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs rootPath; }; + modules = [ ./home/hosts/y2q.nix ]; + }; }; devShells.${system}.default = pkgs.mkShell { @@ -76,7 +81,7 @@ HOST=$(hostname) alias deploy-nixos="sudo nixos-rebuild switch --flake .#$HOST" alias deploy-vps="nixos-rebuild switch --flake .#vps --target-host root@vps" - alias deploy-home="home-manager switch --flake .#toast@$HOST" + alias deploy-home="home-manager switch --flake .#$USER@$HOST" ''; }; }; diff --git a/home/hosts/y2q.nix b/home/hosts/y2q.nix new file mode 100644 index 0000000..509621d --- /dev/null +++ b/home/hosts/y2q.nix @@ -0,0 +1,23 @@ +{ config, pkgs, inputs, ... }: + +{ + imports = [ + inputs.nixvim.homeModules.nixvim + inputs.sops-nix.homeManagerModules.sops + ] ++ ( + let + modulesPath = ../modules; + cliModules = builtins.attrNames (builtins.readDir (modulesPath + "/cli/")); + in + map (module: modulesPath + "/cli/${module}") cliModules + ); + + home = { + username = "android"; + homeDirectory = "/home/android"; + stateVersion = "24.11"; + }; + + nixpkgs.config.allowUnfree = true; + systemd.user.startServices = "sd-switch"; +} diff --git a/home/modules/cli/sops.nix b/home/modules/cli/sops.nix index b125b37..094195f 100644 --- a/home/modules/cli/sops.nix +++ b/home/modules/cli/sops.nix @@ -1,8 +1,8 @@ -{ rootPath, ... }: +{ rootPath, config, ... }: { sops.defaultSopsFile = rootPath + /secrets/secrets.yaml; sops.defaultSopsFormat = "yaml"; - sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt"; + sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; }