2023-10-09 10:44:07 -07:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
2024-03-03 00:11:51 -08:00
|
|
|
home = config.constants.homeDir;
|
2023-10-09 10:44:07 -07:00
|
|
|
usr = config.constants.userName;
|
|
|
|
|
usrPwdFile = "users/${usr}/password";
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
home-manager = {
|
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
|
users.${usr} = {
|
|
|
|
|
home = {
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
dua
|
|
|
|
|
fd
|
|
|
|
|
nil
|
|
|
|
|
nixpkgs-fmt
|
|
|
|
|
rclone
|
|
|
|
|
sops
|
|
|
|
|
];
|
|
|
|
|
stateVersion = config.system.stateVersion;
|
|
|
|
|
};
|
|
|
|
|
programs = {
|
|
|
|
|
bat.enable = true;
|
|
|
|
|
bottom.enable = true;
|
|
|
|
|
direnv = {
|
|
|
|
|
enable = true;
|
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
|
};
|
|
|
|
|
eza = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableAliases = true;
|
|
|
|
|
};
|
|
|
|
|
fish.enable = true;
|
2023-11-25 11:16:06 -08:00
|
|
|
fzf.enable = true;
|
2023-10-09 10:44:07 -07:00
|
|
|
git = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraConfig = {
|
|
|
|
|
core.autocrlf = "input";
|
2023-10-17 13:53:38 -07:00
|
|
|
init.defaultBranch = "development";
|
2023-10-09 10:44:07 -07:00
|
|
|
pull.rebase = false;
|
|
|
|
|
push.autoSetupRemote = true;
|
|
|
|
|
};
|
|
|
|
|
ignores = [
|
|
|
|
|
".direnv"
|
|
|
|
|
".envrc"
|
|
|
|
|
];
|
|
|
|
|
userEmail = config.constants.postMaster;
|
|
|
|
|
userName = config.constants.userName;
|
|
|
|
|
};
|
|
|
|
|
helix = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultEditor = true;
|
|
|
|
|
settings = {
|
|
|
|
|
editor = {
|
|
|
|
|
lsp.display-inlay-hints = true;
|
|
|
|
|
soft-wrap.enable = true;
|
|
|
|
|
};
|
|
|
|
|
theme = "base16_transparent";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
ripgrep.enable = true;
|
2023-11-09 19:37:21 -08:00
|
|
|
starship = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableTransience = true;
|
|
|
|
|
};
|
2023-10-09 10:44:07 -07:00
|
|
|
tealdeer.enable = true;
|
|
|
|
|
zoxide = {
|
|
|
|
|
enable = true;
|
|
|
|
|
options = [ "--cmd cd" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-02-24 00:04:32 -08:00
|
|
|
xdg.enable = true;
|
2023-10-09 10:44:07 -07:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
|
2024-03-02 15:10:23 -08:00
|
|
|
services = {
|
|
|
|
|
openssh = {
|
|
|
|
|
hostKeys = [{
|
|
|
|
|
comment = "host@${config.networking.hostName}";
|
|
|
|
|
path = "/etc/ssh/host";
|
|
|
|
|
rounds = 100;
|
|
|
|
|
type = "ed25519";
|
|
|
|
|
}];
|
|
|
|
|
settings = {
|
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
resolved.enable = true;
|
2024-03-03 00:11:51 -08:00
|
|
|
syncthing = {
|
|
|
|
|
configDir = "${home}/.config/syncthing";
|
|
|
|
|
dataDir = "${home}/.local/share/syncthing";
|
|
|
|
|
openDefaultPorts = true;
|
|
|
|
|
overrideDevices = true;
|
|
|
|
|
overrideFolders = true;
|
|
|
|
|
settings.devices = config.constants.syncthingDevices;
|
|
|
|
|
user = usr;
|
|
|
|
|
};
|
2024-03-02 15:10:23 -08:00
|
|
|
};
|
|
|
|
|
|
2023-10-09 10:44:07 -07:00
|
|
|
sops.secrets.${usrPwdFile}.neededForUsers = true;
|
|
|
|
|
|
|
|
|
|
users = {
|
|
|
|
|
mutableUsers = false;
|
|
|
|
|
users.${usr} = {
|
|
|
|
|
description = "Sicheng Pan";
|
|
|
|
|
extraGroups = [
|
|
|
|
|
"audio"
|
|
|
|
|
"input"
|
|
|
|
|
"networkmanager"
|
|
|
|
|
"uinput"
|
|
|
|
|
"wheel"
|
|
|
|
|
];
|
|
|
|
|
hashedPasswordFile = config.sops.secrets.${usrPwdFile}.path;
|
|
|
|
|
home = config.constants.homeDir;
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
openssh.authorizedKeys.keys = config.constants.publicKeys;
|
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|