diff options
| author | adikro <adikro@disroot.org> | 2026-02-12 19:36:41 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-02-12 19:36:41 +0100 |
| commit | 9868584ddabad45a9964ae9bf64d109963fd1e3d (patch) | |
| tree | 4bad8146b5c3350f7c0c17c4764885cc11637b35 /flake.nix | |
| parent | 1ff6f0eb48961e6482ec1b7d0dd9b606e85ddc79 (diff) | |
added install scripts
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 37 |
1 files changed, 20 insertions, 17 deletions
@@ -66,18 +66,19 @@ }; outputs = - { - self, - nixpkgs, - sops-nix, - ... - }@inputs: + { self, nixpkgs, ... }@inputs: let + system = "x86_64-linux"; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + scripts = import ./scripts { inherit pkgs; }; mkHost = { hostname, - path, user ? "adam", + path ? ./hosts/${hostname}/configuration.nix, }: nixpkgs.lib.nixosSystem { specialArgs = { @@ -86,28 +87,30 @@ }; modules = [ path - sops-nix.nixosModules.sops { networking.hostName = hostname; } ]; }; in { + apps."x86_64-linux" = { + install = { + type = "app"; + program = "${scripts.install}/bin/nixos-install"; + }; + setup = { + type = "app"; + program = "${scripts.setup}/bin/nixos-setup"; + }; + }; nixosConfigurations = { szpont = mkHost { hostname = "szpont"; path = ./hosts/desktop/configuration.nix; }; - laptop = mkHost { - hostname = "laptop"; - path = ./hosts/laptop/configuration.nix; - }; - thinkpad = mkHost { - hostname = "thinkpad"; - path = ./hosts/thinkpad/configuration.nix; - }; + laptop = mkHost { hostname = "laptop"; }; + thinkpad = mkHost { hostname = "thinkpad"; }; pendrive = mkHost { hostname = "pendrive"; - path = ./hosts/pendrive/configuration.nix; user = "user"; }; }; |
