1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

minimize usage of //

This commit is contained in:
2025-12-25 08:21:59 +01:00
parent 583bc83839
commit 3bf70f8956
2 changed files with 346 additions and 301 deletions

View File

@@ -130,12 +130,12 @@ in {
titlebar = false;
border = 1;
};
bars = [
(config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
// rec {
bars = let position = "bottom"; in [
(lib.recursiveUpdate config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
{
workspaceButtons = true;
mode = "hide"; # "dock";
position = "bottom";
inherit position;
statusCommand = toString (pkgs.writers.writeDash "i3status-rust" ''
export I3RS_GITHUB_TOKEN="$(cat ${config.age.secrets.github-token-i3status-rust.path})"
export OPENWEATHERMAP_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"

View File

@@ -78,8 +78,10 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
lib = nixpkgs.lib;
in
nixinate.nixinate.x86_64-linux self
// {
lib.mergeAttrsList [
nixinate.nixinate.x86_64-linux
self
{
mock-secrets = {
type = "app";
program = toString (
@@ -90,7 +92,7 @@
};
}
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
// builtins.listToAttrs (
(builtins.listToAttrs (
map (
hostname:
let
@@ -120,8 +122,8 @@
);
}
) (builtins.attrNames self.nixosConfigurations)
)
// {
))
{
deploy-ful = {
type = "app";
program = toString (
@@ -132,7 +134,8 @@
''
);
};
};
}
];
};
# TODO overlay for packages
@@ -152,11 +155,13 @@
panoptikon = import lib/panoptikon.nix;
};
nixosConfigurations = let
nixosConfigurations =
let
niveumSpecialArgs = system: {
unstablePackages = import nixpkgs-unstable {
inherit system;
config.allowUnfreePredicate = pkg:
config.allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
"obsidian"
"zoom"
@@ -166,10 +171,23 @@
niveumPackages = self.packages.${system};
niveumLib = self.lib;
inputs = {
inherit tinc-graph self telebots menstruation-telegram menstruation-backend scripts agenix recht autorenkalender nixpkgs wallpaper-generator;
inherit
tinc-graph
self
telebots
menstruation-telegram
menstruation-backend
scripts
agenix
recht
autorenkalender
nixpkgs
wallpaper-generator
;
};
};
in {
in
{
ful = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
specialArgs = niveumSpecialArgs system;
@@ -285,25 +303,44 @@
};
};
packages = eachSupportedSystem (system: let
packages = eachSupportedSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
nur.overlays.default
(self: super: {
mpv = super.mpv.override {scripts = [super.mpvScripts.visualizer super.mpvScripts.mpris];};
mpv = super.mpv.override {
scripts = [
super.mpvScripts.visualizer
super.mpvScripts.mpris
];
};
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
})
];
};
wrapScript = {
wrapScript =
{
packages ? [ ],
name,
script,
}:
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
in {
pkgs.writers.writeDashBin name ''PATH=$PATH:${
nixpkgs.lib.makeBinPath (
packages
++ [
pkgs.findutils
pkgs.coreutils
pkgs.gnused
pkgs.gnugrep
]
)
} ${script} "$@"'';
in
{
# linguistics and ancient world
auc = pkgs.callPackage packages/auc.nix { };
betacode = pkgs.callPackage packages/betacode.nix { };
@@ -311,7 +348,9 @@
devanagari = pkgs.callPackage packages/devanagari { };
stardict-tools = pkgs.callPackage packages/stardict-tools.nix { };
heuretes = pkgs.callPackage packages/heuretes.nix { };
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
ipa = pkgs.writers.writePython3Bin "ipa" { flakeIgnore = [ "E501" ]; } (
builtins.readFile packages/ipa.py
);
jsesh = pkgs.callPackage packages/jsesh.nix { }; # TODO upstream
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix { };
polyglot = pkgs.callPackage packages/polyglot.nix { };
@@ -385,7 +424,9 @@
vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix { }; # TODO upstream
vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix { }; # TODO upstream
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix { }; # TODO upstream
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {}; # TODO upstream
vimPlugins-vim-colors-paramount =
pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix
{ }; # TODO upstream
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix { }; # TODO upstream
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix { }; # TODO upstream
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix { }; # TODO upstream
@@ -399,13 +440,17 @@
booksplit = wrapScript {
script = voidrice.outPath + "/.local/bin/booksplit";
name = "booksplit";
packages = [pkgs.ffmpeg pkgs.glibc.bin];
packages = [
pkgs.ffmpeg
pkgs.glibc.bin
];
};
tag = wrapScript {
script = voidrice.outPath + "/.local/bin/tag";
name = "tag";
packages = [ pkgs.ffmpeg ];
};
});
}
);
};
}