need to finish up user setup with passwords and whatnot

This commit is contained in:
TheWanderingCrow 2025-06-09 14:25:56 -04:00
parent 2141de8cb1
commit 15d77dc57c
16 changed files with 245 additions and 132 deletions

View file

@ -13,6 +13,8 @@
else "nixos";
platformModules = "${platform}Modules";
in {
system.stateVersion = "24.05";
imports = lib.flatten [
inputs.home-manager.${platformModules}.home-manager
inputs.sops-nix.${platformModules}.sops
@ -22,6 +24,9 @@ in {
"hosts/common/core/shell.nix"
"hosts/common/core/sops.nix"
"hosts/common/core/ssh.nix"
"hosts/common/users/primary"
"hosts/common/users/primary/${platform}.nix"
"modules/common"
])
];
@ -43,7 +48,7 @@ in {
};
};
nix = {
nix.settings = {
connect-timeout = 5;
log-lines = 25;
min-free = 128000000;

View file

@ -4,84 +4,82 @@
pkgs,
...
}: {
config = lib.mkIf config.software.usershell.enable {
programs.zsh = {
programs.zsh = {
enable = true;
autosuggestions = {
enable = true;
autosuggestions = {
enable = true;
async = true;
};
syntaxHighlighting = {
enable = true;
};
shellAliases = {
lah = "ls -lah";
set-nixpkgs-upstream = "git remote add upstream https://github.com/NixOS/nixpkgs.git";
nup = "sudo nixos-rebuild switch --flake .";
};
async = true;
};
programs.starship = let
raisin_black = "#262932";
blood_red = "#710000";
rich_lemon = "#FDF500";
keppel = "#1AC5B0";
electric_blue = "#36EBF3";
blushing_purple = "#9370DB";
frostbite = "#E455AE";
steel_pink = "#CB1DCD";
pale_silver = "#D1C5C0";
in {
syntaxHighlighting = {
enable = true;
settings = {
format = "[ ](${rich_lemon})[ CrOS](bg:${rich_lemon} fg:${raisin_black})$username$hostname[ ](fg:${rich_lemon} bg:${blushing_purple})$directory[ ](fg:${blushing_purple} bg:${frostbite})$git_branch$git_status[ ](fg:${frostbite} bg:${steel_pink})$nix_shell[ ](${steel_pink})";
right_format = "[ ](${rich_lemon})$time[ ](${rich_lemon})";
};
shellAliases = {
lah = "ls -lah";
set-nixpkgs-upstream = "git remote add upstream https://github.com/NixOS/nixpkgs.git";
nup = "sudo nixos-rebuild switch --flake .";
};
};
# Left Modules
username = {
disabled = false;
format = "[ $user]($style)";
style_user = "fg:${keppel} bg:${rich_lemon}";
style_root = "fg:${blood_red} bg:${rich_lemon}";
};
hostname = {
disabled = false;
format = "[@$hostname ]($style)";
style = "fg:${keppel} bg:${rich_lemon}";
ssh_only = false;
ssh_symbol = "";
};
directory = {
disabled = false;
format = "[ $path ]($style)";
style = "bg:${blushing_purple} fg:${raisin_black}";
truncation_length = 3;
truncation_symbol = "/";
};
git_branch = {
disabled = false;
format = "[ $symbol $branch ]($style)";
symbol = "";
style = "fg:${raisin_black} bg:${frostbite}";
};
git_status = {
disabled = false;
format = "[$all_status$ahead_behind]($style)";
style = "fg:${raisin_black} bg:${frostbite}";
};
nix_shell = {
disabled = false;
format = "[$symbol $name]($style)";
style = "bg:${steel_pink} fg:${electric_blue}";
symbol = "";
};
programs.starship = let
raisin_black = "#262932";
blood_red = "#710000";
rich_lemon = "#FDF500";
keppel = "#1AC5B0";
electric_blue = "#36EBF3";
blushing_purple = "#9370DB";
frostbite = "#E455AE";
steel_pink = "#CB1DCD";
pale_silver = "#D1C5C0";
in {
enable = true;
settings = {
format = "[ ](${rich_lemon})[ CrOS](bg:${rich_lemon} fg:${raisin_black})$username$hostname[ ](fg:${rich_lemon} bg:${blushing_purple})$directory[ ](fg:${blushing_purple} bg:${frostbite})$git_branch$git_status[ ](fg:${frostbite} bg:${steel_pink})$nix_shell[ ](${steel_pink})";
right_format = "[ ](${rich_lemon})$time[ ](${rich_lemon})";
# Right Modules
time = {
disabled = false;
format = "[$time]($style)";
style = "fg:${raisin_black} bg:${rich_lemon}";
};
# Left Modules
username = {
disabled = false;
format = "[ $user]($style)";
style_user = "fg:${keppel} bg:${rich_lemon}";
style_root = "fg:${blood_red} bg:${rich_lemon}";
};
hostname = {
disabled = false;
format = "[@$hostname ]($style)";
style = "fg:${keppel} bg:${rich_lemon}";
ssh_only = false;
ssh_symbol = "";
};
directory = {
disabled = false;
format = "[ $path ]($style)";
style = "bg:${blushing_purple} fg:${raisin_black}";
truncation_length = 3;
truncation_symbol = "/";
};
git_branch = {
disabled = false;
format = "[ $symbol $branch ]($style)";
symbol = "";
style = "fg:${raisin_black} bg:${frostbite}";
};
git_status = {
disabled = false;
format = "[$all_status$ahead_behind]($style)";
style = "fg:${raisin_black} bg:${frostbite}";
};
nix_shell = {
disabled = false;
format = "[$symbol $name]($style)";
style = "bg:${steel_pink} fg:${electric_blue}";
symbol = "";
};
# Right Modules
time = {
disabled = false;
format = "[$time]($style)";
style = "fg:${raisin_black} bg:${rich_lemon}";
};
};
};

View file

@ -14,22 +14,21 @@ in
shell = pkgs.zsh;
openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key);
# Create ssh sockets directory for controlpaths when homemanager not loaded (i.e. isMinimal)
systemd.tmpfiles.rules = let
user = config.users.users.${hostSpec.username}.name;
group = config.users.users.${hostSpec.username}.group;
in [
"d /home/${hostSpec.username}/.ssh 0750 ${user} ${group} -"
"d /home/${hostSpec.username}/.ssh/sockets 0750 ${user} ${group} -"
];
programs.zsh.enable = true;
environment.systemPackages = [
pkgs.git
pkgs.vim
];
};
# Create ssh sockets directory for controlpaths when homemanager not loaded (i.e. isMinimal)
systemd.tmpfiles.rules = let
user = config.users.users.${hostSpec.username}.name;
group = config.users.users.${hostSpec.username}.group;
in [
"d /home/${hostSpec.username}/.ssh 0750 ${user} ${group} -"
"d /home/${hostSpec.username}/.ssh/sockets 0750 ${user} ${group} -"
];
programs.zsh.enable = true;
environment.systemPackages = [
pkgs.git
pkgs.vim
];
}
// lib.optionalAttrs (inputs ? "home-manager") {
home-manager = {

View file

@ -21,7 +21,6 @@
}
# Misc
# inputs.stylix.nixosModules.stylix
(map lib.custom.relativeToRoot [
# Required configs
@ -35,6 +34,8 @@
hostName = "bulwark";
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
networking = {
networkmanager.enable = true;
enableIPv6 = false;

View file

@ -18,7 +18,6 @@
inputs.disko.nixosModules.disko
# Misc
# inputs.stylix.nixosModules.stylix
(map lib.custom.relativeToRoot [
# Required configs