1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

treewide: remove no-ops (#8061)

This commit is contained in:
Benedikt M. Rips 2025-10-26 21:43:53 +01:00 committed by GitHub
parent 879e4d9060
commit f2f1076c1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 302 additions and 414 deletions

View file

@ -17,9 +17,7 @@
lib
pkgs
;
configuration =
{ ... }:
{
configuration = {
imports = modules ++ [
{
programs.home-manager.path = builtins.path {

View file

@ -13,9 +13,7 @@ let
renderSettings = settings: lib.concatStringsSep ";" (lib.mapAttrsToList renderSetting settings);
pluginModule = types.submodule (
{ ... }:
{
pluginModule = types.submodule ({
options = {
src = mkOption {
type = with types; nullOr path;
@ -48,8 +46,7 @@ let
'';
};
};
}
);
});
in
{
meta.maintainers = with lib.maintainers; [ thiagokokada ];

View file

@ -21,9 +21,7 @@ in
options.services.swayidle =
let
timeoutModule =
{ ... }:
{
timeoutModule = {
options = {
timeout = mkOption {
type = types.ints.positive;
@ -44,9 +42,7 @@ in
};
};
eventModule =
{ ... }:
{
eventModule = {
options = {
event = mkOption {
type = types.enum [

View file

@ -42,7 +42,7 @@ let
if lib.isDerivation value then scrubbedValue // newDrvAttrs else scrubbedValue
else
value;
scrubDerivations = attrs: lib.mapAttrs scrubDerivation attrs;
scrubDerivations = lib.mapAttrs scrubDerivation;
# Globally unscrub a few selected packages that are used by a wide selection of tests.
whitelist =
@ -111,10 +111,7 @@ let
pkgs =
let
overlays =
config.test.stubOverlays
++ lib.optionals (
config.nixpkgs.overlays != null && config.nixpkgs.overlays != [ ]
) config.nixpkgs.overlays;
config.test.stubOverlays ++ lib.optionals (config.nixpkgs.overlays != null) config.nixpkgs.overlays;
stubbedPkgs =
if overlays == [ ] then
scrubbedPkgs

View file

@ -4,9 +4,7 @@
name = "nixos-basics";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ ../../../nixos ]; # Import the HM NixOS module.
virtualisation.memorySize = 2048;
@ -18,9 +16,7 @@
uid = 1000;
};
home-manager.users.alice =
{ ... }:
{
home-manager.users.alice = {
home.stateVersion = "24.11";
home.file.test.text = "testfile";
# Enable a light-weight systemd service.

View file

@ -1,4 +1,3 @@
{ ... }:
{
imports = [ ../../../nixos ]; # Import the HM NixOS module.
@ -9,9 +8,7 @@
};
home-manager = {
users.alice =
{ ... }:
{
users.alice = {
home.stateVersion = "24.11";
home.file.test.text = "testfile new profile";
};

View file

@ -4,9 +4,7 @@
name = "nixos-legacy-profile-management";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [
# Make the nixpkgs channel available.
"${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix"
@ -26,9 +24,7 @@
# Force legacy profile management.
enableLegacyProfileManagement = true;
users.alice =
{ ... }:
{
users.alice = {
home.stateVersion = "24.11";
home.file.test.text = "testfile legacy";
};
@ -40,9 +36,7 @@
# Assert that we expect the option to default to false.
enableLegacyProfileManagement = pkgs.lib.mkOptionDefault false;
users.alice =
{ ... }:
{
users.alice = {
home.stateVersion = "24.11";
home.file.test.text = "testfile modern";
};

View file

@ -1,5 +1,3 @@
{ ... }:
{
home.username = "alice";
home.homeDirectory = "/home/alice";

View file

@ -4,9 +4,7 @@
name = "standalone-flake-basics";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 3072;
nix = {

View file

@ -10,9 +10,7 @@ in
name = "home-with-symbols";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
users.users.alice = {

View file

@ -3,9 +3,7 @@
name = "kitty-theme-path";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
users.users.alice = {

View file

@ -2,9 +2,7 @@
{
name = "mu-store-init";
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
users.users.alice = {

View file

@ -9,9 +9,7 @@ in
name = "works-with-nh-stable";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
environment.systemPackages = [ pkgs.nh ];

View file

@ -24,9 +24,7 @@ in
{
name = "restic";
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
users.users.alice = {

View file

@ -4,9 +4,7 @@
name = "standalone-specialisation";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
users.users.alice = {

View file

@ -4,9 +4,7 @@
name = "standalone-standard-basics";
meta.maintainers = [ pkgs.lib.maintainers.rycee ];
nodes.machine =
{ ... }:
{
nodes.machine = {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
virtualisation.memorySize = 2048;
users.users.alice = {

View file

@ -36,9 +36,7 @@ in
};
};
home-cursor-legacy-disabled =
{ ... }:
{
home-cursor-legacy-disabled = {
config = {
home.pointerCursor = null;

View file

@ -1,7 +1,5 @@
{
i18n =
{ ... }:
{
i18n = {
config = {
nmt.script = ''
hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh

View file

@ -1,22 +1,8 @@
{ ... }:
{
imports = [
(
{ ... }:
{
config.home.sessionPath = [ "foo" ];
}
)
(
{ ... }:
{
config.home.sessionPath = [
home.sessionPath = [
"bar"
"baz"
];
}
)
"foo"
];
nmt.script = ''

View file

@ -1,22 +1,8 @@
{ ... }:
{
imports = [
(
{ ... }:
{
config.home.sessionSearchVariables.TEST = [ "foo" ];
}
)
(
{ ... }:
{
config.home.sessionSearchVariables.TEST = [
home.sessionSearchVariables.TEST = [
"bar"
"baz"
];
}
)
"foo"
];
nmt.script = ''

View file

@ -37,7 +37,6 @@ let
in
{
config = {
home.sessionVariables = {
V1 = "v1";
V2 = "v2-${config.home.sessionVariables.V1}";
@ -48,5 +47,4 @@ in
assertFileContent home-path/etc/profile.d/hm-session-vars.sh \
${expected}
'';
};
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
config = {
xdg.mime.enable = true;
xdg.desktopEntries = {
mime-test = {
@ -25,5 +23,4 @@
assertDirectoryNotEmpty home-path/share/mime # Check that update-mime-database created files
'';
};
}

View file

@ -1,5 +1,3 @@
{ ... }:
{
programs.ashell = {
enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
programs = {
bash.enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
programs.keepassxc = {
enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
programs.keepassxc = {
enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
programs = {
kubeswitch.enable = true;

View file

@ -1,4 +1,3 @@
{ ... }:
{
programs.lazydocker = {
enable = true;

View file

@ -1,4 +1,3 @@
{ ... }:
{
programs.lazydocker.enable = true;
test.stubs.lazydocker = { };

View file

@ -1,4 +1,3 @@
{ ... }:
{
programs.swaylock.settings = { };

View file

@ -1,4 +1,3 @@
{ ... }:
{
programs.uv = {
enable = true;

View file

@ -1,20 +1,11 @@
{
imports = [
(
{ ... }:
{
config.programs.zsh.history.ignorePatterns = [ "echo *" ];
}
)
(
{ ... }:
{
config.programs.zsh.history.ignorePatterns = [ "rm *" ];
}
)
programs.zsh = {
enable = true;
history.ignorePatterns = [
"echo *"
"rm *"
];
programs.zsh.enable = true;
};
nmt.script = ''
assertFileContains home-files/.zshrc "HISTORY_IGNORE='(echo *|rm *)'"

View file

@ -1,5 +1,3 @@
{ ... }:
{
services.clipse = {
enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
services.easyeffects = {
enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
services.easyeffects = {
enable = true;

View file

@ -1,5 +1,3 @@
{ ... }:
{
systemd.user.slices.app-test = {
Unit = {

View file

@ -108,8 +108,7 @@ in
lib.test.mkStubPackage = mkStubPackage;
test.stubOverlays =
[ ]
++ lib.optional (config.test.stubs != { }) (
lib.optional (config.test.stubs != { }) (
self: super:
lib.mapAttrs (
n: v: