Files
Jovian-NixOS/flake.nix

68 lines
1.8 KiB
Nix
Raw Normal View History

2023-07-29 17:46:26 -06:00
{
description = "NixOS on the Steam Deck";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2023-07-29 17:46:26 -06:00
nix-github-actions = {
url = "github:zhaofengli/nix-github-actions/matrix-name";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-29 17:46:26 -06:00
};
2023-07-29 17:46:26 -06:00
outputs = { self, nixpkgs, nix-github-actions }: let
2023-07-29 17:46:26 -06:00
inherit (nixpkgs) lib;
2023-07-29 17:46:26 -06:00
supportedSystems = [ "x86_64-linux" ];
eachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: let
pkgs = import nixpkgs {
inherit system;
config = {
allowAliases = false;
allowUnfree = true;
};
2023-07-29 17:46:26 -06:00
overlays = [ self.overlays.default ];
};
in f pkgs);
in {
legacyPackages = eachSupportedSystem (pkgs: pkgs);
nixosModules = rec {
default = jovian;
jovian = ./modules;
};
overlays = rec {
# TODO: Minimize diff while making `nix flake check` pass
default = jovian;
jovian = final: prev: import ./overlay.nix final prev;
};
2023-07-29 17:46:26 -06:00
checks = eachSupportedSystem (pkgs: let
overlayContents = builtins.attrNames (import ./overlay.nix {} {})
++ [ "steam" ];
jobs = lib.foldl (ret: f: f ret) overlayContents [
(map (attr: lib.nameValuePair attr pkgs.${attr}))
(builtins.filter (job: lib.isDerivation job.value))
builtins.listToAttrs
];
in jobs);
2023-07-29 17:46:26 -06:00
githubActions = nix-github-actions.lib.mkGithubMatrix {
inherit (self) checks;
};
2024-04-04 10:38:48 +03:00
devShells = eachSupportedSystem (pkgs: {
default = pkgs.mkShell {
packages = let
pyenv = pkgs.python3.withPackages (ps: [
ps.colorama
ps.httpx
ps.toml
(ps.callPackage ./support/manifest/pyalpm.nix {})
]);
in [ pyenv ];
};
});
2023-07-29 17:46:26 -06:00
};
}