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:
parent
879e4d9060
commit
f2f1076c1f
37 changed files with 302 additions and 414 deletions
|
|
@ -17,9 +17,7 @@
|
|||
lib
|
||||
pkgs
|
||||
;
|
||||
configuration =
|
||||
{ ... }:
|
||||
{
|
||||
configuration = {
|
||||
imports = modules ++ [
|
||||
{
|
||||
programs.home-manager.path = builtins.path {
|
||||
|
|
|
|||
|
|
@ -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 ];
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.username = "alice";
|
||||
home.homeDirectory = "/home/alice";
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 ];
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
home-cursor-legacy-disabled =
|
||||
{ ... }:
|
||||
{
|
||||
home-cursor-legacy-disabled = {
|
||||
config = {
|
||||
home.pointerCursor = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
i18n =
|
||||
{ ... }:
|
||||
{
|
||||
i18n = {
|
||||
config = {
|
||||
nmt.script = ''
|
||||
hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh
|
||||
|
|
|
|||
|
|
@ -1,22 +1,8 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
config.home.sessionPath = [ "foo" ];
|
||||
}
|
||||
)
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
config.home.sessionPath = [
|
||||
home.sessionPath = [
|
||||
"bar"
|
||||
"baz"
|
||||
];
|
||||
}
|
||||
)
|
||||
"foo"
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
|
|
|
|||
|
|
@ -1,22 +1,8 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
config.home.sessionSearchVariables.TEST = [ "foo" ];
|
||||
}
|
||||
)
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
config.home.sessionSearchVariables.TEST = [
|
||||
home.sessionSearchVariables.TEST = [
|
||||
"bar"
|
||||
"baz"
|
||||
];
|
||||
}
|
||||
)
|
||||
"foo"
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.ashell = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
bash.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.keepassxc = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.keepassxc = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
kubeswitch.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.lazydocker = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.lazydocker.enable = true;
|
||||
test.stubs.lazydocker = { };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.swaylock.settings = { };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.uv = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -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 *)'"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.clipse = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
systemd.user.slices.app-test = {
|
||||
Unit = {
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue