2023-09-27 09:05:27 +00:00
|
|
|
{ pkgs, config, ... }:
|
2023-09-19 00:17:43 +00:00
|
|
|
|
|
|
|
{
|
2023-09-20 21:23:10 +00:00
|
|
|
users.users."guanranwang" = {
|
2023-09-19 00:17:43 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
description = "Guanran Wang";
|
|
|
|
extraGroups = [ "wheel" "networkmanager" "tss" ]; # tss = access to tpm devices
|
2023-10-02 03:12:25 +00:00
|
|
|
hashedPasswordFile = config.sops.secrets."hashed-passwd".path;
|
2023-09-19 00:17:43 +00:00
|
|
|
shell = pkgs.fish;
|
|
|
|
packages = [];
|
|
|
|
};
|
2023-09-27 09:05:27 +00:00
|
|
|
|
|
|
|
|
2023-10-09 14:13:21 +00:00
|
|
|
|
2023-10-14 05:53:54 +00:00
|
|
|
# Flakes
|
|
|
|
imports = [
|
|
|
|
../../flakes/nixos/home-manager.nix
|
|
|
|
../../flakes/nixos/sops-nix.nix
|
|
|
|
../../flakes/nixos/hosts.nix
|
|
|
|
../../flakes/nixos/berberman.nix
|
|
|
|
];
|
|
|
|
### home-manager
|
2023-10-09 14:13:21 +00:00
|
|
|
home-manager.users.guanranwang = import ./home-manager/nixos;
|
2023-10-14 05:53:54 +00:00
|
|
|
### sops-nix
|
2023-09-27 09:05:27 +00:00
|
|
|
sops = {
|
2023-10-09 14:13:21 +00:00
|
|
|
defaultSopsFile = ./secrets/secrets.yaml;
|
2023-10-12 14:21:14 +00:00
|
|
|
age.sshKeyPaths = [ "/nix/persist/system/etc/ssh/ssh_host_ed25519_key" ];
|
|
|
|
gnupg.sshKeyPaths = [];
|
2023-09-27 09:05:27 +00:00
|
|
|
secrets = {
|
2023-10-14 05:53:54 +00:00
|
|
|
"hashed-passwd".neededForUsers = true; # Hashed user password
|
|
|
|
"wireless/home".path = "/var/lib/iwd/wangxiaobo.psk"; # Home wifi password
|
|
|
|
"clash-config" = { # Clash.Meta configuration
|
2023-09-27 09:05:27 +00:00
|
|
|
#mode = "0444"; # readable
|
|
|
|
owner = config.users.users."clash-meta".name;
|
|
|
|
group = config.users.users."clash-meta".group;
|
|
|
|
restartUnits = [ "clash-meta.service" ];
|
|
|
|
path = "/etc/clash-meta/config.yaml";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-09-19 00:17:43 +00:00
|
|
|
}
|