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;
|
programs.ssh.enable = true;
|
||||||
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";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
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 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
self,
|
home.packages = with pkgs; [bat ripgrep];
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
encryptedUSBData = import "${self}/data/drives/encryptedUSB.nix";
|
|
||||||
in {
|
|
||||||
home.packages = with pkgs; [eza bat ripgrep vault-bin libarchive age];
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
|
@ -16,27 +10,17 @@ in {
|
||||||
plugins = [];
|
plugins = [];
|
||||||
};
|
};
|
||||||
shellAliases = {
|
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";
|
ip6 = "ip -6";
|
||||||
|
|
||||||
sys = "systemctl";
|
sys = "systemctl";
|
||||||
sysu = "systemctl --user";
|
sysu = "systemctl --user";
|
||||||
logu = "journalctl --user";
|
|
||||||
log = "journalctl";
|
log = "journalctl";
|
||||||
|
logu = "journalctl --user";
|
||||||
|
|
||||||
dmesg = "dmesg -HP";
|
dmesg = "dmesg -HP";
|
||||||
|
|
||||||
hg = "history 0 | rg";
|
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 = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -4,4 +4,6 @@
|
||||||
zip
|
zip
|
||||||
p7zip
|
p7zip
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.zsh.shellAliases.tar = "bsdtar";
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,6 @@
|
||||||
programs.vscode-mod.userSettings = {
|
programs.vscode-mod.userSettings = {
|
||||||
"alejandra.program" = "alejandra";
|
"alejandra.program" = "alejandra";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases.nixdirfmt = "alejandra . && statix fix . && deadnix -e .";
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ in {
|
||||||
musicSync
|
musicSync
|
||||||
#soulseek # takes up too much ram :(
|
#soulseek # takes up too much ram :(
|
||||||
]);
|
]);
|
||||||
home-manager.users.root.imports = with tree; [ home.apps.musicutil ];
|
home-manager.users.root.imports = with tree; [home.apps.musicutil];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = with ports; [
|
networking.firewall.allowedTCPPorts = with ports; [
|
||||||
mpd
|
mpd
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.root = {
|
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 = {
|
networking.firewall = {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.root = {
|
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 = {
|
networking.firewall = {
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
netmask = "255.255.255.255";
|
netmask = "255.255.255.255";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue