From 5e5b5322f6b648ab01bf204e9e655721d748f7e8 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 9 Dec 2024 08:06:21 -0800 Subject: set hostname and correct ssh key --- flake.nix | 66 +++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 29 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index da3fc0a..178bc25 100644 --- a/flake.nix +++ b/flake.nix @@ -38,33 +38,40 @@ , devshell , ... }@inputs: - flake-utils.lib.eachDefaultSystem (system: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ devshell.overlays.default ]; + }; + + in + { + checks = { + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + nixpkgs-fmt.enable = true; + check-merge-conflicts.enable = true; + end-of-file-fixer.enable = true; + }; + }; + }; + + devShells.default = pkgs.devshell.mkShell { + packages = with pkgs; [ just ]; + env = [{ + name = "DEVSHELL_NO_MOTD"; + value = "1"; + }]; + }; + + }) // (flake-utils.lib.eachDefaultSystemPassThrough (system: let - pkgs = import nixpkgs { - inherit system; - overlays = [ devshell.overlays.default ]; - }; mkSystem = import ./nix/lib/mkSystem.nix { inherit nixpkgs inputs; }; in { - checks = { - pre-commit-check = pre-commit-hooks.lib.${system}.run { - src = ./.; - hooks = { - nixpkgs-fmt.enable = true; - check-merge-conflicts.enable = true; - end-of-file-fixer.enable = true; - }; - }; - }; - - devShells.default = pkgs.devshell.mkShell { - packages = with pkgs; [ just ]; - env = [{ - name = "DEVSHELL_NO_MOTD"; - value = "1"; - }]; - }; # a VM running on the MacBook Air nixosConfigurations.vm-aarch64 = mkSystem "vm-aarch64" { @@ -92,10 +99,11 @@ }; # my work MacBook Pro - darwinConfigurations.macbook-pro-intel = mkSystem "macbook-pro-intel" { - system = "x86_64-darwin"; - user = "fcuny"; - darwin = true; - }; - }); + darwinConfigurations.macbook-pro-intel = + mkSystem "macbook-pro-intel" { + system = "x86_64-darwin"; + user = "fcuny"; + darwin = true; + }; + })); } -- cgit 1.4.1