From 68f39eb867c851acb651f79604aba119ecaa9527 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 3 Jun 2025 10:30:38 -0400 Subject: Add some gentoo stuff and update cgit --- flake.lock | 40 +++--- hosts/denpa/cgit/readme_in_summary.diff | 152 ---------------------- hosts/denpa/cgit/readme_in_summary_no_about.diff | 154 +++++++++++++++++++++++ hosts/denpa/git/git-config | 3 + hosts/denpa/git/git-template.zip | Bin 0 -> 2772 bytes hosts/iroha/fstab | 10 ++ hosts/iroha/new_desktop.txt | 49 ++++++++ hosts/iroha/sshd_config | 7 ++ hosts/moyo/fstab | 7 ++ hosts/moyo/samba/smb.conf | 9 +- hosts/moyo/sshd_config | 7 ++ hosts/sofue/configuration.nix | 14 +-- hosts/soy/Scripts/all.sh | 2 +- hosts/soy/Scripts/mount-code.sh | 2 - hosts/soy/Scripts/mount-samba.sh | 2 + nix/gaming.nix | 4 +- nix/programs/sway.nix | 9 +- nix/user.nix | 1 + scripts/desktop/screenshot | 2 +- scripts/unzip-all | 3 + 20 files changed, 283 insertions(+), 194 deletions(-) delete mode 100644 hosts/denpa/cgit/readme_in_summary.diff create mode 100644 hosts/denpa/cgit/readme_in_summary_no_about.diff create mode 100644 hosts/denpa/git/git-config create mode 100644 hosts/denpa/git/git-template.zip create mode 100644 hosts/iroha/fstab create mode 100644 hosts/iroha/new_desktop.txt create mode 100644 hosts/iroha/sshd_config create mode 100644 hosts/moyo/fstab create mode 100644 hosts/moyo/sshd_config delete mode 100755 hosts/soy/Scripts/mount-code.sh create mode 100755 hosts/soy/Scripts/mount-samba.sh create mode 100755 scripts/unzip-all diff --git a/flake.lock b/flake.lock index de777c0..dae5e65 100644 --- a/flake.lock +++ b/flake.lock @@ -14,11 +14,11 @@ ] }, "locked": { - "lastModified": 1748213360, - "narHash": "sha256-P8gM26UIseGdje0MZNqpngQHMbKJWQpu53DK9fbgnZI=", + "lastModified": 1748883636, + "narHash": "sha256-GmHTbirFxOzEBz51PEc/aoVgoGql9TMveF1/cT5ubIA=", "ref": "refs/heads/master", - "rev": "2fa7ea95c891981684a55b41977172d040c2cc55", - "revCount": 130, + "rev": "1e53cb62651b62ad7c03cbeb64e76546e8978ff7", + "revCount": 132, "type": "git", "url": "https://git.akon.city/camu" }, @@ -88,11 +88,11 @@ ] }, "locked": { - "lastModified": 1748391243, - "narHash": "sha256-7sCuihzsTRZemtbTXaFUoGJUfuQErhKEcL9v7HKIo1k=", + "lastModified": 1748830238, + "narHash": "sha256-EB+LzYHK0D5aqxZiYoPeoZoOzSAs8eqBDxm3R+6wMKU=", "owner": "nix-community", "repo": "home-manager", - "rev": "f5b12be834874f7661db4ced969a621ab2d57971", + "rev": "c7fdb7e90bff1a51b79c1eed458fb39e6649a82a", "type": "github" }, "original": { @@ -109,11 +109,11 @@ ] }, "locked": { - "lastModified": 1743466986, - "narHash": "sha256-mL2KLnz/+LuTl2rb0lKvFSsj/ZUkY4adBQd/Kx4qSHQ=", + "lastModified": 1748883127, + "narHash": "sha256-GIm6wHjZn217ITL/BPH8K8Kg+Mf64cbiiVdI9KHP4+g=", "ref": "refs/heads/master", - "rev": "f2318df4bfda763eafb6d535175e246ad18ac6a3", - "revCount": 65, + "rev": "6e8fa1f2c625b8326065b8f0a6b67e048ba812b5", + "revCount": 67, "type": "git", "url": "https://git.akon.city/mauri" }, @@ -124,11 +124,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1747900541, - "narHash": "sha256-dn64Pg9xLETjblwZs9Euu/SsjW80pd6lr5qSiyLY1pg=", + "lastModified": 1748634340, + "narHash": "sha256-pZH4bqbOd8S+si6UcfjHovWDiWKiIGRNRMpmRWaDIms=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "11f2d9ea49c3e964315215d6baa73a8d42672f06", + "rev": "daa628a725ab4948e0e2b795e8fb6f4c3e289a7a", "type": "github" }, "original": { @@ -176,11 +176,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1748370509, - "narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=", + "lastModified": 1748693115, + "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4faa5f5321320e49a78ae7848582f684d64783e9", + "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc", "type": "github" }, "original": { @@ -199,11 +199,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1748439094, - "narHash": "sha256-gZaw+Y0KSNnNCO86kED3y5NMWrG06TXq6L4vl/UQ3vU=", + "lastModified": 1748883059, + "narHash": "sha256-sBG2NR+tB1y4xMYguJT2IsTV2mf8PzWRoz2gScUFHg8=", "owner": "nix-community", "repo": "NUR", - "rev": "cc59c871120ee0ea17ba17dd3f26d60bb21bc49d", + "rev": "7995f4bde30d1dc463f7d39a5118709e19d8e608", "type": "github" }, "original": { diff --git a/hosts/denpa/cgit/readme_in_summary.diff b/hosts/denpa/cgit/readme_in_summary.diff deleted file mode 100644 index 33756f9..0000000 --- a/hosts/denpa/cgit/readme_in_summary.diff +++ /dev/null @@ -1,152 +0,0 @@ -diff --git a/cmd.c b/cmd.c -index 0eb75b1..be316f4 100644 ---- a/cmd.c -+++ b/cmd.c -@@ -49,7 +49,7 @@ static void about_fn(void) - cgit_redirect(redirect, true); - free(currenturl); - free(redirect); -- } else if (ctx.repo->readme.nr) -+ } else if (0) - cgit_print_repo_readme(ctx.qry.path); - else if (ctx.repo->homepage) - cgit_redirect(ctx.repo->homepage, false); -diff --git a/ui-shared.c b/ui-shared.c -index baea6f2..6b01d08 100644 ---- a/ui-shared.c -+++ b/ui-shared.c -@@ -1078,7 +1078,7 @@ void cgit_print_pageheader(void) - - html("\n"); - } - --void cgit_print_summary(void) --{ -- int columns = 3; -- -- if (ctx.repo->enable_log_filecount) -- columns++; -- if (ctx.repo->enable_log_linecount) -- columns++; -- -- cgit_print_layout_start(); -- html("
\n"); - if (ctx.env.authenticated && ctx.repo) { -- if (ctx.repo->readme.nr) -+ if (0) - reporevlink("about", "about", NULL, - hc("about"), ctx.qry.head, NULL, - NULL); -diff --git a/ui-summary.c b/ui-summary.c -index 947812a..faf943e 100644 ---- a/ui-summary.c -+++ b/ui-summary.c -@@ -40,31 +40,6 @@ static void print_url(const char *url) - html("
"); -- cgit_print_branches(ctx.cfg.summary_branches); -- htmlf("", columns); -- cgit_print_tags(ctx.cfg.summary_tags); -- if (ctx.cfg.summary_log > 0) { -- htmlf("", columns); -- cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, -- NULL, NULL, 0, 0, 0); -- } -- urls = 0; -- cgit_add_clone_urls(print_url); -- html("
 
 
"); -- cgit_print_layout_end(); --} -- - /* The caller must free the return value. */ - static char* append_readme_path(const char *filename, const char *ref, const char *path) - { -@@ -99,25 +74,11 @@ static char* append_readme_path(const char *filename, const char *ref, const cha - return full_path; - } - --void cgit_print_repo_readme(const char *path) -+static void print_readme_file(const char *path) - { -- char *filename, *ref, *mimetype; -+ char *filename, *ref; - int free_filename = 0; - -- mimetype = get_mimetype_for_filename(path); -- if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) { -- ctx.page.mimetype = mimetype; -- ctx.page.charset = NULL; -- cgit_print_plain(); -- free(mimetype); -- return; -- } -- free(mimetype); -- -- cgit_print_layout_start(); -- if (ctx.repo->readme.nr == 0) -- goto done; -- - filename = ctx.repo->readme.items[0].string; - ref = ctx.repo->readme.items[0].util; - -@@ -125,7 +86,7 @@ void cgit_print_repo_readme(const char *path) - free_filename = 1; - filename = append_readme_path(filename, ref, path); - if (!filename) -- goto done; -+ return; - } - - /* Print the calculated readme, either from the git repo or from the -@@ -142,6 +103,52 @@ void cgit_print_repo_readme(const char *path) - html(""); - if (free_filename) - free(filename); -+} -+ -+void cgit_print_summary(void) -+{ -+ int columns = 3; -+ -+ if (ctx.repo->enable_log_filecount) -+ columns++; -+ if (ctx.repo->enable_log_linecount) -+ columns++; -+ -+ cgit_print_layout_start(); -+ html(""); -+ cgit_print_branches(ctx.cfg.summary_branches); -+ htmlf("", columns); -+ cgit_print_tags(ctx.cfg.summary_tags); -+ if (ctx.cfg.summary_log > 0) { -+ htmlf("", columns); -+ cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, -+ NULL, NULL, 0, 0, 0); -+ } -+ urls = 0; -+ cgit_add_clone_urls(print_url); -+ html("
 
 
"); -+ if (ctx.repo->readme.nr) -+ print_readme_file(ctx.qry.path); -+ cgit_print_layout_end(); -+} -+ -+void cgit_print_repo_readme(const char *path) -+{ -+ char *mimetype = get_mimetype_for_filename(path); -+ if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) { -+ ctx.page.mimetype = mimetype; -+ ctx.page.charset = NULL; -+ cgit_print_plain(); -+ free(mimetype); -+ return; -+ } -+ free(mimetype); -+ -+ cgit_print_layout_start(); -+ if (ctx.repo->readme.nr == 0) -+ goto done; -+ -+ print_readme_file(path); - - done: - cgit_print_layout_end(); diff --git a/hosts/denpa/cgit/readme_in_summary_no_about.diff b/hosts/denpa/cgit/readme_in_summary_no_about.diff new file mode 100644 index 0000000..73267e0 --- /dev/null +++ b/hosts/denpa/cgit/readme_in_summary_no_about.diff @@ -0,0 +1,154 @@ +diff --git a/cmd.c b/cmd.c +index 0eb75b1..be316f4 100644 +--- a/cmd.c ++++ b/cmd.c +@@ -49,7 +49,7 @@ static void about_fn(void) + cgit_redirect(redirect, true); + free(currenturl); + free(redirect); +- } else if (ctx.repo->readme.nr) ++ } else if (0) + cgit_print_repo_readme(ctx.qry.path); + else if (ctx.repo->homepage) + cgit_redirect(ctx.repo->homepage, false); +diff --git a/ui-shared.c b/ui-shared.c +index 6fae72d..c5b609a 100644 +--- a/ui-shared.c ++++ b/ui-shared.c +@@ -1082,7 +1082,7 @@ void cgit_print_pageheader(void) + + html("\n"); + } + +-void cgit_print_summary(void) +-{ +- int columns = 3; +- +- if (ctx.repo->enable_log_filecount) +- columns++; +- if (ctx.repo->enable_log_linecount) +- columns++; +- +- cgit_print_layout_start(); +- html("
\n"); + if (ctx.env.authenticated && ctx.repo) { +- if (ctx.repo->readme.nr) ++ if (0) + reporevlink("about", "about", NULL, + hc("about"), ctx.qry.head, NULL, + NULL); +diff --git a/ui-summary.c b/ui-summary.c +index 947812a..23c07aa 100644 +--- a/ui-summary.c ++++ b/ui-summary.c +@@ -40,31 +40,6 @@ static void print_url(const char *url) + html("
"); +- cgit_print_branches(ctx.cfg.summary_branches); +- htmlf("", columns); +- cgit_print_tags(ctx.cfg.summary_tags); +- if (ctx.cfg.summary_log > 0) { +- htmlf("", columns); +- cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, +- NULL, NULL, 0, 0, 0); +- } +- urls = 0; +- cgit_add_clone_urls(print_url); +- html("
 
 
"); +- cgit_print_layout_end(); +-} +- + /* The caller must free the return value. */ + static char* append_readme_path(const char *filename, const char *ref, const char *path) + { +@@ -99,25 +74,11 @@ static char* append_readme_path(const char *filename, const char *ref, const cha + return full_path; + } + +-void cgit_print_repo_readme(const char *path) ++static void print_readme_file(const char *path) + { +- char *filename, *ref, *mimetype; ++ char *filename, *ref; + int free_filename = 0; + +- mimetype = get_mimetype_for_filename(path); +- if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) { +- ctx.page.mimetype = mimetype; +- ctx.page.charset = NULL; +- cgit_print_plain(); +- free(mimetype); +- return; +- } +- free(mimetype); +- +- cgit_print_layout_start(); +- if (ctx.repo->readme.nr == 0) +- goto done; +- + filename = ctx.repo->readme.items[0].string; + ref = ctx.repo->readme.items[0].util; + +@@ -125,7 +86,7 @@ void cgit_print_repo_readme(const char *path) + free_filename = 1; + filename = append_readme_path(filename, ref, path); + if (!filename) +- goto done; ++ return; + } + + /* Print the calculated readme, either from the git repo or from the +@@ -142,6 +103,54 @@ void cgit_print_repo_readme(const char *path) + html(""); + if (free_filename) + free(filename); ++} ++ ++void cgit_print_summary(void) ++{ ++ int columns = 3; ++ ++ if (ctx.repo->enable_log_filecount) ++ columns++; ++ if (ctx.repo->enable_log_linecount) ++ columns++; ++ ++ cgit_print_layout_start(); ++ html(""); ++ cgit_print_branches(ctx.cfg.summary_branches); ++ htmlf("", columns); ++ cgit_print_tags(ctx.cfg.summary_tags); ++ if (ctx.cfg.summary_log > 0) { ++ htmlf("", columns); ++ cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, ++ NULL, NULL, 0, 0, 0); ++ } ++ urls = 0; ++ cgit_add_clone_urls(print_url); ++ html("
 
 
"); ++ if (ctx.repo->readme.nr) ++ print_readme_file(ctx.qry.path); ++ cgit_print_layout_end(); ++} ++ ++void cgit_print_repo_readme(const char *path) ++{ ++ char *mimetype; ++ ++ mimetype = get_mimetype_for_filename(path); ++ if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) { ++ ctx.page.mimetype = mimetype; ++ ctx.page.charset = NULL; ++ cgit_print_plain(); ++ free(mimetype); ++ return; ++ } ++ free(mimetype); ++ ++ cgit_print_layout_start(); ++ if (ctx.repo->readme.nr == 0) ++ goto done; ++ ++ print_readme_file(path); + + done: + cgit_print_layout_end(); diff --git a/hosts/denpa/git/git-config b/hosts/denpa/git/git-config new file mode 100644 index 0000000..00eb9e3 --- /dev/null +++ b/hosts/denpa/git/git-config @@ -0,0 +1,3 @@ +[init] + defaultBranch = master + templatedir = /mnt/git//.git-template diff --git a/hosts/denpa/git/git-template.zip b/hosts/denpa/git/git-template.zip new file mode 100644 index 0000000..4ade69c Binary files /dev/null and b/hosts/denpa/git/git-template.zip differ diff --git a/hosts/iroha/fstab b/hosts/iroha/fstab new file mode 100644 index 0000000..3a5a64e --- /dev/null +++ b/hosts/iroha/fstab @@ -0,0 +1,10 @@ +/dev/iroha-vg0/root / ext4 noatime 0 1 +UUID="0170-0D7B" /boot vfat defaults,noatime 0 2 +/dev/iroha-vg0/swap none swap sw 0 0 + +UUID="e339ba64-d4ee-44e1-856a-80812fd72960" /mnt/hdd ext4 noatime 0 2 +UUID="88a11ddb-a1ef-4953-bc27-39e358e4c1c4" /mnt/ssd ext4 noatime 0 2 + +tmpfs /var/tmp/portage tmpfs size=16G,uid=portage,gid=portage,mode=775 0 0 + +#hugetlbfs /hugepages hugetlbfs mode=1770,gid=78 0 0 diff --git a/hosts/iroha/new_desktop.txt b/hosts/iroha/new_desktop.txt new file mode 100644 index 0000000..d492765 --- /dev/null +++ b/hosts/iroha/new_desktop.txt @@ -0,0 +1,49 @@ +== Essential Packages +dosfstools +glibc -multiarch, muslc +https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart + +== Ideas for a "Stable" Feeling System +(Ignoring the obvious factor of OS stability) +=== Hardware +Minimize USB finickery +Monitor flicker +Easy monitor source switching +HID latency +No wireless +Solid keyboard +Minimize/Eliminate fan noise +No audio noise + +=== Software +No container BS +Well kept working directory and easy backups +Seperate system for gaming + +== Notes +https://wiki.gentoo.org/wiki/LTO +https://musl.libc.org/ +https://www.intel.com/content/www/us/en/products/sku/53427/intel-core-i32120t-processor-3m-cache-2-60-ghz/specifications.html +https://community.intel.com/cipcp26785/attachments/cipcp26785/desktop-boards/876/1/DH77DF_TechProdSpec04.pdf + +== Shopping +PSU https://www.quietpcusa.com/Streacom-90W-nanoPSU-and-ACDC-adapter-block?ItemId=3398696 +Case https://www.quietpcusa.com/streacom-db1-fanless-case +SSD https://www.newegg.com/western-digital-red-sa500-500gb/p/N82E16820250122?Item=9SIAAY9KGJ2444&cm_sp=product-_-from-price-options +SSD https://www.newegg.com/samsung-500gb-870-evo-series-sata/p/N82E16820147792 + +=== Acquired +CPU https://www.ebay.com/itm/176997759085 +MB https://www.ebay.com/itm/256822587988 +Ram https://www.ebay.com/itm/226244059510 + +=== Peripherals +https://www.ebay.com/itm/335297968303 +https://www.startech.com/en-us/usb-hubs/5g4aibs-usb-hub-na +https://www.pckeyboard.com/page/product/UNI0416 +https://www.amazon.com/Realforce-Topre-Bluetooth-Mechanical-Keyboard/dp/B09VPCZWR5 +https://mechanicalkeyboards.com/products/topre-realforce-r2-ivory +https://www.amazon.co.jp/-/en/HP-A3mk2-Headphone-Amplifier-Supports-Resolution/dp/B0C2Y66NGN +https://www.amazon.co.jp/-/en/Semi-Open-Dynamic-Headphones-T60RPmk2-Diaphragm/dp/B0F4WLPD7T + +// vim: set syntax=asciidoc: diff --git a/hosts/iroha/sshd_config b/hosts/iroha/sshd_config new file mode 100644 index 0000000..91fe201 --- /dev/null +++ b/hosts/iroha/sshd_config @@ -0,0 +1,7 @@ +PermitRootLogin no +PubkeyAuthentication yes +PasswordAuthentication no +PermitEmptyPasswords no +KbdInteractiveAuthentication no +Subsystem sftp /usr/lib64/misc/sftp-server +Include "/etc/ssh/sshd_config.d/*.conf" diff --git a/hosts/moyo/fstab b/hosts/moyo/fstab new file mode 100644 index 0000000..29b6c66 --- /dev/null +++ b/hosts/moyo/fstab @@ -0,0 +1,7 @@ +/dev/moyo-vg0/root / ext4 noatime 0 1 +UUID="879D-5154" /boot vfat defaults,noatime 0 2 +/dev/moyo-vg0/swap none swap sw 0 0 + +tmpfs /var/tmp/portage tmpfs size=6G,uid=portage,gid=portage,mode=775 0 0 + +#hugetlbfs /hugepages hugetlbfs mode=1770,gid=100 0 0 diff --git a/hosts/moyo/samba/smb.conf b/hosts/moyo/samba/smb.conf index 5781f4f..8a928a0 100644 --- a/hosts/moyo/samba/smb.conf +++ b/hosts/moyo/samba/smb.conf @@ -10,21 +10,20 @@ log file = /var/log/samba/log.%m max log size = 50 passdb backend = tdbsam - allow insecure wide links = yes + allow insecure wide links = no kernel oplocks = yes - socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=32768 SO_SNDBUF=32768 getwd cache = true acl allow execute always = yes ea support = yes store dos attributes = yes [samba] - comment = code + comment = sharing with windows path = /srv/nfs/samba valid users = andrew guest ok = no browseable = yes writable = yes public = no - follow symlinks = yes - wide links = yes + follow symlinks = no + wide links = no diff --git a/hosts/moyo/sshd_config b/hosts/moyo/sshd_config new file mode 100644 index 0000000..91fe201 --- /dev/null +++ b/hosts/moyo/sshd_config @@ -0,0 +1,7 @@ +PermitRootLogin no +PubkeyAuthentication yes +PasswordAuthentication no +PermitEmptyPasswords no +KbdInteractiveAuthentication no +Subsystem sftp /usr/lib64/misc/sftp-server +Include "/etc/ssh/sshd_config.d/*.conf" diff --git a/hosts/sofue/configuration.nix b/hosts/sofue/configuration.nix index 572034e..c85e81a 100644 --- a/hosts/sofue/configuration.nix +++ b/hosts/sofue/configuration.nix @@ -11,8 +11,8 @@ in rec { ../../nix/user.nix ../../nix/bluetooth.nix ../../nix/email.nix - ../../nix/amdgpu.nix - #../../nix/intel.nix + #../../nix/amdgpu.nix + ../../nix/intel.nix ../../nix/gaming.nix ../../nix/steam.nix ../../nix/virtualisation.nix @@ -59,12 +59,12 @@ in rec { footer-offset = 0; }; monitors = { + monitor1 = "DP-2"; + monitor2 = "HDMI-A-3"; + monitor3 = "DP-1"; #monitor1 = "DP-1"; - #monitor2 = "HDMI-A-1"; - #monitor3 = "HDMI-A-3"; - monitor1 = "DP-1"; - monitor2 = "DP-2"; - monitor3 = "HDMI-A-1"; + #monitor2 = "DP-2"; + #monitor3 = "HDMI-A-1"; }; }; diff --git a/hosts/soy/Scripts/all.sh b/hosts/soy/Scripts/all.sh index b08eab1..d99e2fa 100755 --- a/hosts/soy/Scripts/all.sh +++ b/hosts/soy/Scripts/all.sh @@ -1,4 +1,4 @@ #! /usr/bin/env sh -./mount-code.sh +./mount-samba.sh ./set-keyboard.sh ./disable-keybinds.sh diff --git a/hosts/soy/Scripts/mount-code.sh b/hosts/soy/Scripts/mount-code.sh deleted file mode 100755 index 928c65e..0000000 --- a/hosts/soy/Scripts/mount-code.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env sh -sudo mount -t nfs4 -o rw,bg,hard,fsc,proto=tcp,timeo=600,retrans=2,nfsvers=4,minorversion=2 192.168.1.206:/srv/nfs/c /home/andrew/c diff --git a/hosts/soy/Scripts/mount-samba.sh b/hosts/soy/Scripts/mount-samba.sh new file mode 100755 index 0000000..63ca111 --- /dev/null +++ b/hosts/soy/Scripts/mount-samba.sh @@ -0,0 +1,2 @@ +#! /usr/bin/env sh +sudo mount -t nfs4 -o rw,bg,hard,fsc,rsize=32768,wsize=32768,tcp,timeo=600,nfsvers=4,minorversion=2 192.168.1.206:/srv/nfs/samba /home/andrew/samba diff --git a/nix/gaming.nix b/nix/gaming.nix index 4a7d25a..7aab7d8 100644 --- a/nix/gaming.nix +++ b/nix/gaming.nix @@ -41,15 +41,15 @@ in { #}; }; }; +# chaotic.mesa-git.enable = true; programs.gamescope = { enable = true; package = pkgs.gamescope; capSysNice = true; }; -# chaotic.mesa-git.enable = true; # services.ananicy = { # enable = true; -# # package = pkgs.ananicy-cpp; +# #package = pkgs.ananicy-cpp; # settings = { # apply_nice = true; # }; diff --git a/nix/programs/sway.nix b/nix/programs/sway.nix index 5e9cb08..84fa903 100644 --- a/nix/programs/sway.nix +++ b/nix/programs/sway.nix @@ -58,6 +58,7 @@ in { }; home-manager.users.andrew = { home.sessionVariables = { + MAIN_MONITOR="${loc.monitors.monitor1}"; XDG_CURRENT_DESKTOP = "sway"; MOZ_ENABLE_WAYLAND = "1"; SDL_VIDEODRIVER = "wayland"; @@ -339,11 +340,11 @@ in { services.mako = { enable = true; settings = { - defaultTimeout = 14000; + default-timeout = 14000; font = "${loc.font.name} ${toString loc.ui-font.size}"; - backgroundColor = "#${colo.background}"; - textColor = "#${colo.foreground}"; - borderColor = "#${colo.color6}"; + background-color = "#${colo.background}"; + text-color = "#${colo.foreground}"; + border-color = "#${colo.color6}"; }; }; }; diff --git a/nix/user.nix b/nix/user.nix index 01d6e84..076bad3 100644 --- a/nix/user.nix +++ b/nix/user.nix @@ -72,6 +72,7 @@ in { cryptsetup (asNeeded "nix-index" ["nix-channel-index" "nix-index" "nix-locate"]) imagemagick + pngcheck (asNeeded "optipng" ["optipng"]) (asNeeded "dmtx-utils" ["dmtxquery" "dmtxread" "dmtxwrite"]) (asNeeded "zbar" ["zbarcam" "zbarcam-gtk" "zbarcam-qt" "zbarimg"]) diff --git a/scripts/desktop/screenshot b/scripts/desktop/screenshot index ddeb73a..bf1af96 100755 --- a/scripts/desktop/screenshot +++ b/scripts/desktop/screenshot @@ -27,7 +27,7 @@ if [[ $XDG_SESSION_TYPE == "wayland" ]]; then "qrcode") grim -t png -g "$(slurp)" - | parseqr | $copy ;; "color") grim -t ppm -g "$(slurp -p)" - | parsecolor | $copy ;; "video") wf-recorder -a -g "$(slurp)" -f $output ;; - "main") grim -t png -o DP-1 $output ;; + "main") grim -t png -o $MAIN_MONITOR $output ;; "full") grim -t png $output ;; "output") grim -t png -g "$(slurp -o)" $output ;; *) grim -t png -g "$(slurp)" $output ;; diff --git a/scripts/unzip-all b/scripts/unzip-all new file mode 100755 index 0000000..0982666 --- /dev/null +++ b/scripts/unzip-all @@ -0,0 +1,3 @@ +#! /usr/bin/env sh +# https://askubuntu.com/a/518376 +find "$1" ! -path "${1%/}/$(basename $PWD)/*" -name '*.zip' -exec sh -c 'x=${1%.*}; unzip -d "${x##*/}" "$1"' _ {} \; -- cgit v1.2.3-101-g0448