nix fmt
This commit is contained in:
parent
204034fac2
commit
d45a4f2358
5 changed files with 60 additions and 106 deletions
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
fetchurl,
|
||||
stdenv,
|
||||
lib,
|
||||
buildFHSEnv,
|
||||
appimageTools,
|
||||
writeShellScript,
|
||||
anki,
|
||||
undmg,
|
||||
zstd,
|
||||
cacert,
|
||||
commandLineArgs ? [ ],
|
||||
{ fetchurl
|
||||
, stdenv
|
||||
, lib
|
||||
, buildFHSEnv
|
||||
, appimageTools
|
||||
, writeShellScript
|
||||
, anki
|
||||
, undmg
|
||||
, zstd
|
||||
, cacert
|
||||
, commandLineArgs ? [ ]
|
||||
,
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
outputs = { self, nixpkgs, sops-nix, home-manager, ... }@inputs:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
ytnix = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./configuration.nix
|
||||
sops-nix.nixosModules.sops
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
@ -33,5 +35,6 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" "compress=zstd" ];
|
||||
};
|
||||
|
@ -18,25 +19,29 @@
|
|||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c6098a16-c8a6-4a97-8648-6f46ca919d13";
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" "compress=zstd" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/swap" =
|
||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/29B7-F46D";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/29B7-F46D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
chromium,
|
||||
python3,
|
||||
}:
|
||||
buildNpmPackage {
|
||||
pname = "single-file-cli";
|
||||
version = "2.0.73";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gildas-lormeau";
|
||||
repo = "single-file-cli";
|
||||
rev = "0b87ca9167f6cb2b036770d38e9b6bbfaf47abc5";
|
||||
hash = "sha256-fMedP+wp1crHUj9/MVyG8XSsl1PA5bp7/HL4k+X0TRg=";
|
||||
};
|
||||
npmDepsHash = "sha256-nnOMBb9mHNhDejE3+Kl26jsrTRxSSg500q1iwwVUqP8=";
|
||||
|
||||
nativeCheckInputs = [chromium];
|
||||
doCheck = stdenv.hostPlatform.isLinux;
|
||||
|
||||
postBuild = ''
|
||||
patchShebangs ./single-file
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
${python3}/bin/python -m http.server --bind 127.0.0.1 &
|
||||
pid=$!
|
||||
|
||||
./single-file \
|
||||
--browser-headless \
|
||||
--browser-executable-path chromium-browser\
|
||||
http://127.0.0.1:8000
|
||||
|
||||
grep -F 'Page saved with SingleFile' 'Directory listing for'*.html
|
||||
|
||||
kill $pid
|
||||
wait
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "CLI tool for saving a faithful copy of a complete web page in a single HTML file";
|
||||
homepage = "https://github.com/gildas-lormeau/single-file-cli";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [n8henrie];
|
||||
mainProgram = "single-file";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue