Skyler Grey | 0409e46 | 2022-08-19 23:40:48 +0100 | [diff] [blame] | 1 | { |
| 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 Grey | 7dfe5c6 | 2022-08-20 21:41:30 +0100 | [diff] [blame] | 5 | inputs.registry = { |
| 6 | url = "github:nixos/flake-registry"; |
| 7 | flake = false; |
| 8 | }; |
Skyler Grey | 6aa7c26 | 2022-08-20 22:22:03 +0100 | [diff] [blame] | 9 | inputs.impermanence.url = "github:nix-community/impermanence"; |
Skyler Grey | 0409e46 | 2022-08-19 23:40:48 +0100 | [diff] [blame] | 10 | |
Skyler Grey | 7dfe5c6 | 2022-08-20 21:41:30 +0100 | [diff] [blame] | 11 | outputs = inputs: let |
| 12 | inherit (inputs) self nixpkgs flake-utils; |
| 13 | in |
Skyler Grey | 0409e46 | 2022-08-19 23:40:48 +0100 | [diff] [blame] | 14 | flake-utils.lib.eachDefaultSystem (system: let |
| 15 | pkgs = nixpkgs.legacyPackages.${system}; |
Skyler Grey | 7dfe5c6 | 2022-08-20 21:41:30 +0100 | [diff] [blame] | 16 | |
| 17 | utils = import ./utils/utils.nix pkgs.lib; |
| 18 | |
| 19 | username = "minion"; |
Skyler Grey | 0409e46 | 2022-08-19 23:40:48 +0100 | [diff] [blame] | 20 | in { |
Skyler Grey | 7dfe5c6 | 2022-08-20 21:41:30 +0100 | [diff] [blame] | 21 | 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 Grey | 0409e46 | 2022-08-19 23:40:48 +0100 | [diff] [blame] | 41 | devShell = pkgs.mkShell { |
| 42 | nativeBuildInputs = with pkgs; [nodePackages.prettier alejandra]; |
| 43 | buildInputs = []; |
| 44 | }; |
| 45 | formatter = pkgs.alejandra; |
| 46 | }); |
| 47 | } |