single home module

This commit is contained in:
John Lancaster
2024-12-08 16:34:11 -06:00
parent fd21e90e1d
commit d22763540a
2 changed files with 7 additions and 11 deletions

37
home.nix Normal file
View File

@@ -0,0 +1,37 @@
{
lib,
config,
pkgs,
inputs,
...
}:
let
homePath = "/srv/panoptes";
in
{
programs.git = {
enable = true;
extraConfig.credential.helper = "store --file ~/.git-credentials";
userName = "John Lancaster";
userEmail = "32917998+jsl12@users.noreply.github.com";
extraConfig.safe.directory = "${homePath}";
};
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
home = {
homeDirectory = "${homePath}";
packages = [
(pkgs.writeShellScriptBin "nfs" ''
sudo nixos-rebuild switch --flake git+file://${homePath}#${hostname}
'')
(pkgs.writeShellScriptBin "init-panoptes" ''
sudo -u git clone -b reorg https://gitea.john-stream.com/john/loki-nix /srv/panoptes
'')
git
];
};
systemd.user.startServices = "sd-switch";
}