diff options
Diffstat (limited to '')
-rw-r--r-- | nix/flake/devshell.nix | 49 | ||||
-rw-r--r-- | nix/flake/hosts.nix | 48 |
2 files changed, 0 insertions, 97 deletions
diff --git a/nix/flake/devshell.nix b/nix/flake/devshell.nix deleted file mode 100644 index ae1d17d..0000000 --- a/nix/flake/devshell.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ inputs, ... }: { - imports = [ - inputs.devshell.flakeModule - inputs.treefmt-nix.flakeModule - inputs.pre-commit-hooks.flakeModule - ]; - - perSystem = { config, pkgs, ... }: { - devshells.default = { - name = "world"; - devshell.startup.pre-commit.text = config.pre-commit.installationScript; - packages = with pkgs; [ - (config.treefmt.build.wrapper) - just - nixos-rebuild - ]; - env = [{ - name = "DEVSHELL_NO_MOTD"; - value = "1"; - }]; - }; - - treefmt = { - - projectRootFile = ".git/config"; - - flakeFormatter = true; - flakeCheck = true; - - # list of supported programs - # https://github.com/numtide/treefmt-nix - programs = { - nixpkgs-fmt.enable = true; - shfmt.enable = true; - yamlfmt.enable = true; - }; - }; - - pre-commit = { - check.enable = true; - settings = { - hooks = { - deadnix.enable = true; - treefmt.enable = true; - }; - }; - }; - }; -} diff --git a/nix/flake/hosts.nix b/nix/flake/hosts.nix deleted file mode 100644 index 9426bdd..0000000 --- a/nix/flake/hosts.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ inputs, self, ... }: -let - inherit (inputs) nixpkgs darwin home-manager; - inherit (nixpkgs.lib) mkMerge; - - mkDarwinConfig = system: path: - darwin.lib.darwinSystem { - inherit system; - modules = [ - home-manager.darwinModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { inherit self; }; - }; - } - "${self}/nix/hosts/darwin/" - "${self}/nix/hosts/common/nix.nix" - path - { nixpkgs.overlays = [ ]; } - ]; - specialArgs = { inherit inputs self; }; - }; - - mkNixosConfig = system: path: - nixpkgs.lib.nixosSystem { - inherit system; - modules = - [ "${self}/nix/hosts/nixos" "${self}/nix/hosts/common/nix.nix" path ]; - specialArgs = { inherit inputs self; }; - }; -in -{ - flake = mkMerge [{ - darwinConfigurations = { - mba-fcuny = - mkDarwinConfig "aarch64-darwin" "${self}/nix/hosts/darwin/mba"; - HQ-C02FK3Q7MD6T = - mkDarwinConfig "x86_64-darwin" "${self}/nix/hosts/darwin/work"; - }; - - nixosConfigurations = { - vm = mkNixosConfig "aarch64-linux" "${self}/nix/hosts/nixos/vm"; - wildcat = mkNixosConfig "x86_64-linux" "${self}/nix/hosts/nixos/wildcat"; - }; - }]; -} |