Your one-stop-cake-shop for everything Freshly Baked has to offer

refactor(*): add nilla/etc. in top level directory #132

merged opened by freshlybakedca.ke targeting main from private/minion/push-mmztworysmow

Our josh files and combined project pieces have been a mess for a while. As I'm creating a new project, I thought it was high time to tidy them up so they pull out the right files and we can share things like our inputs.

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:k2zmz2l3hvfr44tmlhewol2j/sh.tangled.repo.pull/3mbjgrzgrme22
+260 -185
Interdiff #4 #5
npins/default.nix

This file has not been changed.

npins/default.nix.license

This file has not been changed.

npins/sources.json

This file has not been changed.

npins/sources.json.license

This file has not been changed.

-19
packetmix/inputs.nix
··· 1 - # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 - # 3 - # SPDX-License-Identifier: MIT 4 - 5 - { pins }: 6 - let 7 - settings = { 8 - nixpkgs.configuration.allowUnfree = true; 9 - "nixos-24.11" = settings.nixpkgs; 10 - nixos-unstable = settings.nixpkgs; 11 - }; 12 - in 13 - { config, ... }: 14 - { 15 - config.inputs = builtins.mapAttrs (name: value: { 16 - src = value; 17 - settings = settings.${name} or config.lib.constants.undefined; 18 - }) pins; 19 - }
-132
packetmix/nilla.nix
··· 1 - # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 - # 3 - # SPDX-License-Identifier: MIT 4 - 5 - let 6 - cwd = ./.; 7 - pins = 8 - if builtins.hasAttr "npins" (builtins.readDir cwd) then import "${cwd}/npins" else import ../npins; 9 - 10 - nilla = import pins.nilla; 11 - in 12 - nilla.create ( 13 - { config, lib }: 14 - { 15 - includes = [ 16 - ./homes 17 - (import ./inputs.nix { inherit pins; }) 18 - ./lib 19 - ./modules 20 - ./packages 21 - ./systems 22 - "${pins.nilla-nixos}/modules/nixos.nix" # We can't use config.inputs here without infinitely-recursing 23 - ]; 24 - 25 - config = { 26 - packages.allNixOSSystems = { 27 - systems = [ "x86_64-linux" ]; 28 - 29 - package = 30 - { stdenv }: 31 - stdenv.mkDerivation { 32 - name = "all-nixos-systems"; 33 - 34 - dontUnpack = true; 35 - 36 - buildPhase = '' 37 - mkdir -p $out 38 - '' 39 - + (builtins.concatStringsSep "\n" ( 40 - config.lib.attrs.mapToList ( 41 - name: value: ''ln -s "${value.result.config.system.build.toplevel}" "$out/${name}"'' 42 - ) config.systems.nixos 43 - )); 44 - }; 45 - }; 46 - 47 - packages.allHomes = { 48 - systems = [ "x86_64-linux" ]; 49 - 50 - package = 51 - { stdenv }: 52 - stdenv.mkDerivation { 53 - name = "all-homes"; 54 - 55 - dontUnpack = true; 56 - 57 - buildPhase = '' 58 - mkdir -p $out 59 - '' 60 - + (builtins.concatStringsSep "\n" ( 61 - config.lib.attrs.mapToList ( 62 - name: value: 63 - ''ln -s "${value.result.${stdenv.hostPlatform.system}.activationPackage}" "$out/${name}"'' 64 - ) (config.lib.attrs.filter (_: value: value.result ? ${stdenv.hostPlatform.system}) config.homes) 65 - )); 66 - }; 67 - }; 68 - 69 - packages.helix = { 70 - systems = [ "x86_64-linux" ]; 71 - 72 - package = 73 - { helix }: 74 - helix.overrideAttrs ( 75 - { 76 - patches ? [ ], 77 - ... 78 - }: 79 - { 80 - doCheck = false; 81 - patches = patches ++ [ ./patches/helix/3958-labels-for-config-menus.patch ]; 82 - } 83 - ); 84 - }; 85 - 86 - # With a package set defined, we can create a shell. 87 - shells.default = { 88 - # Declare what systems the shell can be used on. 89 - systems = [ "x86_64-linux" ]; 90 - 91 - # Define our shell environment. 92 - shell = 93 - { 94 - pkgs, 95 - stdenv, 96 - mkShell, 97 - kdePackages, 98 - reuse, 99 - ... 100 - }: 101 - mkShell { 102 - QML_IMPORT_PATH = 103 - lib.fp.pipe 104 - [ 105 - (map (pkg: "${pkg}/lib/qt-6/qml")) 106 - (builtins.concatStringsSep ":") 107 - ] 108 - [ 109 - config.inputs.nixos-unstable.result.${stdenv.hostPlatform.system}.quickshell 110 - kdePackages.qtdeclarative 111 - ]; 112 - 113 - packages = [ 114 - config.inputs.nilla-cli.result.packages.nilla-cli.result.${stdenv.hostPlatform.system} 115 - config.inputs.nilla-home.result.packages.nilla-home.result.${stdenv.hostPlatform.system} 116 - config.inputs.nilla-nixos.result.packages.nilla-nixos.result.${stdenv.hostPlatform.system} 117 - config.inputs.nixos-unstable.result.${stdenv.hostPlatform.system}.quickshell 118 - config.inputs.nixpkgs.result.${stdenv.hostPlatform.system}.deadnix 119 - config.packages.nilla-fmt.result.${stdenv.hostPlatform.system} 120 - config.packages.treefmt.result.${stdenv.hostPlatform.system} 121 - (config.inputs.npins.result { 122 - inherit pkgs; 123 - inherit (stdenv.hostPlatform) system; 124 - }) 125 - kdePackages.qtdeclarative 126 - reuse 127 - ]; 128 - }; 129 - }; 130 - }; 131 - } 132 - )
packetmix/packages/vs-launcher/default.nix

