2020-05-26 16:43:19 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2022-05-31 21:34:33 +02:00
|
|
|
# Everything in here needs to work on linux or darwin, with or without a desktop
|
|
|
|
# environment
|
2020-05-26 17:27:54 +02:00
|
|
|
|
2020-05-26 16:43:19 +02:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../modules/shell.nix
|
|
|
|
../modules/development.nix
|
|
|
|
../modules/emacs.nix
|
|
|
|
../modules/vim.nix
|
|
|
|
../modules/tarsnap.nix
|
2020-06-03 22:29:05 +02:00
|
|
|
../modules/twitter.nix
|
2020-05-26 17:27:54 +02:00
|
|
|
../modules/lib/cloneRepo.nix
|
2020-05-26 16:43:19 +02:00
|
|
|
];
|
|
|
|
|
2022-05-26 14:44:11 +02:00
|
|
|
home.username = "grfn";
|
2022-01-29 18:56:54 +01:00
|
|
|
home.homeDirectory = "/home/grfn";
|
|
|
|
|
2020-05-26 16:43:19 +02:00
|
|
|
programs.password-store.enable = true;
|
|
|
|
|
2020-05-26 17:27:54 +02:00
|
|
|
grfn.impure.clonedRepos.passwordStore = {
|
2020-05-26 16:43:19 +02:00
|
|
|
github = "glittershark/pass";
|
|
|
|
path = ".local/share/password-store";
|
|
|
|
};
|
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
2020-05-26 17:27:54 +02:00
|
|
|
# System utilities
|
|
|
|
bat
|
2020-05-26 16:43:19 +02:00
|
|
|
htop
|
|
|
|
killall
|
|
|
|
bind
|
2022-01-30 17:06:58 +01:00
|
|
|
zip
|
|
|
|
unzip
|
2020-05-26 16:43:19 +02:00
|
|
|
tree
|
2022-03-13 17:19:07 +01:00
|
|
|
nmap
|
2020-06-03 22:29:22 +02:00
|
|
|
bc
|
2020-09-30 00:01:33 +02:00
|
|
|
pv
|
2020-05-26 16:43:19 +02:00
|
|
|
|
2020-05-26 17:27:54 +02:00
|
|
|
# Security
|
2020-05-26 16:43:19 +02:00
|
|
|
gnupg
|
|
|
|
keybase
|
|
|
|
openssl
|
|
|
|
|
|
|
|
# Nix things
|
|
|
|
nixfmt
|
|
|
|
nix-prefetch-github
|
2022-09-26 19:33:05 +02:00
|
|
|
nixpkgs-review
|
2020-05-26 16:43:19 +02:00
|
|
|
cachix
|
2021-03-28 23:16:45 +02:00
|
|
|
(writeShellScriptBin "rebuild-mugwump" ''
|
|
|
|
set -eo pipefail
|
|
|
|
cd ~/code/depot
|
2021-04-11 23:53:27 +02:00
|
|
|
nix build -f . users.grfn.system.system.mugwumpSystem -o /tmp/mugwump
|
|
|
|
nix copy -f . users.grfn.system.system.mugwumpSystem \
|
2021-03-28 23:16:45 +02:00
|
|
|
--to ssh://mugwump
|
|
|
|
system=$(readlink -ef /tmp/mugwump)
|
|
|
|
ssh mugwump sudo nix-env -p /nix/var/nix/profiles/system --set $system
|
|
|
|
ssh mugwump sudo $system/bin/switch-to-configuration switch
|
2022-05-31 21:34:33 +02:00
|
|
|
rm /tmp/mugwump
|
|
|
|
'')
|
|
|
|
(writeShellScriptBin "rebuild-roswell" ''
|
|
|
|
set -eo pipefail
|
|
|
|
cd ~/code/depot
|
|
|
|
nix build -f . users.grfn.system.system.roswellSystem -o /tmp/roswell
|
|
|
|
nix copy -f . users.grfn.system.system.roswellSystem \
|
|
|
|
--to ssh://roswell
|
|
|
|
system=$(readlink -ef /tmp/roswell)
|
|
|
|
ssh roswell sudo nix-env -p /nix/var/nix/profiles/system --set $system
|
|
|
|
ssh roswell sudo $system/bin/switch-to-configuration switch
|
|
|
|
rm /tmp/roswell
|
2021-03-28 23:16:45 +02:00
|
|
|
'')
|
2021-04-12 17:07:55 +02:00
|
|
|
(writeShellScriptBin "rebuild-home" ''
|
|
|
|
set -eo pipefail
|
|
|
|
cd ~/code/depot
|
|
|
|
nix build -f . users.grfn.system.home.$(hostname)Home -o /tmp/home
|
|
|
|
/tmp/home/activate
|
|
|
|
'')
|
2020-05-26 16:43:19 +02:00
|
|
|
];
|
2020-09-30 05:42:59 +02:00
|
|
|
|
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
matchBlocks = {
|
2020-10-05 16:43:19 +02:00
|
|
|
"home" = {
|
|
|
|
host = "home.gws.fyi";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
|
|
|
|
2020-09-30 05:42:59 +02:00
|
|
|
"dobharchu" = {
|
|
|
|
host = "dobharchu";
|
|
|
|
hostname = "172.16.0.4";
|
|
|
|
forwardAgent = true;
|
|
|
|
user = "griffin";
|
|
|
|
};
|
|
|
|
|
2020-10-27 21:52:34 +01:00
|
|
|
"cerberus" = {
|
|
|
|
host = "cerberus";
|
|
|
|
hostname = "172.16.0.3";
|
|
|
|
forwardAgent = true;
|
|
|
|
user = "griffin";
|
|
|
|
};
|
|
|
|
|
2020-09-30 05:42:59 +02:00
|
|
|
"mugwump" = {
|
|
|
|
host = "mugwump";
|
|
|
|
hostname = "172.16.0.5";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
2020-12-14 18:44:31 +01:00
|
|
|
|
|
|
|
"roswell" = {
|
|
|
|
host = "roswell";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
2020-09-30 05:42:59 +02:00
|
|
|
};
|
|
|
|
};
|
2020-11-25 15:59:11 +01:00
|
|
|
|
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
enableBashIntegration = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
};
|
2023-05-15 16:08:33 +02:00
|
|
|
|
|
|
|
services.dropbox = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2020-05-26 16:43:19 +02:00
|
|
|
}
|