refactor: rename checks and move files out of flake dir
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-08-05 16:40:32 -04:00
parent 94bd0d81f5
commit 087dd2af15
11 changed files with 55 additions and 45 deletions

7
checks/default.nix Normal file
View file

@ -0,0 +1,7 @@
{
pkgs,
self,
}: let
nixosMachines = import ./machines.nix {inherit pkgs self;};
in
nixosMachines

10
checks/machines.nix Normal file
View file

@ -0,0 +1,10 @@
# CI: https://github.com/Mic92/dotfiles/blob/c2f538934d67417941f83d8bb65b8263c43d32ca/flake.nix#L168
{
pkgs,
self,
}: let
inherit (pkgs.lib) filterAttrs mapAttrs' nameValuePair;
in
mapAttrs'
(name: config: nameValuePair "nixos-${name}" config.config.system.build.toplevel)
((filterAttrs (_: config: config.pkgs.system == pkgs.system)) self.nixosConfigurations)

View file

@ -1,14 +1,15 @@
{
config,
pkgs,
lib,
pkgs,
self,
vimplugin-easytables-src,
...
}: let
inherit (config.vars) neovimIde;
inherit (pkgs) vimPlugins;
inherit (import ../../../../flake/lib.nix {inherit pkgs;}) buildPlugin;
inherit (import "${self}/lib.nix" {inherit pkgs;}) buildPlugin;
in
lib.mkIf neovimIde {
programs = {

View file

@ -1,14 +1,15 @@
{
config,
pkgs,
lib,
pkgs,
self,
vimplugin-ts-error-translator-src,
...
}: let
inherit (config.vars) neovimIde;
inherit (pkgs) vimPlugins;
inherit (import ../../../../flake/lib.nix {inherit pkgs;}) buildPlugin;
inherit (import "${self}/lib.nix" {inherit pkgs;}) buildPlugin;
in
lib.mkIf neovimIde {
programs = {

View file

@ -26,6 +26,10 @@ in {
nix-fast-buildPkg
];
home-manager.users.${mainUser}.programs.bash.shellAliases = {
nix-fast-build = "nix-fast-build -f $FLAKE/.#nixFastChecks";
};
# Populate cache
systemd = {
services.buildAll = {
@ -51,7 +55,7 @@ in {
fi
git clone https://git.nelim.org/matt1432/nixos-configs.git nix-clone
cd nix-clone
nix-fast-build
nix-fast-build -f .#nixFastChecks
cd ..
rm -r nix-clone
'';

View file

@ -1,6 +1,6 @@
{
inputs = let
inherit (import ./flake/inputs.nix) mkDep mkInput otherInputs;
inherit (import ./inputs.nix) mkDep mkInput otherInputs;
mainInputs = {
nixpkgs = mkInput {
@ -47,7 +47,7 @@
self,
...
}: let
inherit (import ./flake/lib.nix inputs) mkVersion mkNixOS mkNixOnDroid mkPkgs;
inherit (import "${self}/lib.nix" inputs) mkVersion mkNixOS mkNixOnDroid mkPkgs;
supportedSystems = ["x86_64-linux" "aarch64-linux"];
@ -154,10 +154,10 @@
};
});
# For nix-fast-build
checks =
# For nix-fast-build. I use a custom output to alleviate eval time of this flake. ie. when doing nix flake show
nixFastChecks =
perSystem (pkgs:
import ./flake/ci.nix {inherit pkgs self;});
import ./checks {inherit pkgs self;});
formatter = perSystem (pkgs: pkgs.alejandra);
};

View file

@ -1,13 +0,0 @@
# CI: https://github.com/Mic92/dotfiles/blob/c2f538934d67417941f83d8bb65b8263c43d32ca/flake.nix#L168
{
pkgs,
self,
}: let
inherit (pkgs.lib) filterAttrs mapAttrs' nameValuePair;
nixosMachines =
mapAttrs'
(name: config: nameValuePair "nixos-${name}" config.config.system.build.toplevel)
((filterAttrs (_: config: config.pkgs.system == pkgs.system)) self.nixosConfigurations);
in
nixosMachines

View file

@ -9,6 +9,7 @@ self: {
firefox-gx = pkgs.callPackage ./gx-theme.nix {
inherit (self.inputs) firefox-gx-src;
inherit (import "${self}/lib.nix" {}) mkVersion;
};
in {
config = {

View file

@ -1,28 +1,27 @@
{
lib,
mkVersion,
firefox-gx-src,
stdenvNoCC,
}: let
inherit (import ../../flake/lib.nix {}) mkVersion;
in
stdenvNoCC.mkDerivation {
pname = "firefox-gx";
version = mkVersion firefox-gx-src;
}:
stdenvNoCC.mkDerivation {
pname = "firefox-gx";
version = mkVersion firefox-gx-src;
src = firefox-gx-src;
src = firefox-gx-src;
installPhase = ''
# Personal changes
sed -i 's/var(--fuchsia))/var(--purple))/' ./chrome/components/ogx_root-personal.css
sed -i 's#../newtab/wallpaper-dark1.png#../newtab/wallpaper-dark2.png#' ./chrome/components/ogx_root-personal.css
installPhase = ''
# Personal changes
sed -i 's/var(--fuchsia))/var(--purple))/' ./chrome/components/ogx_root-personal.css
sed -i 's#../newtab/wallpaper-dark1.png#../newtab/wallpaper-dark2.png#' ./chrome/components/ogx_root-personal.css
mkdir -p $out
cp -r ./* $out
'';
mkdir -p $out
cp -r ./* $out
'';
meta = {
description = "Firefox Theme CSS to Opera GX Lovers";
homepage = "https://github.com/Godiesc/firefox-gx";
license = lib.licenses.mspl;
};
}
meta = {
description = "Firefox Theme CSS to Opera GX Lovers";
homepage = "https://github.com/Godiesc/firefox-gx";
license = lib.licenses.mspl;
};
}

View file

@ -39,7 +39,7 @@
modules =
[
{home-manager.extraSpecialArgs = specialArgs;}
../common
./common
]
++ mods;
};
@ -60,7 +60,7 @@
};
}
{home-manager = {inherit extraSpecialArgs;};}
../common/nix-on-droid.nix
./common/nix-on-droid.nix
]
++ mods;
};