mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-19 16:49:04 +05:30
style: format code
This commit is contained in:
@@ -1,51 +1,48 @@
|
||||
{
|
||||
flake.modules.nixos.core =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
userName,
|
||||
userEmail,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hasPasswordSecret = lib.hasAttrByPath [ "sops" "secrets" "tux-password" ] config;
|
||||
in
|
||||
{
|
||||
programs.zsh.enable = true;
|
||||
flake.modules.nixos.core = {
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
userName,
|
||||
userEmail,
|
||||
...
|
||||
}: let
|
||||
hasPasswordSecret = lib.hasAttrByPath ["sops" "secrets" "tux-password"] config;
|
||||
in {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
time.timeZone = "Asia/Kolkata";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = lib.genAttrs [
|
||||
"LC_ADDRESS"
|
||||
"LC_IDENTIFICATION"
|
||||
"LC_MEASUREMENT"
|
||||
"LC_MONETARY"
|
||||
"LC_NAME"
|
||||
"LC_NUMERIC"
|
||||
"LC_PAPER"
|
||||
"LC_TELEPHONE"
|
||||
"LC_TIME"
|
||||
] (_: "en_IN");
|
||||
};
|
||||
time.timeZone = "Asia/Kolkata";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = lib.genAttrs [
|
||||
"LC_ADDRESS"
|
||||
"LC_IDENTIFICATION"
|
||||
"LC_MEASUREMENT"
|
||||
"LC_MONETARY"
|
||||
"LC_NAME"
|
||||
"LC_NUMERIC"
|
||||
"LC_PAPER"
|
||||
"LC_TELEPHONE"
|
||||
"LC_TIME"
|
||||
] (_: "en_IN");
|
||||
};
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${userName} = {
|
||||
hashedPasswordFile = lib.mkIf hasPasswordSecret config.sops.secrets.tux-password.path;
|
||||
initialPassword = lib.mkIf (!hasPasswordSecret) userName;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"storage"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${userEmail}"
|
||||
];
|
||||
};
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${userName} = {
|
||||
hashedPasswordFile = lib.mkIf hasPasswordSecret config.sops.secrets.tux-password.path;
|
||||
initialPassword = lib.mkIf (!hasPasswordSecret) userName;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"storage"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${userEmail}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user