summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/common.nix78
-rw-r--r--lib/emacs.nix9
-rw-r--r--lib/packages.nix125
-rw-r--r--lib/ssh.nix76
-rw-r--r--profiles/darwin.nix28
-rw-r--r--profiles/groq.nix4
-rw-r--r--profiles/laptop.nix2
-rw-r--r--profiles/workshop.nix2
8 files changed, 174 insertions, 150 deletions
diff --git a/lib/common.nix b/lib/common.nix
index b51d3fe..011e7e7 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -7,7 +7,6 @@ let
in
{
home = {
- packages = import ./packages.nix { inherit pkgs; };
sessionVariables = {
GPGID = gpgid;
EDITOR = "vim";
@@ -148,7 +147,11 @@ in
for f in extrakto.sh open.sh tmux-extrakto.sh; do
wrapProgram $target/scripts/$f \
--prefix PATH : ${with pkgs; lib.makeBinPath (
- [pkgs.fzf pkgs.python3 pkgs.xclip]
+ [
+ pkgs.fzf
+ pkgs.python3
+ pkgs.xclip
+ ]
)}
done
'';
@@ -202,72 +205,6 @@ in
#shading = 10;
};
- ssh = {
- enable = true;
- forwardAgent = true;
- extraConfig = ''
- StrictHostKeyChecking=accept-new
-
- # sft ssh-config
- Match exec "/usr/local/bin/sft resolve -q %h"
- ProxyCommand "/usr/local/bin/sft" proxycommand %h
- UserKnownHostsFile "/Users/bsima/Library/Application Support/ScaleFT/proxycommand_known_hosts"
- '';
- matchBlocks = {
- "github.com" = {
- hostname = "github.com";
- user = "git";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
- identitiesOnly = true;
- };
-
- # groq
- "groq" = {
- hostname = "bsima"; # must be on vpn
- user = "bsima";
- identityFile = [ "${homedir}/.ssh/groq" ];
- identitiesOnly = true;
- };
-
- # simatime
- "sabten" = {
- hostname = "142.93.81.26";
- user = "root";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
- identitiesOnly = true;
- };
- "serval.simatime.com" = {
- hostname = "serval.simatime.com";
- user = "ben";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
- identitiesOnly = true;
- };
- "simatime.com" = {
- hostname = "simatime.com";
- user = "git";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
- identitiesOnly = true;
- };
- "lithium" = {
- hostname = "192.168.1.9";
- user = "ben";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
- identitiesOnly = true;
- };
- "dev.simatime.com" = {
- user = "ben";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
- identitiesOnly = true;
- };
- "git.platonic.systems" = {
- hostname = "git.platonic.systems";
- user = "git";
- identityFile = [ "${homedir}/.ssh/platonic.systems" ];
- identitiesOnly = true;
- };
- };
- };
-
direnv = {
enable = true;
};
@@ -420,10 +357,5 @@ in
"v." = "vim .";
};
};
-
- emacs = {
- enable = true;
- extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
- };
};
}
diff --git a/lib/emacs.nix b/lib/emacs.nix
new file mode 100644
index 0000000..df7b036
--- /dev/null
+++ b/lib/emacs.nix
@@ -0,0 +1,9 @@
+{ ... }:
+
+{
+ programs.emacs = {
+ enable = true;
+ extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
+ };
+}
+
diff --git a/lib/packages.nix b/lib/packages.nix
index 41acbef..e73eafc 100644
--- a/lib/packages.nix
+++ b/lib/packages.nix
@@ -1,4 +1,4 @@
-{ pkgs }:
+{ pkgs, ... }:
# All common packages go here. Linux-specific should go in `linux.nix'
@@ -19,64 +19,65 @@ let
cp ./zebra $out/bin
'';
};
-in [
-asciinema
-ag
-amfora
-aspellDicts.en
-bat
-bc
-cabal2nix
-cloc
-cmatrix
-ctags
-dhall
-direnv
-entr
-eternal-terminal
-expect
-fd
-figlet
-file
-font-awesome_5
-gitAndTools.stgit
-git-lfs
-git-revise
-github-cli
-hashcash
-htop
-httpstat
-ispell
-jq
-lsof
-material-icons
-mononoki
-mpc_cli
-ncdu
-ncmpc
-nix-prefetch-scripts
-nixos-generators
-noto-fonts-emoji
-opentimestamps-client
-ormolu
-paperkey
-pass
-perlPackages.GitAutofixup
-pianobar
-pup
-pwgen
-python37Packages.black
-ranger
-ripgrep
-shellcheck
-tmux
-tree
-unrar
-unzip
-urlscan
-vimpager
-w3m
-whois
-zebra
-zip
-]
+in {
+ home.packages = [
+ asciinema
+ ag
+ amfora
+ aspellDicts.en
+ bat
+ bc
+ cabal2nix
+ cloc
+ cmatrix
+ ctags
+ dhall
+ direnv
+ entr
+ eternal-terminal
+ expect
+ fd
+ figlet
+ file
+ font-awesome_5
+ gitAndTools.stgit
+ git-lfs
+ git-revise
+ github-cli
+ hashcash
+ htop
+ httpstat
+ ispell
+ jq
+ lsof
+ material-icons
+ mononoki
+ mpc_cli
+ ncdu
+ ncmpc
+ nix-prefetch-scripts
+ nixos-generators
+ noto-fonts-emoji
+ opentimestamps-client
+ ormolu
+ paperkey
+ pass
+ perlPackages.GitAutofixup
+ pianobar
+ pup
+ pwgen
+ ranger
+ ripgrep
+ shellcheck
+ tmux
+ tree
+ unrar
+ unzip
+ urlscan
+ vimpager
+ w3m
+ whois
+ zebra
+ zip
+ ];
+}
diff --git a/lib/ssh.nix b/lib/ssh.nix
new file mode 100644
index 0000000..9cbb05b
--- /dev/null
+++ b/lib/ssh.nix
@@ -0,0 +1,76 @@
+{ ... }:
+
+let
+ homedir = builtins.getEnv "HOME";
+in {
+ programs.ssh = {
+ enable = true;
+ forwardAgent = true;
+ extraConfig = ''
+ StrictHostKeyChecking=accept-new
+
+ # sft ssh-config
+ Match exec "/usr/local/bin/sft resolve -q %h"
+ ProxyCommand "/usr/local/bin/sft" proxycommand %h
+ UserKnownHostsFile "/Users/bsima/Library/Application Support/ScaleFT/proxycommand_known_hosts"
+ '';
+ matchBlocks = {
+ "github.com" = {
+ hostname = "github.com";
+ user = "git";
+ identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identitiesOnly = true;
+ };
+
+ # groq
+ "groq" = {
+ hostname = "bsima"; # must be on vpn
+ user = "bsima";
+ identityFile = [ "${homedir}/.ssh/groq" ];
+ identitiesOnly = true;
+ forwardAgent = true;
+ extraOptions = {
+ #"RemoteCommand" = "tmux -CC new -As0";
+ "RequestTTY" = "force";
+ };
+ };
+
+ # simatime
+ "sabten" = {
+ hostname = "142.93.81.26";
+ user = "root";
+ identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identitiesOnly = true;
+ };
+ "serval.simatime.com" = {
+ hostname = "serval.simatime.com";
+ user = "ben";
+ identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identitiesOnly = true;
+ };
+ "simatime.com" = {
+ hostname = "simatime.com";
+ user = "git";
+ identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identitiesOnly = true;
+ };
+ "lithium" = {
+ hostname = "192.168.1.9";
+ user = "ben";
+ identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identitiesOnly = true;
+ };
+ "dev.simatime.com" = {
+ user = "ben";
+ identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identitiesOnly = true;
+ };
+ "git.platonic.systems" = {
+ hostname = "git.platonic.systems";
+ user = "git";
+ identityFile = [ "${homedir}/.ssh/platonic.systems" ];
+ identitiesOnly = true;
+ };
+ };
+ };
+}
diff --git a/profiles/darwin.nix b/profiles/darwin.nix
index c221e9e..9640d22 100644
--- a/profiles/darwin.nix
+++ b/profiles/darwin.nix
@@ -2,29 +2,29 @@
let
homedir = builtins.getEnv "HOME";
- haskellOverlay = self: super: {
- haskellPackages = super.haskellPackages.override (old: {
- overrides = self: super: {
- hledger = self.callPackage ./pkgs/hledger-1.19.1.nix {};
- hledger-lib = self.callPackage ./pkgs/hledger-lib-1.19.1.nix {};
- };
- });
- };
+ #haskellOverlay = self: super: {
+ # haskellPackages = super.haskellPackages.override (old: {
+ # overrides = self: super: {
+ # hledger = self.callPackage ./pkgs/hledger-1.19.1.nix {};
+ # hledger-lib = self.callPackage ./pkgs/hledger-lib-1.19.1.nix {};
+ # };
+ # });
+ #};
in
{
nixpkgs.overlays = [
- haskellOverlay
+ #haskellOverlay
];
imports = [
- ./lib/common.nix
- ./lib/email.nix
+ ../lib/common.nix
+ #../lib/email.nix
+ ../lib/ssh.nix
];
home = {
- sessionVariables.PATH = "/usr/local/opt/mysql@5.7/bin:${homedir}/bin:${homedir}/.cabal/bin:${homedir}/.local/bin:$PATH";
packages = with pkgs; [
- muchsync
- (haskellPackages.ghcWithPackages (ps: with ps; [hledger]))
+ #muchsync
+ #(haskellPackages.ghcWithPackages (ps: with ps; [hledger]))
coreutils
];
};
diff --git a/profiles/groq.nix b/profiles/groq.nix
index d1214b3..dc7df02 100644
--- a/profiles/groq.nix
+++ b/profiles/groq.nix
@@ -5,7 +5,9 @@ let
in
{
imports = [
- ./common.nix
+ ../lib/common.nix
+ ../lib/packages.nix
+ ../lib/ssh.nix
];
accounts = {
diff --git a/profiles/laptop.nix b/profiles/laptop.nix
index e8bdbba..6104901 100644
--- a/profiles/laptop.nix
+++ b/profiles/laptop.nix
@@ -4,6 +4,8 @@
{
imports = [
../lib/linux.nix
+ ../lib/ssh.nix
+ ../lib/packages.nix
];
home = {
packages = [
diff --git a/profiles/workshop.nix b/profiles/workshop.nix
index 0691b61..25d2d9f 100644
--- a/profiles/workshop.nix
+++ b/profiles/workshop.nix
@@ -4,6 +4,8 @@
{
imports = [
../lib/linux.nix
+ ../lib/ssh.nix
+ ../lib/packages.nix
];
home = {
sessionVariables = {