blob: b527b275f862c9828aaab89419cd6a365781bb35 [file] [log] [blame]
Skyler Grey0409e462022-08-19 23:40:48 +01001{
2 description = "Minion's NixOS configuration (since 2022-08-19)";
Skyler Greybcb2cb72022-08-21 07:24:35 +01003 inputs = {
4 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
5 flake-utils.url = "github:numtide/flake-utils";
6 registry = {
7 url = "github:nixos/flake-registry";
8 flake = false;
9 };
10 home-manager.url = "github:nix-community/home-manager/release-22.05";
11 sops-nix.url = "github:Mic92/sops-nix";
12 impermanence.url = "github:nix-community/impermanence";
13
14 home-manager.inputs.nixpkgs.follows = "nixpkgs";
15 sops-nix.inputs.nixpkgs.follows = "nixpkgs";
16 impermanence.inputs.nixpkgs.follows = "nixpkgs";
Skyler Grey7dfe5c62022-08-20 21:41:30 +010017 };
Skyler Grey0409e462022-08-19 23:40:48 +010018
Skyler Grey7dfe5c62022-08-20 21:41:30 +010019 outputs = inputs: let
20 inherit (inputs) self nixpkgs flake-utils;
21 in
Skyler Grey0409e462022-08-19 23:40:48 +010022 flake-utils.lib.eachDefaultSystem (system: let
23 pkgs = nixpkgs.legacyPackages.${system};
Skyler Grey7dfe5c62022-08-20 21:41:30 +010024
Skyler Greybcb2cb72022-08-21 07:24:35 +010025 utils = import ./utils/utils.nix nixpkgs.lib;
Skyler Grey7dfe5c62022-08-20 21:41:30 +010026
27 username = "minion";
Skyler Grey0409e462022-08-19 23:40:48 +010028 in {
Skyler Greybcb2cb72022-08-21 07:24:35 +010029 packages.nixosConfigurations = {
30 default = nixpkgs.lib.nixosSystem {
Skyler Grey7dfe5c62022-08-20 21:41:30 +010031 inherit system;
32
Skyler Greybcb2cb72022-08-21 07:24:35 +010033 modules = [
34 (nixpkgs.lib.pipe ./modules [
35 utils.nixFilesIn
36 utils.importAll
37 (utils.interpretNonstandardModule (args:
38 args
39 // {
40 home = args.config.home-manager."${username}";
41 }))
42 ])
Skyler Grey7dfe5c62022-08-20 21:41:30 +010043 ];
44
Skyler Greybcb2cb72022-08-21 07:24:35 +010045 specialArgs = inputs // {inherit username pkgs;};
Skyler Grey7dfe5c62022-08-20 21:41:30 +010046 };
47 };
Skyler Grey0409e462022-08-19 23:40:48 +010048 devShell = pkgs.mkShell {
49 nativeBuildInputs = with pkgs; [nodePackages.prettier alejandra];
50 buildInputs = [];
51 };
52 formatter = pkgs.alejandra;
53 });
54}