summaryrefslogtreecommitdiff
path: root/modules/xnet/users.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2024-12-01 22:30:26 -0500
committerKleidi Bujari <mail@4kb.net>2024-12-01 22:30:26 -0500
commitf08f3812f40322b6098d75573413ed83f358871f (patch)
tree0f864c4695dab404e261e6bf179cfc1b04d6c7f5 /modules/xnet/users.nix
parent3ccc7e784a0ed5b19910ab856f6d9774a6f27956 (diff)
downloaddepot-f08f3812f40322b6098d75573413ed83f358871f.tar.gz
depot-f08f3812f40322b6098d75573413ed83f358871f.tar.bz2
depot-f08f3812f40322b6098d75573413ed83f358871f.zip
Cleanup xnet module and add baseline modules
With these changes, the xnet module is useable as a system builder. At this point, it is still undecided whether all configuration will be generalized into this module, rather than keeping mini-modules local to the machine they will run on.
Diffstat (limited to 'modules/xnet/users.nix')
-rw-r--r--modules/xnet/users.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/modules/xnet/users.nix b/modules/xnet/users.nix
new file mode 100644
index 0000000..d9f6081
--- /dev/null
+++ b/modules/xnet/users.nix
@@ -0,0 +1,62 @@
+{ pkgs, lib, config, ... }:
+let
+ cfg = config.xnet.users;
+ inherit (lib) mkOption mkIf types;
+in
+{
+
+ options.xnet.users = {
+ enable = mkOption {
+ type = types.listOf (types.enum [ "kle" ]);
+ default = [ ];
+ description = "Users to enable.";
+ };
+ };
+
+ config = {
+ users.mutableUsers = false;
+
+ users.users.kle = mkIf (builtins.elem "kle" cfg.enable) {
+ hashedPassword = "$6$R4dDhaftX.vapGMd$.An36hlp3DXfkIC7bPZ0MDPo6Zvpk8JRrhy2LES.lZZj6JDa74oJkcMW3DCsIySvLJxOPXSShos0TpgJ/w0fH/";
+ isNormalUser = true;
+ createHome = true;
+ extraGroups = [ "wheel" "users" "networkmanager" "video" ];
+ packages = with pkgs; [
+ btop
+ curl
+ fzf
+ git
+ jq
+ lynx
+ neovim
+ ranger
+ rsync
+ sshfs
+ tree
+ zip
+ ];
+ };
+
+ programs.ssh.extraConfig = ''
+ Host github
+ HostName github.com
+ User git
+ PreferredAuthentications publickey
+ '';
+
+ programs.git = {
+ config = {
+ init = {
+ defaultBranch = "master";
+ };
+ push = {
+ default = "upstream";
+ autoSetupRemote = true;
+ };
+ fetch = {
+ prune = true;
+ };
+ };
+ };
+ };
+}