Compare commits
12 commits
4489dc9d09
...
d184d54b07
Author | SHA1 | Date | |
---|---|---|---|
d184d54b07 | |||
3514b47d11 | |||
7024fb9765 | |||
1b576d6245 | |||
20c1f2296f | |||
23e1ae7967 | |||
edc1b7d026 | |||
a3e65e1f97 | |||
2ad55a75ca | |||
957607a5bc | |||
90e6ae6f67 | |||
0d621743cd |
7 changed files with 77 additions and 3 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake . --no-pure-eval
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.devenv
|
||||
.direnv
|
|
@ -52,9 +52,11 @@
|
|||
}
|
||||
);
|
||||
|
||||
# Base dev shell
|
||||
devenv.shells.default = {
|
||||
imports = [ "${self}/shells/base.nix" ];
|
||||
imports = [
|
||||
"${self}/shells/base.nix"
|
||||
"${self}/shells/nix.nix"
|
||||
];
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
./neofetch.nix
|
||||
./rbw.nix
|
||||
./ripgrep.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./tmux.nix
|
||||
./topgrade.nix
|
||||
|
|
22
home/programs/ssh.nix
Normal file
22
home/programs/ssh.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
# Equivalent of ~/.ssh/config
|
||||
# %d - local user's home directory
|
||||
# %r - remote username
|
||||
matchBlocks = {
|
||||
"tty.marleycentre" = {
|
||||
hostname = "admin.punkfairie.net";
|
||||
identityFile = "%d/.ssh/%r@marleycentre";
|
||||
};
|
||||
|
||||
"tty.marleynet" = {
|
||||
hostname = "10.69.69.2";
|
||||
port = 222;
|
||||
identityFile = "%d/.ssh/%r@marleynet";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,42 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
packages = with pkgs; [
|
||||
nix-direnv
|
||||
gnupg
|
||||
git
|
||||
bitwarden-cli
|
||||
];
|
||||
|
||||
scripts.download_gpg_key.exec = # bash
|
||||
''
|
||||
if ! bw login --check; then
|
||||
echo "Please run `bw login`"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bw sync && \
|
||||
bw get attachment private.key --itemid 335ce92f-974a-44d4-bc1c-b226005203f3 --output private.key && \
|
||||
echo "Please run `set_gpg_tty && import_gpg_key`"
|
||||
'';
|
||||
|
||||
scripts.set_gpg_tty.exec = # bash
|
||||
''
|
||||
export GPG_TTY="$(tty)"
|
||||
'';
|
||||
|
||||
scripts.import_gpg_key.exec = # bash
|
||||
''
|
||||
exec gpg --import private.key
|
||||
'';
|
||||
|
||||
scripts.gpg_no_pinentry.exec = # bash
|
||||
''
|
||||
pkill gpg-agent
|
||||
gpg-agent --pinentry-program=/usr/bin/pinentry-curses --daemon
|
||||
'';
|
||||
|
||||
scripts.git_allow_push.exec = # bash
|
||||
''
|
||||
git config http.version HTTP/1.1
|
||||
'';
|
||||
}
|
||||
|
|
8
shells/nix.nix
Normal file
8
shells/nix.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
languages.nix.enable = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue