2020-05-26 16:43:19 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2020-05-26 17:27:54 +02:00
|
|
|
# Everything in here needs to work on linux or darwin
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2020-05-26 17:27:54 +02:00
|
|
|
|
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
|
|
|
|
zip unzip
|
|
|
|
tree
|
|
|
|
ncat
|
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
|
|
|
|
nix-review
|
|
|
|
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
|
|
|
|
'')
|
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";
|
|
|
|
hostname = "18.223.118.13";
|
|
|
|
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;
|
|
|
|
};
|
2020-05-26 16:43:19 +02:00
|
|
|
}
|