Compare commits
3 Commits
86d6ab87e5
...
c26bbdfd9c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c26bbdfd9c | ||
|
|
3285a6a04f | ||
|
|
ed95bcf9d1 |
@@ -17,6 +17,9 @@
|
||||
echo "Hello from docker.nix!"
|
||||
'')
|
||||
];
|
||||
home.shellAliases = {
|
||||
lzd = "lazydocker";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -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
54
modules/users/john.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user