This file has not been changed.

+1
projects/packetmix/workspace.josh
··· 1 1 ::.tangled/ 2 2 ::LICENSES/ 3 3 ::npins/ 4 + ::nilla.nix=projects/nilla.nix 4 5 ::workspace.josh.license=projects/packetmix/workspace.josh.license 5 6 :/packetmix
+2 -1
projects/sprinkles/workspace.josh
··· 1 1 ::LICENSES/ 2 2 ::npins/ 3 - ::workspace.josh.license=projects/sprinkles/workspace.josh.license 3 + ::nilla.nix=projects/nilla.nix 4 + ::workspace.josh.license=projects/packetmix/workspace.josh.license 4 5 :/sprinkles
+1 -3
sprinkles/nilla.nix
··· 3 3 # SPDX-License-Identifier: MIT 4 4 5 5 let 6 + pins = import ./npins; 6 - cwd = ./.; 7 - pins = 8 - if builtins.hasAttr "npins" (builtins.readDir cwd) then import "${cwd}/npins" else import ../npins; 9 7 10 8 nilla = import pins.nilla; 11 9 in
sprinkles/npins/default.nix

This file has not been changed.

sprinkles/npins/default.nix.license

This file has not been changed.

sprinkles/npins/sources.json

This file has not been changed.

sprinkles/npins/sources.json.license

This file has not been changed.

