Files
panoptes-nix/home.nix
John Lancaster 75d9d5a76e reorg
2024-12-09 19:50:42 -06:00

46 lines
1.2 KiB
Nix

{
pkgs,
systemSettings,
userSettings,
...
}:
let
repoURL = "https://gitea.john-stream.com/john/panoptes-nix";
repoBranch = "main";
homePath = "/home/${userSettings.username}";
repoPath = "${homePath}/${systemSettings.hostName}";
in
{
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
programs.git = {
enable = true;
extraConfig.credential.helper = "store --file ~/.git-credentials";
userName = "${userSettings.gitUserName}";
userEmail = "${userSettings.gitUserEmail}";
extraConfig.safe.directory = "${homePath}";
};
programs.bash.enable = true;
programs.ssh.enable = true;
home = {
stateVersion = "${systemSettings.stateVersion}";
username = "${userSettings.username}";
homeDirectory = "${homePath}";
packages = with pkgs; [
(writeShellScriptBin "nfs" ''
sudo nixos-rebuild switch --flake ${repoPath}#${systemSettings.hostName} --impure
'')
(writeShellScriptBin "init-panoptes" ''
sudo -u ${userSettings.username} git clone -b ${repoBranch} ${repoURL} ${repoPath}
'')
git
python313
];
};
systemd.user.startServices = "sd-switch";
}