summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix37
1 files changed, 20 insertions, 17 deletions
diff --git a/flake.nix b/flake.nix
index 11d2419..eaba51f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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";
};
};