mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
need to finish up user setup with passwords and whatnot
This commit is contained in:
parent
2141de8cb1
commit
15d77dc57c
16 changed files with 245 additions and 132 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
0
hosts/common/users/primary/keys/default.nix
Normal file
0
hosts/common/users/primary/keys/default.nix
Normal 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;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
inputs.disko.nixosModules.disko
|
||||
|
||||
# Misc
|
||||
# inputs.stylix.nixosModules.stylix
|
||||
|
||||
(map lib.custom.relativeToRoot [
|
||||
# Required configs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue