From 45c7825ddbdae8e5aa19f46275c0462f28236b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 20 Mar 2022 10:36:18 +0000 Subject: [PATCH] Add work laptop --- flake.nix | 17 +++++++++++- nixos/boxes/form3/default.nix | 51 +++++++++++++++++++++++++++++++++++ nixos/git/home.nix | 2 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 nixos/boxes/form3/default.nix diff --git a/flake.nix b/flake.nix index 7d041fcf..ceedfc33 100644 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,8 @@ }; }; in { - darwinConfigurations."macmini" = darwin.lib.darwinSystem { + darwinConfigurations = { + "macmini" = darwin.lib.darwinSystem { system = "x86_64-darwin"; modules = [ (./. + "/nixos/boxes/macmini") @@ -62,6 +63,20 @@ } ]; + }; + "FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem { + system = "x86_64-darwin"; + modules = [ + (./. + "/nixos/boxes/form3") + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.cyryl = { imports = [ ./nixos/home-manager ]; }; + + } + ]; + }; }; nixosConfigurations = { diff --git a/nixos/boxes/form3/default.nix b/nixos/boxes/form3/default.nix new file mode 100644 index 00000000..90c4151c --- /dev/null +++ b/nixos/boxes/form3/default.nix @@ -0,0 +1,51 @@ +{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: { + environment.systemPackages = with pkgs; [ vim nixfmt ]; + + imports = [ ../../git ../../mercurial ]; + services.nix-daemon.enable = true; + nix = { + useDaemon = true; + gc.automatic = true; + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + + fonts.enableFontDir = true; + fonts.fonts = with pkgs; [ + (fetchzip { + name = "berkeley-mono-fonts"; + url = "file:///" + ../../fonts.zip; + postFetch = '' + mkdir -p $out/share/fonts + unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype + ''; + sha256 = "sha256-y+j3iHGXJP1pdylLJTlxbhyQ1oFAwini3o3ljLzOsoM="; + }) + fira-code + font-awesome + iosevka + material-icons + nerdfonts + noto-fonts-emoji + powerline-fonts + source-code-pro + weather-icons + ]; + security.pki.certificateFiles = [ + "/Users/Shared/form3-certs/form3-palo-alto.pem" + "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" + ]; + environment.variables = { + NIX_SSL_CERT_FILE = "/Users/cyryl/certs/bundle.crt"; + }; + programs.zsh.enable = true; # default shell on catalina + + system.stateVersion = 4; + + home-manager.users.cyryl = { ... }: { + imports = [ ]; + home.packages = [ ]; + }; +} diff --git a/nixos/git/home.nix b/nixos/git/home.nix index e455bfff..7b7d2eda 100644 --- a/nixos/git/home.nix +++ b/nixos/git/home.nix @@ -3,7 +3,7 @@ enable = true; lfs.enable = true; userName = "Cyryl PÅ‚otnicki"; - userEmail = "cyplo@cyplo.net"; + userEmail = "cyplo@cyplo.dev"; delta = { enable = true; options = {