flake.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware"; darwin.url = "github:lnl7/nix-darwin/master"; darwin.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.inputs.nixpkgs.follows = "nixpkgs"; secrets = { flake = false; }; }; outputs = { self , darwin , emacs-overlay , home-manager , nixpkgs , secrets , ... } @ attrs: let darwinSystem = "aarch64-darwin"; darwinPkgs = nixpkgs.legacyPackages.${darwinSystem}; nixosSystem = "x86_64-linux"; nixosPkgs = nixpkgs.legacyPackages.${nixosSystem}; aarch64LinuxSystem = "aarch64-linux"; aarch64LinuxPackages = nixpkgs.legacyPackages.${aarch64LinuxSystem}; in { nixosConfigurations.prefect = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; modules = [ ./system/prefect.nix ]; }; darwinConfigurations.mba = darwin.lib.darwinSystem { system = darwinSystem; specialArgs = attrs; modules = [ ./system/mba.nix ]; }; homeConfigurations."alan@mba" = home-manager.lib.homeManagerConfiguration { pkgs = darwinPkgs; modules = [ ./user/mba.nix (secrets + "/default.nix") ({ nixpkgs.overlays = [ emacs-overlay.overlay ]; }) ]; }; homeConfigurations."alan@prefect" = home-manager.lib.homeManagerConfiguration { pkgs = nixosPkgs; modules = [ ./user/prefect.nix (secrets + "/default.nix") ({ nixpkgs.overlays = [ emacs-overlay.overlay ]; }) ]; }; homeConfigurations."alan@NanoPi.lan" = home-manager.lib.homeManagerConfiguration { pkgs = aarch64LinuxPackages; modules = [ ./user/server.nix ]; }; homeConfigurations."alan@pappel" = home-manager.lib.homeManagerConfiguration { pkgs = nixosPkgs; modules = [ ./user/server.nix ]; }; }; } |