using new user module
This commit is contained in:
@@ -5,30 +5,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos."${name}" = { pkgs, lib, ...}: {
|
flake.modules.nixos."${name}" = { pkgs, lib, ...}: {
|
||||||
home-manager.users."${username}" = {
|
|
||||||
imports = [
|
|
||||||
inputs.self.homeModules."${username}"
|
|
||||||
];
|
|
||||||
home.sessionVariables = rec {
|
|
||||||
HOST = "${name}";
|
|
||||||
OTHER_VAR = "abc123";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "${name}";
|
networking.hostName = "${name}";
|
||||||
# environment.sessionVariables = rec {
|
|
||||||
# HOST = "${name}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
users.users."${username}" = {
|
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAUa4dcg1TWc4pW++uodyhX4eOqrX/QYIxFWtEP7HFJ john@john-pc-ubuntu"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# require public key authentication for better security
|
# require public key authentication for better security
|
||||||
@@ -36,14 +13,24 @@ in
|
|||||||
settings.KbdInteractiveAuthentication = false;
|
settings.KbdInteractiveAuthentication = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
home-manager.users."${username}" = {
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
|
users.users.john = {
|
||||||
|
extraGroups = [ "docker" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Generic bootstrapping lxc, use a specific host file for more
|
# Generic bootstrapping lxc, use a specific host file for more
|
||||||
flake.nixosConfigurations."${name}" = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations."${name}" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.self.modules.nixos.lxc
|
inputs.self.modules.nixos.lxc
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.self.modules.nixos."${name}"
|
inputs.self.modules.nixos."${name}"
|
||||||
|
inputs.self.modules.nixos.john
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user