Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 20, 2023
1 parent 0c4bf73 commit 28e4756
Show file tree
Hide file tree
Showing 20 changed files with 77 additions and 64 deletions.
9 changes: 9 additions & 0 deletions docs/org/networking.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:PROPERTIES:
:ID: b965ba06-6f21-4058-8929-3d3936388087
:END:
#+TITLE: networking
#+AUTHOR: GuangTao Zhang
#+EMAIL: gtrunsec@hardenedlinux.org
#+DATE: 2023-10-08 Sun 21:22

* avahi :dns:
22 changes: 11 additions & 11 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions local/cells/repo/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ let
let
inputs' = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs;
in
inputs.omnibus.pops.configs.addLoadExtender {
load.inputs.inputs = inputs' // {
inherit nixpkgs;
};
};
inputs.omnibus.pops.configs.addLoadExtender { load.inputs.inputs = inputs'; };
in
{
conform.data = {
conform'.data = {
commit.conventional.scopes = append [
"nixosModules"
"nixosProfiles"
Expand All @@ -32,5 +28,5 @@ in
".*."
];
};
treefmt = configs.layouts.default.treefmt;
inherit (configs.layouts.default) treefmt lefthook conform;
}
6 changes: 6 additions & 0 deletions local/cells/repo/devshellProfiles.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let
inptus' = (inputs.omnibus.pops.flake.setSystem inputs.nixpkgs.system).inputs;
in
(inputs.omnibus.pops.devshellProfiles.addLoadExtender {
load.inputs = inptus';
}).layouts.default
18 changes: 5 additions & 13 deletions local/cells/repo/shells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,22 @@
let
inherit (inputs.std) lib;
inherit (inputs) nixpkgs std;
devshellProfiles =
let
__inptus__ = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs;
in
(inputs.omnibus.devshell.loadProfiles.addLoadExtender {
inputs = {
inherit (__inptus__) fenix;
nixpkgs = __inptus__.nixpkgs.legacyPackages;
};
}).exports.default;
in
{
# Tool Homepage: https://numtide.github.io/devshell/
default = lib.dev.mkShell {
name = "omnibus devshell";

# imports = [ devshellProfiles.rust ];

# Tool Homepage: https://nix-community.github.io/nixago/
# This is Standard's devshell integration.
# It runs the startup hook when entering the shell.
nixago = [
(inputs.std-ext.presets.nixago.conform cell.configs.conform)
# (inputs.std-ext.presets.nixago.treefmt)
(inputs.std-ext.presets.nixago.lefthook)
(std.lib.dev.mkNixago std.lib.cfg.conform cell.configs.conform.default
cell.configs.conform'
)
(std.lib.dev.mkNixago std.lib.cfg.lefthook cell.configs.lefthook.default)
(std.lib.dev.mkNixago std.lib.cfg.treefmt cell.configs.treefmt.default)
];

Expand Down
1 change: 1 addition & 0 deletions local/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# Development Environments
(nixago "configs")
(devshells "shells")
(functions "devshellProfiles")
];
}
{
Expand Down
3 changes: 3 additions & 0 deletions local/lock/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions local/lock/flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";

Expand Down
4 changes: 1 addition & 3 deletions templates/hivebus/nix/lib/exporter/pops/subflake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
subflake = omnibus.pops.flake.setInitInputs ../../../lock;
in
{
inputs = subflake.inputs // {
nixpkgs = subflake.inputs.nixpkgs.legacyPackages;
};
inputs = subflake.inputs;
}
)
))
2 changes: 1 addition & 1 deletion templates/hivebus/units/nixos/hosts/darwin/layouts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let
in
# self' = inputs.self.hosts.nixos;
{
system = "aarch64-linux";
system = "aarch64-darwin";

data = outputs.local.${self.system}.data;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let
inherit (inputs) nixpkgs;
inherit (inputs) nixos;
in
nixpkgs.lib.nixosSystem rec {
system = super.layouts.system;
Expand Down
2 changes: 1 addition & 1 deletion templates/nixos/units/nixos/hosts/darwin/layouts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let
outputs = inputs.self;
in
{
system = "aarch64-linux";
system = "aarch64-aarch";

data = outputs.local.${self.system}.data;

Expand Down
3 changes: 1 addition & 2 deletions tests/devshell/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ let
((baseInputs.addInputsExtender (
POP.lib.extendPop flops.lib.flake.pops.inputsExtender (
self: super: {
inputs = {
inputs = baseInputs.inputs // {
devshell = baseInputs.inputs.devshell.legacyPackages;
nixpkgs = baseInputs.inputs.nixpkgs.legacyPackages;
};
}
)
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/__fixture/layouts.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let
inherit (inputs) nixpkgs darwin;
inherit (inputs) nixpkgs darwin nixos;
# layouts.default to be default
outputs = omnibus.lib.mapPopsLayouts' super.pops;
# with multi-layout
Expand Down
1 change: 0 additions & 1 deletion tests/nixos/__fixture/pops/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{
inputs = {
std = local.outputs.std;
nixpkgs = omnibus.pops.flake.inputs.nixpkgs.legacyPackages;
} // selfInputs.inputs;
}
)
Expand Down
6 changes: 5 additions & 1 deletion tests/nixos/_pops.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ omnibus, root }:
{
omnibus,
root,
flops,
}:
(omnibus.pops.exporter.addLoadExtender {
load = {
src = ./__fixture;
Expand Down
15 changes: 15 additions & 0 deletions units/nixos/homeProfiles/presets/git.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
programs.git = {
enable = true;
delta.enable = true;
lfs.enable = true;

extraConfig = {
core.autocrlf = "input";
init.defaultBranch = "main";
pull.rebase = true;
rebase.autosquash = true;
rerere.enabled = true;
};
};
}
5 changes: 5 additions & 0 deletions units/nixos/nixosModules/omnibus/coding/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
mkEnableOption
"Enable the language server protocol bridge support";
emacs-eaf = mkEnableOption "Enable the Emacs Application Framework support";
python = mkOption {
type = types.package;
default = pkgs.python3;
description = "The Python package to use";
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = ps: [ ];
Expand Down
6 changes: 5 additions & 1 deletion units/nixos/nixosProfiles/presets/coding/nix.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ pkgs, omnibus }:
{
pkgs,
omnibus,
inputs,
}:
let
inherit
(omnibus.lib.errors.requiredInputs inputs "omnibus.pops.nixosProfiles" [
Expand Down
23 changes: 2 additions & 21 deletions units/nixos/nixosProfiles/presets/coding/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
let
cfg = config.omnibus.coding.python;
pythonEnv =
(pkgs.python3.withPackages (
(cfg.python.withPackages (
ps:
with ps;
(lib.optionals cfg.emacs-eaf [
Expand Down Expand Up @@ -30,26 +30,7 @@ let
paramiko
rapidfuzz
])
++ [
pytest
#orgparse
pytest
jupyter
#voila
pygments
# orgbabelhelper
# jupyterlab
pdftotext
openai
]
++ lib.optionals pkgs.stdenv.isLinux [
# pyqt6
# pyqt6-webengine
pyinotify
pymupdf
# eaf depencencies
lxml
]
++ [ ]
));
in
#.override (args: {ignoreCollisions = true;});
Expand Down

0 comments on commit 28e4756

Please sign in to comment.