From 71038da44310aad38966df7c5f0462caad714d6a Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Sun, 2 Feb 2025 01:40:15 -0500 Subject: [PATCH] feat: initial configuration --- flake.lock | 356 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 48 ++++++++ 2 files changed, 404 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9beada5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,356 @@ +{ + "nodes": { + "config": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1738477408, + "narHash": "sha256-JlYdRSfWjAGTMgkCFGbmnCJS+GMS5sUW8gfJA9LCyGM=", + "ref": "main", + "rev": "497fb8541956d45fcf83b0c3284c6d6c7cf6bfef", + "revCount": 3, + "type": "git", + "url": "https://forgejo.mit.edu/ananthv/cantabrigian" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://forgejo.mit.edu/ananthv/cantabrigian" + } + }, + "crane": { + "inputs": { + "nixpkgs": [ + "pulsaros", + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717535930, + "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "55e7754ec31dac78980c8be45f8a28e80e370946", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "pulsaros", + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pulsaros", + "lanzaboote", + "pre-commit-hooks-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "pulsaros", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733951536, + "narHash": "sha256-Zb5ZCa7Xj+0gy5XVXINTSr71fCfAv+IKtmIXNrykT54=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "1318c3f3b068cdcea922fa7c1a0a1f0c96c22f5f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "lanzaboote": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "flake-utils": "flake-utils", + "nixpkgs": [ + "pulsaros", + "nixpkgs" + ], + "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1718178907, + "narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=", + "owner": "nix-community", + "repo": "lanzaboote", + "rev": "b627ccd97d0159214cee5c7db1412b75e4be6086", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v0.4.1", + "repo": "lanzaboote", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1738392223, + "narHash": "sha256-epwD0BvADThOtRrDoI7qJUZPe1vhXoSIwLna2/VoOMA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7d84bdf9cb85f399a8eafe8e17acee2354f13a21", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-upstream": { + "locked": { + "lastModified": 1734014226, + "narHash": "sha256-RcDCLav9GZYWYGoPcU5LzDxrqdDO+a4UYg4pSDyfV9c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0b04b1f3548f38d045f46821d8f41cab5680fed7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1738392223, + "narHash": "sha256-epwD0BvADThOtRrDoI7qJUZPe1vhXoSIwLna2/VoOMA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7d84bdf9cb85f399a8eafe8e17acee2354f13a21", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1733891251, + "narHash": "sha256-DmrXh7X58cNmf8ob2bYKYc5/aVKbmgrYwEgS12ZK9Bw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7db18b8ec24ffb1864e757e163a0d991f6be5648", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks-nix": { + "inputs": { + "flake-compat": [ + "pulsaros", + "lanzaboote", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "pulsaros", + "lanzaboote", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pulsaros": { + "inputs": { + "home-manager": "home-manager", + "lanzaboote": "lanzaboote", + "nixpkgs": "nixpkgs_3", + "nixpkgs-upstream": "nixpkgs-upstream" + }, + "locked": { + "lastModified": 1738478370, + "narHash": "sha256-8fSmKR95E8L8oWEG1FTy+j5r59VN+/vnr61ZXefRQTw=", + "owner": "quantum9innovation", + "repo": "pulsaros", + "rev": "3701d0948a95326ac0586776250170516a71ccfd", + "type": "github" + }, + "original": { + "owner": "quantum9innovation", + "ref": "main", + "repo": "pulsaros", + "type": "github" + } + }, + "root": { + "inputs": { + "config": "config", + "nixpkgs": "nixpkgs_2", + "pulsaros": "pulsaros" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "pulsaros", + "lanzaboote", + "flake-utils" + ], + "nixpkgs": [ + "pulsaros", + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717813066, + "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "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" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2da7bf7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + + # /***** /****** /**** + # |* *| |* | |* **** ** ***** |* | /* * + # |* *| |* | |* /* /* * |* | |* | |* + # |*****/ |* | |* **** /* * |* / |* | ****** + # | |* | |* | ****** ***** |* | | + # | |* | |* * | |* | |* * |* | * | + # | **** ***** **** |* | |* * ****** ***** + # + # ========================================================================== + + # This is the default PulsarOS on-device server configuration flake. + # It loads your remote configuration, + # in conjunction with the PulsarOS default configuration, + # and builds your system environment. + # You can change the versions of the inputs to revert + # to previous system configurations. + # However, you should keep this flake's lockfile, + # so you can declaratively restore packages to previous versions if necessary. + description = "On-device system configuration flake"; + + inputs = { + # PulsarOS uses the latest nixpkgs channel, + # so new (but somewhat? stable) packages are used by default. + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; + + # PulsarOS + pulsaros.url = "github:quantum9innovation/pulsaros/main"; + + # Server configuration + config.url = "git+https://forgejo.mit.edu/ananthv/cantabrigian?ref=main"; + }; + + outputs = + { + nixpkgs, + pulsaros, + config, + ... + }: + { + # Build the system + nixosConfigurations.cantabrigian = (pulsaros.make config).system; + + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style; + }; +}