Skip to content

Commit

Permalink
refactor(tests): use submodule instead
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed May 12, 2024
1 parent f4ccf03 commit c233d06
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 446 deletions.
11 changes: 9 additions & 2 deletions src/mkHome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
# SPDX-License-Identifier: MIT

{ lib }:
userSet: shell: suites:
homeModule: userSet: shell: suites:
{
homeModule ? [ ],
userSet,
shell,
suites ? [ ],
}:
let
user = lib.head (lib.attrNames userSet);
pathsToLinkShell = lib.elem shell [
Expand All @@ -17,7 +23,8 @@ let
in
{
imports =
[
lib.flatten [
homeModule
{ users.users = userSet; }
(
{ pkgs, lib, ... }:
Expand Down
16 changes: 16 additions & 0 deletions src/pops/nixosProfiles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,28 @@
projectRoot,
POP,
flops,
lib,
}:
(super.nixosModules.addLoadExtender {
load = {
src = projectRoot + "/units/nixos/nixosProfiles";
type = "nixosProfilesOmnibus";
transformer = [ (_: _: _) ];
inputsTransformer = [
(
self:
self
// (
let
system = if self ? system then self.system else throw "system is required";
in
{
isDarwin = lib.elem system lib.systems.doubles.darwin;
isLinux = lib.elem system lib.systems.doubles.linux;
}
)
)
];
};
}).addExporters
[
Expand Down
27 changes: 0 additions & 27 deletions tests/nixos/__fixture/__lock/flake.lock

This file was deleted.

14 changes: 0 additions & 14 deletions tests/nixos/__fixture/__lock/flake.nix

This file was deleted.

10 changes: 0 additions & 10 deletions tests/nixos/__fixture/__nixosProfiles/bootstrap.nix

This file was deleted.

62 changes: 0 additions & 62 deletions tests/nixos/__fixture/layouts.nix

This file was deleted.

20 changes: 0 additions & 20 deletions tests/nixos/__fixture/pops/flake.nix

This file was deleted.

34 changes: 0 additions & 34 deletions tests/nixos/__fixture/pops/homeModules.nix

This file was deleted.

44 changes: 0 additions & 44 deletions tests/nixos/__fixture/pops/homeProfiles.nix

This file was deleted.

46 changes: 0 additions & 46 deletions tests/nixos/__fixture/pops/nixosModules.nix

This file was deleted.

54 changes: 0 additions & 54 deletions tests/nixos/__fixture/pops/nixosProfiles.nix

This file was deleted.

15 changes: 0 additions & 15 deletions tests/nixos/__fixture/pops/omnibus.nix

This file was deleted.

Loading

0 comments on commit c233d06

Please sign in to comment.