Flake for my NixOS devices

Merge pull request #1 from Spoonbaker/main

Changes

authored by bwc9876.dev and committed by

GitHub bb8e5437 e7f0fb4f

+70 -10
+36 -1
flake.lock
··· 419 419 "type": "github" 420 420 }, 421 421 "original": { 422 - "owner": "Mic92", 422 + "owner": "nix-community", 423 423 "repo": "nix-index-database", 424 424 "type": "github" 425 425 } ··· 612 612 "nixvim": "nixvim", 613 613 "nu_plugin_dbus": "nu_plugin_dbus", 614 614 "rust-overlay": "rust-overlay_2", 615 + "spoon": "spoon", 615 616 "wayland-mpris-idle-inhibit": "wayland-mpris-idle-inhibit" 616 617 } 617 618 }, ··· 654 655 "owner": "oxalica", 655 656 "repo": "rust-overlay", 656 657 "type": "github" 658 + } 659 + }, 660 + "spoon": { 661 + "inputs": { 662 + "flakelight": [ 663 + "flakelight" 664 + ], 665 + "home-manager": [ 666 + "hm" 667 + ], 668 + "impermanence": [ 669 + "imperm" 670 + ], 671 + "nix-index-database": [ 672 + "nix-index-db" 673 + ], 674 + "nixpkgs": [ 675 + "nixpkgs" 676 + ] 677 + }, 678 + "locked": { 679 + "dir": "nixos-config", 680 + "lastModified": 1746468574, 681 + "narHash": "sha256-zcYPT4WLhJYZoMVMTHX2nX0Y7zv77+ZfCyYAgTYO67I=", 682 + "ref": "refs/heads/main", 683 + "rev": "4e4891620f7532e32d2d7976f62505ee2bda044a", 684 + "revCount": 134, 685 + "type": "git", 686 + "url": "https://codeberg.org/spoonbaker/mono" 687 + }, 688 + "original": { 689 + "dir": "nixos-config", 690 + "type": "git", 691 + "url": "https://codeberg.org/spoonbaker/mono" 657 692 } 658 693 }, 659 694 "systems": {
+16 -2
flake.nix
··· 5 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 6 flakelight.url = "github:nix-community/flakelight"; 7 7 flakelight.inputs.nixpkgs.follows = "nixpkgs"; 8 - nix-index-db.url = "github:Mic92/nix-index-database"; 8 + nix-index-db.url = "github:nix-community/nix-index-database"; 9 9 nix-index-db.inputs.nixpkgs.follows = "nixpkgs"; 10 10 hm.url = "github:nix-community/home-manager"; 11 11 hm.inputs.nixpkgs.follows = "nixpkgs"; ··· 27 27 nu_plugin_dbus.inputs.nixpkgs.follows = "nixpkgs"; 28 28 bingus.url = "github:Bwc9876/bingus-bot"; 29 29 bingus.inputs.nixpkgs.follows = "nixpkgs"; 30 + 31 + spoon.url = "git+https://codeberg.org/spoonbaker/mono?dir=nixos-config"; 32 + spoon.inputs = { 33 + nixpkgs.follows = "nixpkgs"; 34 + flakelight.follows = "flakelight"; 35 + home-manager.follows = "hm"; 36 + impermanence.follows = "imperm"; 37 + nix-index-database.follows = "nix-index-db"; 38 + }; 30 39 }; 31 40 32 41 outputs = inputs @ { ··· 45 54 imperm, 46 55 nu_plugin_dbus, 47 56 bingus, 57 + spoon, 48 58 }: 49 59 flakelight ./. { 60 + imports = [ 61 + spoon.flakelightModules.repl 62 + spoon.flakelightModules.ubercheck 63 + ]; 50 64 inherit inputs; 51 65 formatters = pkgs: { 52 66 "*.nix" = "alejandra ."; ··· 54 68 }; 55 69 packages = 56 70 nixpkgs.lib.genAttrs ["gh-grader-preview" "wayland-mpris-idle-inhibit" "nu_plugin_dbus"] 57 - (i: {pkgs}: let input = builtins.getAttr i inputs; in input.packages.${pkgs.system}.default); 71 + (i: {pkgs}: inputs.${i}.packages.${pkgs.system}.default); 58 72 nixDir = ./.; 59 73 nixDirAliases = { 60 74 nixosConfigurations = ["systemConfigs"];
+16 -7
justfile
··· 3 3 4 4 [private] 5 5 alias u := update 6 - # u: update all inputs 6 + # u: update all inputs 7 7 update: 8 8 nix flake update 9 9 10 10 [private] 11 11 alias b := build 12 - # b: build the configuration 12 + # b: build the configuration 13 13 build: 14 14 nh os build . 15 15 16 + [private] 17 + alias bt := boot 18 + # bt: make the configuration the boot default without activating it 16 19 boot: 17 20 nh os boot . 18 21 19 22 [private] 20 23 alias s := switch 21 - # s: activate configuration & add to boot menu 24 + # s: activate configuration & add to boot menu 22 25 switch: 23 26 nh os switch --ask . 24 27 25 28 [private] 26 29 alias c := check 27 - # c: run flake checks, including making sure `.#repl` and the system config evaluate 30 + # c: run all checks for the current system 28 31 check: 29 - nix flake check .# --show-trace 32 + nix build --show-trace .#uberCheck.$(nix eval --impure --raw --expr 'builtins.currentSystem') 30 33 31 34 [private] 32 35 alias f := format 33 - # f: run nix fmt on the flake 36 + # f: format this flake 34 37 format: 35 38 nix fmt 36 39 37 40 [private] 41 + alias r := repl 42 + # r: start a debugging repl 43 + repl: 44 + nix repl .#repl 45 + 46 + [private] 38 47 alias gc := garbage-collect 39 - # gc: Run nix collect-garbage -d 48 + # gc: run a garbage collection 40 49 garbage-collect: 41 50 nh clean all 42 51
+2
systemConfigs/black-mesa.nix
··· 4 4 ... 5 5 }: { 6 6 system = "x86_64-linux"; 7 + specialArgs.inputs = inputs // inputs.spoon.inputs // {inherit (inputs) self;}; 7 8 8 9 modules = [ 10 + inputs.spoon.nixosModules.black-mesa 9 11 (outputs.lib.applyRoles ["base" "latest-linux" "wireless" "ssh" "graphics" "games" "fun" "dev" "normalboot" "mc-server"]) 10 12 { 11 13 imports = [inputs.bingus.nixosModules.default];