blob: 6725e32444afebd7108418085c0ed8b239465bde [file] [log] [blame]
Skyler Grey0409e462022-08-19 23:40:48 +01001{
2 description = "Minion's NixOS configuration (since 2022-08-19)";
3 inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4 inputs.flake-utils.url = "github:numtide/flake-utils";
Skyler Grey7dfe5c62022-08-20 21:41:30 +01005 inputs.registry = {
6 url = "github:nixos/flake-registry";
7 flake = false;
8 };
Skyler Grey6aa7c262022-08-20 22:22:03 +01009 inputs.impermanence.url = "github:nix-community/impermanence";
Skyler Grey0409e462022-08-19 23:40:48 +010010
Skyler Grey7dfe5c62022-08-20 21:41:30 +010011 outputs = inputs: let
12 inherit (inputs) self nixpkgs flake-utils;
13 in
Skyler Grey0409e462022-08-19 23:40:48 +010014 flake-utils.lib.eachDefaultSystem (system: let
15 pkgs = nixpkgs.legacyPackages.${system};
Skyler Grey7dfe5c62022-08-20 21:41:30 +010016
17 utils = import ./utils/utils.nix pkgs.lib;
18
19 username = "minion";
Skyler Grey0409e462022-08-19 23:40:48 +010020 in {
Skyler Grey7dfe5c62022-08-20 21:41:30 +010021 nixosConfigurations = {
22 default = pkgs.lib.nixosSystem {
23 inherit system;
24
25 home-manager.useGlobalPkgs = true;
26
27 modules = pkgs.lib.pipe ./modules [
28 utils.nixFilesIn
29 utils.importAll
30 (utils.interpretNonstandardModule (args:
31 args
32 // {
33 home =
34 args.config.home-manager."${username}";
35 }))
36 ];
37
38 specialArgs = inputs // {inherit username;};
39 };
40 };
Skyler Grey0409e462022-08-19 23:40:48 +010041 devShell = pkgs.mkShell {
42 nativeBuildInputs = with pkgs; [nodePackages.prettier alejandra];
43 buildInputs = [];
44 };
45 formatter = pkgs.alejandra;
46 });
47}