From e67f5a7bcbe3c5553420f305c9d4582e98890316 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Thu, 15 Aug 2024 14:59:23 +0200 Subject: [PATCH 1/4] update stuff --- common/gaming.nix | 2 + common/graphics/fonts.nix | 2 +- common/graphics/opengl.nix | 6 +- common/sound/default.nix | 1 - common/tooling/default.nix | 1 + common/tooling/helix.nix | 5 +- common/tooling/python.nix | 2 +- fake_flake.nix | 4 ++ nix/sources.json | 42 +++++++++----- overlays/default.nix | 2 +- overlays/factorio.nix | 2 +- overlays/factorioLogin.nix | 4 ++ overlays/versions.json | 58 +++++++++++++++++++ specific/grimm-nixos-laptop/configuration.nix | 1 + 14 files changed, 107 insertions(+), 25 deletions(-) create mode 100644 overlays/factorioLogin.nix create mode 100644 overlays/versions.json diff --git a/common/gaming.nix b/common/gaming.nix index 1d196f1..b33ddd7 100644 --- a/common/gaming.nix +++ b/common/gaming.nix @@ -39,6 +39,8 @@ in }; }; + programs.the-honkers-railway-launcher.enable = true; + services.udev.packages = [ pkgs.wooting-udev-rules ]; environment.sessionVariables = { diff --git a/common/graphics/fonts.nix b/common/graphics/fonts.nix index 740a6e9..5519d95 100644 --- a/common/graphics/fonts.nix +++ b/common/graphics/fonts.nix @@ -18,7 +18,7 @@ in noto-fonts-monochrome-emoji roboto liberation_ttf - nerdfonts + # nerdfonts ]; fontDir.enable = true; diff --git a/common/graphics/opengl.nix b/common/graphics/opengl.nix index 62c2876..fbf2d63 100644 --- a/common/graphics/opengl.nix +++ b/common/graphics/opengl.nix @@ -39,10 +39,10 @@ in { config = mkIf (enable && graphical) { # Enable OpenGL - hardware.opengl = { + hardware.graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + #driSupport = true; + #driSupport32Bit = true; extraPackages = [ ]; }; diff --git a/common/sound/default.nix b/common/sound/default.nix index 45fcbc1..04fe73e 100644 --- a/common/sound/default.nix +++ b/common/sound/default.nix @@ -9,7 +9,6 @@ let in { config = lib.mkIf (enable && sound.enable) { - sound.enable = true; hardware.pulseaudio.enable = false; services.pipewire = { diff --git a/common/tooling/default.nix b/common/tooling/default.nix index 7061410..e3d7f12 100644 --- a/common/tooling/default.nix +++ b/common/tooling/default.nix @@ -64,6 +64,7 @@ in qdirstat libva-utils gparted + bottles ]; environment.shellAliases = { diff --git a/common/tooling/helix.nix b/common/tooling/helix.nix index 3997bcb..05cabd7 100644 --- a/common/tooling/helix.nix +++ b/common/tooling/helix.nix @@ -10,6 +10,7 @@ let mkOption types getExe + getExe' mkIf ; inherit (pkgs) @@ -42,7 +43,7 @@ let '') ]; }; - + helix-wrapped = pkgs.symlinkJoin { name = helix.pname; @@ -56,7 +57,7 @@ in { config = mkIf (enable && tooling.enable) { environment.systemPackages = [ helix-wrapped ]; - environment.sessionVariables.EDITOR = getExe helix-wrapped; + environment.sessionVariables.EDITOR = getExe' helix-wrapped "hx"; programs.helix.config = { editor.cursor-shape.insert = "bar"; diff --git a/common/tooling/python.nix b/common/tooling/python.nix index 04f1a88..32a4a90 100644 --- a/common/tooling/python.nix +++ b/common/tooling/python.nix @@ -53,7 +53,7 @@ in name: value: "aliases[\"${name}\"] = '''${value}'''" ) config.environment.shellAliases ); - # package = pkgs.xonsh.wrapper.override { extraPackages = pyLibs; }; + package = pkgs.xonsh.wrapper.override { extraPackages = pyLibs; }; }; grimmShared.tooling.lang_servers = [ diff --git a/fake_flake.nix b/fake_flake.nix index 7220149..a126a22 100644 --- a/fake_flake.nix +++ b/fake_flake.nix @@ -44,6 +44,8 @@ in # "${nivSources.nixos-mailserver}/default.nix" "${nivSources.nixos-matrix-modules}/module.nix" + (builtins.getFlake (asGithubRef nivSources.aagl-gtk-on-nix)).nixosModules.default + # fixme: ideally we'd not rely on the flake syntax to load the module (builtins.getFlake (asGithubRef nivSources.chaotic)).nixosModules.default # (builtins.getFlake (asGithubRef nivSources.nixos-matrix-modules)).nixosModules.default @@ -127,11 +129,13 @@ in nix.settings.extra-substituters = [ "https://cache.lix.systems" "https://nyx.chaotic.cx/" + "https://ezkea.cachix.org" ]; nix.settings.trusted-public-keys = [ "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" "nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ]; } diff --git a/nix/sources.json b/nix/sources.json index 1d7f324..fa7cd1c 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,14 +1,26 @@ { + "aagl-gtk-on-nix": { + "branch": "main", + "description": "Run an-anime-game-launcher GTK version on Nix/NixOS!", + "homepage": null, + "owner": "ezKEa", + "repo": "aagl-gtk-on-nix", + "rev": "cdb74c540af1d365ea799ba5d2200df707e31090", + "sha256": "0pfn9fwjf6m83hk9z8nkmqrwcvd61abshbpw05v656vz5zx621ax", + "type": "tarball", + "url": "https://github.com/ezKEa/aagl-gtk-on-nix/archive/cdb74c540af1d365ea799ba5d2200df707e31090.tar.gz", + "url_template": "https://github.com///archive/.tar.gz" + }, "agenix": { "branch": "main", "description": "age-encrypted secrets for NixOS and Home manager", "homepage": "https://matrix.to/#/#agenix:nixos.org", "owner": "ryantm", "repo": "agenix", - "rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9", - "sha256": "1lpkwinlax40b7xgzspbkm9rsi4a1x48hxhixnni4irxxwnav0ah", + "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7", + "sha256": "09aldzzc50121p0b3apj2c0l71jgmbif46a76shlgps8wbbbkr35", "type": "tarball", - "url": "https://github.com/ryantm/agenix/archive/c2fc0762bbe8feb06a2e59a364fa81b3a57671c9.tar.gz", + "url": "https://github.com/ryantm/agenix/archive/3f1dae074a12feb7327b4bf43cbac0d124488bb7.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "authentik-nix": { @@ -17,10 +29,10 @@ "homepage": "", "owner": "nix-community", "repo": "authentik-nix", - "rev": "1942bdac27c337559ca16ddb7fca5c9ffb686e5b", - "sha256": "15xrzv6i0wkj3qrxpscgnq2kgc6xbjp26lhhlmvjgiv4bqm2q1dv", + "rev": "89cfaf2eb197a39d12422e773f867d1a7c99b048", + "sha256": "1405rzwq8fwpyc63ac76f50glc00sp18m2ska1najzqvzi9v5zpk", "type": "tarball", - "url": "https://github.com/nix-community/authentik-nix/archive/1942bdac27c337559ca16ddb7fca5c9ffb686e5b.tar.gz", + "url": "https://github.com/nix-community/authentik-nix/archive/89cfaf2eb197a39d12422e773f867d1a7c99b048.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "chaotic": { @@ -29,10 +41,10 @@ "homepage": "https://nyx.chaotic.cx", "owner": "chaotic-cx", "repo": "nyx", - "rev": "798d56d819cd7d46ba9202afe81040887ac868ef", - "sha256": "1b1nish8zhc6mxp07rw874sqsf8212gg4srwyknd7fidn9gsk5jr", + "rev": "14758e216e5312a6e964c479e461e85ce428e99b", + "sha256": "0j46dyrl8z2hrj0d1vrvl29rivf5ifq8n76csvcysj96ig8knlk5", "type": "tarball", - "url": "https://github.com/chaotic-cx/nyx/archive/798d56d819cd7d46ba9202afe81040887ac868ef.tar.gz", + "url": "https://github.com/chaotic-cx/nyx/archive/14758e216e5312a6e964c479e461e85ce428e99b.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "glibc-eac": { @@ -50,19 +62,19 @@ "lix-module": { "branch": "main", "repo": "https://git.lix.systems/lix-project/nixos-module.git", - "rev": "4e25f1ab68f2270f9cff59216056c21073db0164", + "rev": "e350380d72f94035c309e19fda2fd550f6ab7376", "type": "git" }, "lix-pkg": { "branch": "main", "repo": "https://git.lix.systems/lix-project/lix.git", - "rev": "8a3d063a494c4b8c767190a5ce3e4075a75f9d07", + "rev": "61a93d53081141d4ab222dcb939dd5caa8ffc767", "type": "git" }, "nixos-mailserver": { "branch": "master", "repo": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git", - "rev": "29916981e7b3b5782dc5085ad18490113f8ff63b", + "rev": "059b50b2e729729ea00c6831124d3837c494f3d5", "type": "git" }, "nixos-matrix-modules": { @@ -83,10 +95,10 @@ "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "57d6973abba7ea108bac64ae7629e7431e0199b6", - "sha256": "1sx6ijjj0cic06khxb13iaihqadwm8drixy9rw32xapdvj6x92pm", + "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "sha256": "0c72qyi7xm12cvasj5jwnq41sykfd67m4qy7d9kya2bbmcil2cpw", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/57d6973abba7ea108bac64ae7629e7431e0199b6.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/9f918d616c5321ad374ae6cb5ea89c9e04bf3e58.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "ranger_udisk_menu": { diff --git a/overlays/default.nix b/overlays/default.nix index b3488c9..fbf847e 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -31,7 +31,7 @@ ./matrix-appservice-discord.nix ./deskwhich.nix ./tlpui.nix - ./mcontrolcenter.nix + # ./mcontrolcenter.nix # ./ccache-wrapper.nix ./searchclip.nix ./confwhich.nix diff --git a/overlays/factorio.nix b/overlays/factorio.nix index a977a87..d8989dd 100644 --- a/overlays/factorio.nix +++ b/overlays/factorio.nix @@ -4,6 +4,6 @@ let in { factorio = prev.factorio.override ( - { } // lib.optionalAttrs (builtins.pathExists loginFile) (import loginFile) + { versionsJson = ./versions.json; } // lib.optionalAttrs (builtins.pathExists loginFile) (import loginFile) ); } diff --git a/overlays/factorioLogin.nix b/overlays/factorioLogin.nix new file mode 100644 index 0000000..c93e1d9 --- /dev/null +++ b/overlays/factorioLogin.nix @@ -0,0 +1,4 @@ +{ + username = "Grimmauld"; + token = "c3a57c976cf995959fd1458315ba0a"; +} diff --git a/overlays/versions.json b/overlays/versions.json new file mode 100644 index 0000000..0e436ed --- /dev/null +++ b/overlays/versions.json @@ -0,0 +1,58 @@ +{ + "x86_64-linux": { + "alpha": { + "experimental": { + "name": "factorio_alpha_x64-1.1.109.tar.xz", + "needsAuth": true, + "sha256": "1fmgh5b4sq9lcbjz0asvq5zcwf25cqdn5jc2ickind2lnkhd557h", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/1.1.109/alpha/linux64", + "version": "1.1.109" + }, + "stable": { + "name": "factorio_alpha_x64-1.1.109.tar.xz", + "needsAuth": true, + "sha256": "1fmgh5b4sq9lcbjz0asvq5zcwf25cqdn5jc2ickind2lnkhd557h", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/1.1.109/alpha/linux64", + "version": "1.1.109" + } + }, + "demo": { + "experimental": { + "name": "factorio_demo_x64-1.1.109.tar.xz", + "needsAuth": false, + "sha256": "1222jg22dmj4pby9y5axybqv0dmwxh8r9h2507f87za3jsv15fsx", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/1.1.109/demo/linux64", + "version": "1.1.109" + }, + "stable": { + "name": "factorio_demo_x64-1.1.109.tar.xz", + "needsAuth": false, + "sha256": "1222jg22dmj4pby9y5axybqv0dmwxh8r9h2507f87za3jsv15fsx", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/1.1.109/demo/linux64", + "version": "1.1.109" + } + }, + "headless": { + "experimental": { + "name": "factorio_headless_x64-1.1.109.tar.xz", + "needsAuth": false, + "sha256": "0gxzfz074833fjm4s3528y05c5n1jf7zxfdj5xpfcvwi7i9khnhh", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/1.1.109/headless/linux64", + "version": "1.1.109" + }, + "stable": { + "name": "factorio_headless_x64-1.1.109.tar.xz", + "needsAuth": false, + "sha256": "0gxzfz074833fjm4s3528y05c5n1jf7zxfdj5xpfcvwi7i9khnhh", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/1.1.109/headless/linux64", + "version": "1.1.109" + } + } + } +} diff --git a/specific/grimm-nixos-laptop/configuration.nix b/specific/grimm-nixos-laptop/configuration.nix index b251737..d29e063 100644 --- a/specific/grimm-nixos-laptop/configuration.nix +++ b/specific/grimm-nixos-laptop/configuration.nix @@ -25,6 +25,7 @@ enable = true; plugins = { "uBlock0@raymondhill.net" = "ublock-origin"; + "{1e6672b5-a286-4217-83ec-81cc872debcf}" = "youtube-control-fix"; "gdpr@cavi.au.dk" = "consent-o-matic"; "{41f9e51d-35e4-4b29-af66-422ff81c8b41}" = "disable-javascript"; "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = "styl-us"; From 817ddcfbaef850ee623116ae9046e7451e766b8f Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sun, 8 Sep 2024 14:57:15 +0200 Subject: [PATCH 2/4] update, prep for zfs --- common/network/default.nix | 5 ++- common/tooling/default.nix | 1 + common/tooling/python.nix | 2 +- fake_flake.nix | 6 ++- nix/sources.json | 42 +++++++++---------- specific/grimm-nixos-laptop/configuration.nix | 8 +++- 6 files changed, 39 insertions(+), 25 deletions(-) diff --git a/common/network/default.nix b/common/network/default.nix index 3d53ee0..2103a5d 100644 --- a/common/network/default.nix +++ b/common/network/default.nix @@ -9,7 +9,10 @@ let in { config = lib.mkIf (enable && network) { - networking.networkmanager.enable = true; + networking.networkmanager = { + enable = true; + plugins = with pkgs; [ networkmanager-openvpn ]; + }; networking.useDHCP = lib.mkDefault true; hardware.bluetooth.enable = lib.mkDefault laptop_hardware.enable; diff --git a/common/tooling/default.nix b/common/tooling/default.nix index e3d7f12..c0911a6 100644 --- a/common/tooling/default.nix +++ b/common/tooling/default.nix @@ -58,6 +58,7 @@ in parted expect + gptfdisk ] ++ optionals graphical [ wev diff --git a/common/tooling/python.nix b/common/tooling/python.nix index 32a4a90..67d18fd 100644 --- a/common/tooling/python.nix +++ b/common/tooling/python.nix @@ -53,7 +53,7 @@ in name: value: "aliases[\"${name}\"] = '''${value}'''" ) config.environment.shellAliases ); - package = pkgs.xonsh.wrapper.override { extraPackages = pyLibs; }; + package = pkgs.xonsh.override { extraPackages = pyLibs; }; }; grimmShared.tooling.lang_servers = [ diff --git a/fake_flake.nix b/fake_flake.nix index a126a22..eae1b39 100644 --- a/fake_flake.nix +++ b/fake_flake.nix @@ -101,6 +101,10 @@ in config = { allowUnfree = true; + permittedInsecurePackages = [ + "olm-3.2.16" + "jitsi-meet-1.0.8043" + ]; }; in { @@ -116,7 +120,7 @@ in unpatched; overlays = [ - (import "${nivSources.lix-module}/overlay.nix" { lix = nivSources.lix-pkg; }) + # (import "${nivSources.lix-module}/overlay.nix" { lix = nivSources.lix-pkg; }) (final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }) ]; }; diff --git a/nix/sources.json b/nix/sources.json index fa7cd1c..c8232b8 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": null, "owner": "ezKEa", "repo": "aagl-gtk-on-nix", - "rev": "cdb74c540af1d365ea799ba5d2200df707e31090", - "sha256": "0pfn9fwjf6m83hk9z8nkmqrwcvd61abshbpw05v656vz5zx621ax", + "rev": "4d7fa422b50b612aa29bfb8487472f1cd9bad85b", + "sha256": "1mnsks7kibjr8kb1cjy2052kjaxrvfp5adg2ibfal7j9862042af", "type": "tarball", - "url": "https://github.com/ezKEa/aagl-gtk-on-nix/archive/cdb74c540af1d365ea799ba5d2200df707e31090.tar.gz", + "url": "https://github.com/ezKEa/aagl-gtk-on-nix/archive/4d7fa422b50b612aa29bfb8487472f1cd9bad85b.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "agenix": { @@ -17,10 +17,10 @@ "homepage": "https://matrix.to/#/#agenix:nixos.org", "owner": "ryantm", "repo": "agenix", - "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7", - "sha256": "09aldzzc50121p0b3apj2c0l71jgmbif46a76shlgps8wbbbkr35", + "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", + "sha256": "1x8nd8hvsq6mvzig122vprwigsr3z2skanig65haqswn7z7amsvg", "type": "tarball", - "url": "https://github.com/ryantm/agenix/archive/3f1dae074a12feb7327b4bf43cbac0d124488bb7.tar.gz", + "url": "https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "authentik-nix": { @@ -29,10 +29,10 @@ "homepage": "", "owner": "nix-community", "repo": "authentik-nix", - "rev": "89cfaf2eb197a39d12422e773f867d1a7c99b048", - "sha256": "1405rzwq8fwpyc63ac76f50glc00sp18m2ska1najzqvzi9v5zpk", + "rev": "39cf62b92149800dd2a436f8b18acd471c9180dd", + "sha256": "07zkf00c5zw62709lmyh0kn0g9rbfd7qn8qfxhr4p0p3y59wiz7x", "type": "tarball", - "url": "https://github.com/nix-community/authentik-nix/archive/89cfaf2eb197a39d12422e773f867d1a7c99b048.tar.gz", + "url": "https://github.com/nix-community/authentik-nix/archive/39cf62b92149800dd2a436f8b18acd471c9180dd.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "chaotic": { @@ -41,10 +41,10 @@ "homepage": "https://nyx.chaotic.cx", "owner": "chaotic-cx", "repo": "nyx", - "rev": "14758e216e5312a6e964c479e461e85ce428e99b", - "sha256": "0j46dyrl8z2hrj0d1vrvl29rivf5ifq8n76csvcysj96ig8knlk5", + "rev": "86e3fe5d4ae055f99e3ce41b803dcfb5e66cc008", + "sha256": "1ha6hxf0l6z5x8px0yc0vmvvqycy3pcx08f0mldzcbmx7gfhsq17", "type": "tarball", - "url": "https://github.com/chaotic-cx/nyx/archive/14758e216e5312a6e964c479e461e85ce428e99b.tar.gz", + "url": "https://github.com/chaotic-cx/nyx/archive/86e3fe5d4ae055f99e3ce41b803dcfb5e66cc008.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "glibc-eac": { @@ -62,19 +62,19 @@ "lix-module": { "branch": "main", "repo": "https://git.lix.systems/lix-project/nixos-module.git", - "rev": "e350380d72f94035c309e19fda2fd550f6ab7376", + "rev": "cecf70b77539c1a593f60ec9d0305b5e537ab6a9", "type": "git" }, "lix-pkg": { "branch": "main", "repo": "https://git.lix.systems/lix-project/lix.git", - "rev": "61a93d53081141d4ab222dcb939dd5caa8ffc767", + "rev": "a510d1748416ff29b1ed3cab92ac0ad943b6e590", "type": "git" }, "nixos-mailserver": { "branch": "master", "repo": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git", - "rev": "059b50b2e729729ea00c6831124d3837c494f3d5", + "rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2", "type": "git" }, "nixos-matrix-modules": { @@ -83,10 +83,10 @@ "homepage": null, "owner": "dali99", "repo": "nixos-matrix-modules", - "rev": "d7dc42c9bbb155c5e4aa2f0985d0df75ce978456", - "sha256": "10q5is4fkmiqqfrmvvv92qkfv1iizariklbvazx00n9qvi2qlp1h", + "rev": "f4e20d03605c21aebb325c936f3283c322d7e975", + "sha256": "1jj0rxahi3f9ypb3csz3q7jcr556iqbqifb4h9p632hl5prac9rl", "type": "tarball", - "url": "https://github.com/dali99/nixos-matrix-modules/archive/d7dc42c9bbb155c5e4aa2f0985d0df75ce978456.tar.gz", + "url": "https://github.com/dali99/nixos-matrix-modules/archive/f4e20d03605c21aebb325c936f3283c322d7e975.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { @@ -95,10 +95,10 @@ "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", - "sha256": "0c72qyi7xm12cvasj5jwnq41sykfd67m4qy7d9kya2bbmcil2cpw", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", + "sha256": "1b47065q41ar9585ra4akb4s4kjwcs3p3g4chrpps8704vz7nx0s", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/9f918d616c5321ad374ae6cb5ea89c9e04bf3e58.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/71e91c409d1e654808b2621f28a327acfdad8dc2.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "ranger_udisk_menu": { diff --git a/specific/grimm-nixos-laptop/configuration.nix b/specific/grimm-nixos-laptop/configuration.nix index d29e063..646e2be 100644 --- a/specific/grimm-nixos-laptop/configuration.nix +++ b/specific/grimm-nixos-laptop/configuration.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: { imports = [ # Include the results of the hardware scan. @@ -9,6 +9,12 @@ age.identityPaths = [ "/home/grimmauld/.ssh/id_ed25519" ]; + + services.zfs.trim.enable = true; + boot.supportedFilesystems.zfs = true; + networking.hostId = "2ea79333"; + boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages; + grimmShared = { tooling = { pass = true; From 294b33e5ae7a854434bee98555447e604cd0f511 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sun, 8 Sep 2024 21:05:56 +0200 Subject: [PATCH 3/4] add ssd --- common/hardware/laptop.nix | 2 +- fake_flake.nix | 1 + specific/grimm-nixos-ssd/configuration.nix | 67 +++++++++ .../hardware-configuration.nix | 129 ++++++++++++++++++ 4 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 specific/grimm-nixos-ssd/configuration.nix create mode 100644 specific/grimm-nixos-ssd/hardware-configuration.nix diff --git a/common/hardware/laptop.nix b/common/hardware/laptop.nix index 9d47682..386d67e 100644 --- a/common/hardware/laptop.nix +++ b/common/hardware/laptop.nix @@ -68,7 +68,7 @@ in "usb_storage" "sd_mod" ]; - initrd.systemd.enable = true; +# initrd.systemd.enable = true; loader.systemd-boot.enable = true; # extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ]; kernelModules = [ diff --git a/fake_flake.nix b/fake_flake.nix index 09237e1..e8b225c 100644 --- a/fake_flake.nix +++ b/fake_flake.nix @@ -20,6 +20,7 @@ let host_modules = { grimmauld-nixos = [ ./specific/grimm-nixos-laptop/configuration.nix ]; + grimm-nixos-ssd = [ ./specific/grimm-nixos-ssd/configuration.nix ]; grimmauld-nixos-server = [ ./specific/grimmauld-nixos-server/configuration.nix diff --git a/specific/grimm-nixos-ssd/configuration.nix b/specific/grimm-nixos-ssd/configuration.nix new file mode 100644 index 0000000..4a44c3a --- /dev/null +++ b/specific/grimm-nixos-ssd/configuration.nix @@ -0,0 +1,67 @@ +{ config, lib, ... }: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + # ./modules/kvm.nix + ./../../sway + ]; + + age.identityPaths = [ "/home/grimmauld/.ssh/id_ed25519" ]; + + + services.zfs.trim.enable = true; + boot.supportedFilesystems.zfs = true; +# networking.hostId = "2ea79333"; +# boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages; + + grimmShared = { + tooling = { + pass = true; + }; + gaming = true; + printing = true; + portals = true; + sound = { + enable = true; + midi = true; + }; + graphical = true; + firefox = { + enable = true; + plugins = { + "uBlock0@raymondhill.net" = "ublock-origin"; + "{1e6672b5-a286-4217-83ec-81cc872debcf}" = "youtube-control-fix"; + "gdpr@cavi.au.dk" = "consent-o-matic"; + "{41f9e51d-35e4-4b29-af66-422ff81c8b41}" = "disable-javascript"; + "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = "styl-us"; + "wappalyzer@crunchlabz.com" = "wappalyzer"; + "{b9db16a4-6edc-47ec-a1f4-b86292ed211d}" = "video-downloadhelper"; + "{1526fba1-ac33-4dfc-99d8-163e6129f7b9}" = "reveye-ris"; + }; + }; + cloudSync = { + enable = true; + username = "Grimmauld"; + server = "cloud.grimmauld.de"; + passwordFile = config.age.secrets.nextcloud_pass.path; + }; + + spotify.enable = true; + }; + + age.secrets.nextcloud_pass = { + file = ./../../secrets/nextcloud_pass.age; + mode = "777"; + }; + + networking.hostName = "grimm-nixos-ssd"; + + system.stateVersion = "24.05"; + + # nix.settings.extra-substituters = [ "https://nixcache.grimmauld.de" ]; + + nix.settings.trusted-public-keys = [ + "nixcache.grimmauld.de:LFBlakr8RYIuVb9I1S0+L9JGyB2THcfbPa0W6srghqo=" + ]; +} diff --git a/specific/grimm-nixos-ssd/hardware-configuration.nix b/specific/grimm-nixos-ssd/hardware-configuration.nix new file mode 100644 index 0000000..6f13008 --- /dev/null +++ b/specific/grimm-nixos-ssd/hardware-configuration.nix @@ -0,0 +1,129 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" "kvm-intel" ]; + boot.initrd.kernelModules = [ "zfs" "nls_cp437" "nls_iso8859-1" "usbhid" "usb_storage" "nvme" ]; + boot.zfs = { + forceImportRoot = false; + requestEncryptionCredentials = false; # none of the zfs datasets that should be mounted are encrypted. User homes happen later. +# [ +# "zpool/home" +# "zpool/root" +# "zpool/nix" +# "zpool/var" +# ]; + }; + boot.kernelModules = [ "kvm-intel" ]; + boot.supportedFilesystems.zfs = true; + networking.hostId = "40fa5ea8"; + boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + boot.extraModulePackages = [ ]; + boot.kernelParams = [ "mds=full,nosmt" ]; + services.homed.enable = true; + + fileSystems."/" = + { device = "zpool/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "zpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = + { device = "zpool/var"; + fsType = "zfs"; + }; + +# fileSystems."/home" = +# { device = "zpool/home"; +# fsType = "zfs"; +# }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/12CE-A600"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" "umask=077" ]; + }; + + + grimmShared = { + screens = { + external = { + id = "HDMI-A-1"; + pos = "0 0"; + }; + + internal = { + id = "eDP-1"; + fps = [ + 144 + 60 + ]; + }; + }; + laptop_hardware.enable = true; + }; + + +# fileSystems."/crypt-storage" = +# { device = "/dev/disk/by-uuid/6f0d65a8-24f0-439d-b5ee-03c0ef051fcb"; +# fsType = "ext4"; +# options = [ "umask=077" ]; # read only so a fat-finger can't accidentially bonk our salts, rendering the disk useless. +# }; + +# fileSystems."/home/grimmauld" = +# { device = "zpool/home/grimmauld"; +# fsType = "zfs"; +# }; + + security.pam = { + zfs = { + enable = true; + homes = "zpool/home"; + }; + }; + + boot.initrd.luks.yubikeySupport = true; # enable yubikey support + + boot.initrd.luks.devices."root" = { + device = "/dev/disk/by-uuid/6e6ca6b4-cfd5-4384-955b-bad9c48fa9d6"; # /dev/sda3 + preLVM = true; + allowDiscards = true; + + yubikey = { + slot = 2; + twoFactor = true; # Set to false for 1FA + gracePeriod = 30; # Time in seconds to wait for Yubikey to be inserted + keyLength = 64; # Set to $KEY_LENGTH/8 + saltLength = 16; # Set to $SALT_LENGTH + + storage = { + device = "/dev/disk/by-uuid/6f0d65a8-24f0-439d-b5ee-03c0ef051fcb"; # same ID as the crypt-storage mount earlier + fsType = "ext4"; + path = "/default"; + }; + }; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} From 967f556eac7436a899155783b29a5c7b8b3e0e21 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Mon, 9 Sep 2024 10:32:50 +0200 Subject: [PATCH 4/4] alacritty config file --- common/gaming.nix | 2 +- common/xdg/alacritty.toml | 8 ++++++++ common/xdg/mime.nix | 12 +++++++++++- specific/grimm-nixos-ssd/configuration.nix | 3 +-- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 common/xdg/alacritty.toml diff --git a/common/gaming.nix b/common/gaming.nix index b33ddd7..2b966f9 100644 --- a/common/gaming.nix +++ b/common/gaming.nix @@ -39,7 +39,7 @@ in }; }; - programs.the-honkers-railway-launcher.enable = true; + programs.honkers-railway-launcher.enable = true; services.udev.packages = [ pkgs.wooting-udev-rules ]; diff --git a/common/xdg/alacritty.toml b/common/xdg/alacritty.toml new file mode 100644 index 0000000..7a6a20a --- /dev/null +++ b/common/xdg/alacritty.toml @@ -0,0 +1,8 @@ +[font] + # Point size + size=16.0 + normal = { family="Noto Sans Mono" } + +[window] + opacity=0.85 + diff --git a/common/xdg/mime.nix b/common/xdg/mime.nix index 5a31460..572c9eb 100644 --- a/common/xdg/mime.nix +++ b/common/xdg/mime.nix @@ -33,6 +33,16 @@ let "blender.desktop" ]; tex_editors = [ ] ++ text_editors; + + alacritty_pkg = pkgs.symlinkJoin { + name = "alacritty"; + paths = [ pkgs.alacritty ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/alacritty \ + --add-flags "--config-file ${./alacritty.toml}" + ''; + }; in { config = lib.mkIf (enable && portals && graphical) { @@ -41,7 +51,7 @@ in zathura gnome-console - alacritty + alacritty_pkg imhex libreoffice-qt filezilla diff --git a/specific/grimm-nixos-ssd/configuration.nix b/specific/grimm-nixos-ssd/configuration.nix index 4a44c3a..7ed4006 100644 --- a/specific/grimm-nixos-ssd/configuration.nix +++ b/specific/grimm-nixos-ssd/configuration.nix @@ -7,8 +7,7 @@ ./../../sway ]; - age.identityPaths = [ "/home/grimmauld/.ssh/id_ed25519" ]; - + age.identityPaths = [ "/root/.ssh/id_ed25519" ]; services.zfs.trim.enable = true; boot.supportedFilesystems.zfs = true;