refactor: rename legacyPackages to scopedPackages
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-20 15:17:55 -05:00
parent 4f38557364
commit 838df34dfb
51 changed files with 24 additions and 23 deletions

View file

@ -43,7 +43,7 @@ sudo ln -sf /home/matt/.nix /etc/nixos
| `nixosConfigurations` | [devices](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/devices)' + ISO's configurations | | `nixosConfigurations` | [devices](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/devices)' + ISO's configurations |
| `nixOnDroidConfigurations.default` | [Nix-On-Droid](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/devices/android)'s configuration | | `nixOnDroidConfigurations.default` | [Nix-On-Droid](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/devices/android)'s configuration |
| `packages` | Some custom [packages](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/packages) not available in nixpkgs or modified from it | | `packages` | Some custom [packages](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/packages) not available in nixpkgs or modified from it |
| `legacyPackages` | Some custom [package scopes](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/legacyPackages) not available in nixpkgs or modified from it | | `scopedPackages` | Some custom [package scopes](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/scopedPackages) not available in nixpkgs or modified from it |
| `apps` | Scripts ran from the flake defined [here](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/apps) | | `apps` | Scripts ran from the flake defined [here](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/apps) |
| `homeManagerModules` | [Modules](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/homeManagerModules) made for home-manager | | `homeManagerModules` | [Modules](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/homeManagerModules) made for home-manager |
| `homeManagerModules` | [Modules](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/nixosModules) made for NixOS systems | | `homeManagerModules` | [Modules](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/nixosModules) made for NixOS systems |

View file

