mirror of
https://github.com/Smaug123/PulumiConfig
synced 2025-10-07 09:38:40 +00:00
Create Pulumi-provisioned web server
This commit is contained in:
34
PulumiWebServer/Nix/userconfig.nix
Normal file
34
PulumiWebServer/Nix/userconfig.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{pkgs, ...}: {
|
||||
users.mutableUsers = false;
|
||||
users.users."@@USER@@" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/@@USER@@";
|
||||
extraGroups = ["wheel"];
|
||||
openssh.authorizedKeys.keys = ["@@AUTHORIZED_KEYS@@"];
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
users = ["@@USER@@"];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = ["NOPASSWD"];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.vim
|
||||
pkgs.git
|
||||
pkgs.home-manager
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user