feat: Added stuff from steamdeck

Signed-off-by: uttarayan21 <email@uttarayan.me>
This commit is contained in:
uttarayan21
2025-05-04 05:53:14 +05:30
parent a67d3353e2
commit 13dedfa654
3 changed files with 22 additions and 12 deletions

View File

@@ -22,5 +22,9 @@ home:
nixos: nixos:
sudo nixos-rebuild switch --flake . sudo nixos-rebuild switch --flake .
deck:
nix run home-manager/master -- switch --flake .#deck
test_nixos: test_nixos:
sudo nixos-rebuild test --fast --flake . sudo nixos-rebuild test --fast --flake .

View File

@@ -5,24 +5,24 @@
... ...
}: }:
with lib; let with lib; let
cfg = config.services.aichat; cfg = config.services.tailscale;
in { in {
options = { options = {
services.aichat = { services.tailscale = {
enable = mkEnableOption "aichat"; enable = mkEnableOption "tailscale";
package = mkPackageOption pkgs "aichat" {}; package = mkPackageOption pkgs "tailscale" {};
}; };
}; };
config = { config = {
home.packages = mkIf cfg.enable [cfg.package]; home.packages = mkIf cfg.enable [cfg.package];
home.activation.runTailscaleActivation = let # This doesn't work since we don't have root
tailscaleLib = "${cfg.package}/lib"; home.activation.copyTailscaledService = mkIf cfg.enable (let
tailscaleService = "${cfg.package}/lib/systemd/system/tailscaled.service";
in in
lib.hm.dag.entryAfter ["writeBoundary"] '' lib.hm.dag.entryAfter ["installPackages"] ''
cp -r ${tailscaleLib} /etc/ verboseEcho Copying the tailscale systemd files to /etc
systemctl reload-daemon run cp ${tailscaleService} /etc/systemd/system/tailscaled.service
systemctl enable --now tailscaled '');
'';
}; };
} }

View File

@@ -6,5 +6,11 @@
imports = [ imports = [
../modules/home/tailscale.nix ../modules/home/tailscale.nix
]; ];
services.tailscale.enable = true; services.tailscale = {
enable = false;
};
home.packages = [
pkgs.tailscale
];
} }