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
|
||||||
fetchurl,
|
, stdenv
|
||||||
stdenv,
|
, lib
|
||||||
lib,
|
, buildFHSEnv
|
||||||
buildFHSEnv,
|
, appimageTools
|
||||||
appimageTools,
|
, writeShellScript
|
||||||
writeShellScript,
|
, anki
|
||||||
anki,
|
, undmg
|
||||||
undmg,
|
, zstd
|
||||||
zstd,
|
, cacert
|
||||||
cacert,
|
, commandLineArgs ? [ ]
|
||||||
commandLineArgs ? [ ],
|
,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
|
@ -106,8 +106,8 @@
|
||||||
btop
|
btop
|
||||||
stockfish
|
stockfish
|
||||||
cutechess
|
cutechess
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
rofi-wayland
|
rofi-wayland
|
||||||
rofimoji
|
rofimoji
|
||||||
cliphist
|
cliphist
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
python312Packages.python-lsp-server
|
python312Packages.python-lsp-server
|
||||||
|
|
||||||
(callPackage ./anki-bin.nix {})
|
(callPackage ./anki-bin.nix { })
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,10 +156,10 @@
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
neovim
|
neovim
|
||||||
git
|
git
|
||||||
python3
|
python3
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
mako
|
mako
|
||||||
tree
|
tree
|
||||||
kitty
|
kitty
|
||||||
borgbackup
|
borgbackup
|
||||||
|
@ -252,10 +252,10 @@
|
||||||
# warnings are often not that serious
|
# warnings are often not that serious
|
||||||
failOnWarnings = false;
|
failOnWarnings = false;
|
||||||
postHook = ''
|
postHook = ''
|
||||||
${pkgs.curl}/bin/curl -u $(cat /run/secrets/ntfy) -d "ytnixRsync: backup completed with exit code: $exitStatus
|
${pkgs.curl}/bin/curl -u $(cat /run/secrets/ntfy) -d "ytnixRsync: backup completed with exit code: $exitStatus
|
||||||
$(journalctl -u borgbackup-job-ytnixRsync.service|tail -n 5)" \
|
$(journalctl -u borgbackup-job-ytnixRsync.service|tail -n 5)" \
|
||||||
https://ntfy.cything.io/chunk
|
https://ntfy.cything.io/chunk
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.btrbk.instances.local = {
|
services.btrbk.instances.local = {
|
||||||
|
@ -265,8 +265,8 @@
|
||||||
snapshot_preserve_min = "2d";
|
snapshot_preserve_min = "2d";
|
||||||
snapshot_dir = "/snapshots";
|
snapshot_dir = "/snapshots";
|
||||||
subvolume = {
|
subvolume = {
|
||||||
"/home" = {};
|
"/home" = { };
|
||||||
"/" = {};
|
"/" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
# mount, trash and stuff in thunar
|
# mount, trash and stuff in thunar
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
# thumbnails in thunar
|
# thumbnails in thunar
|
||||||
services.tumbler.enable =true;
|
services.tumbler.enable = true;
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
|
|
|
@ -14,24 +14,27 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, sops-nix, home-manager, ... }@inputs:
|
outputs = { self, nixpkgs, sops-nix, home-manager, ... }@inputs:
|
||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in {
|
in
|
||||||
nixosConfigurations = {
|
{
|
||||||
ytnix = lib.nixosSystem {
|
nixosConfigurations = {
|
||||||
specialArgs = { inherit inputs; };
|
ytnix = lib.nixosSystem {
|
||||||
modules = [
|
specialArgs = { inherit inputs; };
|
||||||
./configuration.nix
|
modules = [
|
||||||
sops-nix.nixosModules.sops
|
./configuration.nix
|
||||||
home-manager.nixosModules.home-manager {
|
sops-nix.nixosModules.sops
|
||||||
home-manager = {
|
home-manager.nixosModules.home-manager
|
||||||
useGlobalPkgs = true;
|
{
|
||||||
useUserPackages = true;
|
home-manager = {
|
||||||
users.yt = import ./home.nix;
|
useGlobalPkgs = true;
|
||||||
};
|
useUserPackages = true;
|
||||||
}
|
users.yt = import ./home.nix;
|
||||||
];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" "compress=zstd" ];
|
options = [ "subvol=root" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
@ -18,32 +19,36 @@
|
||||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c6098a16-c8a6-4a97-8648-6f46ca919d13";
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c6098a16-c8a6-4a97-8648-6f46ca919d13";
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=home" "compress=zstd" ];
|
options = [ "subvol=home" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
||||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" =
|
||||||
{ device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=swap" ];
|
options = [ "subvol=swap" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/29B7-F46D";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/29B7-F46D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ {
|
swapDevices = [{
|
||||||
device = "/swap/swapfile";
|
device = "/swap/swapfile";
|
||||||
} ];
|
}];
|
||||||
|
|
||||||
boot.resumeDevice = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
boot.resumeDevice = "/dev/disk/by-uuid/17870658-6118-46af-837f-70c9175e09c3";
|
||||||
boot.kernelParams = [ "resume_offset=53224704" ];
|
boot.kernelParams = [ "resume_offset=53224704" ];
|
||||||
|
|
|
@ -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
Reference in a new issue