mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 17:38:29 +02:00
58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
{pkgs, ...}: {
|
||
# Set your time zone.
|
||
time.timeZone = "Asia/Shanghai";
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_US.UTF-8";
|
||
|
||
i18n.extraLocaleSettings = {
|
||
LC_ADDRESS = "zh_CN.UTF-8";
|
||
LC_IDENTIFICATION = "zh_CN.UTF-8";
|
||
LC_MEASUREMENT = "zh_CN.UTF-8";
|
||
LC_MONETARY = "zh_CN.UTF-8";
|
||
LC_NAME = "zh_CN.UTF-8";
|
||
LC_NUMERIC = "zh_CN.UTF-8";
|
||
LC_PAPER = "zh_CN.UTF-8";
|
||
LC_TELEPHONE = "zh_CN.UTF-8";
|
||
LC_TIME = "zh_CN.UTF-8";
|
||
};
|
||
|
||
# ssh-agent is used to pull my private secrets repo from github when depoloying my nixos config.
|
||
programs.ssh.startAgent = true;
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||
git
|
||
gnumake
|
||
wget
|
||
curl
|
||
nix-output-monitor
|
||
];
|
||
|
||
users.groups = {
|
||
"ryan" = {};
|
||
};
|
||
|
||
# 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 = {
|
||
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";
|
||
};
|
||
};
|
||
|
||
# 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"];
|
||
}
|