Compare commits

...

3 Commits

Author SHA1 Message Date
John Lancaster
c26bbdfd9c added lzd sehll alias 2026-03-10 00:19:05 -05:00
John Lancaster
3285a6a04f using new user module 2026-03-10 00:16:29 -05:00
John Lancaster
ed95bcf9d1 moved users folder 2026-03-09 23:14:53 -05:00
4 changed files with 68 additions and 59 deletions

View File

@@ -17,6 +17,9 @@
echo "Hello from docker.nix!"
'')
];
home.shellAliases = {
lzd = "lazydocker";
};
};
};
}

View File

@@ -1,35 +0,0 @@
{ inputs, ... }:
{
flake.homeModules.john = {
home.username = "john";
home.homeDirectory = "/home/john";
home.stateVersion = "25.11";
xdg.enable = true;
programs.git.settings.user.name = "John Lancaster";
programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com";
imports = with inputs.self.homeModules; [
base
docker
# resticprofile
];
};
# This is the base homeConfiguration for the john user that will be used if no other
flake.homeConfigurations.john = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
modules = [
inputs.self.homeModules.john
# Include another inline module to set the options created through the jsl-home modules
{
docker.enable = false;
ssh.matchSets = {
certs = true;
homelab = true;
};
}
];
};
}

View File

@@ -5,30 +5,7 @@ let
in
{
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}";
# 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 = {
enable = true;
# require public key authentication for better security
@@ -36,14 +13,24 @@ in
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
flake.nixosConfigurations."${name}" = inputs.nixpkgs.lib.nixosSystem {
modules = [
inputs.home-manager.nixosModules.home-manager
inputs.self.modules.nixos.lxc
inputs.home-manager.nixosModules.home-manager
inputs.self.modules.nixos."${name}"
inputs.self.modules.nixos.john
];
};
}

54
modules/users/john.nix Normal file
View File

@@ -0,0 +1,54 @@
{ inputs, ... }:
let
username = "john";
in
{
flake.modules.nixos."${username}" = { pkgs, ... }: {
home-manager.users."${username}" = {
imports = [
inputs.self.homeModules."${username}"
];
};
users.users."${username}" = {
isNormalUser = true;
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAUa4dcg1TWc4pW++uodyhX4eOqrX/QYIxFWtEP7HFJ john@john-pc-ubuntu"
];
};
programs.zsh.enable = true;
};
flake.homeModules."${username}" = {
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.stateVersion = "25.11";
xdg.enable = true;
programs.git.settings.user.name = "John Lancaster";
programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com";
imports = with inputs.self.homeModules; [
base
docker
# resticprofile
];
};
# This is the base homeConfiguration for the john user that will be used if no other
flake.homeConfigurations."${username}" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
modules = [
inputs.self.homeModules."${username}"
# Include another inline module to set the options created through the jsl-home modules
{
docker.enable = false;
ssh.matchSets = {
certs = true;
homelab = true;
};
}
];
};
}