Clean branch
This commit is contained in:
commit
de986accc2
42 changed files with 1959 additions and 0 deletions
99
common/users.nix
Normal file
99
common/users.nix
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
usr = config.constants.userName;
|
||||
usrPwdFile = "users/${usr}/password";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs.fishPlugins; [
|
||||
fzf-fish
|
||||
pisces
|
||||
puffer
|
||||
tide
|
||||
];
|
||||
|
||||
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;
|
||||
fzf.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
core.autocrlf = "input";
|
||||
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;
|
||||
tealdeer.enable = true;
|
||||
zoxide = {
|
||||
enable = true;
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue