flake: add Flake Parts tree into testbed environment (#1642)
Link: https://github.com/nix-community/stylix/pull/1642 Reviewed-by: awwpotato <awwpotato@voidq.com>
This commit is contained in:
commit
ceda12a6da
15 changed files with 39 additions and 105 deletions
11
.github/workflows/check.yml
vendored
11
.github/workflows/check.yml
vendored
|
|
@ -34,6 +34,17 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# TODO: Lock this Action to a release tag once commit [1] ("fix: relocate
|
||||
# TMPDIR to /mnt to improve Nix installer compatibility") is part of a
|
||||
# release, resolving [2] ("does not work with cachix install nix action").
|
||||
#
|
||||
# [1]: https://github.com/wimpysworld/nothing-but-nix/pull/25
|
||||
# [2]: https://github.com/wimpysworld/nothing-but-nix/issues/24
|
||||
- uses: wimpysworld/nothing-but-nix@10c936d9e46521bf923f75458e0cbd4fa309300d # yamllint disable-line rule:line-length
|
||||
if: runner.os == 'Linux'
|
||||
with:
|
||||
hatchet-protocol: holster
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
|
||||
- uses: cachix/cachix-action@v16
|
||||
|
|
|
|||
|
|
@ -4,17 +4,7 @@ let
|
|||
in
|
||||
{
|
||||
environment = {
|
||||
loginShellInit = "${lib.getExe package} example.md";
|
||||
loginShellInit = "${lib.getExe package} flake-parts/flake.nix";
|
||||
systemPackages = [ package ];
|
||||
};
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/refs/heads/master/tests/syntax-tests/source/Markdown/example.md";
|
||||
hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA=";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
package = pkgs.emacs;
|
||||
in
|
||||
{
|
||||
stylix.testbed.ui.application = {
|
||||
name = "emacs";
|
||||
inherit package;
|
||||
};
|
||||
stylix.testbed.ui.command.text = "emacs flake-parts/flake.nix";
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
inherit package;
|
||||
package = pkgs.emacs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
package = pkgs.gedit;
|
||||
in
|
||||
{
|
||||
stylix.testbed.ui.application = {
|
||||
name = "org.gnome.gedit";
|
||||
inherit package;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ package ];
|
||||
stylix.testbed.ui.command.text = "gedit flake-parts/flake.nix";
|
||||
environment.systemPackages = [ pkgs.gedit ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
package = pkgs.gnome-text-editor;
|
||||
in
|
||||
{
|
||||
stylix.testbed.ui.application = {
|
||||
name = "org.gnome.TextEditor";
|
||||
inherit package;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ package ];
|
||||
stylix.testbed.ui.command.text = "gnome-text-editor flake-parts/flake.nix";
|
||||
environment.systemPackages = [ pkgs.gnome-text-editor ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui.command = {
|
||||
text = "${lib.getExe pkgs.micro} example.md";
|
||||
text = "${lib.getExe pkgs.micro} flake-parts/flake.nix";
|
||||
useTerminal = true;
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.micro.enable = true;
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/e2aa4bc33cca785cab8bdadffc58a4a30b245854/tests/syntax-tests/source/Markdown/example.md";
|
||||
hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,12 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
package = pkgs.neovide;
|
||||
in
|
||||
{
|
||||
stylix.testbed.ui.application = {
|
||||
name = "neovide";
|
||||
inherit package;
|
||||
};
|
||||
stylix.testbed.ui.command.text = "neovide flake-parts/flake.nix";
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs = {
|
||||
neovide = {
|
||||
enable = true;
|
||||
inherit package;
|
||||
package = pkgs.neovide;
|
||||
};
|
||||
neovim.enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
stylix.testbed.ui.command = {
|
||||
text = "nvim example.md";
|
||||
text = "nvim flake-parts/flake.nix";
|
||||
useTerminal = true;
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.neovim.enable = true;
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/e2aa4bc33cca785cab8bdadffc58a4a30b245854/tests/syntax-tests/source/Markdown/example.md";
|
||||
hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,8 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui.command = {
|
||||
text = "nvim example.md";
|
||||
text = "nvim flake-parts/flake.nix";
|
||||
useTerminal = true;
|
||||
};
|
||||
|
||||
programs.nixvim.enable = true;
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/refs/heads/master/tests/syntax-tests/source/Markdown/example.md";
|
||||
hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,8 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui.command = {
|
||||
text = "nvim example.md";
|
||||
text = "nvim flake-parts/flake.nix";
|
||||
useTerminal = true;
|
||||
};
|
||||
|
||||
programs.nvf.enable = true;
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/refs/heads/master/tests/syntax-tests/source/Markdown/example.md";
|
||||
hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui.command = {
|
||||
text = "${lib.getExe pkgs.vim} example.md";
|
||||
text = "${lib.getExe pkgs.vim} flake-parts/flake.nix";
|
||||
useTerminal = true;
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.vim.enable = true;
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/e2aa4bc33cca785cab8bdadffc58a4a30b245854/tests/syntax-tests/source/Markdown/example.md";
|
||||
hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,13 @@
|
|||
{ lib, pkgs, ... }:
|
||||
# We are using VSCodium because VSCode is an unfree package
|
||||
let
|
||||
package = pkgs.vscodium;
|
||||
in
|
||||
{
|
||||
stylix.testbed.ui.application = {
|
||||
name = "codium";
|
||||
inherit package;
|
||||
};
|
||||
stylix.testbed.ui.command.text = "codium flake-parts/flake.nix";
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
inherit package;
|
||||
|
||||
# We are using VSCodium because VSCode is an unfree package
|
||||
package = pkgs.vscodium;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,10 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui.command = {
|
||||
text = "${lib.getExe pkgs.zed-editor} example.md";
|
||||
text = "${lib.getExe pkgs.zed-editor} flake-parts/flake.nix";
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.zed-editor.enable = true;
|
||||
home.file."example.md" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/sharkdp/bat/e2aa4bc33cca785cab8bdadffc58a4a30b245854/tests/syntax-tests/source/Rust/output.rs";
|
||||
hash = "sha256-vpUndD6H1oJfYVDai4LpVpsW6SSGbK466t3IKENZ1ow=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ let
|
|||
|
||||
modules =
|
||||
[
|
||||
(lib.modules.importApply ./modules/flake-parts.nix inputs)
|
||||
./modules/common.nix
|
||||
./modules/enable.nix
|
||||
./modules/application.nix
|
||||
|
|
|
|||
7
stylix/testbed/modules/flake-parts.nix
Normal file
7
stylix/testbed/modules/flake-parts.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
inputs:
|
||||
{ lib, ... }:
|
||||
{
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
home.file.flake-parts.source = inputs.flake-parts;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue