Add home manager to colmena
This commit is contained in:
parent
96e3db4a8b
commit
58a8ff88d5
32 changed files with 245 additions and 189 deletions
|
|
@ -154,7 +154,7 @@ in
|
|||
domainsList = [
|
||||
{
|
||||
domain = p.domains.public;
|
||||
email = p.email;
|
||||
email = p.personal.email;
|
||||
cloudflareApiKeyFile = config.age.secrets.cloudflare-pasetto-apiKey.path;
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -35,41 +35,17 @@ in
|
|||
virtualisation.proxmox.enable = true;
|
||||
};
|
||||
|
||||
# Extra packages
|
||||
environment = {
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
devenv
|
||||
git
|
||||
just
|
||||
zellij
|
||||
openssl
|
||||
nixfmt-rfc-style
|
||||
ripgrep
|
||||
];
|
||||
|
||||
interactiveShellInit = ''
|
||||
alias j='just'
|
||||
'';
|
||||
programs = {
|
||||
nix-ld.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
||||
direnv.enable = true;
|
||||
|
||||
# For VSCode Remote Development
|
||||
nix-ld.enable = true;
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
presets = [
|
||||
"nerd-font-symbols"
|
||||
];
|
||||
settings = {
|
||||
add_newline = true;
|
||||
container.disabled = true;
|
||||
nix_shell.disabled = false;
|
||||
};
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
users.${p.personal.username} = {
|
||||
imports = [ ../home.nix ];
|
||||
home.stateVersion = "25.11";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,6 @@
|
|||
}:
|
||||
let
|
||||
p = import ../parameters.nix;
|
||||
|
||||
homeParameters = {
|
||||
username = "pazpi";
|
||||
commonName = "Davide Pasetto";
|
||||
userEmail = "pasettodavide@gmail.com";
|
||||
extraPackages = [ ];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -35,7 +27,7 @@ in
|
|||
|
||||
desktopUser = {
|
||||
enable = true;
|
||||
userName = homeParameters.username;
|
||||
userName = p.personal.username;
|
||||
hashedPassword = "$y$j9T$dA94KVg1/jYLqclQQbTDk.$cnfxBWUN8P4shr8Kkipv5bU/RCtQNoAwYFDZ0X/BYs5";
|
||||
};
|
||||
|
||||
|
|
@ -73,10 +65,7 @@ in
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
users.${homeParameters.username} = import ./pazpi-home.nix;
|
||||
extraSpecialArgs = {
|
||||
inherit homeParameters;
|
||||
};
|
||||
users.${p.personal.username} = import ./pazpi-home.nix;
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Rome";
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
homeParameters,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.username = homeParameters.username;
|
||||
home.homeDirectory = "/home/${homeParameters.username}";
|
||||
|
||||
imports = [ ../../modules/home ];
|
||||
|
||||
programs.git = {
|
||||
userName = homeParameters.username;
|
||||
userEmail = homeParameters.userEmail;
|
||||
};
|
||||
|
||||
# set cursor size and dpi for 4k monitor
|
||||
xresources.properties = {
|
||||
"Xcursor.size" = 16;
|
||||
"Xft.dpi" = 172;
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
# TODO add your custom bashrc here
|
||||
bashrcExtra = ''
|
||||
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
||||
'';
|
||||
|
||||
# set some aliases, feel free to add more or remove some
|
||||
shellAliases = {
|
||||
k = "kubectl";
|
||||
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
|
||||
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update home Manager without changing this value. See
|
||||
# the home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
# Let home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
@ -54,6 +54,9 @@ let
|
|||
# Agenix for secrets
|
||||
agenix.nixosModules.default
|
||||
|
||||
# Home Manager
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
# Host-specific module
|
||||
hostModule
|
||||
]
|
||||
|
|
|
|||
135
hosts/home.nix
Normal file
135
hosts/home.nix
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
p = import ./parameters.nix;
|
||||
in
|
||||
{
|
||||
|
||||
home = {
|
||||
|
||||
username = p.personal.username;
|
||||
homeDirectory = "/home/${p.personal.username}";
|
||||
|
||||
shell.enableShellIntegration = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
agenix-cli
|
||||
devenv # Fast, Declarative, Reproducible, and Composable Developer Environments
|
||||
dive # Docker image explorer
|
||||
just # Command runner (modern make alternative)
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.overpass
|
||||
nodejs
|
||||
repgrep # Interactive ripgrep
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
shellAliases = {
|
||||
hm = "home-manager";
|
||||
hms = "home-manager switch";
|
||||
hmb = "home-manager build";
|
||||
g = "git";
|
||||
".." = "cd ../";
|
||||
"..." = "cd ../..";
|
||||
ls = "eza";
|
||||
j = "just";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
direnv.enable = true;
|
||||
fzf.enable = true;
|
||||
home-manager.enable = true;
|
||||
htop.enable = true;
|
||||
lazygit.enable = true;
|
||||
zellij.enable = true;
|
||||
zoxide.enable = true;
|
||||
|
||||
bash = {
|
||||
enable = true;
|
||||
shellOptions = [
|
||||
"histappend"
|
||||
"extglob"
|
||||
"globstar"
|
||||
"checkjobs"
|
||||
];
|
||||
};
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
colors = "auto";
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
git = true;
|
||||
icons = "auto";
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init.defaultBranch = "master";
|
||||
user = with p.personal; {
|
||||
name = commonName;
|
||||
email = email;
|
||||
};
|
||||
fetch.pruneTags = true;
|
||||
pull.rebase = false;
|
||||
};
|
||||
signing = {
|
||||
format = "ssh";
|
||||
key = "~/.ssh/id_ed25519.pub";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
nix_shell.disabled = false;
|
||||
container.disabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
uv = {
|
||||
enable = true;
|
||||
settings = {
|
||||
python-downloads = "never";
|
||||
python-preference = "only-system";
|
||||
};
|
||||
};
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"colmena.home" = {
|
||||
hostname = "colmena.home.pasetto.me";
|
||||
};
|
||||
"colmena-ts" = {
|
||||
hostname = "192.168.1.22";
|
||||
};
|
||||
"*" = {
|
||||
user = "pazpi";
|
||||
identityFile = "~/.ssh/id_ed25519";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -35,5 +35,9 @@ in
|
|||
librenms = "librenms.${private-domain}";
|
||||
collabora = "collabora.${private-domain}";
|
||||
};
|
||||
email = "davide@${public-domain}";
|
||||
personal = {
|
||||
username = "pazpi";
|
||||
commonName = "Davide Pasetto";
|
||||
email = "davide@${public-domain}";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue