nixos-config/org-conf/nix-flake.org

4.7 KiB

Nix Flakes Config

Flakes

Main Flake

Flake of entire repo. link

  {
    description = "Lemon flake: NixOS and home manager configs";
    inputs = {
      private = {
        type = "github";
        owner = "materusPL";
        repo = "Nixerus";
        ref = "mock";
      };

      nixpkgs = {
        type = "github";
        owner = "NixOS";
        repo = "nixpkgs";
        ref = "nixos-unstable";
      };

      configInputs = {
        type = "github";
        owner = "materusPL";
        repo = "nixos-config";
        ref = "inputs";
        inputs = {
          nixpkgs.follows = "nixpkgs";
        };
      };

      nixpkgs-stable = {
        type = "github";
        owner = "NixOS";
        repo = "nixpkgs";
        ref = "nixos-24.11";
      };

      hm-stable = {
        type = "github";
        owner = "nix-community";
        repo = "home-manager";
        ref = "release-24.11";
        inputs.nixpkgs.follows = "nixpkgs-stable";
      };

      configInputs-stable = {
        type = "github";
        owner = "materusPL";
        repo = "nixos-config";
        ref = "inputs";
        inputs = {
          nixpkgs.follows = "nixpkgs-stable";
          home-manager.follows = "hm-stable";
        };
      };
    };
    outputs =
      let
        rootPath = builtins.toString ./.;
      in
      inputs@{ self, ... }:
      {

      };
  }

Subflake

Subflake with dependencies, use so there's no need for duplication for stable and unstable. link

  {
    description = "Subflake of Lemon repository, contains dependencies";
    inputs = {
      nixpkgs = {
        type = "github";
        owner = "NixOS";
        repo = "nixpkgs";
        ref = "nixos-unstable";
      };

      flake-utils = {
        type = "github";
        owner = "numtide";
        repo = "flake-utils";
        ref = "main";
      };

      base16 = {
        type = "github";
        owner = "SenchoPens";
        repo = "base16.nix";
        ref = "main";
      };

      devshell = {
        type = "github";
        owner = "numtide";
        repo = "devshell";
        ref = "main";
        inputs = {
          nixpkgs.follows = "nixpkgs";
        };
      };

      home-manager = {
        type = "github";
        owner = "nix-community";
        repo = "home-manager";
        ref = "master";
        inputs = {
          nixpkgs.follows = "nixpkgs";
        };
      };

      emacs-overlay = {
        type = "github";
        owner = "nix-community";
        repo = "emacs-overlay";
        ref = "master";
        inputs = {
          nixpkgs.follows = "nixpkgs";
          flake-utils.follows = "flake-utils";
        };
      };

      nixos-hardware = {
        type = "github";
        owner = "NixOS";
        repo = "nixos-hardware";
        ref = "master";
      };

      nixerus = {
        type = "github";
        owner = "materusPL";
        repo = "Nixerus";
        ref = "master";
        inputs = {
          nixpkgs.follows = "nixpkgs";
          home-manager.follows = "home-manager";
        };
      };

      nix-vscode-extensions = {
        type = "github";
        owner = "nix-community";
        repo = "nix-vscode-extensions";
        ref = "master";
        inputs = {
          nixpkgs.follows = "nixpkgs";
          flake-utils.follows = "flake-utils";
        };
      };

      sops-nix = {
        type = "github";
        owner = "Mic92";
        repo = "sops-nix";
        ref = "master";
        inputs = {
          nixpkgs.follows = "nixpkgs";
        };
      };

      git-agecrypt = {
        type = "github";
        owner = "vlaci";
        repo = "git-agecrypt";
        ref = "main";
        inputs = {
          nixpkgs.follows = "nixpkgs";
          flake-utils.follows = "flake-utils";
        };
      };

      plasma-manager = {
        type = "github";
        owner = "nix-community";
        repo = "plasma-manager";
        ref = "trunk";
        inputs = {
          nixpkgs.follows = "nixpkgs";
          home-manager.follows = "home-manager";
        };
      };

      nur = {
        type = "github";
        owner = "nix-community";
        repo = "NUR";
        ref = "master";
      };

    };

    outputs = inputs: inputs;
  }