dotfiles

My PC Dotfiles & Website
commit e9e5ae808a9a4ae1bd9aa2c1c02c2a151fb49ba8
parent 1f9d8539eb4fc6209bf16dbfb0040881735b71c6
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue, 19 Dec 2023 22:26:49 +0530

chore(flake): Update `inputs`

Flake lock file updates:

• Updated input 'filters':
    'github:numtide/nix-filter/41fd48e00c22b4ced525af521ead8792402de0ea' (2023-09-16)
  → 'github:numtide/nix-filter/c843418ecfd0344ecb85844b082ff5675e02c443' (2023-12-04)
• Updated input 'flatpak':
    'github:gmodena/nix-flatpak/d8f54c27de6617c44a67c36b361d4ad2512a51ce' (2023-11-18)
  → 'github:gmodena/nix-flatpak/4f39230e34e8d5056e5b58ed9e4bb264438090bd' (2023-12-16)
• Updated input 'formatter':
    'github:numtide/treefmt-nix/e82f32aa7f06bbbd56d7b12186d555223dc399d1' (2023-11-12)
  → 'github:numtide/treefmt-nix/d06b70e5163a903f19009c3f97770014787a080f' (2023-12-13)
• Updated input 'gaming':
    'github:fufexan/nix-gaming/076d7864a6c2d02e41325c03ad3200a8a3739763' (2023-11-26)
  → 'github:fufexan/nix-gaming/f64c85c5cc619d5e87fa66ea3a22a7cd5c29555f' (2023-12-18)
• Updated input 'gaming/nixpkgs':
    'github:NixOS/nixpkgs/0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1' (2023-11-24)
  → 'github:NixOS/nixpkgs/aa9d4729cbc99dabacb50e3994dcefb3ea0f7447' (2023-12-14)
• Updated input 'generators':
    'github:nix-community/nixos-generators/150f38bd1e09e20987feacb1b0d5991357532fb5' (2023-09-30)
  → 'github:nix-community/nixos-generators/246219bc21b943c6f6812bb7744218ba0df08600' (2023-12-04)
• Updated input 'hardware':
    'github:nixos/nixos-hardware/b006ec52fce23b1d57f6ab4a42d7400732e9a0a2' (2023-11-26)
  → 'github:nixos/nixos-hardware/7763c6fd1f299cb9361ff2abf755ed9619ef01d6' (2023-12-13)
• Updated input 'home-manager':
    'github:nix-community/home-manager/aeb2232d7a32530d3448318790534d196bf9427a' (2023-11-24)
  → 'github:nix-community/home-manager/1488651d02c1a7a15e284210f0d380a62d8d8cef' (2023-12-17)
• Updated input 'index':
    'github:Mic92/nix-index-database/41afa8d1c061beda68502bcc67f2788f3a77042b' (2023-12-03)
  → 'github:Mic92/nix-index-database/4605ccd764fac78b9e4b5b058698cb9f04430b91' (2023-12-18)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/070b5cf9f70bc7ef2dfd739a1f7d6c563fe64bd1' (2023-11-27)
  → 'github:NixOS/nixpkgs/2b81606b1e6b280a6615217a67c0a31b8109d00e' (2023-12-18)
• Updated input 'nur':
    'github:nix-community/NUR/20954abdd52e1941e13c0ab3ea676097ccec0183' (2023-11-27)
  → 'github:nix-community/NUR/5d62db8546cf2cade0992be6d7a3878f3a88a4b2' (2023-12-18)
• Updated input 'sops':
    'github:Mic92/sops-nix/8bca48cb9a12bbd8766f359ad00336924e91b7f7' (2023-12-03)
  → 'github:Mic92/sops-nix/21f2b8f123a1601fef3cf6bbbdf5171257290a77' (2023-12-17)
• Updated input 'stylix':
    'github:danth/stylix/8b3f61727f3b86c27096c3c014ae602aa40670ba' (2023-11-25)
  → 'github:danth/stylix/41d218597590a89324a4b7c50cf0bf088a7214ba' (2023-12-14)
