Clean up home manager stuff
This commit is contained in:
parent
91c80de756
commit
96a6a21ecb
|
@ -1,11 +1,20 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.bat = {
|
|
||||||
enable = true;
|
options.nathans-home.bat = with lib; {
|
||||||
config = {
|
enable = mkOption {
|
||||||
theme = "zenburn";
|
type = types.bool;
|
||||||
style = "header,rule,snip,changes";
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.nathans-home.bat.enable {
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
theme = "zenburn";
|
||||||
|
style = "header,rule,snip,changes";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,56 +1,64 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
## Shell
|
options.nathans-home.fish = with lib; {
|
||||||
# Shell proper
|
enable = mkOption {
|
||||||
programs.fish = {
|
type = types.bool;
|
||||||
enable = true;
|
default = true;
|
||||||
# Setup our aliases
|
|
||||||
shellAliases = {
|
|
||||||
ls = "exa --icons";
|
|
||||||
la = "exa --icons -a";
|
|
||||||
lg = "exa --icons --git";
|
|
||||||
cat = "bat";
|
|
||||||
dig = "dog";
|
|
||||||
df = "duf";
|
|
||||||
};
|
|
||||||
# Custom configuration
|
|
||||||
interactiveShellInit = ''
|
|
||||||
# Setup any-nix-shell
|
|
||||||
any-nix-shell fish --info-right | source
|
|
||||||
# Load logger function
|
|
||||||
source ~/.config/fish/functions/cmdlogger.fish
|
|
||||||
'';
|
|
||||||
functions = {
|
|
||||||
# Setup command logging to ~/.logs
|
|
||||||
cmdlogger = {
|
|
||||||
onEvent = "fish_preexec";
|
|
||||||
body = ''
|
|
||||||
mkdir -p ~/.logs
|
|
||||||
echo (date -u +"%Y-%m-%dT%H:%M:%SZ")" "(echo %self)" "(pwd)": "$argv >> ~/.logs/(hostname)-(date "+%Y-%m-%d").log
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Starship, for the prompt
|
config = lib.mkIf config.nathans-home.fish.enable {
|
||||||
programs.starship = {
|
## Shell
|
||||||
enable = true;
|
# Shell proper
|
||||||
settings = {
|
programs.fish = {
|
||||||
directory = {
|
enable = true;
|
||||||
truncation_length = 3;
|
# Setup our aliases
|
||||||
fish_style_pwd_dir_length = 1;
|
shellAliases = {
|
||||||
|
ls = "exa --icons";
|
||||||
|
la = "exa --icons -a";
|
||||||
|
lg = "exa --icons --git";
|
||||||
|
cat = "bat";
|
||||||
|
dig = "dog";
|
||||||
|
df = "duf";
|
||||||
};
|
};
|
||||||
git_commit = {
|
# Custom configuration
|
||||||
commit_hash_length = 6;
|
interactiveShellInit = ''
|
||||||
only_detached = false;
|
# Setup any-nix-shell
|
||||||
|
any-nix-shell fish --info-right | source
|
||||||
|
# Load logger function
|
||||||
|
source ~/.config/fish/functions/cmdlogger.fish
|
||||||
|
'';
|
||||||
|
functions = {
|
||||||
|
# Setup command logging to ~/.logs
|
||||||
|
cmdlogger = {
|
||||||
|
onEvent = "fish_preexec";
|
||||||
|
body = ''
|
||||||
|
mkdir -p ~/.logs
|
||||||
|
echo (date -u +"%Y-%m-%dT%H:%M:%SZ")" "(echo %self)" "(pwd)": "$argv >> ~/.logs/(hostname)-(date "+%Y-%m-%d").log
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
package = {
|
};
|
||||||
symbol = "";
|
# Starship, for the prompt
|
||||||
};
|
programs.starship = {
|
||||||
time = {
|
enable = true;
|
||||||
disabled = false;
|
settings = {
|
||||||
format = "[$time]($style)";
|
directory = {
|
||||||
time_format = "%I:%M %p";
|
truncation_length = 3;
|
||||||
|
fish_style_pwd_dir_length = 1;
|
||||||
|
};
|
||||||
|
git_commit = {
|
||||||
|
commit_hash_length = 6;
|
||||||
|
only_detached = false;
|
||||||
|
};
|
||||||
|
package = {
|
||||||
|
symbol = "";
|
||||||
|
};
|
||||||
|
time = {
|
||||||
|
disabled = false;
|
||||||
|
format = "[$time]($style)";
|
||||||
|
time_format = "%I:%M %p";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,51 +1,60 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.ssh = {
|
options.nathans-home.ssh = with lib; {
|
||||||
# SSH configuration
|
enable = mkOption {
|
||||||
enable = true;
|
type = types.bool;
|
||||||
# extra config to set the ciphers
|
default = true;
|
||||||
extraConfig = ''
|
};
|
||||||
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
};
|
||||||
'';
|
|
||||||
# enable session reuse
|
config = lib.mkIf config.nathans-home.ssh.enable {
|
||||||
controlMaster = "auto";
|
programs.ssh = {
|
||||||
controlPersist = "10m";
|
# SSH configuration
|
||||||
# Configure known hosts
|
enable = true;
|
||||||
matchBlocks = {
|
# extra config to set the ciphers
|
||||||
"levitation" = {
|
extraConfig = ''
|
||||||
forwardAgent = true;
|
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||||
user = "nathan";
|
'';
|
||||||
hostname = "172.23.12.134";
|
# enable session reuse
|
||||||
};
|
controlMaster = "auto";
|
||||||
"perception" = {
|
controlPersist = "10m";
|
||||||
forwardAgent = true;
|
# Configure known hosts
|
||||||
user = "nathan";
|
matchBlocks = {
|
||||||
hostname = "172.23.55.145";
|
"levitation" = {
|
||||||
};
|
forwardAgent = true;
|
||||||
"oracles" = {
|
user = "nathan";
|
||||||
forwardAgent = true;
|
hostname = "100.95.223.6";
|
||||||
user = "nathan";
|
};
|
||||||
hostname = "172.23.108.12";
|
"perception" = {
|
||||||
};
|
forwardAgent = true;
|
||||||
"tounge" = {
|
user = "nathan";
|
||||||
forwardAgent = true;
|
hostname = "100.67.146.101";
|
||||||
user = "nathan";
|
};
|
||||||
hostname = "172.23.98.121";
|
"oracles" = {
|
||||||
};
|
forwardAgent = true;
|
||||||
"shadowchild" = {
|
user = "nathan";
|
||||||
forwardAgent = true;
|
hostname = "100.66.15.34";
|
||||||
user = "nathan";
|
};
|
||||||
hostname = "172.23.217.149";
|
"tounge" = {
|
||||||
};
|
forwardAgent = true;
|
||||||
"matrix.community.rs" = {
|
user = "nathan";
|
||||||
forwardAgent = true;
|
hostname = "172.23.98.121";
|
||||||
user = "nathan";
|
};
|
||||||
hostname = "172.23.129.209";
|
"shadowchild" = {
|
||||||
};
|
forwardAgent = true;
|
||||||
"de1955" = {
|
user = "nathan";
|
||||||
user = "de1955";
|
hostname = "172.23.217.149";
|
||||||
hostname = "de1955.rsync.net";
|
};
|
||||||
|
"matrix.community.rs" = {
|
||||||
|
forwardAgent = true;
|
||||||
|
user = "nathan";
|
||||||
|
hostname = "100.113.74.107";
|
||||||
|
};
|
||||||
|
"de1955" = {
|
||||||
|
user = "de1955";
|
||||||
|
hostname = "de1955.rsync.net";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
domain = "mccarty.io";
|
domain = "mccarty.io";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces.enp5s0.useDHCP = true;
|
interfaces.enp5s0.useDHCP = true;
|
||||||
|
nat.externalInterface = "enp5s0";
|
||||||
};
|
};
|
||||||
###
|
###
|
||||||
## Enable programs we don't want on every machine
|
## Enable programs we don't want on every machine
|
||||||
|
|
|
@ -7,4 +7,11 @@
|
||||||
# Automatically prune to keep things lean
|
# Automatically prune to keep things lean
|
||||||
autoPrune.enable = true;
|
autoPrune.enable = true;
|
||||||
};
|
};
|
||||||
|
# Setup networking for nixos containers
|
||||||
|
networking = {
|
||||||
|
nat = {
|
||||||
|
enable = true;
|
||||||
|
internalInterfaces = [ "ve-+" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,10 @@
|
||||||
groupBy = "app-name";
|
groupBy = "app-name";
|
||||||
# Bottom right corner
|
# Bottom right corner
|
||||||
anchor = "bottom-right";
|
anchor = "bottom-right";
|
||||||
|
# Maximum visible notifications
|
||||||
|
maxVisible = 10;
|
||||||
|
# Sort by time in descending order (newest first)
|
||||||
|
sort = "-time";
|
||||||
};
|
};
|
||||||
# Swayidle for automatic screen locking
|
# Swayidle for automatic screen locking
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
|
|
Loading…
Reference in New Issue