feat(home): add host y2q

This commit is contained in:
toast 2025-10-09 20:09:57 +09:00
parent da3d4c46d8
commit eaa6a4fdec
3 changed files with 31 additions and 3 deletions

View file

@ -63,6 +63,11 @@
extraSpecialArgs = { inherit inputs rootPath; }; extraSpecialArgs = { inherit inputs rootPath; };
modules = [ ./home/hosts/wsl.nix ]; 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 { devShells.${system}.default = pkgs.mkShell {
@ -76,7 +81,7 @@
HOST=$(hostname) HOST=$(hostname)
alias deploy-nixos="sudo nixos-rebuild switch --flake .#$HOST" alias deploy-nixos="sudo nixos-rebuild switch --flake .#$HOST"
alias deploy-vps="nixos-rebuild switch --flake .#vps --target-host root@vps" 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"
''; '';
}; };
}; };

23
home/hosts/y2q.nix Normal file
View file

@ -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";
}

View file

@ -1,8 +1,8 @@
{ rootPath, ... }: { rootPath, config, ... }:
{ {
sops.defaultSopsFile = rootPath + /secrets/secrets.yaml; sops.defaultSopsFile = rootPath + /secrets/secrets.yaml;
sops.defaultSopsFormat = "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";
} }