dotfiles/nixos/boxes/form3/default.nix

71 lines
2.1 KiB
Nix
Raw Normal View History

2022-12-19 09:09:08 +00:00
{
config,
pkgs,
inputs,
lib,
nixpkgs-nixos-unstable-and-unfree,
...
}: let
2022-10-05 14:04:38 +01:00
system_cert_bundle_path = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
form3_cert_path = ./form3-palo-alto.pem;
2022-12-19 09:09:08 +00:00
form3_cert_bundle =
builtins.toFile "form3-cert-bundle.crt"
2022-10-05 14:04:38 +01:00
(builtins.readFile system_cert_bundle_path
+ builtins.readFile form3_cert_path);
in {
2022-12-19 09:09:08 +00:00
environment.systemPackages = with pkgs; [vim nixfmt];
2022-03-20 10:36:18 +00:00
2022-12-19 09:09:08 +00:00
imports = [../../git ../../mercurial];
2022-03-20 10:36:18 +00:00
services.nix-daemon.enable = true;
nix = {
useDaemon = true;
gc.automatic = true;
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
2022-05-06 11:16:40 +01:00
fonts.fontDir.enable = true;
2022-03-20 10:36:18 +00:00
fonts.fonts = with pkgs; [
2022-12-19 09:09:08 +00:00
(runCommand "berkeley-fonts" {} ''
2022-11-16 14:21:48 +00:00
mkdir -vp "$out/share/fonts/opentype"
mkdir -vp "$out/share/fonts/truetype"
2022-12-19 09:09:08 +00:00
${pkgs.unzip}/bin/unzip ${../../fonts.zip} \*.otf -d $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip ${../../fonts.zip} \*.ttf -d $out/share/fonts/truetype
2022-11-16 14:21:48 +00:00
'')
2022-06-29 16:08:58 +01:00
nerdfonts
2022-03-20 10:36:18 +00:00
fira-code
font-awesome
material-icons
powerline-fonts
source-code-pro
weather-icons
];
2022-12-19 09:09:08 +00:00
security.pki.certificateFiles = [form3_cert_path system_cert_bundle_path];
2022-03-20 10:36:18 +00:00
environment.variables = {
2022-10-05 14:18:23 +01:00
SSL_CERT_FILE = form3_cert_bundle;
2022-10-05 14:04:38 +01:00
NIX_SSL_CERT_FILE = form3_cert_bundle;
BUNDLE_SSL_CA_CERT = form3_cert_bundle;
CARGO_NET_GIT_FETCH_WITH_CLI = "true";
2022-03-20 10:36:18 +00:00
};
2022-10-05 14:04:38 +01:00
programs.zsh.enable = true;
2022-03-20 10:36:18 +00:00
system.stateVersion = 4;
2022-12-19 09:09:08 +00:00
home-manager.users.cyryl = {...}: {
imports = [];
home.packages = with pkgs; [awscli kubectl cargo-update];
2022-03-20 10:44:52 +00:00
programs.git.userEmail = lib.mkForce "cyryl.plotnicki@form3.tech";
2022-12-19 09:09:08 +00:00
programs.git.extraConfig.user.signingkey = "6441B1BC81F8FB1561C9AFF5534222210FE423ED";
2022-03-20 11:07:43 +00:00
programs.git.extraConfig.commit.gpgsign = true;
2022-12-19 09:09:08 +00:00
programs.git.extraConfig."url \"git@github.com:\"".insteadOf = "https://github.com/";
2022-03-20 11:07:43 +00:00
programs.gpg.enable = true;
programs.gpg.homedir = "/Users/cyryl/.gnupg";
2022-03-20 12:09:52 +00:00
programs.zsh.loginExtra = ''
eval "$(/opt/homebrew/bin/brew shellenv)"
'';
2022-03-20 10:36:18 +00:00
};
}