Skip to content

Commit

Permalink
chore: add license
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Nov 20, 2023
1 parent 9053140 commit ad574cf
Show file tree
Hide file tree
Showing 306 changed files with 1,242 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: omnibus
Upstream-Contact: guangtao zhang <gtrunsec@hardenedlinux.org>
Source: https://github.com/GTrunSec/omnibus

# Sample paragraph, commented out:
#
# Files: src/*
# Copyright: $YEAR $NAME <$CONTACT>
# License: ...
Files: src/*
Copyright: 2023 The Omnibus Authors
License: MIT
9 changes: 9 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2023 guantao zhang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4 changes: 4 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
call-flake = import (
Expand Down
4 changes: 4 additions & 0 deletions examples/overlays/__fixture/test1.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

_:

final: prev:
Expand Down
4 changes: 4 additions & 0 deletions examples/overlays/__fixture/test2.nix
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ inputs }: final: prev: { }
4 changes: 4 additions & 0 deletions examples/overlays/default.nix
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ omnibus }: omnibus.pops.overlays { src = ./__fixture; }
4 changes: 4 additions & 0 deletions examples/packages/__fixture/hello1.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
lib,
stdenv,
Expand Down
4 changes: 4 additions & 0 deletions examples/packages/__fixture/hello2.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
lib,
stdenv,
Expand Down
4 changes: 4 additions & 0 deletions examples/packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

# [[file:../../docs/org/pops-packages.org::*Example][Example:1]]
{
omnibus,
Expand Down
4 changes: 4 additions & 0 deletions examples/packagesOverlay.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

# [[file:../docs/org/pops-packages.org::*Example][Example:3]]
{ super, omnibus }:
let
Expand Down
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
inputs = {
flops.url = "github:gtrunsec/flops";
Expand Down
4 changes: 4 additions & 0 deletions local/cells/repo/configs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

/* This file holds configuration data for repo dotfiles.
Q: Why not just put the put the file there?
Expand Down
4 changes: 4 additions & 0 deletions local/cells/repo/devshellProfiles.nix
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

cell.pops.devshellProfiles.exports.self
4 changes: 4 additions & 0 deletions local/cells/repo/pops.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ inputs, cell }:
let
inherit (inputs) nixpkgs;
Expand Down
6 changes: 6 additions & 0 deletions local/cells/repo/shells.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

/* This file holds reproducible shells with commands in them.
They conveniently also generate config files in their startup hook.
Expand Down Expand Up @@ -28,6 +32,8 @@ in
nixpkgs.statix
nixpkgs.deadnix
nixpkgs.tree

nixpkgs.reuse
];

commands = [ ];
Expand Down
4 changes: 4 additions & 0 deletions local/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
nixConfig = {
extra-substituters = [
Expand Down
4 changes: 4 additions & 0 deletions local/lock/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
Expand Down
4 changes: 4 additions & 0 deletions src/__init.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ inputs }:
let
inherit (inputs) flops self;
Expand Down
4 changes: 4 additions & 0 deletions src/errors/inputsSource.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
list:
let
Expand Down
4 changes: 4 additions & 0 deletions src/errors/requiredInputs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib, super }:
inputs': object: listNames:
let
Expand Down
4 changes: 4 additions & 0 deletions src/flakeOutputs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

let
outputs = root.lib.mapPopsExports super.pops;
in
Expand Down
4 changes: 4 additions & 0 deletions src/lib/addLoadToPops.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
list: pops: load:
lib.listToAttrs (
Expand Down
4 changes: 4 additions & 0 deletions src/lib/addLoadToPopsFilterBySrc.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib, super }:
dir: pops: ext:
let
Expand Down
4 changes: 4 additions & 0 deletions src/lib/attrsets/filterAttrsOnlyRecursive.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib, super }:
pred: set:
lib.listToAttrs (
Expand Down
4 changes: 4 additions & 0 deletions src/lib/attrsets/filterDerivations.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ super, lib }:
super.filterAttrsOnlyRecursive (
n: attrs: lib.isDerivation attrs || attrs.recurseForDerivations or false
Expand Down
4 changes: 4 additions & 0 deletions src/lib/attrsets/stripAttrsForHydra.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ super }:
super.filterAttrsOnlyRecursive (
n: _: n != "recurseForDerivations" && n != "dimension"
Expand Down
4 changes: 4 additions & 0 deletions src/lib/filterSrc.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib, root }:
src:
let
Expand Down
4 changes: 4 additions & 0 deletions src/lib/inputsToPaths.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib, flops }:
# let
# # Helper function to collect outPath attributes recursively
Expand Down
4 changes: 4 additions & 0 deletions src/lib/loaderInputs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

inputs.self.pops.self.load.inputs
// {
omnibus =
Expand Down
4 changes: 4 additions & 0 deletions src/lib/mapLoadToPops.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
pops: load:
lib.mapAttrsRecursiveCond ((as: !(as ? "addLoadExtender")))
Expand Down
4 changes: 4 additions & 0 deletions src/lib/mapPopsExports'.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
pops:
let
Expand Down
4 changes: 4 additions & 0 deletions src/lib/mapPopsExports.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
pops:
# mapAttrsRecursiveCond' =
Expand Down
4 changes: 4 additions & 0 deletions src/lib/recursiveAttrValues.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:

let
Expand Down
4 changes: 4 additions & 0 deletions src/lib/types.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
lib,
yants,
Expand Down
4 changes: 4 additions & 0 deletions src/load.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ root }:
let
load = root.pops.load;
Expand Down
4 changes: 4 additions & 0 deletions src/mkHome.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
homeModule: userSet: shell: suites:
let
Expand Down
4 changes: 4 additions & 0 deletions src/ops/makes.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
inputs,
lib,
Expand Down
4 changes: 4 additions & 0 deletions src/ops/mkMicrovm.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

# credit: https://github.com/divnix/std/blob/main/src/lib/ops/mkMicrovm.nix#
{ inputs, root }:
let
Expand Down
4 changes: 4 additions & 0 deletions src/ops/readYAML.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ inputs, root }: # source from std
let
inherit (root.errors.requiredInputs inputs "omnibus.pops.self" [ "nixpkgs" ])
Expand Down
4 changes: 4 additions & 0 deletions src/outputs.nix
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

super.flakeOutputs
4 changes: 4 additions & 0 deletions src/pops/_exportsOmnibusProfiles.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{ lib }:
self:
lib.mapAttrs (n: v: (if lib.isAttrs v then v else v { })) self
Expand Down
4 changes: 4 additions & 0 deletions src/pops/allData.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

(super.data.addLoadExtender {
load = {
loader = with haumea; [
Expand Down
4 changes: 4 additions & 0 deletions src/pops/configs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

{
flops,
lib,
Expand Down
4 changes: 4 additions & 0 deletions src/pops/darwinModules.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

super.nixosModules.addLoadExtender {
load.src = projectDir + "/units/nixos/darwinModules";
}
4 changes: 4 additions & 0 deletions src/pops/darwinProfiles.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

super.nixosProfiles.addLoadExtender {
load = {
src = projectDir + "/units/nixos/darwinProfiles";
Expand Down
4 changes: 4 additions & 0 deletions src/pops/data.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

flops.haumea.pops.default.setInit {
loader = with haumea; [
matchers.json
Expand Down
4 changes: 4 additions & 0 deletions src/pops/devshellModules.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

super.nixosModules.addLoadExtender {
load = {
src = projectDir + "/units/devshell/modules";
Expand Down
4 changes: 4 additions & 0 deletions src/pops/devshellProfiles.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 The omnibus Authors
#
# SPDX-License-Identifier: MIT

super.nixosProfiles.addLoadExtender {
load = {
src = projectDir + "/units/devshell/profiles";
Expand Down
Loading

0 comments on commit ad574cf

Please sign in to comment.