refactor: via statix

This commit is contained in:
Ryan Yin
2023-12-22 12:07:37 +08:00
parent cddd8101c7
commit a1b5572eea
13 changed files with 70 additions and 62 deletions

View File

@@ -1,9 +1,8 @@
{...}: {
networking.hostName = "ai";
# Enable networking
networking.networkmanager.enable = true;
networking.defaultGateway = "192.168.5.201";
_: {
networking = {
hostName = "ai";
defaultGateway = "192.168.5.201";
networkmanager.enable = true;
};
system.stateVersion = "23.11";
}

View File

@@ -36,17 +36,21 @@
};
# Don't allow mutation of users outside the config.
users.mutableUsers = false;
# Define a user account. Don't forget to set a password with passwd.
users.users.ryan = {
# generated by `mkpasswd -m scrypt`
# we have to use initialHashedPassword here, if your'are using tmpfs for /
initialHashedPassword = "$7$CU..../....Sdl/JRH..9eIvZ6mE/52r.$xeR6lyvTcVVKt28Owcoc/vPOOECcYSiq1xjw/QCz2t0";
isNormalUser = true;
description = "ryan";
extraGroups = ["ryan" "networkmanager" "wheel"];
users = {
mutableUsers = false;
# Define a user account. Don't forget to set a password with passwd.
users = {
ryan = {
# generated by `mkpasswd -m scrypt`
# we have to use initialHashedPassword here, if your'are using tmpfs for /
initialHashedPassword = "$7$CU..../....Sdl/JRH..9eIvZ6mE/52r.$xeR6lyvTcVVKt28Owcoc/vPOOECcYSiq1xjw/QCz2t0";
isNormalUser = true;
description = "ryan";
extraGroups = ["ryan" "networkmanager" "wheel"];
};
root.initialHashedPassword = "$7$CU..../....X6uvZYnFD.i1CqqFFNl4./$4vgqzIPyw5XBr0aCDFbY/UIRRJr7h5SMGoQ/ZvX3FP2";
};
};
users.users.root.initialHashedPassword = "$7$CU..../....X6uvZYnFD.i1CqqFFNl4./$4vgqzIPyw5XBr0aCDFbY/UIRRJr7h5SMGoQ/ZvX3FP2";
# make ryan a trusted user so he can set custom nix substituters url(cache mirror) to speed up nixos-rebuild.
nix.settings.trusted-users = ["ryan"];