-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
47 lines (42 loc) · 1.81 KB
/
flake.nix
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
{
description = "Declarative flatpaks.";
inputs = {
systems.url = "github:nix-systems/default-linux";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager.url = "github:nix-community/home-manager/release-24.11";
};
outputs = { self, nixpkgs, systems, home-manager }@inputs: let
inherit (nixpkgs.lib) genAttrs warn;
genSystems = f: genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
in {
devShells = genSystems (pkgs: {
default = pkgs.callPackage ./shell.nix { inherit inputs; };
});
nixosModules = rec {
declarative-flatpak.imports = [ ./src/modules/nixos.nix ];
default = warn "\"default\" flake output should no longer be used, please use the \"declarative-flatpak\" output" declarative-flatpak;
};
homeManagerModules = rec {
declarative-flatpak.imports = [ ./src/modules/home-manager.nix ];
default = warn "\"default\" flake output should no longer be used, please use the \"declarative-flatpak\" output" declarative-flatpak;
};
checks = genSystems ({ callPackage, ... }: {
nixos = callPackage ./tests/nixos.nix { modules.flatpak = self.nixosModules.declarative-flatpak; };
# home-manager = callPackage ./tests/home-manager.nix { modules = { flatpak = self.homeManagerModules.declarative-flatpak; home-manager = home-manager.nixosModules.home-manager; }; };
});
nixosConfigurations.shell = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ nixpkgs.config.allowUnfree = true; }
self.nixosModules.declarative-flatpak
home-manager.nixosModules.home-manager
(nixpkgs + "/nixos/modules/virtualisation/qemu-vm.nix")
./vm/configuration.nix
./vm/home-manager.nix
];
specialArgs = {
flatpak = self;
};
};
};
}