Skip to content

Commit

Permalink
treewide: use lib.singleton (#763)
Browse files Browse the repository at this point in the history
backport of #754
  • Loading branch information
awwpotato authored Jan 9, 2025
1 parent 743ad1d commit c62df19
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 92 deletions.
16 changes: 7 additions & 9 deletions modules/alacritty/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.alacritty;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.alacritty = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.alacritty = {
enable = true;
inherit package;
};
};
}
16 changes: 7 additions & 9 deletions modules/emacs/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.emacs;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.emacs = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.emacs = {
enable = true;
inherit package;
};
};
}
20 changes: 9 additions & 11 deletions modules/firefox/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.firefox;
Expand All @@ -10,15 +10,13 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.firefox = {
enable = true;
inherit package;
profiles.stylix.isDefault = true;
};
home-manager.sharedModules = lib.singleton {
programs.firefox = {
enable = true;
inherit package;
profiles.stylix.isDefault = true;
};

stylix.targets.firefox.profileNames = [ "stylix" ];
}
];
stylix.targets.firefox.profileNames = [ "stylix" ];
};
}
16 changes: 7 additions & 9 deletions modules/foot/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.foot;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.foot = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.foot = {
enable = true;
inherit package;
};
};
}
16 changes: 7 additions & 9 deletions modules/hyprland/testbed.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
environment.loginShellInit = lib.getExe pkgs.hyprland;
programs.hyprland.enable = true;

home-manager.sharedModules = [
{
wayland.windowManager.hyprland = {
enable = true;
home-manager.sharedModules = lib.singleton {
wayland.windowManager.hyprland = {
enable = true;

# We need something to open a window so that we can check the window borders
settings.bind = [ "ALT, RETURN, exec, ${lib.getExe pkgs.foot}" ];
};
}
];
# We need something to open a window so that we can check the window borders
settings.bind = [ "ALT, RETURN, exec, ${lib.getExe pkgs.foot}" ];
};
};
}
16 changes: 7 additions & 9 deletions modules/kitty/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.kitty;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.kitty = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.kitty = {
enable = true;
inherit package;
};
};
}
16 changes: 7 additions & 9 deletions modules/qutebrowser/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.qutebrowser;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.qutebrowser = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.qutebrowser = {
enable = true;
inherit package;
};
};
}
16 changes: 7 additions & 9 deletions modules/vscode/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

# We are using VSCodium because VSCode is an unfree package
let
Expand All @@ -11,12 +11,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.vscode = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.vscode = {
enable = true;
inherit package;
};
};
}
16 changes: 7 additions & 9 deletions modules/wezterm/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.wezterm;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.wezterm = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.wezterm = {
enable = true;
inherit package;
};
};
}
16 changes: 7 additions & 9 deletions modules/zathura/testbed.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

let
package = pkgs.zathura;
Expand All @@ -10,12 +10,10 @@ in
inherit package;
};

home-manager.sharedModules = [
{
programs.zathura = {
enable = true;
inherit package;
};
}
];
home-manager.sharedModules = lib.singleton {
programs.zathura = {
enable = true;
inherit package;
};
};
}

0 comments on commit c62df19

Please sign in to comment.