feat: Added stuff from steamdeck
Signed-off-by: uttarayan21 <email@uttarayan.me>
This commit is contained in:
4
Makefile
4
Makefile
@@ -22,5 +22,9 @@ home:
|
||||
nixos:
|
||||
sudo nixos-rebuild switch --flake .
|
||||
|
||||
deck:
|
||||
nix run home-manager/master -- switch --flake .#deck
|
||||
|
||||
|
||||
test_nixos:
|
||||
sudo nixos-rebuild test --fast --flake .
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.aichat;
|
||||
cfg = config.services.tailscale;
|
||||
in {
|
||||
options = {
|
||||
services.aichat = {
|
||||
enable = mkEnableOption "aichat";
|
||||
package = mkPackageOption pkgs "aichat" {};
|
||||
services.tailscale = {
|
||||
enable = mkEnableOption "tailscale";
|
||||
package = mkPackageOption pkgs "tailscale" {};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home.packages = mkIf cfg.enable [cfg.package];
|
||||
home.activation.runTailscaleActivation = let
|
||||
tailscaleLib = "${cfg.package}/lib";
|
||||
# This doesn't work since we don't have root
|
||||
home.activation.copyTailscaledService = mkIf cfg.enable (let
|
||||
tailscaleService = "${cfg.package}/lib/systemd/system/tailscaled.service";
|
||||
in
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
cp -r ${tailscaleLib} /etc/
|
||||
systemctl reload-daemon
|
||||
systemctl enable --now tailscaled
|
||||
'';
|
||||
lib.hm.dag.entryAfter ["installPackages"] ''
|
||||
verboseEcho Copying the tailscale systemd files to /etc
|
||||
run cp ${tailscaleService} /etc/systemd/system/tailscaled.service
|
||||
'');
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,5 +6,11 @@
|
||||
imports = [
|
||||
../modules/home/tailscale.nix
|
||||
];
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.tailscale
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user