dotfiles

My PC Dotfiles & Website
commit 257a2d302bd3bdc19d176f93261ac238bc11e9f3
parent 85b6517f87fad267356141d16f3a0cdb58e864a8
Author: maydayv7 <maydayv7@gmail.com>
Date:   Tue, 18 Aug 2026 15:57:44 +0530

fix: Minor changes

Diffstat:
Mfiles/vscode/settings.json | 1+
Mflake.lock | 18+++++++++---------
Mmodules/apps/codex.nix | 8+++++++-
Mmodules/apps/internet.nix | 1+
Mmodules/apps/vscode/_profile.nix | 1+
Mmodules/games/mc-server/default.nix | 26+++++++++++++++++++-------
Mmodules/system/filesystem.nix | 30+++++++++++++++++++++---------
Mscripts/os.nix | 2++
8 files changed, 61 insertions(+), 26 deletions(-)

diff --git a/files/vscode/settings.json b/files/vscode/settings.json @@ -32,6 +32,7 @@ "window.doubleClickIconToClose": true, "window.menuBarVisibility": "toggle", "window.titleSeparator": " / ", + "workbench.browser.openLocalhostLinks": true, "workbench.commandPalette.preserveInput": true, "workbench.editor.highlightModifiedTabs": true, "workbench.list.horizontalScrolling": true, diff --git a/flake.lock b/flake.lock @@ -508,11 +508,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1786773797, - "narHash": "sha256-PCWimmaAPzsjCMcruup2A047brH+on+ZFjg358qvn9o=", + "lastModified": 1787027504, + "narHash": "sha256-8IqYrCfNgO+T4Sc2gM4AHSuqhSgwcrAq0uOTMq9ixKg=", "owner": "numtide", "repo": "llm-agents.nix", - "rev": "b4a645976fff76ef94dd60b7d4f9deaa216f40bd", + "rev": "50e05f7a7cc039d39d53bc77c132d9457f990375", "type": "github" }, "original": { @@ -687,11 +687,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1786593342, - "narHash": "sha256-smTKQXMLLStzc8zJevMCckbk3My7SvbbLmPYZUJJKW4=", + "lastModified": 1786963906, + "narHash": "sha256-3tkeMWSvHPo3tYljfXbPC/TgknikU1GvdVr/DkdfvE0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6b5e5b7a6631f065bf6908986990b37d845f847f", + "rev": "f4b6996c4e8b9ee06ce147ec344c885f51071b14", "type": "github" }, "original": { @@ -1129,11 +1129,11 @@ ] }, "locked": { - "lastModified": 1785945821, - "narHash": "sha256-NLSyTCW4K4ofhNBllt3omPasm6QpralXH1DBZOc91Dw=", + "lastModified": 1786901030, + "narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ae7910970dddc408fe6ab1c8e4b277bb21d72dc0", + "rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa", "type": "github" }, "original": { diff --git a/modules/apps/codex.nix b/modules/apps/codex.nix @@ -13,7 +13,13 @@ _: { [pkgs.vscode-marketplace.openai.chatgpt]; home = { - persist.directories = [".codex"]; + packages = [pkgs.llm.chatgpt]; + persist.directories = [ + ".codex" + ".config/Codex" + ".cache/Codex" + ]; + file.".codex/config.toml" = { force = true; mutable = true; diff --git a/modules/apps/internet.nix b/modules/apps/internet.nix @@ -69,6 +69,7 @@ in { directories = [ ".config/BraveSoftware" ".cache/BraveSoftware" + ".config/teams-for-linux" ".thunderbird" ".cache/thunderbird" ".config/ZapZap" diff --git a/modules/apps/vscode/_profile.nix b/modules/apps/vscode/_profile.nix @@ -69,6 +69,7 @@ with files.vscode; { ] ++ (with pkgs.vscode-marketplace; [ cweijan.vscode-office # Document Viewer + bruno-api-client.bruno # API Client langningchen.cph-ng # CP ]) ++ lib.optionals isGnome [pkgs.vscode-extensions.piousdeer.adwaita-theme]; diff --git a/modules/games/mc-server/default.nix b/modules/games/mc-server/default.nix @@ -1,7 +1,13 @@ ## Minecraft Server Configuration ## # ? # Run 'systemctl start minecraft-server-NAME' to start the server # ? # Run 'echo COMMAND > /run/minecraft/NAME.stdin' to run commands -{inputs, ...}: { +{ + config, + inputs, + ... +}: let + inherit (config.flake.files) path; +in { flake.modules.nixos.mc-server = { config, lib, @@ -9,11 +15,6 @@ ... }: let inherit - (builtins) - listToAttrs - toString - ; - inherit (lib) concatMap filter @@ -89,6 +90,17 @@ config = mkIf (cfg != []) { system.fs.persist.directories = [dataDir]; + disko.devices.zpool.fspool.datasets."data/minecraft" = mkIf (config.system.fs.scheme == "advanced") { + type = "zfs_fs"; + mountpoint = "${path.data}${dataDir}"; + options = { + atime = "off"; + mountpoint = "legacy"; + recordsize = "32K"; + "com.sun:auto-snapshot" = "true"; + }; + }; + networking.firewall = { allowedTCPPorts = map (srv: srv.port) cfg; allowedUDPPorts = concatMap (srv: @@ -108,7 +120,7 @@ systemd-socket.enable = true; }; - servers = listToAttrs ( + servers = builtins.listToAttrs ( map (srv: { inherit (srv) name; value = mkMerge [ diff --git a/modules/system/filesystem.nix b/modules/system/filesystem.nix @@ -26,7 +26,7 @@ in { optional types ; - inherit (builtins) listToAttrs map; + cfg = config.system.fs; in { imports = [ @@ -149,9 +149,14 @@ in { (mkIf (cfg.scheme == "advanced") { zpool.fspool = { type = "zpool"; - options.cachefile = "none"; + options = { + ashift = "12"; + cachefile = "none"; + }; rootFsOptions = { + atime = "off"; compression = "zstd"; + dnodesize = "auto"; encryption = "on"; keyformat = "passphrase"; keylocation = "prompt"; @@ -175,7 +180,7 @@ in { mountpoint = "/nix"; options = { mountpoint = "legacy"; - atime = "off"; + recordsize = "1M"; }; }; @@ -217,7 +222,8 @@ in { dir = "${path}${system}"; in '' chown root:keys ${dir} - chmod 774 -R ${dir} + chmod -R u=rwX,g=rwX,o= ${dir} + chmod g+s ${dir} ''; }) @@ -233,7 +239,7 @@ in { "${files.path.data}".neededForBoot = true; } // filterAttrs (name: _: hasPrefix "/etc" name) ( - listToAttrs ( + builtins.listToAttrs ( map ( item: nameValuePair item.directory { @@ -249,8 +255,6 @@ in { # Early Boot Requirements boot = { - # Boot Settings - kernelParams = ["elevator=none"]; zfs = { forceImportAll = false; devNodes = "/dev/disk/by-partlabel/System"; @@ -273,8 +277,16 @@ in { # Maintainence services.zfs = { - trim.enable = true; - autoScrub.enable = true; + trim = { + enable = true; + interval = "weekly"; + }; + + autoScrub = { + enable = true; + interval = "monthly"; + }; + autoSnapshot = { enable = true; hourly = 12; diff --git a/scripts/os.nix b/scripts/os.nix @@ -402,6 +402,8 @@ in sudo git clone --recurse-submodules ${path.repo} "$DIR" pushd "$DIR" &> /dev/null; sudo git config core.fileMode false; popd &> /dev/null sudo chgrp -R keys "$DIR" + sudo chmod -R u=rwX,g=rwX,o= "$DIR" + sudo find -P "$DIR" -type d -exec chmod g+s {} + newline read -rp "Enter path to GPG Keys (path/.git): " KEY