diff options
author | Franck Cuny <franck@fcuny.net> | 2024-12-09 08:06:21 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-12-09 08:06:21 -0800 |
commit | 5e5b5322f6b648ab01bf204e9e655721d748f7e8 (patch) | |
tree | 4084d13973eecd3128583d22510968f635cecc63 /flake.nix | |
parent | move the configuration for hetzner under machines (diff) | |
download | world-5e5b5322f6b648ab01bf204e9e655721d748f7e8.tar.gz |
set hostname and correct ssh key
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 66 |
1 files changed, 37 insertions, 29 deletions
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; + }; + })); } |