• Updated input 'unstable':
    'github:NixOS/nixpkgs/5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8' (2023-11-24)
  → 'github:NixOS/nixpkgs/a9bf124c46ef298113270b1f84a164865987a91c' (2023-12-11)
• Updated input 'windows':
    'github:emmanuelrosa/erosanix/8cbe76f6417869794981eaf073e73bd2eda650af' (2023-12-01)
  → 'github:emmanuelrosa/erosanix/658953e31f02fd11eb73b18cdc15f45765863ec4' (2023-12-18)
• Updated input 'windows/flake-compat':
    'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04)
  → 'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: maydayv7 <maydayv7@gmail.com>

Diffstat:

M.github/ISSUE_TEMPLATE/bug-report.md | 4++--
M.github/ISSUE_TEMPLATE/help-request.md | 4++--
M.github/workflows/update.yml | 2+-
MREADME.md | 11+++++++----
Mchecks/gitlab/issue_templates/Bug.md | 4++--
Mchecks/gitlab/issue_templates/Help.md | 4++--
Mflake.lock | 96++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mmodules/base/default.nix | 3++-
Mmodules/hardware/README.md | 2+-
Mpackages/default.nix | 2+-
Mpackages/flake.nix | 45+++++++++++++++++++++++----------------------
Dpackages/patches/gscan2pdf.patch | 183-------------------------------------------------------------------------------
Mscripts/commands.sh | 43+++++++++++++++++++++++++------------------
Mscripts/nixos.nix | 18+++++-------------
Mshells/default.nix | 2+-
Msite/content/about.md | 2+-
Msite/content/now.md | 2+-
17 files changed, 124 insertions(+), 303 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md @@ -32,9 +32,9 @@ Add any other context about the problem ### Metadata -Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result +Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result ```console -[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" +[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" output here ``` diff --git a/.github/ISSUE_TEMPLATE/help-request.md b/.github/ISSUE_TEMPLATE/help-request.md @@ -24,9 +24,9 @@ Add any other context about the problem ### Metadata -Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result. +Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result. ```console -[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" +[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" output here ``` diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml @@ -30,7 +30,7 @@ jobs: branch: update_flake pr-labels: dependencies pr-title: > - chore(flake.lock): Update `inputs` + chore(flake): Update `inputs` - name: Update Packages env: GIT_AUTHOR_NAME: github-actions[bot] diff --git a/README.md b/README.md @@ -238,7 +238,7 @@ sudo ./result/bin/os-install If you want to create an `.iso` image of the entire system, run the following command: _Replace_ **_DEVICE_** _with the name of Device to build_ -<pre><code>nix run github:nix-community/nixos-generators -- -f iso --flake github:maydayv7/dotfiles#<b><i>DEVICE</i></b></code></pre> +<pre><code>nix build github:maydayv7/dotfiles#nixosConfigurations.<b><i>DEVICE</i></b>.config.formats.iso</code></pre> </details> @@ -253,7 +253,7 @@ _Note that the `install` script automatically creates and labels all the require | SWAP Area | swap | swap | 4G | | DATA Partition | Files | ZFS | 10G | -> [!Note] +> [!NOTE] > For the `advanced` filesystem scheme only #### Procedure @@ -394,16 +394,19 @@ You can navigate to the `README`s present in the various directories to know mor - Support declarative [Flatpak](https://flatpak.org/) application install - Update Nix to version 2.19 - Enable Security & Hardening settings by default +- Add Boot Recovery Settings - Support Secure Boot using [`lanzaboote`](https://github.com/nix-community/lanzaboote) - Allow patching Default Package Channel -- Separate `games` and `laptop` module -- Separate `install` Script - Show package delta using [`nvd`](https://gitlab.com/khumba/nvd) - Upgrade to GNOME 45 - Update Extensions - Fix Emoji Support - Drop `.templates` - Multiple Refactors + - Separate `games` and `laptop` module + - Separate `install` Script + - Stop exposing `nixosModules` + - Fix `user.homeConfig` ### v13 diff --git a/checks/gitlab/issue_templates/Bug.md b/checks/gitlab/issue_templates/Bug.md @@ -24,9 +24,9 @@ Add any other context about the problem ### Metadata -Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result +Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result ```console -[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" +[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" output here ``` diff --git a/checks/gitlab/issue_templates/Help.md b/checks/gitlab/issue_templates/Help.md @@ -16,9 +16,9 @@ Add any other context about the problem ### Metadata -Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result. +Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result. ```console -[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" +[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" output here ``` diff --git a/flake.lock b/flake.lock @@ -192,11 +192,11 @@ }, "filters": { "locked": { - "lastModified": 1694857738, - "narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=", + "lastModified": 1701697642, + "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=", "owner": "numtide", "repo": "nix-filter", - "rev": "41fd48e00c22b4ced525af521ead8792402de0ea", + "rev": "c843418ecfd0344ecb85844b082ff5675e02c443", "type": "github" }, "original": { @@ -240,11 +240,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -312,11 +312,11 @@ }, "flatpak": { "locked": { - "lastModified": 1700311469, - "narHash": "sha256-89ulQo4Jqt1OP06DGDErkj1Dpa0i1GZzWpR6Cs5PbE8=", + "lastModified": 1702756026, + "narHash": "sha256-KEYa3S0JZCR2WpbEnVn9EXmN5/oCgWGlGg9yHoz5MLc=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "d8f54c27de6617c44a67c36b361d4ad2512a51ce", + "rev": "4f39230e34e8d5056e5b58ed9e4bb264438090bd", "type": "github" }, "original": { @@ -332,11 +332,11 @@ ] }, "locked": { - "lastModified": 1699786194, - "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", + "lastModified": 1702461037, + "narHash": "sha256-ssyGxfGHRuuLHuMex+vV6RMOt7nAo07nwufg9L5GkLg=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", + "rev": "d06b70e5163a903f19009c3f97770014787a080f", "type": "github" }, "original": { @@ -389,11 +389,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1700961605, - "narHash": "sha256-nN5m0OhqmD0gxtpXDvXyqCPQux9L/o1Yr1ALKoaOT9o=", + "lastModified": 1702898224, + "narHash": "sha256-1k7pLFEU2GWJNu5WnxO7yLbmFaUwjy5obbo4m2pFNQs=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "076d7864a6c2d02e41325c03ad3200a8a3739763", + "rev": "f64c85c5cc619d5e87fa66ea3a22a7cd5c29555f", "type": "github" }, "original": { @@ -408,11 +408,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1696058303, - "narHash": "sha256-eNqKWpF5zG0SrgbbtljFOrRgFgRzCc4++TMFADBMLnc=", + "lastModified": 1701689616, + "narHash": "sha256-ewnfgvRy73HoP5KnYmy1Rcr4m4yShvsb6TCCaKoW8pc=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "150f38bd1e09e20987feacb1b0d5991357532fb5", + "rev": "246219bc21b943c6f6812bb7744218ba0df08600", "type": "github" }, "original": { @@ -445,11 +445,11 @@ }, "hardware": { "locked": { - "lastModified": 1701020860, - "narHash": "sha256-NwnRn04C8s+hH+KdVtGmVB1FFNIG7DtPJmQSCBDaET4=", + "lastModified": 1702453208, + "narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "b006ec52fce23b1d57f6ab4a42d7400732e9a0a2", + "rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6", "type": "github" }, "original": { @@ -465,11 +465,11 @@ ] }, "locked": { - "lastModified": 1700814205, - "narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=", + "lastModified": 1702814678, + "narHash": "sha256-zDtO0jV2QLoddUJinLlTQrQqCUW3dPiIWOSYgg98T7E=", "owner": "nix-community", "repo": "home-manager", - "rev": "aeb2232d7a32530d3448318790534d196bf9427a", + "rev": "1488651d02c1a7a15e284210f0d380a62d8d8cef", "type": "github" }, "original": { @@ -501,11 +501,11 @@ ] }, "locked": { - "lastModified": 1701572887, - "narHash": "sha256-oCPwQZT0Inis4zcYhtFHUp7Rym1zglKPLDcRird35q8=", + "lastModified": 1702864432, + "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "41afa8d1c061beda68502bcc67f2788f3a77042b", + "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", "type": "github" }, "original": { @@ -531,11 +531,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1700856099, - "narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=", + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", "type": "github" }, "original": { @@ -579,11 +579,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1701058557, - "narHash": "sha256-fux7HlrnoNs93MN0kET4AfiYwg/expoasndRCFeDRyk=", + "lastModified": 1702907480, + "narHash": "sha256-6uAyxBJbIA8ET9T6ZrbphzLTkEn5HxyxxacykiIQdT8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "070b5cf9f70bc7ef2dfd739a1f7d6c563fe64bd1", + "rev": "2b81606b1e6b280a6615217a67c0a31b8109d00e", "type": "github" }, "original": { @@ -595,11 +595,11 @@ }, "nur": { "locked": { - "lastModified": 1701068004, - "narHash": "sha256-4U9oZqidE/gf2M7/0Sfzl6A2HRGDiqggTRp9J2CBEdo=", + "lastModified": 1702910532, + "narHash": "sha256-pbuL3mLubyEEJMTuNKHiIuzO6A4UFRSfsq2IZWswVcw=", "owner": "nix-community", "repo": "NUR", - "rev": "20954abdd52e1941e13c0ab3ea676097ccec0183", + "rev": "5d62db8546cf2cade0992be6d7a3878f3a88a4b2", "type": "github" }, "original": { @@ -720,11 +720,11 @@ ] }, "locked": { - "lastModified": 1701572436, - "narHash": "sha256-0anfOQqDend6kSuF8CmOSAZsiAS1nwOsin5VQukh6Q4=", + "lastModified": 1702812162, + "narHash": "sha256-18cKptpAAfkatdQgjO5SZXZsbc1IVPRoYx2AxaiooL4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8bca48cb9a12bbd8766f359ad00336924e91b7f7", + "rev": "21f2b8f123a1601fef3cf6bbbdf5171257290a77", "type": "github" }, "original": { @@ -752,11 +752,11 @@ ] }, "locked": { - "lastModified": 1700923005, - "narHash": "sha256-j1Isg4ln4bfgSGuETvYPzEdEIRc/tBPpLqXa+bfvBf0=", + "lastModified": 1702559747, + "narHash": "sha256-d6AmQp3M00WMPJquNfGVzIol5iojD1pi9slek+4N9VY=", "owner": "danth", "repo": "stylix", - "rev": "8b3f61727f3b86c27096c3c014ae602aa40670ba", + "rev": "41d218597590a89324a4b7c50cf0bf088a7214ba", "type": "github" }, "original": { @@ -825,11 +825,11 @@ }, "unstable": { "locked": { - "lastModified": 1700794826, - "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", + "lastModified": 1702312524, + "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8", + "rev": "a9bf124c46ef298113270b1f84a164865987a91c", "type": "github" }, "original": { @@ -903,11 +903,11 @@ ] }, "locked": { - "lastModified": 1701473854, - "narHash": "sha256-yXQAHNaGxW48de95RP8HkOOyaaz7zP6JR3VM5YEH4rc=", + "lastModified": 1702858149, + "narHash": "sha256-fUi7Y0cJ/EDRCNFe3uUPi/gEJVOszDYrPTyIjTCVI/8=", "owner": "emmanuelrosa", "repo": "erosanix", - "rev": "8cbe76f6417869794981eaf073e73bd2eda650af", + "rev": "658953e31f02fd11eb73b18cdc15f45765863ec4", "type": "github" }, "original": { diff --git a/modules/base/default.nix b/modules/base/default.nix @@ -1,9 +1,10 @@ { util, + inputs, pkgs, ... }: { - imports = util.map.modules.list ./.; + imports = util.map.modules.list ./. ++ [inputs.generators.nixosModules.all-formats]; ## Base Configuration ## config = { diff --git a/modules/hardware/README.md b/modules/hardware/README.md @@ -10,7 +10,7 @@ To configure Secure Boot, first install the system by using the `efi` loader, th _If the `advanced` filesystem scheme is used, the keys need to be created after `/etc/secureboot` is persisted_ -> [!Note] +> [!NOTE] > Secure Boot is only supported in EFI Mode ### File System diff --git a/packages/default.nix b/packages/default.nix @@ -1,2 +1,2 @@ # Default Package Channel -with builtins; (getFlake "git+file://${toString ./.}").legacyPackages."${currentSystem}" +with builtins; (getFlake "git+file://${toString ../.}").legacyPackages."${currentSystem}" diff --git a/packages/flake.nix b/packages/flake.nix @@ -33,29 +33,30 @@ in { patches = map.patches ./patches; pkgs' = import src {inherit system;}; in - if !(any isPath patches) - then import src - else - import (pkgs'.applyPatches { - inherit src patches; - name = "nixpkgs-patched-${src.shortRev}"; - }) { - inherit system; - config = import ../modules/nix/config.nix; - overlays = - [nur.overlay] - ++ (attrValues self.overlays or {}) - ++ [ - (final: prev: { - custom = self.packages."${system}"; - unstable = import unstable {inherit system;}; + ( + if !(any isPath patches) + then import src + else + import (pkgs'.applyPatches { + inherit src patches; + name = "nixpkgs-patched-${src.shortRev}"; + }) + ) { + inherit system; + config = import ../modules/nix/config.nix; + overlays = + [nur.overlay] + ++ (attrValues self.overlays or {}) + ++ [ + (final: prev: { + custom = self.packages."${system}"; + unstable = import unstable {inherit system;}; - gaming = gaming.packages."${system}"; - generators = generators.packages."${system}".default; - wine = windows.packages."${system}"; - }) - ]; - }; + gaming = gaming.packages."${system}"; + wine = windows.packages."${system}"; + }) + ]; + }; # Custom Packages apps = diff --git a/packages/patches/gscan2pdf.patch b/packages/patches/gscan2pdf.patch @@ -1,183 +0,0 @@ -From 9a579e14dd7536bf4cf554c065615810defd72d8 Mon Sep 17 00:00:00 2001 -From: Florian Brandes <florian.brandes@posteo.de> -Date: Tue, 21 Nov 2023 01:10:25 +0100 -Subject: [PATCH 1/4] gscan2pdf: fix build failures - -Due to the removal of tools like `tiff2pdf` from `libtiff` -many tests fail or cause a timeout. -This commit fixes the dependency to `libtiff_4_5`. - -fixes #268406 - -Signed-off-by: Florian Brandes <florian.brandes@posteo.de> ---- - pkgs/applications/graphics/gscan2pdf/default.nix | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix -index 78f25a0df3ade2..7726f9e3e36a13 100644 ---- a/pkgs/applications/graphics/gscan2pdf/default.nix -+++ b/pkgs/applications/graphics/gscan2pdf/default.nix -@@ -2,7 +2,7 @@ - # libs - librsvg, sane-backends, sane-frontends, - # runtime dependencies -- imagemagick, libtiff, djvulibre, poppler_utils, ghostscript, unpaper, pdftk, -+ imagemagick, libtiff_4_5, djvulibre, poppler_utils, ghostscript, unpaper, pdftk, - # test dependencies - xvfb-run, liberation_ttf, file, tesseract }: - -@@ -71,7 +71,7 @@ perlPackages.buildPerlPackage rec { - wrapProgram "$out/bin/gscan2pdf" \ - --prefix PATH : "${sane-backends}/bin" \ - --prefix PATH : "${imagemagick}/bin" \ -- --prefix PATH : "${libtiff}/bin" \ -+ --prefix PATH : "${libtiff_4_5}/bin" \ - --prefix PATH : "${djvulibre}/bin" \ - --prefix PATH : "${poppler_utils}/bin" \ - --prefix PATH : "${ghostscript}/bin" \ -@@ -87,7 +87,10 @@ perlPackages.buildPerlPackage rec { - - nativeCheckInputs = [ - imagemagick -- libtiff -+ # Needs older libtiff version, because it stopped packageing tools like -+ # tiff2pdf and others in version 4.6. These tools are necessary for gscan2pdf. -+ # See commit f57a4b0ac1b954eec0c8def2a99e2a464ac6ff7a for in-depth explanation. -+ libtiff_4_5 - djvulibre - poppler_utils - ghostscript - -From fe3094b0dcc167494891090d49f367c59ea4c6e9 Mon Sep 17 00:00:00 2001 -From: Florian Brandes <florian.brandes@posteo.de> -Date: Thu, 23 Nov 2023 12:00:28 +0100 -Subject: [PATCH 2/4] gscan2pdf: re-add previously removed test - -Signed-off-by: Florian Brandes <florian.brandes@posteo.de> ---- - pkgs/applications/graphics/gscan2pdf/default.nix | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix -index 7726f9e3e36a13..98713a4fa4d223 100644 ---- a/pkgs/applications/graphics/gscan2pdf/default.nix -+++ b/pkgs/applications/graphics/gscan2pdf/default.nix -@@ -133,12 +133,6 @@ perlPackages.buildPerlPackage rec { - # Non-zero wait status: 139 - rm t/0601_Dialog_Scan.t - -- # Disable a test which failed due to convert returning an exit value of 1 -- # convert: negative or zero image size `/build/KL5kTVnNCi/YfgegFM53e.pnm' @ error/resize.c/ResizeImage/3743. -- # *** unhandled exception in callback: -- # *** "convert" unexpectedly returned exit value 1 at t/357_unpaper_rtl.t line 63. -- rm t/357_unpaper_rtl.t -- - xvfb-run -s '-screen 0 800x600x24' \ - make test - ''; - -From 1e2704927aeb052ede5cedde4b6eb20d424af5d2 Mon Sep 17 00:00:00 2001 -From: Florian Brandes <florian.brandes@posteo.de> -Date: Wed, 22 Nov 2023 10:48:04 +0100 -Subject: [PATCH 3/4] gscan2pdf: add patch to remove warnings during test - -see https://sourceforge.net/p/gscan2pdf/bugs/421 - -Signed-off-by: Florian Brandes <florian.brandes@posteo.de> ---- - pkgs/applications/graphics/gscan2pdf/default.nix | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix -index 98713a4fa4d223..296d63cd6785af 100644 ---- a/pkgs/applications/graphics/gscan2pdf/default.nix -+++ b/pkgs/applications/graphics/gscan2pdf/default.nix -@@ -1,4 +1,4 @@ --{ lib, fetchurl, perlPackages, wrapGAppsHook, -+{ lib, fetchurl, perlPackages, wrapGAppsHook, fetchpatch, - # libs - librsvg, sane-backends, sane-frontends, - # runtime dependencies -@@ -17,6 +17,15 @@ perlPackages.buildPerlPackage rec { - hash = "sha256-NGz6DUa7TdChpgwmD9pcGdvYr3R+Ft3jPPSJpybCW4Q="; - }; - -+ patches = [ -+ # fixes warnings during tests. See https://sourceforge.net/p/gscan2pdf/bugs/421 -+ (fetchpatch { -+ name = "0001-Remove-given-and-when-keywords-and-operator.patch"; -+ url = "https://sourceforge.net/p/gscan2pdf/bugs/_discuss/thread/602a7cedfd/1ea4/attachment/0001-Remove-given-and-when-keywords-and-operator.patch"; -+ hash = "sha256-JtrHUkfEKnDhWfEVdIdYVlr5b/xChTzsrrPmruLaJ5M="; -+ }) -+ ]; -+ - nativeBuildInputs = [ wrapGAppsHook ]; - - buildInputs = - -From d54a7a6019d30ecee3cbd363a99297b7f2bd00d7 Mon Sep 17 00:00:00 2001 -From: Florian Brandes <florian.brandes@posteo.de> -Date: Thu, 23 Nov 2023 11:54:10 +0100 -Subject: [PATCH 4/4] gscan2pdf: patch from upstream with utf8 filenames - -see: https://sourceforge.net/p/gscan2pdf/bugs/400 - -Signed-off-by: Florian Brandes <florian.brandes@posteo.de> ---- - .../graphics/gscan2pdf/default.nix | 2 ++ - .../graphics/gscan2pdf/image-utf8-fix.patch | 32 +++++++++++++++++++ - 2 files changed, 34 insertions(+) - create mode 100644 pkgs/applications/graphics/gscan2pdf/image-utf8-fix.patch - -diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix -index 296d63cd6785af..0acc934a7fd9be 100644 ---- a/pkgs/applications/graphics/gscan2pdf/default.nix -+++ b/pkgs/applications/graphics/gscan2pdf/default.nix -@@ -24,6 +24,8 @@ perlPackages.buildPerlPackage rec { - url = "https://sourceforge.net/p/gscan2pdf/bugs/_discuss/thread/602a7cedfd/1ea4/attachment/0001-Remove-given-and-when-keywords-and-operator.patch"; - hash = "sha256-JtrHUkfEKnDhWfEVdIdYVlr5b/xChTzsrrPmruLaJ5M="; - }) -+ # fixes an error with utf8 file names. See https://sourceforge.net/p/gscan2pdf/bugs/400 -+ ./image-utf8-fix.patch - ]; - - nativeBuildInputs = [ wrapGAppsHook ]; -diff --git a/pkgs/applications/graphics/gscan2pdf/image-utf8-fix.patch b/pkgs/applications/graphics/gscan2pdf/image-utf8-fix.patch -new file mode 100644 -index 00000000000000..fa1d03e0309a81 ---- /dev/null -+++ b/pkgs/applications/graphics/gscan2pdf/image-utf8-fix.patch -@@ -0,0 +1,32 @@ -+diff --git a/bin/gscan2pdf b/bin/gscan2pdf -+index e075b0f2..ff124522 100755 -+--- a/bin/gscan2pdf -++++ b/bin/gscan2pdf -+@@ -3434,9 +3434,11 @@ sub save_image { -+ if ( @{$list_of_pages} > 1 ) { -+ my $w = length scalar @{$list_of_pages}; -+ for ( 1 .. @{$list_of_pages} ) { -++ _utf8_on($filename); -+ my $current_filename = -+ sprintf "${filename}_%0${w}d.$SETTING{'image type'}", -+ $_; -++ _utf8_off($filename); -+ if ( -f $current_filename ) { -+ my $text = sprintf __('This operation would overwrite %s'), -+ $current_filename; -+@@ -3450,11 +3452,15 @@ sub save_image { -+ return; -+ } -+ } -++ _utf8_on($filename); -+ $filename = "${filename}_%0${w}d.$SETTING{'image type'}"; -++ _utf8_off($filename); -+ } -+ else { -+ if ( $filename !~ /[.]$SETTING{'image type'}$/ixsm ) { -++ _utf8_on($filename); -+ $filename = "$filename.$SETTING{'image type'}"; -++ _utf8_off($filename); -+ return if ( file_exists( $file_chooser, $filename ) ); -+ } -+ return if ( file_writable( $file_chooser, $filename ) ); diff --git a/scripts/commands.sh b/scripts/commands.sh @@ -3,16 +3,7 @@ # Useful Commands # -error() { - echo -e "\n\033[0;31merror:\033[0m $1" - if [ -n "$2" ] - then - echo -e "\n$2" - fi - exit 7 -} - -extract () { +extract() { if [ -f "$1" ] then case $1 in @@ -42,10 +33,26 @@ internet() { fi } +up() { + LIMIT=$1 + P=$PWD/.. + for ((i=1; i < LIMIT; i++)) + do + P=$P/.. + done + cd "$P" || exit +} + newline() { echo -e "\n"; } +temp(){ + TEMP=/tmp/script + rm -rf "$TEMP" + mkdir -p "$TEMP" +} + restart() { read -rp "Do you want to Reboot the System? (Y/N): " choice case $choice in @@ -54,14 +61,14 @@ restart() { esac } -up () { - LIMIT=$1 - P=$PWD/.. - for ((i=1; i < LIMIT; i++)) - do - P=$P/.. - done - cd "$P" || exit + +error() { + echo -e "\n\033[0;31merror:\033[0m $1" + if [ -n "$2" ] + then + echo -e "\n$2" + fi + exit 7 } info() { diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -46,7 +46,6 @@ with files; let # Usage # --activate - Activates Current Configuration --boot - Applies Configuration on boot - --check - Checks Configuration Build --delta - Shows Package Delta for Build --rollback [ 'generation' ] - Reverts to Last [ or Specified ] Build Generation --test - Tests Configuration Build @@ -88,7 +87,6 @@ in runtimeInputs = with pkgs; [ cachix coreutils - generators git gnupg gnused @@ -129,24 +127,18 @@ in sudo nixos-rebuild boot --flake ${path.system}# restart ;; - "--check") - echo "Checking Configuration..." - nixos-rebuild dry-activate --flake ${path.system}# - ;; "--delta") - DIR=/tmp/nixos/build - mkdir "$DIR" && pushd "$DIR" &> /dev/null + temp + pushd "$TEMP" &> /dev/null echo "Building Configuration..." - info "This may take a while..." - if nixos-rebuild build --flake ${path.system}# &> /dev/null + if nixos-rebuild build --flake ${path.system}# then echo "Processing Delta..." nvd diff /run/current-system result else - rm -rf "$DIR" && error "Couldn't build generation successfully" + error "Couldn't build generation successfully" fi popd &> /dev/null - rm -rf "$DIR" ;; "--test") echo "Testing Configuration..." @@ -225,7 +217,7 @@ in elif grep -wq "$2" <<<"${nixosConfigurations}" &> /dev/null then echo "Building '$2' Device Image..." - nixos-generate -f iso --flake ${path.system}#"$2" + nix build ${path.system}#nixosConfigurations."$2".config.formats.iso else error "Unknown Variant '$2'" "# Available Variants #\n Install Media: ${installMedia}\n Devices: ${nixosConfigurations}" fi diff --git a/shells/default.nix b/shells/default.nix @@ -2,7 +2,7 @@ with pkgs; mkShell { name = "devShell"; - packages = [git gnupg jq sops treefmt] ++ [figlet neofetch]; + packages = [git gnupg jq nixFlakes sops treefmt] ++ [figlet neofetch]; shellHook = '' echo -e "\e[36m## Default Developer Shell ##" echo -e "\e[34m Version: $(nix --version)" diff --git a/site/content/about.md b/site/content/about.md @@ -7,7 +7,7 @@ skip-meta = true # Who am I? -I am **Vishrut Gurrala**, a 17 year old student in Bengaluru, India +I am **Vishrut Gurrala**, a 18 year old student in Bengaluru, India Tech Enthusiast (_read:_ live and breath technology) and avid reader diff --git a/site/content/now.md b/site/content/now.md @@ -12,4 +12,4 @@ This page is inspired by [NowNowNow](https://nownownow.com) Nothing much else really! ;) -> Last Updated: **September** 2023 +> Last Updated: **December** 2023