nixos-config/flake.nix

56 lines
1.8 KiB
Nix
Raw Normal View History

2021-03-31 22:15:08 +00:00
{
2021-06-02 20:46:32 +00:00
inputs.nixpkgs.url = "nixpkgs/nixos-21.05";
inputs.unstable.url = "nixpkgs/nixos-unstable";
2021-04-06 03:11:17 +00:00
2021-06-10 19:51:04 +00:00
outputs = { self, nixpkgs, ... }@inputs:
2021-06-05 06:22:38 +00:00
{
2021-06-12 01:32:23 +00:00
nixosModules = {
baseline = ./modules/baseline.nix;
cli = ./modules/cli.nix;
gnome = ./modules/gnome.nix;
phpipam = ./modules/phpipam.nix;
pipewire = ./modules/pipewire.nix;
profiles = ./modules/profiles.nix;
scansnap_s1300 = ./modules/scansnap_s1300.nix;
scroll-boost = ./modules/scroll-boost;
security-tools = ./modules/security-tools.nix;
status-on-console = ./modules/status-on-console.nix;
sway = ./modules/sway.nix;
};
nixosModule = { ... }: { imports = builtins.attrValues self.nixosModules; };
2021-06-05 06:22:38 +00:00
nixosConfigurations = self.lib.getHosts inputs ./hosts;
2021-06-25 05:04:30 +00:00
lib = {
getHosts = import lib/hosts.nix;
forAllSystems = f: builtins.listToAttrs (map
(name: { inherit name; value = f name; })
(nixpkgs.lib.platforms.all)
);
};
2021-06-10 19:51:04 +00:00
2021-06-25 05:04:30 +00:00
packages = self.lib.forAllSystems (system:
with nixpkgs.legacyPackages.${system};
2021-06-10 19:51:04 +00:00
{
binaryninja = callPackage ./pkgs/binary-ninja-personal { };
2021-06-22 14:38:28 +00:00
commander-x16 = callPackage ./pkgs/commander-x16 { };
gef = callPackage ./pkgs/gef { };
2021-06-17 19:42:58 +00:00
packettracer = callPackage ./pkgs/packettracer { };
2021-06-22 14:38:28 +00:00
weevely = callPackage ./pkgs/weevely { };
2021-06-25 05:04:30 +00:00
}
);
2021-06-12 02:41:50 +00:00
2021-06-25 05:04:30 +00:00
apps = self.lib.forAllSystems (system:
with nixpkgs.legacyPackages.${system};
2021-06-28 01:20:04 +00:00
let
binScript = x: writeShellScriptBin "script" "exec ${x}";
in
2021-06-12 02:41:50 +00:00
{
2021-06-28 01:20:04 +00:00
luks-mirror = binScript ./misc/luks-mirror.sh;
luks-single = binScript ./misc/luks-single.sh;
2021-06-25 05:04:30 +00:00
}
);
};
2021-03-31 22:15:08 +00:00
}