more stuff

This commit is contained in:
Kopatz
2024-04-17 16:33:12 +02:00
parent 468c978e62
commit 6a891bec61
35 changed files with 177 additions and 74 deletions

View File

@@ -1,23 +1,45 @@
{lib, config, pkgs, ...}:
{
options.mainUser = {
name = lib.mkOption {
default = "mainuser";
description = ''
username
'';
options = {
mainUser = {
name = lib.mkOption {
default = "mainuser";
description = ''
username
'';
};
layout = lib.mkOption {
default = "de";
description = "keyboard layout";
};
variant = lib.mkOption {
default = "";
description = "keyboard variant";
};
sshKey = lib.mkOption {
default = throw "No ssh key specified";
description = "Public key of the user";
};
};
layout = lib.mkOption {
default = "de";
description = "keyboard layout";
};
variant = lib.mkOption {
default = "";
description = "keyboard variant";
};
sshKey = lib.mkOption {
default = throw "No ssh key specified";
description = "Public key of the user";
kop.user = {
name = lib.mkOption {
default = "mainuser";
description = ''
username
'';
};
layout = lib.mkOption {
default = "de";
description = "keyboard layout";
};
variant = lib.mkOption {
default = "";
description = "keyboard variant";
};
sshKey = lib.mkOption {
default = throw "No ssh key specified";
description = "Public key of the user";
};
};
};
}

29
users/vm/default.nix Normal file
View File

@@ -0,0 +1,29 @@
{ inputs
, pkgs
, lib
, config
, ...
}:
{
imports = [ ../default.nix ];
mainUser.name = "vm";
virtualisation.vmVariant = {
virtualisation = {
memorySize = 4096; # Use 2048MiB memory.
cores = 4;
};
};
home-manager = {
users.${config.mainUser.name} = import ./home.nix;
};
programs.zsh.enable = true;
users.users.${config.mainUser.name} = {
isNormalUser = true ;
initialPassword = "test";
description = config.mainUser.name;
shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" ];
};
}

12
users/vm/home.nix Normal file
View File

@@ -0,0 +1,12 @@
{ config, pkgs, inputs, ...}:
{
home = {
stateVersion = "23.05";
};
imports = [
../../home-manager/nvim.nix
../../home-manager/zsh.nix
inputs.nix-colors.homeManagerModule
];
}