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
|
2023-10-23 20:51:21 +02:00
|
|
|
# ../modules/development.nix
|
2020-05-26 16:43:19 +02:00
|
|
|
../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
|
|
|
];
|
|
|
|
|
2024-03-31 20:11:01 +02:00
|
|
|
home.username = "aspen";
|
|
|
|
home.homeDirectory = "/home/aspen";
|
2022-01-29 18:56:54 +01:00
|
|
|
|
2020-05-26 16:43:19 +02:00
|
|
|
programs.password-store.enable = true;
|
|
|
|
|
2024-03-31 20:11:01 +02:00
|
|
|
aspen.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
|
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
|
2024-09-01 00:03:16 +02:00
|
|
|
nixfmt-classic
|
2020-05-26 16:43:19 +02:00
|
|
|
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
|
2024-02-12 04:00:40 +01:00
|
|
|
nix build -f . users.aspen.system.system.mugwumpSystem -o /tmp/mugwump
|
|
|
|
nix copy -f . users.aspen.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
|
2024-02-12 04:00:40 +01:00
|
|
|
nix build -f . users.aspen.system.system.roswellSystem -o /tmp/roswell
|
|
|
|
nix copy -f . users.aspen.system.system.roswellSystem \
|
2022-05-31 21:34:33 +02:00
|
|
|
--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
|
2024-04-19 14:59:05 +02:00
|
|
|
home=$(nix-build -A users.aspen.system.home.$(hostname)Home -o /tmp/home)
|
|
|
|
nix-env -p /nix/var/nix/per-user/aspen/home --set $home
|
|
|
|
$home/activate
|
2021-04-12 17:07:55 +02:00
|
|
|
'')
|
2020-05-26 16:43:19 +02:00
|
|
|
];
|
2020-09-30 05:42:59 +02:00
|
|
|
|
2024-04-19 14:59:05 +02:00
|
|
|
programs.ssh = { enable = true; };
|
2020-11-25 15:59:11 +01:00
|
|
|
|
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
enableBashIntegration = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
};
|
2020-05-26 16:43:19 +02:00
|
|
|
}
|