+35
nilla.nix
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + let 6 + pins = import ./npins; 7 + 8 + nilla = import pins.nilla; 9 + 10 + settings = config: { 11 + nixpkgs = { 12 + configuration.allowUnfree = true; 13 + overlays = [ 14 + config.inputs.fenix.result.overlays.default 15 + ]; 16 + }; 17 + "nixos-24.11" = (settings config).nixpkgs; 18 + nixos-unstable = (settings config).nixpkgs; 19 + }; 20 + 21 + result = (nilla.create [ ]).extend { 22 + modules = [ 23 + ./packetmix/project.nix 24 + ./sprinkles/project.nix 25 + ]; 26 + 27 + args = { 28 + inherit nilla pins; # pins needs to be a static arg for us to import from it... 29 + }; 30 + }; 31 + in 32 + result.config 33 + // { 34 + extend = result.extend; 35 + }
+127
packetmix/project.nix
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + { 6 + config, 7 + lib, 8 + pins, 9 + ... 10 + }: 11 + { 12 + includes = [ 13 + ./homes 14 + ./lib 15 + ./modules 16 + ./packages 17 + ./systems 18 + "${pins.nilla-nixos}/modules/nixos.nix" # We can't use config.inputs here without infinitely-recursing 19 + ]; 20 + 21 + config = { 22 + packages.allNixOSSystems = { 23 + systems = [ "x86_64-linux" ]; 24 + 25 + package = 26 + { stdenv }: 27 + stdenv.mkDerivation { 28 + name = "all-nixos-systems"; 29 + 30 + dontUnpack = true; 31 + 32 + buildPhase = '' 33 + mkdir -p $out 34 + '' 35 + + (builtins.concatStringsSep "\n" ( 36 + config.lib.attrs.mapToList ( 37 + name: value: ''ln -s "${value.result.config.system.build.toplevel}" "$out/${name}"'' 38 + ) config.systems.nixos 39 + )); 40 + }; 41 + }; 42 + 43 + packages.allHomes = { 44 + systems = [ "x86_64-linux" ]; 45 + 46 + package = 47 + { stdenv }: 48 + stdenv.mkDerivation { 49 + name = "all-homes"; 50 + 51 + dontUnpack = true; 52 + 53 + buildPhase = '' 54 + mkdir -p $out 55 + '' 56 + + (builtins.concatStringsSep "\n" ( 57 + config.lib.attrs.mapToList ( 58 + name: value: 59 + ''ln -s "${value.result.${stdenv.hostPlatform.system}.activationPackage}" "$out/${name}"'' 60 + ) (config.lib.attrs.filter (_: value: value.result ? ${stdenv.hostPlatform.system}) config.homes) 61 + )); 62 + }; 63 + }; 64 + 65 + packages.helix = { 66 + systems = [ "x86_64-linux" ]; 67 + 68 + package = 69 + { helix }: 70 + helix.overrideAttrs ( 71 + { 72 + patches ? [ ], 73 + ... 74 + }: 75 + { 76 + doCheck = false; 77 + patches = patches ++ [ ./patches/helix/3958-labels-for-config-menus.patch ]; 78 + } 79 + ); 80 + }; 81 + 82 + # With a package set defined, we can create a shell. 83 + shells.default = { 84 + # Declare what systems the shell can be used on. 85 + systems = [ "x86_64-linux" ]; 86 + 87 + # Define our shell environment. 88 + shell = 89 + { 90 + pkgs, 91 + stdenv, 92 + mkShell, 93 + kdePackages, 94 + reuse, 95 + ... 96 + }: 97 + mkShell { 98 + QML_IMPORT_PATH = 99 + lib.fp.pipe 100 + [ 101 + (map (pkg: "${pkg}/lib/qt-6/qml")) 102 + (builtins.concatStringsSep ":") 103 + ] 104 + [ 105 + config.inputs.nixos-unstable.result.${stdenv.hostPlatform.system}.quickshell 106 + kdePackages.qtdeclarative 107 + ]; 108 + 109 + packages = [ 110 + config.inputs.nilla-cli.result.packages.nilla-cli.result.${stdenv.hostPlatform.system} 111 + config.inputs.nilla-home.result.packages.nilla-home.result.${stdenv.hostPlatform.system} 112 + config.inputs.nilla-nixos.result.packages.nilla-nixos.result.${stdenv.hostPlatform.system} 113 + config.inputs.nixos-unstable.result.${stdenv.hostPlatform.system}.quickshell 114 + config.inputs.nixpkgs.result.${stdenv.hostPlatform.system}.deadnix 115 + config.packages.nilla-fmt.result.${stdenv.hostPlatform.system} 116 + config.packages.treefmt.result.${stdenv.hostPlatform.system} 117 + (config.inputs.npins.result { 118 + inherit pkgs; 119 + inherit (stdenv.hostPlatform) system; 120 + }) 121 + kdePackages.qtdeclarative 122 + reuse 123 + ]; 124 + }; 125 + }; 126 + }; 127 + }
+43
projects/nilla.nix
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + let 6 + pins = import ./npins; 7 + 8 + nilla = import pins.nilla; 9 + 10 + settings = config: { 11 + nixpkgs = { 12 + configuration.allowUnfree = true; 13 + overlays = [ 14 + config.inputs.fenix.result.overlays.default 15 + ]; 16 + }; 17 + "nixos-24.11" = (settings config).nixpkgs; 18 + nixos-unstable = (settings config).nixpkgs; 19 + }; 20 + 21 + result = (nilla.create [ ]).extend { 22 + modules = [ 23 + ./project.nix 24 + ( 25 + { config, ... }: 26 + { 27 + config.inputs = builtins.mapAttrs (name: value: { 28 + src = value; 29 + settings = (settings config).${name} or config.lib.constants.undefined; 30 + }) pins; 31 + } 32 + ) 33 + ]; 34 + 35 + args = { 36 + inherit nilla pins; # pins needs to be a static arg for us to import from it... 37 + }; 38 + }; 39 + in 40 + result.config 41 + // { 42 + extend = result.extend; 43 + }
+51 -30
sprinkles/project.nix
··· 2 2 # 3 3 # SPDX-License-Identifier: MIT 4 4 5 - let 6 - pins = import ./npins; 7 - 8 - nilla = import pins.nilla; 9 - in 10 - nilla.create ({ config, lib }: { 5 + { pins, config, lib }: 6 + { 11 7 config = { 12 - inputs = { 13 - fenix.src = pins.fenix; 14 - quickshell.src = pins.quickshell; 15 - 16 - nixpkgs = { 17 - src = pins.nixpkgs; 18 - 19 - settings = { 20 - overlays = [ 21 - config.inputs.fenix.result.overlays.default 22 - ]; 23 - }; 24 - }; 25 - }; 26 - 27 8 packages.default = config.packages.sprinkles; 28 9 packages.sprinkles = { 29 - systems = [ "x86_64-linux" "aarch64-linux" ]; 10 + systems = [ 11 + "x86_64-linux" 12 + "aarch64-linux" 13 + ]; 30 14 31 - package = { fenix, makeRustPlatform, lib, installShellFiles, dbus, ... }: 15 + package = 16 + { 17 + fenix, 18 + makeRustPlatform, 19 + lib, 20 + installShellFiles, 21 + dbus, 22 + ... 23 + }: 32 24 let 33 25 toolchain = fenix.complete.toolchain; 34 26 ··· 55 47 56 48 shells.default = config.shells.sprinkles; 57 49 shells.sprinkles = { 58 - systems = [ "x86_64-linux" "aarch64-linux" ]; 50 + systems = [ 51 + "x86_64-linux" 52 + "aarch64-linux" 53 + ]; 59 54 60 - shell = { mkShell, kdePackages, fenix, bacon, pkg-config, reuse, dbus, sqlx-cli, system, ... }: 55 + shell = 56 + { 57 + mkShell, 58 + kdePackages, 59 + fenix, 60 + bacon, 61 + pkg-config, 62 + reuse, 63 + dbus, 64 + sqlx-cli, 65 + system, 66 + ... 67 + }: 61 68 mkShell { 62 69 QML_IMPORT_PATH = 63 70 lib.fp.pipe ··· 66 73 (builtins.concatStringsSep ":") 67 74 ] 68 75 [ 69 - (config.inputs.quickshell.result.packages.${system}.default.override { gitRev=pins.quickshell.revision; }) 76 + (config.inputs.quickshell.result.packages.${system}.default.override { 77 + gitRev = pins.quickshell.revision; 78 + }) 70 79 kdePackages.qtdeclarative 71 80 ]; 72 81 ··· 90 99 }; 91 100 }; 92 101 shells.testing = { 93 - systems = [ "x86_64-linux" "aarch64-linux" ]; 102 + systems = [ 103 + "x86_64-linux" 104 + "aarch64-linux" 105 + ]; 94 106 95 - shell = { mkShell, libnotify, sqlitebrowser, system, ... }: 107 + shell = 108 + { 109 + mkShell, 110 + libnotify, 111 + sqlitebrowser, 112 + system, 113 + ... 114 + }: 96 115 mkShell { 97 116 buildInputs = [ libnotify ]; 98 117 packages = [ 99 118 libnotify 100 119 sqlitebrowser 101 120 config.packages.default.result.${system} 102 - (config.inputs.quickshell.result.packages.${system}.default.override { gitRev=pins.quickshell.revision; }) 121 + (config.inputs.quickshell.result.packages.${system}.default.override { 122 + gitRev = pins.quickshell.revision; 123 + }) 103 124 ]; 104 125 }; 105 126 }; 106 127 }; 107 - }) 128 + }

History

15 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
5/5 success
expand
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments
1 commit
expand
refactor(*): add nilla/etc. in top level directory
expand 0 comments