Skip to content

Instantly share code, notes, and snippets.

View PerchunPak's full-sized avatar

Perchun Pak PerchunPak

View GitHub Profile
@PerchunPak
PerchunPak / shell.nix
Created May 31, 2024 15:41
StableDiffusion A1111 on Nixos
# based on https://github.com/virchau13/automatic1111-webui-nix
# usage:
# - Clone and cd https://github.com/AUTOMATIC1111/stable-diffusion-webui
# - place this file into clonned repository
# - `nix-shell shell.nix`
let
pkgs = import <nixpkgs> { config.allowUnfree = true; };
variant = "CUDA";
in
pkgs.mkShell rec {
@PerchunPak
PerchunPak / pillow-9.5.0-overlay.nix
Created May 31, 2024 15:36
Nixpkgs unstable (24.04) Pillow 9.5.0 overlay
# built for https://github.com/NixOS/nixpkgs/commit/9ca3f649614213b2aaf5f1e16ec06952fe4c2632
import <nixpkgs> {
config.packageOverrides = prev: {
python311 = prev.python311.override {
packageOverrides = pyfinal: pyprev: {
pillow = pyprev.pillow.overridePythonAttrs rec {
version = "9.5.0";
format = "setuptools";
src = prev.fetchPypi {
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
diff --git a/pkgs/applications/editors/vim/plugins/deprecated.json b/pkgs/applications/editors/vim/plugins/deprecated.json
index d855a3d2cd4b..e73899e66fea 100644
--- a/pkgs/applications/editors/vim/plugins/deprecated.json
+++ b/pkgs/applications/editors/vim/plugins/deprecated.json
@@ -48,7 +48,7 @@
"new": "sqlite-lua"
},
"vim-fsharp": {
- "date": "2024-04-03",
+ "date": "2024-04-21",
final: prev: {
vlc-nightly = let
revision = "2a58b2bf9263b33538bca88ab4e5e6a04e73c88e";
vlc-without-qt5 = prev.vlc.override {withQt5 = false;};
in
vlc-without-qt5.overrideAttrs (old: {
version = "nightly";
src = final.fetchFromGitLab {
domain = "code.videolan.org";
owner = "videolan";
@PerchunPak
PerchunPak / diswall-module.nix
Created April 16, 2024 18:06
untested WIP diswall module for nixos, do note that I am not planning to continue it
{
lib,
config,
pkgs,
...
}: let
cfg = config.my.diswall;
srcPath = cfg.package.src.outPath;
in {
options = {
@PerchunPak
PerchunPak / EXPLANATION.md
Created April 4, 2024 16:06
Use disko to partition your disk without deleting existing data

this formats disk

-# shellcheck disable=SC2043
-for dev in /dev/vda; do
-  /nix/store/nxykihliwdnlmp6apf2ivi0vnfv9ddak-disk-deactivate/disk-deactivate "$dev"
-done

this check for some reason failed and totally skipped execution of creation of partitions (does it check whether there are any partitions on a disk?)

[nixos@nixos:~/nixos-dotfiles]$ sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode create ./modules/nixos/disko.nix --arg device '"/dev/vda"'
trace: the create output is deprecated, use format instead
this derivation will be built:
/nix/store/g6qdlfivkbr0xa9j6v4kl97sg789jvmw-disko-format.drv
building '/nix/store/g6qdlfivkbr0xa9j6v4kl97sg789jvmw-disko-format.drv'...
++ mktemp -d
+ disko_devices_dir=/tmp/tmp.S66ppwTquk
+ trap 'rm -rf "$disko_devices_dir"' EXIT
+ mkdir -p /tmp/tmp.S66ppwTquk
+ device=/dev/vda
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/044fcnhp4wzqzg6f1k76sfnqq787l6nn-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
patching script interpreter paths in tests
tests/functional/ca/build-with-garbage-path.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/5lr5n3qa4day8l1ivbwlcby2nknczqkq-bash-5.2p26/bin/bash"
tests/functional/ca/concurrent-builds.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/5lr5n3qa4day8l1ivbwlcby2nknczqkq-bash-5.2p26/bin/bash"
tests/functional/ca/gc.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/5lr5n3qa4day8l1ivbwlcby2nknczqkq-bash-5.2p26/bin/bash"
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh