aboutsummaryrefslogtreecommitdiffstats
path: root/flake.nix
blob: a63e03b2597432ea0f6b0ddd5c32c2167439ecc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# nixos-config - My current NixOS configuration
#
# Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of my nixos-config.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
  description = "A NixOS System Configuration";

  inputs = {};

  outputs = {self, ...}: let
    sources = import ./unflake.nix;

    # core
    nixpkgs = sources.nixpkgs;
    nixpkgs-stable = sources.nixpkgs-stable;
    library = sources.library;
    # modules
    home-manager = sources.home-manager;
    nixos-generators = sources.nixos-generators;
    impermanence = sources.impermanence;
    agenix = sources.agenix;
    serverphone = sources.serverphone;
    disko = sources.disko;
    lanzaboote = sources.lanzaboote;
    nixvim = sources.nixvim;
    nix-index-database = sources.nix-index-database;
    # external dependencies
    treefmt-nix = sources.treefmt-nix;
    templates = sources.templates;
    # my binaries
    qmk_firmware = sources.qmk_firmware;
    turtle = sources.turtle;

    system = "x86_64-linux";

    packageSets = rec {
      stable = nixpkgs-stable.legacyPackages.${system};
      unstable = nixpkgs.legacyPackages.${system};

      soispha = import ./pkgs {
        inherit libraries;
        pkgs = unstable;
      };
    };

    libraries = rec {
      nix = packageSets.unstable.lib;
      base = import ./lib {lib = nix;};
      extra = library.nixLib;
    };

    modules = {
      inherit
        home-manager
        nixvim
        nixos-generators
        impermanence
        agenix
        serverphone
        disko
        lanzaboote
        nix-index-database
        ;
    };

    externalDependencies = {
      inherit
        treefmt-nix
        templates
        ;
    };

    externalBinaries = {
      inherit
        qmk_firmware
        turtle
        ;
    };

    openPRsNixpkgs = {};

    outputs = import ./flake {
      inherit
        self
        sources
        nixpkgs
        system
        openPRsNixpkgs
        packageSets
        libraries
        modules
        externalDependencies
        externalBinaries
        ;
    };
  in
    outputs;
}