mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
tests: remove with lib (#6511)
This commit is contained in:
parent
e495cd8c80
commit
439a125afe
100 changed files with 77 additions and 398 deletions
|
|
@ -1,8 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, lib, ... }:
|
||||
let inherit (lib) concatStringsSep mkOption types;
|
||||
in {
|
||||
options.test.asserts = {
|
||||
warnings = {
|
||||
enable = mkOption {
|
||||
|
|
@ -37,8 +35,8 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf config.test.asserts.warnings.enable {
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.test.asserts.warnings.enable {
|
||||
home.file = {
|
||||
"asserts/warnings.actual".text = concatStringsSep ''
|
||||
|
||||
|
|
@ -57,12 +55,13 @@ with lib;
|
|||
'';
|
||||
})
|
||||
|
||||
(mkIf config.test.asserts.assertions.enable {
|
||||
(lib.mkIf config.test.asserts.assertions.enable {
|
||||
home.file = {
|
||||
"asserts/assertions.actual".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
'' (map (x: x.message) (filter (x: !x.assertion) config.assertions));
|
||||
''
|
||||
(map (x: x.message) (lib.filter (x: !x.assertion) config.assertions));
|
||||
"asserts/assertions.expected".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{
|
||||
home.username = "alice";
|
||||
home.homeDirectory = "/home/alice";
|
||||
home.stateVersion = "24.11";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{
|
||||
home.username = "alice";
|
||||
home.homeDirectory = "/home/alice";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
accounts.email = {
|
||||
maildirBasePath = "Mail";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."disabled" = {
|
||||
enable = false;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."executable" = {
|
||||
text = "";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file.".hidden".source = ./.hidden;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."source with spaces!".source = ./. + "/source with spaces!";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
conflict1 = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."$HOME/$FOO/bar baz".text = "blah";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."using-text".text = ''
|
||||
This is the
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
launchd.agents."test-service" = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ pkgs, ... }: {
|
||||
config = {
|
||||
home.packages = [ pkgs.comic-relief pkgs.unifont ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
registry = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
pam.sessionVariables = {
|
||||
V1 = "v1";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
home.file.testfile.text = "not special";
|
||||
specialisation.test.configuration = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, lib, ... }: {
|
||||
config = {
|
||||
# Test fallback behavior for stateVersion >= 20.09, which is pure.
|
||||
xdg.enable = lib.mkForce false;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ pkgs, ... }: {
|
||||
config = {
|
||||
xdg.desktopEntries = {
|
||||
full = { # full definition
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
xdg.configHome = /. + "${config.home.homeDirectory}/.dummy-config";
|
||||
xdg.dataHome = /. + "${config.home.homeDirectory}/.dummy-data";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
xdg.mimeApps = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{
|
||||
config = {
|
||||
xdg.mime.enable = false;
|
||||
nmt.script = ''
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
xsession = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
home.stateVersion = "19.09";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.abook.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.abook = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
test.asserts.assertions.expected = [''
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
nmt.script = let dir = "home-files/.config/aerc";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, pkgs, ... }: {
|
||||
config = {
|
||||
nmt.script = let
|
||||
dir = if (pkgs.stdenv.isDarwin && !config.xdg.enable) then
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.bash = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.boxxy.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.boxxy.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.dircolors = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{
|
||||
config = {
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{
|
||||
config = {
|
||||
programs.eww = { enable = true; };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,13 @@
|
|||
modulePath:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
moduleName = concatStringsSep "." modulePath;
|
||||
moduleName = lib.concatStringsSep "." modulePath;
|
||||
|
||||
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||
|
||||
in {
|
||||
imports = [ firefoxMockOverlay ];
|
||||
|
||||
config = mkIf config.test.enableBig (setAttrByPath modulePath {
|
||||
config = lib.mkIf config.test.enableBig (lib.setAttrByPath modulePath {
|
||||
enable = true;
|
||||
enableGnomeExtensions = true;
|
||||
} // {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
modulePath:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = getAttrFromPath modulePath config;
|
||||
cfg = lib.getAttrFromPath modulePath config;
|
||||
|
||||
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||
|
||||
in {
|
||||
imports = [ firefoxMockOverlay ];
|
||||
|
||||
config = mkIf config.test.enableBig ({
|
||||
config = lib.mkIf config.test.enableBig ({
|
||||
home.stateVersion = "23.05";
|
||||
} // setAttrByPath modulePath {
|
||||
} // lib.setAttrByPath modulePath {
|
||||
enable = true;
|
||||
policies = { BlockAboutConfig = true; };
|
||||
package = pkgs.${cfg.wrappedPackageName}.override {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
modulePath:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
|
||||
cfg = getAttrFromPath modulePath config;
|
||||
cfg = lib.getAttrFromPath modulePath config;
|
||||
|
||||
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||
|
||||
in {
|
||||
imports = [ firefoxMockOverlay ];
|
||||
|
||||
config = lib.mkIf config.test.enableBig ({
|
||||
home.stateVersion = "19.09";
|
||||
} // setAttrByPath modulePath { enable = true; } // {
|
||||
} // lib.setAttrByPath modulePath { enable = true; } // {
|
||||
nmt.script = ''
|
||||
assertFileRegex \
|
||||
home-path/bin/${cfg.wrappedPackageName} \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
|
||||
func = pkgs.writeText "func.fish" ''
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ lib, ... }: {
|
||||
config = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
|
||||
fooPluginSrc = pkgs.writeText "fooPluginSrc" "";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
dummy-gnome-shell-extensions = pkgs.runCommand "dummy-package" { } ''
|
||||
mkdir -p $out/share/gnome-shell/extensions/dummy-package
|
||||
|
|
@ -31,7 +28,7 @@ let
|
|||
"test-extension-uuid"
|
||||
];
|
||||
|
||||
actualEnabledExtensions = catAttrs "value"
|
||||
actualEnabledExtensions = lib.catAttrs "value"
|
||||
config.dconf.settings."org/gnome/shell".enabled-extensions.value;
|
||||
|
||||
in {
|
||||
|
|
@ -62,8 +59,8 @@ in {
|
|||
message = "Expected disable-user-extensions to be false.";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
all (e: elem e actualEnabledExtensions) expectedEnabledExtensions;
|
||||
assertion = lib.all (e: lib.elem e actualEnabledExtensions)
|
||||
expectedEnabledExtensions;
|
||||
message = ''
|
||||
Expected enabled-extensions to contain all of:
|
||||
${toString expectedEnabledExtensions}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ lib, pkgs, ... }: {
|
||||
config = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.kitty = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
programs.looking-glass-client = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
programs.looking-glass-client = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.man = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.man = { enable = true; };
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.preferXdgDirectories = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.readline = {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, lib, ... }: {
|
||||
config = {
|
||||
programs.ssh = { enable = true; };
|
||||
|
||||
home.file.assertions.text = builtins.toJSON
|
||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||
(map (a: a.message) (lib.filter (a: !a.assertion) config.assertions));
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.ssh/config
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ssh = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, lib, ... }: {
|
||||
config = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
|
@ -25,7 +21,7 @@ with lib;
|
|||
};
|
||||
|
||||
home.file.result.text = builtins.toJSON
|
||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||
(map (a: a.message) (lib.filter (a: !a.assertion) config.assertions));
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.ssh/config
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ssh = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ssh = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ssh = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ssh = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, lib, ... }: {
|
||||
config = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
|
@ -12,7 +8,7 @@ with lib;
|
|||
proxyJump = "jump-host";
|
||||
};
|
||||
|
||||
ordered = hm.dag.entryAfter [ "xyz" ] { port = 1; };
|
||||
ordered = lib.hm.dag.entryAfter [ "xyz" ] { port = 1; };
|
||||
|
||||
xyz = {
|
||||
identityFile = "file";
|
||||
|
|
@ -49,7 +45,7 @@ with lib;
|
|||
};
|
||||
|
||||
home.file.assertions.text = builtins.toJSON
|
||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||
(map (a: a.message) (lib.filter (a: !a.assertion) config.assertions));
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.ssh/config
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, lib, ... }: {
|
||||
config = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
|
@ -19,7 +15,7 @@ with lib;
|
|||
};
|
||||
|
||||
home.file.assertions.text = builtins.toJSON
|
||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||
(map (a: a.message) (lib.filter (a: !a.assertion) config.assertions));
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.ssh/config
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ lib, pkgs, ... }: {
|
||||
config = {
|
||||
programs.texlive.enable = true;
|
||||
|
||||
|
|
@ -14,7 +10,7 @@ with lib;
|
|||
combine = tpkgs:
|
||||
pkgs.symlinkJoin {
|
||||
name = "dummy-texlive-combine";
|
||||
paths = attrValues tpkgs;
|
||||
paths = lib.attrValues tpkgs;
|
||||
};
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
substituteExpected = path:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ pkgs, ... }: {
|
||||
config = {
|
||||
programs.tmux = {
|
||||
aggressiveResize = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = { enable = false; };
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, pkgs, ... }: {
|
||||
programs.watson = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, pkgs, ... }: {
|
||||
programs.watson = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
{ config, ... }: {
|
||||
config = {
|
||||
programs.xmobar = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.activitywatch.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.fluidsynth.enable = true;
|
||||
services.fluidsynth.soundService = "pipewire-pulse";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./i3-stubs.nix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./i3-stubs.nix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./i3-stubs.nix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./i3-stubs.nix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./i3-stubs.nix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
let
|
||||
i3 = {
|
||||
ws1 = "1";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
systemd.user.timers.test-timer = {
|
||||
Unit = { Description = "A basic test timer"; };
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
darwinTestApp = pkgs.runCommandLocal "target-darwin-example-app" { } ''
|
||||
mkdir -p $out/Applications
|
||||
touch $out/Applications/example-app
|
||||
'';
|
||||
|
||||
in {
|
||||
config = {
|
||||
home.packages = [ darwinTestApp ];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
expectedXdgDataDirs = concatStringsSep ":" [
|
||||
expectedXdgDataDirs = lib.concatStringsSep ":" [
|
||||
"\${NIX_STATE_DIR:-/nix/var/nix}/profiles/default/share"
|
||||
"/home/hm-user/.nix-profile/share"
|
||||
"/usr/share/ubuntu"
|
||||
|
|
@ -12,7 +9,6 @@ let
|
|||
"/var/lib/snapd/desktop"
|
||||
"/foo"
|
||||
];
|
||||
|
||||
in {
|
||||
config = {
|
||||
targets.genericLinux.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
xresources.properties = { };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
xresources = {
|
||||
properties = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
|
||||
stubType = types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
|
|
@ -15,13 +13,13 @@ let
|
|||
outPath = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "@${name}@";
|
||||
defaultText = literalExpression ''"@''${name}@"'';
|
||||
defaultText = lib.literalExpression ''"@''${name}@"'';
|
||||
};
|
||||
|
||||
version = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
defaultText = literalExpression "pkgs.\${name}.version or null";
|
||||
defaultText = lib.literalExpression "pkgs.\${name}.version or null";
|
||||
};
|
||||
|
||||
buildScript = mkOption {
|
||||
|
|
@ -52,7 +50,7 @@ let
|
|||
meta.mainProgram = name;
|
||||
} buildScript;
|
||||
|
||||
stubbedPkg = pkg // optionalAttrs (outPath != null) {
|
||||
stubbedPkg = pkg // lib.optionalAttrs (outPath != null) {
|
||||
inherit outPath;
|
||||
|
||||
# Prevent getOutput from descending into outputs
|
||||
|
|
@ -63,7 +61,8 @@ let
|
|||
buildHost = pkg;
|
||||
hostTarget = pkg;
|
||||
};
|
||||
} // optionalAttrs (version != null) { inherit version; } // extraAttrs;
|
||||
} // lib.optionalAttrs (version != null) { inherit version; }
|
||||
// extraAttrs;
|
||||
in stubbedPkg;
|
||||
|
||||
in {
|
||||
|
|
@ -90,11 +89,12 @@ in {
|
|||
config = {
|
||||
lib.test.mkStubPackage = mkStubPackage;
|
||||
|
||||
test.stubOverlays = [ ] ++ optional (config.test.stubs != { }) (self: super:
|
||||
mapAttrs (n: v:
|
||||
builtins.traceVerbose "${n} - stubbed" (mkStubPackage (v
|
||||
// optionalAttrs (v.version == null) {
|
||||
version = super.${n}.version or null;
|
||||
}))) config.test.stubs) ++ config.test.unstubs;
|
||||
test.stubOverlays = [ ] ++ lib.optional (config.test.stubs != { })
|
||||
(self: super:
|
||||
lib.mapAttrs (n: v:
|
||||
builtins.traceVerbose "${n} - stubbed" (mkStubPackage (v
|
||||
// lib.optionalAttrs (v.version == null) {
|
||||
version = super.${n}.version or null;
|
||||
}))) config.test.stubs) ++ config.test.unstubs;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue