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

211 lines
4.7 KiB
Org Mode
Raw Normal View History

2024-12-05 23:50:27 +01:00
:PROPERTIES:
:NIX-DIR: ../nix/
:END:
#+TITLE: Nix Flakes Config
#+AUTHOR: materus
#+DESCRIPTION: Nix flake declarations and some configuration maker functions.
#+STARTUP: overview
#+PROPERTY: header-args :tangle (concat (org-entry-get nil "NIX-DIR" t) "default.nix") :comments link
#+OPTIONS: \n:t
#+auto_tangle: t
* Flakes
** Main Flake
Flake of entire repo. [[../flake.nix][link]]
#+begin_src nix header-args :tangle (concat (org-entry-get nil "NIX-DIR" t) "../flake.nix") :comments 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, ... }:
{
};
}
#+end_src
** Subflake
Subflake with dependencies, use so there's no need for duplication for stable and unstable. [[../nix/subflake/flake.nix][link]]
#+begin_src nix header-args :tangle (concat (org-entry-get nil "NIX-DIR" t) "/subflake/flake.nix") :comments 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;
}
#+end_src