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