@ -8,7 +8,7 @@ const FLAKE = process.env.FLAKE;
export const updateFirefoxAddons = () => { export const updateFirefoxAddons = () => {
console.log('Updating firefox addons using mozilla-addons-to-nix'); console.log('Updating firefox addons using mozilla-addons-to-nix');
const DIR = `${FLAKE}/legacyPackages/firefox-addons`; const DIR = `${FLAKE}/scopedPackages/firefox-addons`;
const GENERATED_FILE = `${DIR}/generated-firefox-addons.nix`; const GENERATED_FILE = `${DIR}/generated-firefox-addons.nix`;
const SLUGS = `${DIR}/addons.json`; const SLUGS = `${DIR}/addons.json`;
@ -27,7 +27,7 @@ export const updateFirefoxAddons = () => {
const OLD_VERS = Object.fromEntries([...JSON.parse(spawnSync('nix', [ const OLD_VERS = Object.fromEntries([...JSON.parse(spawnSync('nix', [
'eval', 'eval',
'.#legacyPackages.x86_64-linux.firefoxAddons', '.#scopedPackages.x86_64-linux.firefoxAddons',
'--apply', '--apply',
nixExpr, nixExpr,
'--json', '--json',

View file

@ -44,7 +44,7 @@
enable = true; enable = true;
config.theme = "dracula-bat"; config.theme = "dracula-bat";
themes.dracula-bat.src = self.legacyPackages.${pkgs.system}.dracula.bat; themes.dracula-bat.src = self.scopedPackages.${pkgs.system}.dracula.bat;
extraPackages = builtins.attrValues { extraPackages = builtins.attrValues {
inherit (pkgs.bat-extras) batman; inherit (pkgs.bat-extras) batman;

View file

@ -17,7 +17,7 @@ in {
lfs.enable = true; lfs.enable = true;
includes = [ includes = [
{path = toString self.legacyPackages.${pkgs.system}.dracula.git;} {path = toString self.scopedPackages.${pkgs.system}.dracula.git;}
(mkDefaultRemote "https://github.com") (mkDefaultRemote "https://github.com")
(mkDefaultRemote "git@github.com") (mkDefaultRemote "git@github.com")

View file

@ -53,7 +53,7 @@
customComponents = builtins.attrValues { customComponents = builtins.attrValues {
inherit inherit
(self.legacyPackages.${pkgs.system}.hass-components) (self.scopedPackages.${pkgs.system}.hass-components)
extended-ollama-conversation # url is without subdirectory extended-ollama-conversation # url is without subdirectory
ha-fallback-conversation ha-fallback-conversation
tuya-local tuya-local

View file

@ -33,7 +33,7 @@
customComponents = builtins.attrValues { customComponents = builtins.attrValues {
inherit inherit
(self.legacyPackages.${pkgs.system}.hass-components) (self.scopedPackages.${pkgs.system}.hass-components)
yamaha-soundbar yamaha-soundbar
; ;
}; };

View file

@ -83,7 +83,7 @@ in {
customComponents = builtins.attrValues { customComponents = builtins.attrValues {
inherit inherit
(self.legacyPackages.${pkgs.system}.hass-components) (self.scopedPackages.${pkgs.system}.hass-components)
material-symbols material-symbols
; ;
}; };
@ -96,7 +96,7 @@ in {
; ;
inherit inherit
(self.legacyPackages.${pkgs.system}.lovelace-components) (self.scopedPackages.${pkgs.system}.lovelace-components)
custom-sidebar custom-sidebar
; ;
}; };

View file

@ -34,7 +34,7 @@ in {
services.home-assistant = { services.home-assistant = {
customComponents = attrValues { customComponents = attrValues {
inherit inherit
(self.legacyPackages.${pkgs.system}.hass-components) (self.scopedPackages.${pkgs.system}.hass-components)
netdaemon netdaemon
; ;
}; };

View file

@ -7,7 +7,7 @@
services.home-assistant = { services.home-assistant = {
customComponents = builtins.attrValues { customComponents = builtins.attrValues {
inherit inherit
(self.legacyPackages.${pkgs.system}.hass-components) (self.scopedPackages.${pkgs.system}.hass-components)
spotifyplus spotifyplus
; ;
}; };

View file

@ -92,7 +92,7 @@ in {
enable = true; enable = true;
theme = "dracula"; theme = "dracula";
themePackages = [ themePackages = [
self.legacyPackages.${pkgs.system}.dracula.plymouth self.scopedPackages.${pkgs.system}.dracula.plymouth
]; ];
}; };

View file

@ -3,7 +3,7 @@ self: {
pkgs, pkgs,
... ...
}: let }: let
inherit (self.legacyPackages.${pkgs.system}) firefoxAddons; inherit (self.scopedPackages.${pkgs.system}) firefoxAddons;
rounding = (config.wayland.windowManager.hyprland.settings.decoration.rounding or 2) - 2; rounding = (config.wayland.windowManager.hyprland.settings.decoration.rounding or 2) - 2;
@ -22,6 +22,7 @@ in {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles.matt = { profiles.matt = {
isDefault = true; isDefault = true;
id = 0; id = 0;

View file

@ -1,6 +1,6 @@
self: {pkgs, ...}: { self: {pkgs, ...}: {
config = let config = let
inherit (self.legacyPackages.${pkgs.system}) mpvScripts; inherit (self.scopedPackages.${pkgs.system}) mpvScripts;
in { in {
# For kdialog-open-files # For kdialog-open-files
home.packages = [ home.packages = [

View file

@ -71,7 +71,7 @@ in {
startup_commands = "toggle_custom_color"; startup_commands = "toggle_custom_color";
ui_font = "JetBrainsMono Nerd Font Mono Regular"; ui_font = "JetBrainsMono Nerd Font Mono Regular";
font_size = "24"; font_size = "24";
source = toString self.legacyPackages.${pkgs.system}.dracula.sioyek; source = toString self.scopedPackages.${pkgs.system}.dracula.sioyek;
}; };
}; };

View file

@ -1,6 +1,6 @@
self: {pkgs, ...}: { self: {pkgs, ...}: {
config = let config = let
inherit (self.legacyPackages.${pkgs.system}) dracula; inherit (self.scopedPackages.${pkgs.system}) dracula;
cursorTheme = dracula.hyprcursor; cursorTheme = dracula.hyprcursor;
cursorThemeName = "Dracula-cursors"; cursorThemeName = "Dracula-cursors";

View file

@ -5,7 +5,7 @@ self: {
}: { }: {
config = let config = let
hyprpaper = self.inputs.hyprpaper.packages.${pkgs.system}.default; hyprpaper = self.inputs.hyprpaper.packages.${pkgs.system}.default;
wallpaper = toString self.legacyPackages.${pkgs.system}.dracula.wallpaper; wallpaper = toString self.scopedPackages.${pkgs.system}.dracula.wallpaper;
in { in {
home.packages = [hyprpaper]; home.packages = [hyprpaper];

View file

@ -5,7 +5,7 @@ self: {
... ...
}: { }: {
config = let config = let
inherit (self.legacyPackages.${pkgs.system}) dracula; inherit (self.scopedPackages.${pkgs.system}) dracula;
cfg = osConfig.roles.desktop; cfg = osConfig.roles.desktop;
in { in {

View file

@ -123,9 +123,9 @@
nixOnDroidConfigurations.default = nixOnDroidConfigurations.default =
mkNixOnDroid [./devices/android]; mkNixOnDroid [./devices/android];
legacyPackages = scopedPackages =
perSystem (pkgs: perSystem (pkgs:
import ./legacyPackages {inherit inputs mkVersion pkgs;}); import ./scopedPackages {inherit inputs mkVersion pkgs;});
packages = packages =
perSystem (pkgs: perSystem (pkgs:

View file

@ -1,8 +1,8 @@
# LegacyPackages # ScopedPackages
This directory encompasses every derivation scopes for packages exposed by my flake. This directory encompasses every derivation scopes for packages exposed by my flake.
## List of package scopes found in `self.legacyPackages` ## List of package scopes found in `self.scopedPackages`
| Name | Description | | Name | Description |
| --------------- | ----------- | | --------------- | ----------- |

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
file="$FLAKE/legacyPackages/lovelace-components/custom-sidebar/default.nix" file="$FLAKE/scopedPackages/lovelace-components/custom-sidebar/default.nix"
old_hash="$(sed -n 's/.*hash = "\(.*\)";/\1/p' "$file")" old_hash="$(sed -n 's/.*hash = "\(.*\)";/\1/p' "$file")"
sed -i "s/hash = .*/hash = \"\";/" "$file" sed -i "s/hash = .*/hash = \"\";/" "$file"