mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 17:38:29 +02:00
refactor: via statix
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user