tidy and seperate some base home-manager profiles and presets
This commit is contained in:
parent
79b4c2f1ff
commit
09bc397a1d
15
home/apps/age.nix
Normal file
15
home/apps/age.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
encryptedUSBData = import "${self}/data/drives/encryptedUSB.nix";
|
||||
in {
|
||||
home.packages = with pkgs; [age];
|
||||
|
||||
programs.zsh.shellAliases = {
|
||||
chaos_age = "age -i ${encryptedUSBData.chaosAgePrivateKeyPath}";
|
||||
chaos_age_encrypt = "age -a -e -i ${encryptedUSBData.chaosAgePrivateKeyPath}";
|
||||
chaos_pub = "cat ${encryptedUSBData.chaosAgePublicKeyPath}";
|
||||
};
|
||||
}
|
5
home/base/age-encryption.nix
Normal file
5
home/base/age-encryption.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{tree, ...}: {
|
||||
imports = with tree; [
|
||||
home.apps.age
|
||||
];
|
||||
}
|
21
home/base/ssh-aliases.nix
Normal file
21
home/base/ssh-aliases.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.modules) mkMerge;
|
||||
in {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = mkMerge [
|
||||
(mkMerge (map (hostname: {
|
||||
"${hostname}" = {
|
||||
user = "root";
|
||||
hostname = "${hostname}.servers.genderfucked.monster";
|
||||
};
|
||||
}) ["hetzner-arm" "hetzner-arm-decrypt" "vault" "vault-decrypt" "raspberry"]))
|
||||
{
|
||||
"blahaj" = {
|
||||
user = "chaos";
|
||||
hostname = "blahaj.sapphicco.de";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,21 +1,3 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.modules) mkMerge;
|
||||
in {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = mkMerge [
|
||||
(mkMerge (map (hostname: {
|
||||
"${hostname}" = {
|
||||
user = "root";
|
||||
hostname = "${hostname}.servers.genderfucked.monster";
|
||||
};
|
||||
}) ["hetzner-arm" "hetzner-arm-decrypt" "vault" "vault-decrypt" "raspberry"]))
|
||||
{
|
||||
"blahaj" = {
|
||||
user = "chaos";
|
||||
hostname = "blahaj.sapphicco.de";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
{...}: {
|
||||
programs.ssh.enable = true;
|
||||
}
|
||||
|
|
11
home/base/vault.nix
Normal file
11
home/base/vault.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [vault-bin];
|
||||
|
||||
programs.zsh.envExtra = ''
|
||||
export VAULT_ADDR="https://vault.owo.monster"
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
VAULT_ADDR = "https://vault.owo.monster";
|
||||
};
|
||||
}
|
|
@ -1,11 +1,5 @@
|
|||
{
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
encryptedUSBData = import "${self}/data/drives/encryptedUSB.nix";
|
||||
in {
|
||||
home.packages = with pkgs; [eza bat ripgrep vault-bin libarchive age];
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [bat ripgrep];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
@ -16,27 +10,17 @@ in {
|
|||
plugins = [];
|
||||
};
|
||||
shellAliases = {
|
||||
nixdirfmt = "alejandra . && statix fix . && deadnix -e .";
|
||||
tar = "bsdtar";
|
||||
exa = "eza";
|
||||
eza = "eza --time-style long-iso";
|
||||
la = "eza -Ga";
|
||||
ll = "eza -l";
|
||||
lla = "eza -lga";
|
||||
ip6 = "ip -6";
|
||||
|
||||
sys = "systemctl";
|
||||
sysu = "systemctl --user";
|
||||
logu = "journalctl --user";
|
||||
log = "journalctl";
|
||||
logu = "journalctl --user";
|
||||
|
||||
dmesg = "dmesg -HP";
|
||||
|
||||
hg = "history 0 | rg";
|
||||
chaos_age = "age -i ${encryptedUSBData.chaosAgePrivateKeyPath}";
|
||||
chaos_age_encrypt = "age -a -e -i ${encryptedUSBData.chaosAgePrivateKeyPath}";
|
||||
chaos_pub = "cat ${encryptedUSBData.chaosAgePublicKeyPath}";
|
||||
};
|
||||
envExtra = ''
|
||||
export VAULT_ADDR="https://vault.owo.monster"
|
||||
'';
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
|
|
@ -4,4 +4,6 @@
|
|||
zip
|
||||
p7zip
|
||||
];
|
||||
|
||||
programs.zsh.shellAliases.tar = "bsdtar";
|
||||
}
|
||||
|
|
|
@ -13,4 +13,6 @@
|
|||
programs.vscode-mod.userSettings = {
|
||||
"alejandra.program" = "alejandra";
|
||||
};
|
||||
|
||||
programs.zsh.shellAliases.nixdirfmt = "alejandra . && statix fix . && deadnix -e .";
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
];
|
||||
|
||||
home-manager.users.root = {
|
||||
imports = with tree; [home.base home.dev.small];
|
||||
imports = with tree; [home.base.zsh home.base.age-encyption home.dev.small];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
];
|
||||
|
||||
home-manager.users.root = {
|
||||
imports = with tree; [home.base home.dev.small];
|
||||
imports = with tree; [home.base.zsh home.base.age-encyption home.dev.small];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
netmask = "255.255.255.255";
|
||||
in {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue