fmt: format teh flake

This commit is contained in:
silver 2024-05-12 15:53:25 +01:00
parent bd242e59cd
commit d856e726ca
Signed by: silver
GPG key ID: 54E2C71918E93B74

View file

@ -3,56 +3,60 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
bfom.url = "gitlab:silver_rust/bfom"; bfom.url = "gitlab:silver_rust/bfom";
}; };
/* /*
sudo nano /etc/nix/nix.conf sudo nano /etc/nix/nix.conf
trusted-users = {username} trusted-users = {username}
*/ */
nixConfig = { nixConfig = {
extra-substituters = "https://nix-cache.skynet.ie/skynet-cache"; extra-substituters = "https://nix-cache.skynet.ie/skynet-cache";
extra-trusted-public-keys = "skynet-cache:OdfA4Or0JcHiHf05fsiIR4nZT2z2yDEtkoLqhntGAz4="; extra-trusted-public-keys = "skynet-cache:OdfA4Or0JcHiHf05fsiIR4nZT2z2yDEtkoLqhntGAz4=";
}; };
outputs = { self, nixpkgs, utils, bfom }: utils.lib.eachDefaultSystem (system: outputs = {
let self,
pkgs = import nixpkgs { nixpkgs,
system = "${system}"; utils,
config = { bfom,
allowUnfree = true; }:
permittedInsecurePackages = [ utils.lib.eachDefaultSystem (system: let
# for obsidian pkgs = import nixpkgs {
"electron-25.9.0" system = "${system}";
# for wkhtmltopdf config = {
"qtwebkit-5.212.0-alpha4" allowUnfree = true;
]; permittedInsecurePackages = [
# for obsidian
"electron-25.9.0"
# for wkhtmltopdf
"qtwebkit-5.212.0-alpha4"
];
};
};
in rec {
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [obsidian];
shellHook = ''
${pkgs.obsidian}/bin/obsidian &
BG_PID=$!
trap "kill -9 $BG_PID" EXIT
'';
}; };
};
in rec {
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ obsidian ];
shellHook = ''
${pkgs.obsidian}/bin/obsidian &
BG_PID=$!
trap "kill -9 $BG_PID" EXIT
'';
};
packages = { packages = {
handovers = pkgs.writeShellScriptBin "format_handovers" '' handovers = pkgs.writeShellScriptBin "format_handovers" ''
export PATH=${pkgs.lib.makeBinPath [ pkgs.wkhtmltopdf bfom.defaultPackage.x86_64-linux ]}:$PATH export PATH=${pkgs.lib.makeBinPath [pkgs.wkhtmltopdf bfom.defaultPackage.x86_64-linux]}:$PATH
${./_scripts/format_handovers.sh} ${./_scripts/format_handovers.sh}
''; '';
minutes = pkgs.writeShellScriptBin "format_minutes" '' minutes = pkgs.writeShellScriptBin "format_minutes" ''
export PATH=${pkgs.lib.makeBinPath [ pkgs.wkhtmltopdf bfom.defaultPackage.x86_64-linux ]}:$PATH export PATH=${pkgs.lib.makeBinPath [pkgs.wkhtmltopdf bfom.defaultPackage.x86_64-linux]}:$PATH
${./_scripts/format_minutes.sh} ${./_scripts/format_minutes.sh}
''; '';
}; };
});
});
} }