dotfiles

My PC Dotfiles & Website
commit 83cc044c0ee563c55c90f0a8b71f93cd90559803
parent adedde9defc2de3770caa04c419358bdb3700f13
Author: maydayv7 <maydayv7@gmail.com>
Date:   Sun, 15 Mar 2026 20:52:13 +0530

feat: Site Flake

Diffstat:
M.github/workflows/website-git.yaml | 2+-
M.github/workflows/website.yml | 2+-
Asite/flake.lock | 142+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msite/flake.nix | 123++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
4 files changed, 241 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/website-git.yaml b/.github/workflows/website-git.yaml @@ -25,7 +25,7 @@ jobs: accept-flake-config = true access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Build Stagit Site - run: nix run .#build-stagit + run: nix run ./site#build-stagit - name: Prepare for Deployment run: mv public site/git/public - name: Deploy to Cloudflare diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml @@ -25,7 +25,7 @@ jobs: accept-flake-config = true access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Build Zola Site - run: nix build .#website + run: nix build ./site#website - name: Prepare for Deployment run: | mkdir -p site/public diff --git a/site/flake.lock b/site/flake.lock @@ -0,0 +1,142 @@ +{ + "nodes": { + "formatter": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773297127, + "narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "71b125cd05fbfd78cab3e070b73544abe24c5016", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "framework": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1773375660, + "narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "formatter": "formatter", + "framework": "framework", + "nixpkgs": "nixpkgs", + "stagit": "stagit", + "systems": "systems_2" + } + }, + "stagit": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1767557231, + "narHash": "sha256-cXLrl1XCf3Mhz9UhCQxt0eZNcAOtejReiMAi/fTWn6s=", + "owner": "maydayv7", + "repo": "stagit", + "rev": "62010429c33b33ef1239638b202a745ea29e43a1", + "type": "github" + }, + "original": { + "owner": "maydayv7", + "repo": "stagit", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "flake": false, + "locked": { + "lastModified": 1707463813, + "narHash": "sha256-qUyPFG6yjwI4b3wya7aEFDYSIxf1fZeapi0dF46+pAk=", + "owner": "maydayv7", + "repo": "dotfiles", + "rev": "5d24bade1fb3e0186e28a33908519f65ec774c2d", + "type": "github" + }, + "original": { + "owner": "maydayv7", + "ref": "systems", + "repo": "dotfiles", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/site/flake.nix b/site/flake.nix @@ -1,28 +1,99 @@ -_: { - ## Website Configuration ## - perSystem = - { lib, pkgs, ... }: - { - # Website - packages.website = pkgs.callPackage ./. { inherit lib pkgs; }; - - # 'git' Frontend - apps.build-stagit = { - type = "app"; - program = lib.getExe (pkgs.callPackage ./git { inherit lib pkgs; }); - }; - - # Development Shell - devShells.website = import ./shell.nix { inherit pkgs; }; - - # Formatting Errors - treefmt.config.programs.prettier.excludes = [ - "site/templates/macros/edit.html" - "site/templates/macros/head.html" - "site/templates/macros/javascript.html" - "site/templates/macros/menu.html" - "site/templates/macros/posts.html" - "site/templates/tags/list.html" - ]; +{ + description = "My Personal Website"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-25.11"; + systems = { + url = "github:maydayv7/dotfiles?ref=systems"; + flake = false; + }; + + framework = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; + + formatter = { + url = "github:numtide/treefmt-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + stagit = { + url = "github:maydayv7/stagit"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { self, ... }@inputs: + inputs.framework.lib.mkFlake { inherit inputs; } { + inherit (self) systems; + flake.systems = import inputs.systems; + imports = [ inputs.formatter.flakeModule ]; + perSystem = + { + config, + lib, + system, + ... + }: + let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + (final: prev: { + stagit-fork = inputs.stagit.packages.${system}.default; + }) + ]; + }; + in + { + # Website + packages = rec { + default = website; + website = pkgs.callPackage ./. { inherit lib pkgs; }; + }; + + # 'git' Frontend + apps = rec { + default = build-stagit; + build-stagit = { + type = "app"; + program = lib.getExe (pkgs.callPackage ./git { inherit lib pkgs; }); + }; + }; + + # Development Shell + devShells = rec { + default = website; + website = import ./shell.nix { inherit pkgs; }; + }; + + # Formatting + treefmt.config = { + projectRootFile = "flake.nix"; + settings.global.excludes = [ + "_*" + "result/**" + "flake.lock" + ]; + + programs = { + nixfmt.enable = true; + prettier = { + enable = true; + settings.bracketSameLine = true; + excludes = [ + "templates/macros/edit.html" + "templates/macros/head.html" + "templates/macros/javascript.html" + "templates/macros/menu.html" + "templates/macros/posts.html" + "templates/tags/list.html" + ]; + }; + }; + }; + }; }; }