chore: cleanup all files
This commit is contained in:
parent
f4e47cbf97
commit
9cc9955425
43 changed files with 2893 additions and 2834 deletions
372
modules/conf.nix
372
modules/conf.nix
|
|
@ -1,199 +1,173 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.conf = {
|
||||
system = lib.mkOption {
|
||||
default = "x86_64-linux";
|
||||
# no fisherprice unix support
|
||||
type = with lib.types; (enum [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-linux-android"
|
||||
]);
|
||||
example = "aarch64-linux";
|
||||
description = ''
|
||||
System architecture.
|
||||
'';
|
||||
};
|
||||
|
||||
systemLocalTime = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
System time for dualbooting
|
||||
'';
|
||||
};
|
||||
|
||||
wsl = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Runs Nix in wsl
|
||||
'';
|
||||
};
|
||||
|
||||
secureBoot = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
enables secure boot.
|
||||
Note: Secure boot is NOT reproducible
|
||||
Here are the necessary steps:
|
||||
+ create your keys with sbctl -> sudo sbctl create-keys
|
||||
+ build with systemd once -> set this to false and build once
|
||||
+ build with secureBoot true
|
||||
+ verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify
|
||||
+ enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft
|
||||
+ reboot with secureboot enabled
|
||||
Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys
|
||||
You likely have to disable these vendor specific keys (example HP: sure boot)
|
||||
'';
|
||||
};
|
||||
|
||||
useSystemdBootloader = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
use systemd bootloader.
|
||||
'';
|
||||
};
|
||||
|
||||
cpu = lib.mkOption {
|
||||
# TODO: how to enable arm?
|
||||
default = "amd";
|
||||
type = with lib.types; (enum [
|
||||
"amd"
|
||||
"intel"
|
||||
]);
|
||||
example = "intel";
|
||||
description = ''
|
||||
cpu microcode.
|
||||
'';
|
||||
};
|
||||
|
||||
additionalBootKernalParams = lib.mkOption {
|
||||
default = [
|
||||
"video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}"
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
additional kernelParams passed to bootloader
|
||||
'';
|
||||
};
|
||||
|
||||
defaultMonitor = lib.mkOption {
|
||||
default = "";
|
||||
example = "eDP-1";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor
|
||||
'';
|
||||
};
|
||||
|
||||
defaultMonitorMode = lib.mkOption {
|
||||
default = "";
|
||||
example = "3440x1440@180";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor mode: width x height @ refreshrate
|
||||
'';
|
||||
};
|
||||
|
||||
defaultMonitorScale = lib.mkOption {
|
||||
default = "1";
|
||||
example = "1.5";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor scaling
|
||||
'';
|
||||
};
|
||||
|
||||
bootParams = lib.mkOption {
|
||||
default = [];
|
||||
example = ["resume=something"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
Boot params
|
||||
'';
|
||||
};
|
||||
|
||||
kernelOverride = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr package;
|
||||
description = ''
|
||||
kernel to be used
|
||||
Has no examples as doc complains...
|
||||
#example = pkgs.linuxPackages_xanmod_latest;
|
||||
'';
|
||||
};
|
||||
|
||||
username = lib.mkOption {
|
||||
default = "DashNix";
|
||||
example = "pingpang";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The username.
|
||||
'';
|
||||
};
|
||||
|
||||
timezone = lib.mkOption {
|
||||
default = "Europe/Zurich";
|
||||
example = "Europe/Berlin";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The timezone.
|
||||
'';
|
||||
};
|
||||
|
||||
locale = lib.mkOption {
|
||||
default = "en_US.UTF-8";
|
||||
example = "de_DE.UTF-8";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The locale.
|
||||
'';
|
||||
};
|
||||
|
||||
nixosConfigPath = lib.mkOption {
|
||||
default = "/home/${config.conf.username}/gits/nixos/.";
|
||||
example = "yourpath/.";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The path for your build command, you can then simply type rebuild to switch to a new configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
systemStateVersion = lib.mkOption {
|
||||
example = "24.11";
|
||||
default = "23.05";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
System state version
|
||||
'';
|
||||
};
|
||||
homeStateVersion = lib.mkOption {
|
||||
default = "24.11";
|
||||
example = "23.05";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Home state version
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
(lib.optionalAttrs (options ? system.stateVersion) {
|
||||
boot = {
|
||||
kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel;
|
||||
kernelParams = config.conf.additionalBootKernalParams;
|
||||
};
|
||||
system.stateVersion = config.conf.systemStateVersion;
|
||||
})
|
||||
// (lib.optionalAttrs (options ? home.stateVersion) {
|
||||
home.stateVersion = config.conf.homeStateVersion;
|
||||
});
|
||||
}
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.conf = {
|
||||
system = lib.mkOption {
|
||||
default = "x86_64-linux";
|
||||
# no fisherprice unix support
|
||||
type = with lib.types; (enum [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-linux-android"
|
||||
]);
|
||||
example = "aarch64-linux";
|
||||
description = ''
|
||||
System architecture.
|
||||
'';
|
||||
};
|
||||
|
||||
systemLocalTime = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
System time for dualbooting
|
||||
'';
|
||||
};
|
||||
|
||||
wsl = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Runs Nix in wsl
|
||||
'';
|
||||
};
|
||||
|
||||
secureBoot = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
enables secure boot.
|
||||
Note: Secure boot is NOT reproducible
|
||||
Here are the necessary steps:
|
||||
+ create your keys with sbctl -> sudo sbctl create-keys
|
||||
+ build with systemd once -> set this to false and build once
|
||||
+ build with secureBoot true
|
||||
+ verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify
|
||||
+ enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft
|
||||
+ reboot with secureboot enabled
|
||||
Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys
|
||||
You likely have to disable these vendor specific keys (example HP: sure boot)
|
||||
'';
|
||||
};
|
||||
|
||||
useSystemdBootloader = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
use systemd bootloader.
|
||||
'';
|
||||
};
|
||||
|
||||
cpu = lib.mkOption {
|
||||
# TODO: how to enable arm?
|
||||
default = "amd";
|
||||
type = with lib.types; (enum [
|
||||
"amd"
|
||||
"intel"
|
||||
]);
|
||||
example = "intel";
|
||||
description = ''
|
||||
cpu microcode.
|
||||
'';
|
||||
};
|
||||
|
||||
additionalBootKernalParams = lib.mkOption {
|
||||
default = [
|
||||
# TODO test if needed
|
||||
#"video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}"
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
additional kernelParams passed to bootloader
|
||||
'';
|
||||
};
|
||||
|
||||
bootParams = lib.mkOption {
|
||||
default = [];
|
||||
example = ["resume=something"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
Boot params
|
||||
'';
|
||||
};
|
||||
|
||||
kernelOverride = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr package;
|
||||
description = ''
|
||||
kernel to be used
|
||||
Has no examples as doc complains...
|
||||
#example = pkgs.linuxPackages_xanmod_latest;
|
||||
'';
|
||||
};
|
||||
|
||||
username = lib.mkOption {
|
||||
default = "DashNix";
|
||||
example = "pingpang";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The username.
|
||||
'';
|
||||
};
|
||||
|
||||
timezone = lib.mkOption {
|
||||
default = "Europe/Zurich";
|
||||
example = "Europe/Berlin";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The timezone.
|
||||
'';
|
||||
};
|
||||
|
||||
locale = lib.mkOption {
|
||||
default = "en_US.UTF-8";
|
||||
example = "de_DE.UTF-8";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The locale.
|
||||
'';
|
||||
};
|
||||
|
||||
nixosConfigPath = lib.mkOption {
|
||||
default = "/home/${config.conf.username}/gits/nixos/.";
|
||||
example = "yourpath/.";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The path for your build command, you can then simply type rebuild to switch to a new configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
systemStateVersion = lib.mkOption {
|
||||
example = "24.11";
|
||||
default = "23.05";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
System state version
|
||||
'';
|
||||
};
|
||||
homeStateVersion = lib.mkOption {
|
||||
default = "24.11";
|
||||
example = "23.05";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Home state version
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
(lib.optionalAttrs (options ? system.stateVersion) {
|
||||
boot = {
|
||||
kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel;
|
||||
kernelParams = config.conf.additionalBootKernalParams;
|
||||
};
|
||||
system.stateVersion = config.conf.systemStateVersion;
|
||||
})
|
||||
// (lib.optionalAttrs (options ? home.stateVersion) {
|
||||
home.stateVersion = config.conf.homeStateVersion;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
144
modules/programs/anyrun.nix
Normal file
144
modules/programs/anyrun.nix
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
options,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
options.mods.anyrun = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables anyrun";
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured anyrun config.
|
||||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom anyrun configuration.
|
||||
Will be merged with default configuration if enabled.
|
||||
'';
|
||||
};
|
||||
useDefaultCss = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured anyrun css.
|
||||
'';
|
||||
};
|
||||
customCss = lib.mkOption {
|
||||
default = '''';
|
||||
example = ''
|
||||
#window {
|
||||
border-radius: none;
|
||||
}
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
Custom anyrun css.
|
||||
Will be merged with default css if enabled.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.anyrun.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.anyrun = lib.mkForce {
|
||||
enable = true;
|
||||
config =
|
||||
if config.mods.anyrun.useDefaultConfig
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
plugins = [
|
||||
inputs.anyrun.packages.${pkgs.system}.applications
|
||||
inputs.anyrun.packages.${pkgs.system}.rink
|
||||
inputs.anyrun.packages.${pkgs.system}.translate
|
||||
inputs.anyrun.packages.${pkgs.system}.websearch
|
||||
];
|
||||
hideIcons = mkDashDefault false;
|
||||
width = {
|
||||
fraction = mkDashDefault 0.3;
|
||||
};
|
||||
y = {
|
||||
fraction = mkDashDefault 0.5;
|
||||
};
|
||||
layer = mkDashDefault "overlay";
|
||||
hidePluginInfo = mkDashDefault true;
|
||||
closeOnClick = mkDashDefault true;
|
||||
}
|
||||
config.mods.anyrun.customConfig
|
||||
]
|
||||
else config.mods.anyrun.customConfig;
|
||||
|
||||
extraCss =
|
||||
if config.mods.anyrun.useDefaultCss
|
||||
then
|
||||
''
|
||||
#window {
|
||||
border-radius: 10px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
box#main {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
list#main {
|
||||
border-radius: 10px;
|
||||
margin: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
list#plugin {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
list#match {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
entry#entry {
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
margin: 10px 10px 0px 10px;
|
||||
}
|
||||
|
||||
label#match-desc {
|
||||
font-size: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
label#match-title {
|
||||
font-size: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
label#plugin {
|
||||
font-size: 16px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
* {
|
||||
border-radius: 10px;
|
||||
}
|
||||
''
|
||||
+ config.mods.anyrun.customCss
|
||||
else config.mods.anyrun.customCss;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -1,128 +1,131 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
basePackages = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables default system packages.
|
||||
'';
|
||||
};
|
||||
additionalPackages = lib.mkOption {
|
||||
default = [];
|
||||
example = [pkgs.openssl];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Additional packages to install.
|
||||
Note that these are installed even if base packages is disabled, e.g. you can also use this as the only packages to install.
|
||||
'';
|
||||
};
|
||||
specialPrograms = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
special program configuration to be added which require programs.something notation.
|
||||
'';
|
||||
};
|
||||
specialServices = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
special services configuration to be added which require an services.something notation.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
with pkgs;
|
||||
[
|
||||
adwaita-icon-theme
|
||||
dbus
|
||||
dconf
|
||||
direnv
|
||||
glib
|
||||
gnome.nixos-gsettings-overrides
|
||||
gsettings-desktop-schemas
|
||||
gtk-layer-shell
|
||||
gtk3
|
||||
gtk4
|
||||
gtk4-layer-shell
|
||||
hicolor-icon-theme
|
||||
icon-library
|
||||
kdePackages.breeze-icons
|
||||
kdePackages.breeze
|
||||
libsForQt5.breeze-qt5
|
||||
kdePackages.qtstyleplugin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libadwaita
|
||||
libxkbcommon
|
||||
alejandra
|
||||
openssl
|
||||
seahorse
|
||||
upower
|
||||
xorg.xkbutils
|
||||
sbctl
|
||||
]
|
||||
++ config.mods.basePackages.additionalPackages
|
||||
else config.mods.basePackages.additionalPackages;
|
||||
|
||||
gtk.iconCache.enable = false;
|
||||
services =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
{
|
||||
preload.enable = mkDashDefault true;
|
||||
upower.enable = mkDashDefault true;
|
||||
dbus = {
|
||||
enable = mkDashDefault true;
|
||||
};
|
||||
avahi = {
|
||||
enable = mkDashDefault true;
|
||||
nssmdns4 = mkDashDefault true;
|
||||
openFirewall = mkDashDefault true;
|
||||
};
|
||||
}
|
||||
// config.mods.basePackages.specialServices
|
||||
else config.mods.basePackages.specialServices;
|
||||
|
||||
programs =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
{
|
||||
nix-ld = {
|
||||
enable = mkDashDefault true;
|
||||
libraries = with pkgs; [
|
||||
jdk
|
||||
zlib
|
||||
];
|
||||
};
|
||||
direnv = {
|
||||
package = mkDashDefault pkgs.direnv;
|
||||
silent = mkDashDefault false;
|
||||
loadInNixShell = mkDashDefault true;
|
||||
direnvrcExtra = mkDashDefault "";
|
||||
nix-direnv = {
|
||||
enable = mkDashDefault true;
|
||||
package = mkDashDefault pkgs.nix-direnv;
|
||||
};
|
||||
};
|
||||
gnupg.agent.enable = mkDashDefault true;
|
||||
}
|
||||
// config.mods.basePackages.specialPrograms
|
||||
else config.mods.basePackages.specialPrograms;
|
||||
};
|
||||
}
|
||||
{
|
||||
mkDashDefault,
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
basePackages = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables default system packages.
|
||||
'';
|
||||
};
|
||||
additionalPackages = lib.mkOption {
|
||||
default = [];
|
||||
example = [pkgs.openssl];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Additional packages to install.
|
||||
Note that these are installed even if base packages is disabled, e.g. you can also use this as the only packages to install.
|
||||
'';
|
||||
};
|
||||
specialPrograms = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
special program configuration to be added which require programs.something notation.
|
||||
'';
|
||||
};
|
||||
specialServices = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
special services configuration to be added which require an services.something notation.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
with pkgs;
|
||||
[
|
||||
adwaita-icon-theme
|
||||
dbus
|
||||
dconf
|
||||
direnv
|
||||
glib
|
||||
gnome.nixos-gsettings-overrides
|
||||
gsettings-desktop-schemas
|
||||
gtk-layer-shell
|
||||
gtk3
|
||||
gtk4
|
||||
gtk4-layer-shell
|
||||
hicolor-icon-theme
|
||||
icon-library
|
||||
kdePackages.breeze-icons
|
||||
kdePackages.breeze
|
||||
libsForQt5.breeze-qt5
|
||||
kdePackages.qtstyleplugin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libadwaita
|
||||
libxkbcommon
|
||||
alejandra
|
||||
openssl
|
||||
seahorse
|
||||
upower
|
||||
xorg.xkbutils
|
||||
sbctl
|
||||
]
|
||||
++ config.mods.basePackages.additionalPackages
|
||||
else config.mods.basePackages.additionalPackages;
|
||||
|
||||
gtk.iconCache.enable = mkDashDefault false;
|
||||
services =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
{
|
||||
preload.enable = mkDashDefault true;
|
||||
upower.enable = mkDashDefault true;
|
||||
dbus = {
|
||||
enable = mkDashDefault true;
|
||||
};
|
||||
avahi = {
|
||||
enable = mkDashDefault true;
|
||||
nssmdns4 = mkDashDefault true;
|
||||
openFirewall = mkDashDefault true;
|
||||
};
|
||||
}
|
||||
// config.mods.basePackages.specialServices
|
||||
else config.mods.basePackages.specialServices;
|
||||
|
||||
programs =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
nix-ld = {
|
||||
enable = mkDashDefault true;
|
||||
libraries = with pkgs; [
|
||||
jdk
|
||||
zlib
|
||||
];
|
||||
};
|
||||
direnv = {
|
||||
package = mkDashDefault pkgs.direnv;
|
||||
silent = mkDashDefault false;
|
||||
loadInNixShell = mkDashDefault true;
|
||||
direnvrcExtra = mkDashDefault "";
|
||||
nix-direnv = {
|
||||
enable = mkDashDefault true;
|
||||
package = mkDashDefault pkgs.nix-direnv;
|
||||
};
|
||||
};
|
||||
gnupg.agent.enable = mkDashDefault true;
|
||||
}
|
||||
config.mods.basePackages.specialPrograms
|
||||
]
|
||||
else config.mods.basePackages.specialPrograms;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
|
|
@ -18,8 +19,8 @@
|
|||
config = lib.mkIf config.mods.bluetooth.enable (
|
||||
lib.optionalAttrs (options ? hardware.bluetooth) {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
enable = mkDashDefault true;
|
||||
powerOnBoot = mkDashDefault true;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stable,
|
||||
pkgs,
|
||||
name,
|
||||
...
|
||||
}: let
|
||||
mkExtension = id: install_url: {
|
||||
${id} = {
|
||||
inherit install_url;
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.mods.browser.${name}.extensions = lib.mkOption {
|
||||
default = [
|
||||
(mkExtension "uBlock0@raymondhill.net" "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi")
|
||||
(mkExtension "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" "https://addons.mozilla.org/firefox/downloads/latest/user-agent-string-switcher/latest.xpi")
|
||||
(mkExtension "{d7742d87-e61d-4b78-b8a1-b469842139fa}" "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi")
|
||||
(mkExtension "firefox@ghostery.com" "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi")
|
||||
(mkExtension "CanvasBlocker@kkapsner.de" "https://addons.mozilla.org/firefox/downloads/latest/canvasblocker/latest.xpi")
|
||||
(mkExtension "jid1-KKzOGWgsW3Ao4Q@jetpack" "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi")
|
||||
(mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi")
|
||||
(mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi")
|
||||
(mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi")
|
||||
(mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi")
|
||||
(mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib stable;}}/latest.xpi")
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf anything;
|
||||
description = ''
|
||||
List of extensions via attrsets:
|
||||
```nix
|
||||
# id
|
||||
# figure out the id via:
|
||||
# nix run github:tupakkatapa/mozid -- 'https://addons.mozilla.org/en/firefox/addon/ublock-origin'
|
||||
"uBlock0@raymondhill.net" = {
|
||||
# install url
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
# method https://mozilla.github.io/policy-templates/#extensionsettings
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
```
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
lib,
|
||||
dashNixAdditionalProps,
|
||||
config,
|
||||
options,
|
||||
pkgs,
|
||||
stable,
|
||||
...
|
||||
}: let
|
||||
name = "firefox";
|
||||
in {
|
||||
imports = [
|
||||
(import ./ffextensions.nix
|
||||
{inherit lib stable pkgs name;})
|
||||
(import ../../../lib/foxextensions.nix
|
||||
{inherit lib dashNixAdditionalProps pkgs name;})
|
||||
];
|
||||
options.mods.browser.${name} = {
|
||||
enable = lib.mkOption {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
lib,
|
||||
dashNixAdditionalProps,
|
||||
config,
|
||||
options,
|
||||
pkgs,
|
||||
stable,
|
||||
...
|
||||
}: let
|
||||
name = "librewolf";
|
||||
in {
|
||||
imports = [
|
||||
(import ./ffextensions.nix
|
||||
{inherit lib stable pkgs name;})
|
||||
(import ../../../lib/foxextensions.nix
|
||||
{inherit lib dashNixAdditionalProps pkgs name;})
|
||||
];
|
||||
options.mods.browser.${name} = {
|
||||
enable = lib.mkOption {
|
||||
|
|
|
|||
|
|
@ -1,140 +1,140 @@
|
|||
# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
inputs,
|
||||
stable,
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# at time of using this here, stylix might not be evaluated yet
|
||||
# hence ensure it is by using base16 mkSchemeAttrs
|
||||
base16 = pkgs.callPackage inputs.base16.lib {};
|
||||
scheme = base16.mkSchemeAttrs config.stylix.base16Scheme;
|
||||
name = "zen";
|
||||
in {
|
||||
imports = [
|
||||
(import ./ffextensions.nix
|
||||
{inherit lib stable pkgs name;})
|
||||
];
|
||||
options.mods.browser.${name} = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the zen browser";
|
||||
};
|
||||
configuration = lib.mkOption {
|
||||
default = {
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
CaptivePortal = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisableTelemetry = true;
|
||||
NoDefaultBookmarks = true;
|
||||
PasswordManagerEnabled = false;
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
Pocket = false;
|
||||
Snippets = false;
|
||||
TopSites = true;
|
||||
Highlights = false;
|
||||
};
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
};
|
||||
"3rdparty".Extensions = {
|
||||
"addon@darkreader.org" = {
|
||||
theme = {
|
||||
darkSchemeBackgroundColor = "#${scheme.base00}";
|
||||
darkSchemeTextColor = "#${scheme.base05}";
|
||||
};
|
||||
previewNewDesign = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information.";
|
||||
};
|
||||
profiles = lib.mkOption {
|
||||
default = [
|
||||
{
|
||||
name = "${config.conf.username}";
|
||||
value = {
|
||||
settings = {
|
||||
"zen.view.compact.hide-tabbar" = false;
|
||||
"zen.view.compact.hide-toolbar" = true;
|
||||
"zen.view.sidebar-expanded" = false;
|
||||
"zen.view.use-single-toolbar" = false;
|
||||
"zen.view.welcome-screen.seen" = true;
|
||||
"zen.theme.accent-color" = "#b4bbff";
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"cookiebanners.service.mode" = 2;
|
||||
};
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "special";
|
||||
value = {
|
||||
settings = {
|
||||
"zen.view.compact.hide-tabbar" = false;
|
||||
"zen.view.compact.hide-toolbar" = true;
|
||||
"zen.view.sidebar-expanded" = false;
|
||||
"zen.view.use-single-toolbar" = false;
|
||||
"zen.view.welcome-screen.seen" = true;
|
||||
"zen.theme.accent-color" = "#b4bbff";
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
};
|
||||
isDefault = false;
|
||||
id = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
example = [
|
||||
{
|
||||
name = "custom";
|
||||
value = {
|
||||
settings = {
|
||||
extensions.autoDisableScopes = 0;
|
||||
};
|
||||
extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader];
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
};
|
||||
}
|
||||
];
|
||||
type = with lib.types; listOf (attrsOf anything);
|
||||
description = "Zen profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.wrapFirefox
|
||||
inputs.zen-browser.packages.${system}.zen-browser-unwrapped
|
||||
{
|
||||
pname = "zen-browser";
|
||||
extraPolicies =
|
||||
config.mods.browser.zen.configuration
|
||||
// {
|
||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions;
|
||||
};
|
||||
};
|
||||
profiles = builtins.listToAttrs config.mods.browser.zen.profiles;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix
|
||||
{
|
||||
lib,
|
||||
dashNixAdditionalProps,
|
||||
config,
|
||||
options,
|
||||
inputs,
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# at time of using this here, stylix might not be evaluated yet
|
||||
# hence ensure it is by using base16 mkSchemeAttrs
|
||||
base16 = pkgs.callPackage inputs.base16.lib {};
|
||||
scheme = base16.mkSchemeAttrs config.stylix.base16Scheme;
|
||||
name = "zen";
|
||||
in {
|
||||
imports = [
|
||||
(import ../../../lib/foxextensions.nix
|
||||
{inherit lib dashNixAdditionalProps pkgs name;})
|
||||
];
|
||||
options.mods.browser.${name} = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the zen browser";
|
||||
};
|
||||
configuration = lib.mkOption {
|
||||
default = {
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
CaptivePortal = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisableTelemetry = true;
|
||||
NoDefaultBookmarks = true;
|
||||
PasswordManagerEnabled = false;
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
Pocket = false;
|
||||
Snippets = false;
|
||||
TopSites = true;
|
||||
Highlights = false;
|
||||
};
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
};
|
||||
"3rdparty".Extensions = {
|
||||
"addon@darkreader.org" = {
|
||||
theme = {
|
||||
darkSchemeBackgroundColor = "#${scheme.base00}";
|
||||
darkSchemeTextColor = "#${scheme.base05}";
|
||||
};
|
||||
previewNewDesign = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information.";
|
||||
};
|
||||
profiles = lib.mkOption {
|
||||
default = [
|
||||
{
|
||||
name = "${config.conf.username}";
|
||||
value = {
|
||||
settings = {
|
||||
"zen.view.compact.hide-tabbar" = false;
|
||||
"zen.view.compact.hide-toolbar" = true;
|
||||
"zen.view.sidebar-expanded" = false;
|
||||
"zen.view.use-single-toolbar" = false;
|
||||
"zen.view.welcome-screen.seen" = true;
|
||||
"zen.theme.accent-color" = "#b4bbff";
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"cookiebanners.service.mode" = 2;
|
||||
};
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "special";
|
||||
value = {
|
||||
settings = {
|
||||
"zen.view.compact.hide-tabbar" = false;
|
||||
"zen.view.compact.hide-toolbar" = true;
|
||||
"zen.view.sidebar-expanded" = false;
|
||||
"zen.view.use-single-toolbar" = false;
|
||||
"zen.view.welcome-screen.seen" = true;
|
||||
"zen.theme.accent-color" = "#b4bbff";
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
};
|
||||
isDefault = false;
|
||||
id = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
example = [
|
||||
{
|
||||
name = "custom";
|
||||
value = {
|
||||
settings = {
|
||||
extensions.autoDisableScopes = 0;
|
||||
};
|
||||
extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader];
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
};
|
||||
}
|
||||
];
|
||||
type = with lib.types; listOf (attrsOf anything);
|
||||
description = "Zen profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.wrapFirefox
|
||||
inputs.zen-browser.packages.${system}.zen-browser-unwrapped
|
||||
{
|
||||
pname = "zen-browser";
|
||||
extraPolicies =
|
||||
config.mods.browser.zen.configuration
|
||||
// {
|
||||
ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions;
|
||||
};
|
||||
};
|
||||
profiles = builtins.listToAttrs config.mods.browser.zen.profiles;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
|
|
@ -63,8 +64,8 @@
|
|||
containers.enable = true;
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
dockerCompat = mkDashDefault true;
|
||||
defaultNetwork.settings.dns_enabled = mkDashDefault true;
|
||||
};
|
||||
}
|
||||
else if (config.mods.containers.variant == "docker")
|
||||
|
|
|
|||
|
|
@ -1,50 +1,52 @@
|
|||
{
|
||||
imports = [
|
||||
./acpid.nix
|
||||
./basePackages.nix
|
||||
./bluetooth.nix
|
||||
./browser
|
||||
./coding.nix
|
||||
./containers.nix
|
||||
./drives.nix
|
||||
./fancontrol.nix
|
||||
./fastfetch.nix
|
||||
./fish.nix
|
||||
./flatpak.nix
|
||||
./gaming.nix
|
||||
./gdm.nix
|
||||
./git.nix
|
||||
./gnome.nix
|
||||
./gnomeServices.nix
|
||||
./gpu.nix
|
||||
./greetd.nix
|
||||
./homePackages.nix
|
||||
./hyprland
|
||||
./kde.nix
|
||||
./kdeConnect.nix
|
||||
./keepassxc.nix
|
||||
./kitty.nix
|
||||
./media.nix
|
||||
./mime.nix
|
||||
./ncspot.nix
|
||||
./nextcloud.nix
|
||||
./onedrive.nix
|
||||
./oxi
|
||||
./piper.nix
|
||||
./plymouth.nix
|
||||
./printing.nix
|
||||
./scripts.nix
|
||||
./sddm.nix
|
||||
./sops.nix
|
||||
./starship.nix
|
||||
./streamcontroller.nix
|
||||
./stylix.nix
|
||||
./supersonic.nix
|
||||
./sway.nix
|
||||
./teams.nix
|
||||
./virtmanager.nix
|
||||
./xkb.nix
|
||||
./xone.nix
|
||||
./yazi
|
||||
];
|
||||
}
|
||||
{
|
||||
imports = [
|
||||
./acpid.nix
|
||||
./anyrun.nix
|
||||
./basePackages.nix
|
||||
./bluetooth.nix
|
||||
./browser
|
||||
./coding.nix
|
||||
./containers.nix
|
||||
./drives.nix
|
||||
./fancontrol.nix
|
||||
./fastfetch.nix
|
||||
./fish.nix
|
||||
./flatpak.nix
|
||||
./gaming.nix
|
||||
./gdm.nix
|
||||
./git.nix
|
||||
./gnome.nix
|
||||
./gnomeServices.nix
|
||||
./gpu.nix
|
||||
./greetd.nix
|
||||
./homePackages.nix
|
||||
./hypr
|
||||
./ironbar.nix
|
||||
./kde.nix
|
||||
./kdeConnect.nix
|
||||
./keepassxc.nix
|
||||
./kitty.nix
|
||||
./media.nix
|
||||
./mime.nix
|
||||
./ncspot.nix
|
||||
./nextcloud.nix
|
||||
./onedrive.nix
|
||||
./oxi
|
||||
./piper.nix
|
||||
./plymouth.nix
|
||||
./printing.nix
|
||||
./scripts.nix
|
||||
./sddm.nix
|
||||
./sops.nix
|
||||
./starship.nix
|
||||
./streamcontroller.nix
|
||||
./stylix.nix
|
||||
./supersonic.nix
|
||||
./sway.nix
|
||||
./teams.nix
|
||||
./virtmanager.nix
|
||||
./xkb.nix
|
||||
./xone.nix
|
||||
./yazi
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.mods.fancontrol = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables fancontrol-gui with needed drivers";
|
||||
};
|
||||
forceId = lib.mkOption {
|
||||
default = null;
|
||||
example = "force_id=0x8628";
|
||||
type = with lib.types; nullOr str;
|
||||
description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.fancontrol.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.fancontrol-gui.enable = true;
|
||||
}
|
||||
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
||||
boot = {
|
||||
kernelParams = ["acpi_enforce_resources=lax"];
|
||||
extraModulePackages = with config.boot.kernelPackages; [liquidtux it87];
|
||||
kernelModules = ["v4l2loopback" "it87"];
|
||||
extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) ''
|
||||
options it87 ${config.mods.fancontrol.forceId}
|
||||
'';
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.mods.fancontrol = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables fancontrol-gui with needed drivers";
|
||||
};
|
||||
forceId = lib.mkOption {
|
||||
default = null;
|
||||
example = "force_id=0x8628";
|
||||
type = with lib.types; nullOr str;
|
||||
description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.fancontrol.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.fancontrol-gui.enable = true;
|
||||
}
|
||||
// (lib.optionalAttrs (options ? boot.kernelModules) {
|
||||
boot = {
|
||||
kernelParams = ["acpi_enforce_resources=lax"];
|
||||
extraModulePackages = with config.boot.kernelPackages; [liquidtux it87];
|
||||
kernelModules = ["v4l2loopback" "it87"];
|
||||
extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) ''
|
||||
options it87 ${config.mods.fancontrol.forceId}
|
||||
'';
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,66 +1,73 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
pkgs,
|
||||
lib,
|
||||
options,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
dashfetch = lib.mkOption {
|
||||
options.mods.dashfetch = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "A custom configuration for fastfetch";
|
||||
};
|
||||
modules = lib.mkOption {
|
||||
default = [
|
||||
"title"
|
||||
"separator"
|
||||
{
|
||||
type = "os";
|
||||
key = "OS";
|
||||
format = "DashNix ({name} {version})";
|
||||
}
|
||||
"host"
|
||||
"kernel"
|
||||
"uptime"
|
||||
"packages"
|
||||
"shell"
|
||||
"display"
|
||||
"de"
|
||||
"wm"
|
||||
"wmtheme"
|
||||
"theme"
|
||||
"icons"
|
||||
"font"
|
||||
"cursor"
|
||||
"terminal"
|
||||
"terminalfont"
|
||||
"cpu"
|
||||
"gpu"
|
||||
"memory"
|
||||
"swap"
|
||||
"disk"
|
||||
"localip"
|
||||
"battery"
|
||||
"poweradapter"
|
||||
"locale"
|
||||
"break"
|
||||
"colors"
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf anything;
|
||||
description = "modules for fastfetch";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? home.packages) {
|
||||
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch) {
|
||||
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch.enable) {
|
||||
source = (pkgs.formats.json {}).generate "config.jsonc" {
|
||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||
logo = {
|
||||
type = "kitty";
|
||||
source = ../../assets/logo2.png;
|
||||
width = 35;
|
||||
padding = {
|
||||
top = 1;
|
||||
type = mkDashDefault "kitty";
|
||||
source = mkDashDefault ../../assets/logo2.png;
|
||||
width = mkDashDefault 35;
|
||||
padding = mkDashDefault {
|
||||
top = mkDashDefault 1;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
"title"
|
||||
"separator"
|
||||
{
|
||||
type = "os";
|
||||
key = "OS";
|
||||
format = "DashNix ({name} {version})";
|
||||
}
|
||||
"host"
|
||||
"kernel"
|
||||
"uptime"
|
||||
"packages"
|
||||
"shell"
|
||||
"display"
|
||||
"de"
|
||||
"wm"
|
||||
"wmtheme"
|
||||
"theme"
|
||||
"icons"
|
||||
"font"
|
||||
"cursor"
|
||||
"terminal"
|
||||
"terminalfont"
|
||||
"cpu"
|
||||
"gpu"
|
||||
"memory"
|
||||
"swap"
|
||||
"disk"
|
||||
"localip"
|
||||
"battery"
|
||||
"poweradapter"
|
||||
"locale"
|
||||
"break"
|
||||
"colors"
|
||||
];
|
||||
modules = config.mods.dashfetch.modules;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
|
|
@ -76,27 +77,27 @@
|
|||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
|
||||
|
||||
programs = {
|
||||
steam.enable = config.mods.gaming.steam;
|
||||
steam.enable = mkDashDefault config.mods.gaming.steam;
|
||||
gamemode.enable = true;
|
||||
gamemode = {
|
||||
enableRenice = true;
|
||||
enableRenice = mkDashDefault true;
|
||||
settings = {
|
||||
general = {
|
||||
desiredgov = "performance";
|
||||
desiredgov = mkDashDefault "performance";
|
||||
};
|
||||
cpu = {
|
||||
pin_cores = config.mods.gaming.pinCores;
|
||||
park_cores = config.mods.gaming.parkCores;
|
||||
pin_cores = mkDashDefault config.mods.gaming.pinCores;
|
||||
park_cores = mkDashDefault config.mods.gaming.parkCores;
|
||||
};
|
||||
gpu = lib.mkIf config.mods.gaming.gpuOptimization {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = config.mods.gaming.gpuDevice;
|
||||
amd_performance_level = "high";
|
||||
nv_powermizer_mode = 1;
|
||||
apply_gpu_optimisations = mkDashDefault "accept-responsibility";
|
||||
gpu_device = mkDashDefault config.mods.gaming.gpuDevice;
|
||||
amd_performance_level = mkDashDefault "high";
|
||||
nv_powermizer_mode = mkDashDefault 1;
|
||||
};
|
||||
custom = {
|
||||
start = "notify-send -a 'Gamemode' 'Optimizations activated'";
|
||||
end = "notify-send -a 'Gamemode' 'Optimizations deactivated'";
|
||||
start = mkDashDefault "notify-send -a 'Gamemode' 'Optimizations activated'";
|
||||
end = mkDashDefault "notify-send -a 'Gamemode' 'Optimizations deactivated'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -67,16 +67,16 @@
|
|||
environment.variables =
|
||||
if (config.mods.gpu.amdgpu.enable && config.mods.gpu.vapi.rocm.enable)
|
||||
then {
|
||||
RUSTICL_ENABLE = "radeonsi";
|
||||
RUSTICL_ENABLE = mkDashDefault "radeonsi";
|
||||
}
|
||||
else {};
|
||||
|
||||
hardware = {
|
||||
nvidia = lib.mkIf config.mods.gpu.nvidia.enable {
|
||||
modesetting.enable = true;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
modesetting.enable = mkDashDefault true;
|
||||
open = mkDashDefault true;
|
||||
nvidiaSettings = mkDashDefault true;
|
||||
package = mkDashDefault config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
graphics = let
|
||||
amdPackages = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
|
|
@ -17,7 +18,7 @@
|
|||
'';
|
||||
};
|
||||
monitor = lib.mkOption {
|
||||
default = "${config.conf.defaultMonitor}";
|
||||
default = "${config.mods.hypr.hyprland.defaultMonitor}";
|
||||
example = "eDP-1";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
'';
|
||||
};
|
||||
scale = lib.mkOption {
|
||||
default = "${config.conf.defaultMonitorScale}";
|
||||
default = "${config.mods.hypr.hyprland.defaultMonitorScale}";
|
||||
example = "1.5";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
description = "The compositor/greeter command to run";
|
||||
};
|
||||
resolution = lib.mkOption {
|
||||
default = "${config.conf.defaultMonitorMode}";
|
||||
default = "${config.mods.hypr.hyprland.defaultMonitorMode}";
|
||||
example = "3440x1440@180";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
|
|
@ -86,16 +87,16 @@
|
|||
lib.mkIf config.mods.greetd.enable (
|
||||
lib.optionalAttrs (options ? environment) {
|
||||
# greetd display manager
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.enable = mkDashDefault true;
|
||||
services = {
|
||||
displayManager.sessionPackages = config.mods.greetd.environments;
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
terminal.vt = 1;
|
||||
terminal.vt = mkDashDefault 1;
|
||||
default_session = {
|
||||
command = config.mods.greetd.greeterCommand;
|
||||
user = username;
|
||||
command = mkDashDefault config.mods.greetd.greeterCommand;
|
||||
user = mkDashDefault username;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -129,9 +130,9 @@
|
|||
'';
|
||||
|
||||
# unlock GPG keyring on login
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
security.pam.services.greetd.sshAgentAuth = true;
|
||||
security.pam.sshAgentAuth.enable = true;
|
||||
security.pam.services.greetd.enableGnomeKeyring = mkDashDefault true;
|
||||
security.pam.services.greetd.sshAgentAuth = mkDashDefault true;
|
||||
security.pam.sshAgentAuth.enable = mkDashDefault true;
|
||||
}
|
||||
// lib.optionalAttrs (options ? home) {
|
||||
xdg.configFile."regreet/regreet.toml".source =
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./anyrun.nix
|
||||
./ironbar.nix
|
||||
./hyprlock.nix
|
||||
./hyprpaper.nix
|
||||
];
|
||||
|
|
@ -1,410 +1,442 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
browserName =
|
||||
if (builtins.isString config.mods.homePackages.browser)
|
||||
then config.mods.homePackages.browser
|
||||
else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram
|
||||
then config.mods.homePackages.browser.meta.mainProgram
|
||||
else config.mods.homePackages.browser.pname;
|
||||
in {
|
||||
options.mods.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable Hyprland
|
||||
'';
|
||||
};
|
||||
monitor = lib.mkOption {
|
||||
default = [
|
||||
# main monitor
|
||||
"${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}"
|
||||
# all others
|
||||
];
|
||||
example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The monitor configuration for hyprland.
|
||||
'';
|
||||
};
|
||||
workspace = lib.mkOption {
|
||||
default = [];
|
||||
example = ["2,monitor:DP-1, default:true"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The workspace configuration for hyprland.
|
||||
'';
|
||||
};
|
||||
noAtomic = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use tearing
|
||||
'';
|
||||
};
|
||||
extraAutostart = lib.mkOption {
|
||||
default = [];
|
||||
example = ["your application"];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
Extra exec_once.
|
||||
'';
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured Hyprland config.
|
||||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom Hyprland configuration.
|
||||
Will be merged with default configuration if enabled.
|
||||
'';
|
||||
};
|
||||
plugins = lib.mkOption {
|
||||
default = [];
|
||||
example = [];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Plugins to be added to Hyprland.
|
||||
'';
|
||||
};
|
||||
pluginConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Plugin configuration to be added to Hyprland.
|
||||
'';
|
||||
};
|
||||
hyprspaceEnable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Enables Hyprspace plugin for hyprland.
|
||||
Please note, plugins tend to break VERY often.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.enable (
|
||||
lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
|
||||
# install Hyprland related packages
|
||||
home.packages = with pkgs; [
|
||||
xorg.xprop
|
||||
grim
|
||||
slurp
|
||||
satty
|
||||
xdg-desktop-portal-gtk
|
||||
# xdg-desktop-portal-hyprland
|
||||
copyq
|
||||
wl-clipboard
|
||||
hyprcursor
|
||||
hyprpicker
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings =
|
||||
if config.mods.hyprland.useDefaultConfig
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizeactive"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# screenshots
|
||||
''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy''
|
||||
''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -''
|
||||
''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy''
|
||||
|
||||
# regular programs
|
||||
"$mod SUPER,F,exec,${browserName}"
|
||||
(lib.mkIf (
|
||||
browserName == "firefox" || browserName == "zen"
|
||||
) "$mod SUPERSHIFT,F,exec,${browserName} -p special")
|
||||
"$mod SUPER,T,exec,kitty -1"
|
||||
"$mod SUPER,E,exec,nautilus -w"
|
||||
"$mod SUPER,N,exec,neovide"
|
||||
(lib.mkIf (config.mods.hyprland.anyrun.enable) "$mod SUPER,R,exec,anyrun")
|
||||
(lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun")
|
||||
(lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash")
|
||||
(lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc")
|
||||
(lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut")
|
||||
(lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced")
|
||||
(lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui")
|
||||
"$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend"
|
||||
"$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate"
|
||||
|
||||
# media keys
|
||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute")
|
||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%")
|
||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%")
|
||||
",XF86AudioPlay,exec, playerctl play-pause"
|
||||
",XF86AudioNext,exec, playerctl next"
|
||||
",XF86AudioPrev,exec, playerctl previous"
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-")
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%")
|
||||
|
||||
# hyprland keybinds
|
||||
# misc
|
||||
"$mod SUPER,V,togglefloating,"
|
||||
"$mod SUPER,B,fullscreen,"
|
||||
"$mod SUPER,C,togglesplit"
|
||||
"$mod SUPER,Q,killactive,"
|
||||
"$mod SUPERSHIFTALT,M,exit,"
|
||||
"$mod SUPERSHIFT,W,togglespecialworkspace"
|
||||
|
||||
# move
|
||||
"$mod SUPER,left,movewindow,l"
|
||||
"$mod SUPER,right,movewindow,r"
|
||||
"$mod SUPER,up,movewindow,u"
|
||||
"$mod SUPER,down,movewindow,d"
|
||||
|
||||
# workspaces
|
||||
"$mod SUPER,1,workspace,1"
|
||||
"$mod SUPER,2,workspace,2"
|
||||
"$mod SUPER,3,workspace,3"
|
||||
"$mod SUPER,4,workspace,4"
|
||||
"$mod SUPER,5,workspace,5"
|
||||
"$mod SUPER,6,workspace,6"
|
||||
"$mod SUPER,7,workspace,7"
|
||||
"$mod SUPER,8,workspace,8"
|
||||
"$mod SUPER,9,workspace,9"
|
||||
"$mod SUPER,0,workspace,10"
|
||||
|
||||
# move to workspace
|
||||
"$mod SUPERSHIFT,1,movetoworkspace,1"
|
||||
"$mod SUPERSHIFT,2,movetoworkspace,2"
|
||||
"$mod SUPERSHIFT,3,movetoworkspace,3"
|
||||
"$mod SUPERSHIFT,4,movetoworkspace,4"
|
||||
"$mod SUPERSHIFT,5,movetoworkspace,5"
|
||||
"$mod SUPERSHIFT,6,movetoworkspace,6"
|
||||
"$mod SUPERSHIFT,7,movetoworkspace,7"
|
||||
"$mod SUPERSHIFT,8,movetoworkspace,8"
|
||||
"$mod SUPERSHIFT,9,movetoworkspace,9"
|
||||
"$mod SUPERSHIFT,0,movetoworkspace,10"
|
||||
|
||||
# move to workspace silent
|
||||
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
|
||||
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
|
||||
"$mod SUPERSHIFTALT,3,movetoworkspacesilent,3"
|
||||
"$mod SUPERSHIFTALT,4,movetoworkspacesilent,4"
|
||||
"$mod SUPERSHIFTALT,5,movetoworkspacesilent,5"
|
||||
"$mod SUPERSHIFTALT,6,movetoworkspacesilent,6"
|
||||
"$mod SUPERSHIFTALT,7,movetoworkspacesilent,7"
|
||||
"$mod SUPERSHIFTALT,8,movetoworkspacesilent,8"
|
||||
"$mod SUPERSHIFTALT,9,movetoworkspacesilent,9"
|
||||
"$mod SUPERSHIFTALT,0,movetoworkspacesilent,10"
|
||||
|
||||
# preselection
|
||||
"$mod SUPERALT,j,layoutmsg,preselect l"
|
||||
"$mod SUPERALT,k,layoutmsg,preselect d"
|
||||
"$mod SUPERALT,l,layoutmsg,preselect u"
|
||||
"$mod SUPERALT,semicolon,layoutmsg,preselect r"
|
||||
"$mod SUPERALT,h,layoutmsg,preselect n"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# hyprland keybinds
|
||||
# focus
|
||||
"$mod SUPER,J,movefocus,l"
|
||||
"$mod SUPER,semicolon,movefocus,r"
|
||||
"$mod SUPER,L,movefocus,u"
|
||||
"$mod SUPER,K,movefocus,d"
|
||||
|
||||
# resize
|
||||
"$mod SUPER,U,resizeactive,-20 0"
|
||||
"$mod SUPER,P,resizeactive,20 0"
|
||||
"$mod SUPER,O,resizeactive,0 -20"
|
||||
"$mod SUPER,I,resizeactive,0 20"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_out = "3,5,5,5";
|
||||
border_size = 3;
|
||||
"col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
|
||||
# "col.inactive_border" = "0x66333333";
|
||||
allow_tearing = lib.mkIf config.mods.hyprland.noAtomic true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 4;
|
||||
};
|
||||
|
||||
render = {
|
||||
direct_scanout = mkDashDefault config.mods.gaming.enable;
|
||||
};
|
||||
|
||||
animations = {
|
||||
bezier = "penguin,0.05,0.9,0.1,1.0";
|
||||
animation = [
|
||||
"windowsMove,1,4,default"
|
||||
"windows,1,7,default,popin 70%"
|
||||
"windowsOut,1,7,default,popin 70%"
|
||||
"border,1,10,default"
|
||||
"fade,1,7,default"
|
||||
"workspaces,1,6,default"
|
||||
"layers,1,3,default,popin"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
pseudotile = 0;
|
||||
permanent_direction_override = false;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "${config.mods.xkb.layout}";
|
||||
kb_variant = "${config.mods.xkb.variant}";
|
||||
repeat_delay = 200;
|
||||
force_no_accel = true;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
tap-to-click = true;
|
||||
tap-and-drag = true;
|
||||
};
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = 1;
|
||||
enable_swallow = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_hyprland_logo = true;
|
||||
swallow_regex = "^(.*)(kitty)(.*)$";
|
||||
initial_workspace_tracking = 1;
|
||||
# just doesn't work
|
||||
enable_anr_dialog = false;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
enable_hyprcursor = true;
|
||||
no_hardware_cursors = mkDashDefault (
|
||||
if config.mods.gpu.nvidia.enable
|
||||
then 2
|
||||
else 0
|
||||
);
|
||||
# done with nix, this would break the current setup otherwise
|
||||
sync_gsettings_theme = false;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
};
|
||||
|
||||
monitor = config.mods.hyprland.monitor;
|
||||
workspace = config.mods.hyprland.workspace;
|
||||
|
||||
env = [
|
||||
"GTK_CSD,0"
|
||||
''TERM,"kitty /bin/fish"''
|
||||
"XDG_CURRENT_DESKTOP=Hyprland"
|
||||
"XDG_SESSION_TYPE=wayland"
|
||||
"XDG_SESSION_DESKTOP=Hyprland"
|
||||
"HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}"
|
||||
"HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}"
|
||||
"XCURSOR_THEME,${config.mods.stylix.cursor.name}"
|
||||
"XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"QT_QPA_PLATFORMTHEME,qt5ct"
|
||||
"QT_WAYLAND_FORCE_DPI,96"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
''EDITOR,"neovide --novsync --nofork"''
|
||||
(lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1")
|
||||
"GTK_USE_PORTAL, 1"
|
||||
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia")
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland")
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm")
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia")
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
# layer rules
|
||||
# mainly to disable animations within slurp and grim
|
||||
"noanim, selection"
|
||||
];
|
||||
|
||||
windowrule = [
|
||||
# window rules
|
||||
"float,class:^(.*)(OxiCalc)(.*)$"
|
||||
"float,class:^(.*)(winecfg.exe)(.*)$"
|
||||
"float,class:^(.*)(copyq)(.*)$"
|
||||
"center,class:^(.*)(swappy)(.*)$"
|
||||
"float,title:^(.*)(reset)(.*)$"
|
||||
"workspace 10 silent,class:^(.*)(steam)(.*)$"
|
||||
"workspace 9 silent,class:^(.*)(dota)(.*)$"
|
||||
"workspace 9 silent,class:^(.*)(battlebits)(.*)$"
|
||||
"workspace 9 silent,class:^(.*)(aoe)(.*)$"
|
||||
"suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$"
|
||||
"immediate,class:^(.*)(Pal)$"
|
||||
"immediate,class:^(.*)(dota2)$"
|
||||
"immediate,class:^(.*)(needforspeedheat.exe)$"
|
||||
];
|
||||
|
||||
exec-once =
|
||||
[
|
||||
# environment
|
||||
"systemctl --user import-environment"
|
||||
"dbus-update-activation-environment --systemd --all"
|
||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
|
||||
# other programs
|
||||
"hyprpaper"
|
||||
"ironbar"
|
||||
"${browserName}"
|
||||
"oxipaste_daemon"
|
||||
"oxinoti"
|
||||
]
|
||||
++ config.mods.hyprland.extraAutostart;
|
||||
|
||||
plugin =
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable {
|
||||
bind = [
|
||||
"SUPER, W, overview:toggle, toggle"
|
||||
];
|
||||
};
|
||||
}
|
||||
config.mods.hyprland.pluginConfig
|
||||
];
|
||||
}
|
||||
config.mods.hyprland.customConfig
|
||||
]
|
||||
else lib.mkForce config.mods.hyprland.customConfig;
|
||||
plugins =
|
||||
[
|
||||
(lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
|
||||
]
|
||||
++ config.mods.hyprland.plugins;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
{
|
||||
mkDashDefault,
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
browserName =
|
||||
if (builtins.isString config.mods.homePackages.browser)
|
||||
then config.mods.homePackages.browser
|
||||
else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram
|
||||
then config.mods.homePackages.browser.meta.mainProgram
|
||||
else config.mods.homePackages.browser.pname;
|
||||
in {
|
||||
options.mods.hypr.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable Hyprland
|
||||
'';
|
||||
};
|
||||
defaultMonitor = lib.mkOption {
|
||||
default = "";
|
||||
example = "eDP-1";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor
|
||||
'';
|
||||
};
|
||||
defaultMonitorMode = lib.mkOption {
|
||||
default = "";
|
||||
example = "3440x1440@180";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor mode: width x height @ refreshrate
|
||||
'';
|
||||
};
|
||||
defaultMonitorScale = lib.mkOption {
|
||||
default = "1";
|
||||
example = "1.5";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor scaling
|
||||
'';
|
||||
};
|
||||
monitor = lib.mkOption {
|
||||
default = [
|
||||
# main monitor
|
||||
"${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}"
|
||||
# all others
|
||||
];
|
||||
example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The monitor configuration for hyprland.
|
||||
'';
|
||||
};
|
||||
workspace = lib.mkOption {
|
||||
default = [];
|
||||
example = ["2,monitor:DP-1, default:true"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The workspace configuration for hyprland.
|
||||
'';
|
||||
};
|
||||
noAtomic = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use tearing
|
||||
'';
|
||||
};
|
||||
extraAutostart = lib.mkOption {
|
||||
default = [];
|
||||
example = ["your application"];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
Extra exec_once.
|
||||
'';
|
||||
};
|
||||
useIronbar = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Whether to use ironbar in hyprland.
|
||||
'';
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured Hyprland config.
|
||||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom Hyprland configuration.
|
||||
Will be merged with default configuration if enabled.
|
||||
'';
|
||||
};
|
||||
plugins = lib.mkOption {
|
||||
default = [];
|
||||
example = [];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Plugins to be added to Hyprland.
|
||||
'';
|
||||
};
|
||||
pluginConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Plugin configuration to be added to Hyprland.
|
||||
'';
|
||||
};
|
||||
hyprspaceEnable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Enables Hyprspace plugin for hyprland.
|
||||
Please note, plugins tend to break VERY often.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hypr.hyprland.enable (
|
||||
lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
|
||||
# install Hyprland related packages
|
||||
home.packages = with pkgs; [
|
||||
xorg.xprop
|
||||
grim
|
||||
slurp
|
||||
satty
|
||||
xdg-desktop-portal-gtk
|
||||
# xdg-desktop-portal-hyprland
|
||||
copyq
|
||||
wl-clipboard
|
||||
hyprcursor
|
||||
hyprpicker
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings =
|
||||
if config.mods.hypr.hyprland.useDefaultConfig
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
"$mod" = mkDashDefault "SUPER";
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizeactive"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# screenshots
|
||||
''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy''
|
||||
''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -''
|
||||
''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy''
|
||||
|
||||
# regular programs
|
||||
"$mod SUPER,F,exec,${browserName}"
|
||||
(lib.mkIf (
|
||||
browserName == "firefox" || browserName == "zen"
|
||||
) "$mod SUPERSHIFT,F,exec,${browserName} -p special")
|
||||
"$mod SUPER,T,exec,kitty -1"
|
||||
"$mod SUPER,E,exec,nautilus -w"
|
||||
"$mod SUPER,N,exec,neovide"
|
||||
(lib.mkIf (config.mods.anyrun.enable) "$mod SUPER,R,exec,anyrun")
|
||||
(lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun")
|
||||
(lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash")
|
||||
(lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc")
|
||||
(lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut")
|
||||
(lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced")
|
||||
(lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui")
|
||||
(lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend")
|
||||
(lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate")
|
||||
|
||||
# media keys
|
||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute")
|
||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%")
|
||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%")
|
||||
",XF86AudioPlay,exec, playerctl play-pause"
|
||||
",XF86AudioNext,exec, playerctl next"
|
||||
",XF86AudioPrev,exec, playerctl previous"
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-")
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%")
|
||||
|
||||
# hyprland keybinds
|
||||
# misc
|
||||
"$mod SUPER,V,togglefloating,"
|
||||
"$mod SUPER,B,fullscreen,"
|
||||
"$mod SUPER,C,togglesplit"
|
||||
"$mod SUPER,Q,killactive,"
|
||||
"$mod SUPERSHIFTALT,M,exit,"
|
||||
"$mod SUPERSHIFT,W,togglespecialworkspace"
|
||||
|
||||
# move
|
||||
"$mod SUPER,left,movewindow,l"
|
||||
"$mod SUPER,right,movewindow,r"
|
||||
"$mod SUPER,up,movewindow,u"
|
||||
"$mod SUPER,down,movewindow,d"
|
||||
|
||||
# workspaces
|
||||
"$mod SUPER,1,workspace,1"
|
||||
"$mod SUPER,2,workspace,2"
|
||||
"$mod SUPER,3,workspace,3"
|
||||
"$mod SUPER,4,workspace,4"
|
||||
"$mod SUPER,5,workspace,5"
|
||||
"$mod SUPER,6,workspace,6"
|
||||
"$mod SUPER,7,workspace,7"
|
||||
"$mod SUPER,8,workspace,8"
|
||||
"$mod SUPER,9,workspace,9"
|
||||
"$mod SUPER,0,workspace,10"
|
||||
|
||||
# move to workspace
|
||||
"$mod SUPERSHIFT,1,movetoworkspace,1"
|
||||
"$mod SUPERSHIFT,2,movetoworkspace,2"
|
||||
"$mod SUPERSHIFT,3,movetoworkspace,3"
|
||||
"$mod SUPERSHIFT,4,movetoworkspace,4"
|
||||
"$mod SUPERSHIFT,5,movetoworkspace,5"
|
||||
"$mod SUPERSHIFT,6,movetoworkspace,6"
|
||||
"$mod SUPERSHIFT,7,movetoworkspace,7"
|
||||
"$mod SUPERSHIFT,8,movetoworkspace,8"
|
||||
"$mod SUPERSHIFT,9,movetoworkspace,9"
|
||||
"$mod SUPERSHIFT,0,movetoworkspace,10"
|
||||
|
||||
# move to workspace silent
|
||||
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
|
||||
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
|
||||
"$mod SUPERSHIFTALT,3,movetoworkspacesilent,3"
|
||||
"$mod SUPERSHIFTALT,4,movetoworkspacesilent,4"
|
||||
"$mod SUPERSHIFTALT,5,movetoworkspacesilent,5"
|
||||
"$mod SUPERSHIFTALT,6,movetoworkspacesilent,6"
|
||||
"$mod SUPERSHIFTALT,7,movetoworkspacesilent,7"
|
||||
"$mod SUPERSHIFTALT,8,movetoworkspacesilent,8"
|
||||
"$mod SUPERSHIFTALT,9,movetoworkspacesilent,9"
|
||||
"$mod SUPERSHIFTALT,0,movetoworkspacesilent,10"
|
||||
|
||||
# preselection
|
||||
"$mod SUPERALT,j,layoutmsg,preselect l"
|
||||
"$mod SUPERALT,k,layoutmsg,preselect d"
|
||||
"$mod SUPERALT,l,layoutmsg,preselect u"
|
||||
"$mod SUPERALT,semicolon,layoutmsg,preselect r"
|
||||
"$mod SUPERALT,h,layoutmsg,preselect n"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# hyprland keybinds
|
||||
# focus
|
||||
"$mod SUPER,J,movefocus,l"
|
||||
"$mod SUPER,semicolon,movefocus,r"
|
||||
"$mod SUPER,L,movefocus,u"
|
||||
"$mod SUPER,K,movefocus,d"
|
||||
|
||||
# resize
|
||||
"$mod SUPER,U,resizeactive,-20 0"
|
||||
"$mod SUPER,P,resizeactive,20 0"
|
||||
"$mod SUPER,O,resizeactive,0 -20"
|
||||
"$mod SUPER,I,resizeactive,0 20"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_out = mkDashDefault "3,5,5,5";
|
||||
border_size = mkDashDefault 3;
|
||||
"col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
|
||||
# "col.inactive_border" = "0x66333333";
|
||||
allow_tearing = lib.mkIf config.mods.hypr.hyprland.noAtomic true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = mkDashDefault 4;
|
||||
};
|
||||
|
||||
render = {
|
||||
direct_scanout = mkDashDefault config.mods.gaming.enable;
|
||||
};
|
||||
|
||||
animations = {
|
||||
bezier = mkDashDefault "penguin,0.05,0.9,0.1,1.0";
|
||||
animation = [
|
||||
"windowsMove,1,4,default"
|
||||
"windows,1,7,default,popin 70%"
|
||||
"windowsOut,1,7,default,popin 70%"
|
||||
"border,1,10,default"
|
||||
"fade,1,7,default"
|
||||
"workspaces,1,6,default"
|
||||
"layers,1,3,default,popin"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
preserve_split = mkDashDefault true;
|
||||
pseudotile = mkDashDefault 0;
|
||||
permanent_direction_override = mkDashDefault false;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = mkDashDefault "${config.mods.xkb.layout}";
|
||||
kb_variant = mkDashDefault "${config.mods.xkb.variant}";
|
||||
repeat_delay = mkDashDefault 200;
|
||||
force_no_accel = mkDashDefault true;
|
||||
touchpad = {
|
||||
natural_scroll = mkDashDefault true;
|
||||
tap-to-click = mkDashDefault true;
|
||||
tap-and-drag = mkDashDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = mkDashDefault 1;
|
||||
enable_swallow = mkDashDefault true;
|
||||
disable_splash_rendering = mkDashDefault true;
|
||||
disable_hyprland_logo = mkDashDefault true;
|
||||
swallow_regex = mkDashDefault "^(.*)(kitty)(.*)$";
|
||||
initial_workspace_tracking = mkDashDefault 1;
|
||||
# just doesn't work
|
||||
enable_anr_dialog = false;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
enable_hyprcursor = mkDashDefault true;
|
||||
no_hardware_cursors = mkDashDefault (
|
||||
if config.mods.gpu.nvidia.enable
|
||||
then 2
|
||||
else 0
|
||||
);
|
||||
# done with nix, this would break the current setup otherwise
|
||||
sync_gsettings_theme = mkDashDefault false;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = mkDashDefault true;
|
||||
};
|
||||
|
||||
monitor = mkDashDefault config.mods.hypr.hyprland.monitor;
|
||||
workspace = mkDashDefault config.mods.hypr.hyprland.workspace;
|
||||
|
||||
env = [
|
||||
"GTK_CSD,0"
|
||||
''TERM,"kitty /bin/fish"''
|
||||
"XDG_CURRENT_DESKTOP=Hyprland"
|
||||
"XDG_SESSION_TYPE=wayland"
|
||||
"XDG_SESSION_DESKTOP=Hyprland"
|
||||
"HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}"
|
||||
"HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}"
|
||||
"XCURSOR_THEME,${config.mods.stylix.cursor.name}"
|
||||
"XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"QT_QPA_PLATFORMTHEME,qt5ct"
|
||||
"QT_WAYLAND_FORCE_DPI,96"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
''EDITOR,"neovide --novsync --nofork"''
|
||||
(lib.mkIf config.mods.hypr.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1")
|
||||
"GTK_USE_PORTAL, 1"
|
||||
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia")
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland")
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm")
|
||||
(lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia")
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
# layer rules
|
||||
# mainly to disable animations within slurp and grim
|
||||
"noanim, selection"
|
||||
];
|
||||
|
||||
windowrule = [
|
||||
# window rules
|
||||
"float,class:^(.*)(OxiCalc)(.*)$"
|
||||
"float,class:^(.*)(winecfg.exe)(.*)$"
|
||||
"float,class:^(.*)(copyq)(.*)$"
|
||||
"center,class:^(.*)(swappy)(.*)$"
|
||||
"float,title:^(.*)(reset)(.*)$"
|
||||
"workspace 10 silent,class:^(.*)(steam)(.*)$"
|
||||
"workspace 9 silent,class:^(.*)(dota)(.*)$"
|
||||
"workspace 9 silent,class:^(.*)(battlebits)(.*)$"
|
||||
"workspace 9 silent,class:^(.*)(aoe)(.*)$"
|
||||
"suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$"
|
||||
"immediate,class:^(.*)(Pal)$"
|
||||
"immediate,class:^(.*)(dota2)$"
|
||||
"immediate,class:^(.*)(needforspeedheat.exe)$"
|
||||
];
|
||||
|
||||
exec-once =
|
||||
[
|
||||
# environment
|
||||
"systemctl --user import-environment"
|
||||
"dbus-update-activation-environment --systemd --all"
|
||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
|
||||
# other programs
|
||||
"${browserName}"
|
||||
(lib.mkIf config.mods.hypr.hyprpaper.enable "hyprpaper")
|
||||
(lib.mkIf config.mods.hypr.hyprland.useIronbar "ironbar")
|
||||
(lib.mkIf config.mods.oxi.oxipaste.enable "oxipaste_daemon")
|
||||
(lib.mkIf config.mods.oxi.oxinoti.enable "oxinoti")
|
||||
]
|
||||
++ config.mods.hypr.hyprland.extraAutostart;
|
||||
|
||||
plugin =
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
hyprspace = lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable {
|
||||
bind = [
|
||||
"SUPER, W, overview:toggle, toggle"
|
||||
];
|
||||
};
|
||||
}
|
||||
config.mods.hypr.hyprland.pluginConfig
|
||||
];
|
||||
}
|
||||
config.mods.hypr.hyprland.customConfig
|
||||
]
|
||||
else lib.mkForce config.mods.hypr.hyprland.customConfig;
|
||||
plugins =
|
||||
[
|
||||
(lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
|
||||
]
|
||||
++ config.mods.hypr.hyprland.plugins;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
61
modules/programs/hypr/hyprlock.nix
Normal file
61
modules/programs/hypr/hyprlock.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods.hypr.hyprlock = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables Hyprlock";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
default = {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "";
|
||||
color = "rgba(26, 27, 38, 1.0)";
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "${config.mods.hypr.hyprland.defaultMonitor}";
|
||||
placeholder_text = "password or something";
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "${config.mods.hypr.hyprland.defaultMonitor}";
|
||||
text = "$TIME";
|
||||
font_size = 50;
|
||||
position = "0, 200";
|
||||
valign = "center";
|
||||
halign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "config";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hypr.hyprlock.enable (
|
||||
lib.optionalAttrs (options ? xdg.configFile) {
|
||||
stylix.targets.hyprlock = {
|
||||
enable = false;
|
||||
};
|
||||
home.packages = with pkgs; [hyprlock];
|
||||
programs.hyprlock = lib.mkIf config.mods.hypr.hyprlock.enable {
|
||||
enable = true;
|
||||
settings = config.mods.hypr.hyprlock.config;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
36
modules/programs/hypr/hyprpaper.nix
Normal file
36
modules/programs/hypr/hyprpaper.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods.hypr.hyprpaper = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables Hyprpaper";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
default = "";
|
||||
example = ''
|
||||
preload = path/to/wallpaper
|
||||
wallpaper = YOURMONITOR,path/to/wallpaper
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
Hyprpaper config
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hypr.hyprpaper.enable (
|
||||
lib.optionalAttrs (options ? xdg.configFile) {
|
||||
home.packages = with pkgs; [hyprpaper];
|
||||
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hypr.hyprpaper.enable {
|
||||
text = config.mods.hypr.hyprpaper.config;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
options,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
hyprland = {
|
||||
anyrun = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables anyrun";
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured anyrun config.
|
||||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom anyrun configuration.
|
||||
Will be merged with default configuration if enabled.
|
||||
'';
|
||||
};
|
||||
useDefaultCss = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured anyrun css.
|
||||
'';
|
||||
};
|
||||
customCss = lib.mkOption {
|
||||
default = '''';
|
||||
example = ''
|
||||
#window {
|
||||
border-radius: none;
|
||||
}
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
Custom anyrun css.
|
||||
Will be merged with default css if enabled.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.anyrun.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.anyrun = lib.mkForce {
|
||||
enable = true;
|
||||
config =
|
||||
if config.mods.hyprland.anyrun.useDefaultConfig
|
||||
then
|
||||
{
|
||||
plugins = [
|
||||
inputs.anyrun.packages.${pkgs.system}.applications
|
||||
inputs.anyrun.packages.${pkgs.system}.rink
|
||||
inputs.anyrun.packages.${pkgs.system}.translate
|
||||
inputs.anyrun.packages.${pkgs.system}.websearch
|
||||
];
|
||||
hideIcons = false;
|
||||
width = {
|
||||
fraction = 0.3;
|
||||
};
|
||||
y = {
|
||||
fraction = 0.5;
|
||||
};
|
||||
layer = "overlay";
|
||||
hidePluginInfo = true;
|
||||
closeOnClick = true;
|
||||
}
|
||||
// config.mods.hyprland.anyrun.customConfig
|
||||
else config.mods.hyprland.anyrun.customConfig;
|
||||
|
||||
extraCss =
|
||||
if config.mods.hyprland.anyrun.useDefaultCss
|
||||
then
|
||||
''
|
||||
#window {
|
||||
border-radius: 10px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
box#main {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
list#main {
|
||||
border-radius: 10px;
|
||||
margin: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
list#plugin {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
list#match {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
entry#entry {
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
margin: 10px 10px 0px 10px;
|
||||
}
|
||||
|
||||
label#match-desc {
|
||||
font-size: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
label#match-title {
|
||||
font-size: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
label#plugin {
|
||||
font-size: 16px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
* {
|
||||
border-radius: 10px;
|
||||
}
|
||||
''
|
||||
+ config.mods.hyprland.anyrun.customCss
|
||||
else config.mods.hyprland.anyrun.customCss;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
hyprland.hyprlock = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables Hyprlock";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.hyprlock.enable (
|
||||
lib.optionalAttrs (options ? xdg.configFile) {
|
||||
stylix.targets.hyprlock = {
|
||||
enable = false;
|
||||
};
|
||||
home.packages = with pkgs; [hyprlock];
|
||||
programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "";
|
||||
color = "rgba(26, 27, 38, 1.0)";
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "${config.conf.defaultMonitor}";
|
||||
|
||||
placeholder_text = "password or something";
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "${config.conf.defaultMonitor}";
|
||||
text = "$TIME";
|
||||
font_size = 50;
|
||||
position = "0, 200";
|
||||
valign = "center";
|
||||
halign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
hyprland.hyprpaper = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables Hyprpaper";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
default = "";
|
||||
example = ''
|
||||
preload = path/to/wallpaper
|
||||
wallpaper = YOURMONITOR,path/to/wallpaper
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
Hyprpaper config
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.hyprpaper.enable (
|
||||
lib.optionalAttrs (options ? xdg.configFile) {
|
||||
home.packages = with pkgs; [hyprpaper];
|
||||
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable {
|
||||
text = config.mods.hyprland.hyprpaper.config;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -9,12 +9,127 @@
|
|||
username = config.conf.username;
|
||||
base16 = pkgs.callPackage inputs.base16.lib {};
|
||||
scheme = base16.mkSchemeAttrs config.stylix.base16Scheme;
|
||||
ironbarDefaultConfig = {
|
||||
end = [
|
||||
{
|
||||
type = "sys_info";
|
||||
format = [" {memory_percent}"];
|
||||
interval.memory = 30;
|
||||
class = "memory-usage";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
bar = [
|
||||
{
|
||||
type = "button";
|
||||
class = "popup-button";
|
||||
label = "";
|
||||
on_click = "popup:toggle";
|
||||
}
|
||||
];
|
||||
class = "popup-button-box";
|
||||
popup = [
|
||||
{
|
||||
type = "box";
|
||||
orientation = "vertical";
|
||||
class = "audio-box";
|
||||
widgets = [
|
||||
{
|
||||
type = "box";
|
||||
orientation = "horizontal";
|
||||
widgets = [
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth";
|
||||
}
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl internal";
|
||||
}
|
||||
];
|
||||
class = "audio-button-box";
|
||||
}
|
||||
{
|
||||
type = "label";
|
||||
label = "Output";
|
||||
}
|
||||
{
|
||||
type = "slider";
|
||||
class = "audio-slider";
|
||||
step = 1.0;
|
||||
length = 200;
|
||||
value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%";
|
||||
}
|
||||
{
|
||||
type = "label";
|
||||
label = "Input";
|
||||
}
|
||||
{
|
||||
type = "slider";
|
||||
class = "audio-slider";
|
||||
step = 1.0;
|
||||
length = 200;
|
||||
value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
bar = [
|
||||
{
|
||||
type = "button";
|
||||
class = "popup-button";
|
||||
label = "";
|
||||
on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css";
|
||||
}
|
||||
];
|
||||
class = "popup-button-box";
|
||||
}
|
||||
{
|
||||
type = "clock";
|
||||
format = "%I:%M";
|
||||
format_popup = "%I:%M:%S";
|
||||
locale = "en_US";
|
||||
}
|
||||
{type = "tray";}
|
||||
];
|
||||
position = "top";
|
||||
height = 10;
|
||||
anchor_to_edges = true;
|
||||
start = [
|
||||
{
|
||||
type = "workspaces";
|
||||
all_monitors = true;
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
type = "focused";
|
||||
show_icon = true;
|
||||
show_title = true;
|
||||
icon_size = 20;
|
||||
truncate = "end";
|
||||
}
|
||||
];
|
||||
};
|
||||
monitorConfig =
|
||||
if config.mods.hypr.hyprland.enable
|
||||
then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig;}
|
||||
else ironbarDefaultConfig;
|
||||
in {
|
||||
options.mods = {
|
||||
hyprland.ironbar = {
|
||||
ironbar = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables ironbar";
|
||||
};
|
||||
|
|
@ -26,19 +141,6 @@ in {
|
|||
Use preconfigured ironbar config.
|
||||
'';
|
||||
};
|
||||
modules = lib.mkOption {
|
||||
default = [];
|
||||
example = [
|
||||
{
|
||||
type = "upower";
|
||||
class = "memory-usage";
|
||||
}
|
||||
];
|
||||
type = with lib.types; listOf attrs;
|
||||
description = ''
|
||||
Adds modules to ironbar. See https://github.com/JakeStanger/ironbar/wiki/ for more information.
|
||||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
|
|
@ -71,12 +173,12 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.hyprland.ironbar.enable (
|
||||
config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) (
|
||||
lib.optionalAttrs (options ? programs.ironbar) {
|
||||
programs.ironbar = {
|
||||
enable = true;
|
||||
style =
|
||||
if config.mods.hyprland.ironbar.useDefaultCss
|
||||
if config.mods.ironbar.useDefaultCss
|
||||
then
|
||||
/*
|
||||
css
|
||||
|
|
@ -212,131 +314,20 @@ in {
|
|||
background-color: #${scheme.base02};
|
||||
}
|
||||
''
|
||||
+ config.mods.hyprland.ironbar.customCss
|
||||
else config.mods.hyprland.ironbar.customCss;
|
||||
+ config.mods.ironbar.customCss
|
||||
else config.mods.ironbar.customCss;
|
||||
features = [
|
||||
#"another_feature"
|
||||
];
|
||||
config = {
|
||||
monitors."${config.conf.defaultMonitor}" =
|
||||
if config.mods.hyprland.ironbar.useDefaultConfig
|
||||
then
|
||||
{
|
||||
end =
|
||||
config.mods.hyprland.ironbar.modules
|
||||
++ [
|
||||
{
|
||||
type = "sys_info";
|
||||
format = [" {memory_percent}"];
|
||||
interval.memory = 30;
|
||||
class = "memory-usage";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
bar = [
|
||||
{
|
||||
type = "button";
|
||||
class = "popup-button";
|
||||
label = "";
|
||||
on_click = "popup:toggle";
|
||||
}
|
||||
];
|
||||
class = "popup-button-box";
|
||||
popup = [
|
||||
{
|
||||
type = "box";
|
||||
orientation = "vertical";
|
||||
class = "audio-box";
|
||||
widgets = [
|
||||
{
|
||||
type = "box";
|
||||
orientation = "horizontal";
|
||||
widgets = [
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth";
|
||||
}
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl internal";
|
||||
}
|
||||
];
|
||||
class = "audio-button-box";
|
||||
}
|
||||
{
|
||||
type = "label";
|
||||
label = "Output";
|
||||
}
|
||||
{
|
||||
type = "slider";
|
||||
class = "audio-slider";
|
||||
step = 1.0;
|
||||
length = 200;
|
||||
value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%";
|
||||
}
|
||||
{
|
||||
type = "label";
|
||||
label = "Input";
|
||||
}
|
||||
{
|
||||
type = "slider";
|
||||
class = "audio-slider";
|
||||
step = 1.0;
|
||||
length = 200;
|
||||
value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
bar = [
|
||||
{
|
||||
type = "button";
|
||||
class = "popup-button";
|
||||
label = "";
|
||||
on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css";
|
||||
}
|
||||
];
|
||||
class = "popup-button-box";
|
||||
}
|
||||
{
|
||||
type = "clock";
|
||||
format = "%I:%M";
|
||||
format_popup = "%I:%M:%S";
|
||||
locale = "en_US";
|
||||
}
|
||||
{type = "tray";}
|
||||
];
|
||||
position = "top";
|
||||
height = 10;
|
||||
anchor_to_edges = true;
|
||||
start = [
|
||||
{
|
||||
type = "workspaces";
|
||||
all_monitors = true;
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
type = "focused";
|
||||
show_icon = true;
|
||||
show_title = true;
|
||||
icon_size = 20;
|
||||
truncate = "end";
|
||||
}
|
||||
];
|
||||
}
|
||||
// config.mods.hyprland.ironbar.customConfig
|
||||
else config.mods.hyprland.ironbar.customConfig;
|
||||
};
|
||||
config =
|
||||
if config.mods.ironbar.useDefaultConfig
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
monitorConfig
|
||||
config.mods.ironbar.customConfig
|
||||
]
|
||||
else config.mods.ironbar.customConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
@ -12,54 +12,63 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables the piper program and its daemon";
|
||||
};
|
||||
use_cache_config = lib.mkOption {
|
||||
useConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
|
||||
description = "Whether to overwrite the config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
|
||||
};
|
||||
cache_config = lib.mkOption {
|
||||
config = lib.mkOption {
|
||||
default = ''
|
||||
[General]
|
||||
LastDatabases=/home/${config.conf.username}/pws/Passwords.kdbx
|
||||
LastActiveDatabase=/home/${config.conf.username}/pws/Passwords.kdbx
|
||||
LastOpenedDatabases=/home/${config.conf.username}/pws/Passwords.kdbx
|
||||
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0p\0w\0s\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0p\0w\0s\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x)
|
||||
ConfigVersion=2
|
||||
|
||||
[Browser]
|
||||
Enabled=true
|
||||
|
||||
[GUI]
|
||||
ApplicationTheme=classic
|
||||
HidePasswords=true
|
||||
MinimizeOnClose=true
|
||||
MinimizeToTray=true
|
||||
ShowTrayIcon=true
|
||||
TrayIconAppearance=monochrome-light
|
||||
|
||||
[PasswordGenerator]
|
||||
Length=30
|
||||
|
||||
[Security]
|
||||
EnableCopyOnDoubleClick=true
|
||||
'';
|
||||
example = "";
|
||||
type = lib.types.lines;
|
||||
description = "Cache config to be used.";
|
||||
};
|
||||
useCacheConfig = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
|
||||
};
|
||||
cacheConfig = lib.mkOption {
|
||||
default = '''';
|
||||
example = ''
|
||||
[General]
|
||||
LastDatabases=/path/to/database
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = "Cache config to be used.";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.keepassxc.enable (
|
||||
lib.optionalAttrs (options ? home.file) {
|
||||
home.packages = [pkgs.keepassxc];
|
||||
xdg.configFile."keepassxc/keepassxc.ini" = {
|
||||
text = ''
|
||||
[General]
|
||||
ConfigVersion=2
|
||||
|
||||
[Browser]
|
||||
Enabled=true
|
||||
|
||||
[GUI]
|
||||
ApplicationTheme=classic
|
||||
HidePasswords=true
|
||||
MinimizeOnClose=true
|
||||
MinimizeToTray=true
|
||||
ShowTrayIcon=true
|
||||
TrayIconAppearance=monochrome-light
|
||||
|
||||
[PasswordGenerator]
|
||||
Length=30
|
||||
|
||||
[Security]
|
||||
EnableCopyOnDoubleClick=true
|
||||
'';
|
||||
xdg.configFile."keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.useConfig {
|
||||
text = config.mods.keepassxc.config;
|
||||
};
|
||||
|
||||
home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.use_cache_config {
|
||||
text = config.mods.keepassxc.cache_config;
|
||||
home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.useCacheConfig {
|
||||
text = config.mods.keepassxc.cacheConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@ in {
|
|||
type = lib.types.bool;
|
||||
description = "Enables kitty";
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enable default config for kitty";
|
||||
};
|
||||
additionalConfig = lib.mkOption {
|
||||
default = {};
|
||||
example = {
|
||||
|
|
@ -48,7 +54,7 @@ in {
|
|||
enable_audio_bell = "yes";
|
||||
};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Additional kitty configuration";
|
||||
description = "Additional kitty configuration. Will be the only configuration if useDefaultConfig is disabled.";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.kitty.enable (
|
||||
|
|
@ -59,80 +65,64 @@ in {
|
|||
programs.kitty = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
enable_audio_bell = "no";
|
||||
window_alert_on_bell = "no";
|
||||
cursor_blink_interval = "0";
|
||||
window_padding_width = "1";
|
||||
shell_integration = "yes";
|
||||
sync_with_monitor = "no";
|
||||
background_opacity = "0.8";
|
||||
if config.mods.kitty.useDefaultConfig
|
||||
then
|
||||
{
|
||||
enable_audio_bell = "no";
|
||||
window_alert_on_bell = "no";
|
||||
cursor_blink_interval = "0";
|
||||
window_padding_width = "1";
|
||||
shell_integration = "yes";
|
||||
sync_with_monitor = "no";
|
||||
background_opacity = "0.8";
|
||||
|
||||
font_family = "${config.mods.stylix.fonts.monospace.name}";
|
||||
bold_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold";
|
||||
italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Italic";
|
||||
bold_italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold Italic";
|
||||
font_family = "${config.mods.stylix.fonts.monospace.name}";
|
||||
bold_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold";
|
||||
italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Italic";
|
||||
bold_italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold Italic";
|
||||
|
||||
background = base;
|
||||
foreground = "#" + scheme.base05;
|
||||
selection_foreground = "#" + scheme.base05;
|
||||
selection_background = base;
|
||||
url_color = "#" + scheme.base04;
|
||||
cursor = "#" + scheme.base05;
|
||||
active_border_color = "#" + scheme.base03;
|
||||
inactive_border_color = "#" + scheme.base01;
|
||||
active_tab_background = base;
|
||||
active_tab_foreground = "#" + scheme.base05;
|
||||
inactive_tab_background = "#" + scheme.base01;
|
||||
inactive_tab_foreground = "#" + scheme.base04;
|
||||
tab_bar_background = "#" + scheme.base01;
|
||||
background = base;
|
||||
foreground = "#" + scheme.base05;
|
||||
selection_foreground = "#" + scheme.base05;
|
||||
selection_background = base;
|
||||
url_color = "#" + scheme.base04;
|
||||
cursor = "#" + scheme.base05;
|
||||
active_border_color = "#" + scheme.base03;
|
||||
inactive_border_color = "#" + scheme.base01;
|
||||
active_tab_background = base;
|
||||
active_tab_foreground = "#" + scheme.base05;
|
||||
inactive_tab_background = "#" + scheme.base01;
|
||||
inactive_tab_foreground = "#" + scheme.base04;
|
||||
tab_bar_background = "#" + scheme.base01;
|
||||
|
||||
mark1_foreground = "#" + scheme.base00;
|
||||
mark1_background = "#" + scheme.base07;
|
||||
mark2_foreground = "#" + scheme.base00;
|
||||
mark2_background = "#" + scheme.base0E;
|
||||
mark3_foreground = "#" + scheme.base00;
|
||||
mark3_background = "#" + scheme.base08;
|
||||
mark1_foreground = "#" + scheme.base00;
|
||||
mark1_background = "#" + scheme.base07;
|
||||
mark2_foreground = "#" + scheme.base00;
|
||||
mark2_background = "#" + scheme.base0E;
|
||||
mark3_foreground = "#" + scheme.base00;
|
||||
mark3_background = "#" + scheme.base08;
|
||||
|
||||
color0 = "#" + scheme.base03;
|
||||
color1 = "#" + scheme.base08;
|
||||
color2 = "#" + scheme.base0B;
|
||||
color3 = "#" + scheme.base0A;
|
||||
color4 = "#" + scheme.base0D;
|
||||
color5 = "#" + scheme.base06;
|
||||
color6 = "#" + scheme.base0C;
|
||||
color7 = "#" + scheme.base07;
|
||||
color0 = "#" + scheme.base03;
|
||||
color1 = "#" + scheme.base08;
|
||||
color2 = "#" + scheme.base0B;
|
||||
color3 = "#" + scheme.base0A;
|
||||
color4 = "#" + scheme.base0D;
|
||||
color5 = "#" + scheme.base06;
|
||||
color6 = "#" + scheme.base0C;
|
||||
color7 = "#" + scheme.base07;
|
||||
|
||||
color8 = "#" + scheme.base04;
|
||||
color9 = "#" + scheme.base08;
|
||||
color10 = "#" + scheme.base0B;
|
||||
color11 = "#" + scheme.base0A;
|
||||
color12 = "#" + scheme.base0D;
|
||||
color13 = "#" + scheme.base06;
|
||||
color14 = "#" + scheme.base0C;
|
||||
color15 = "#" + scheme.base0B;
|
||||
|
||||
# color0 = base;
|
||||
# color1 = "#" + scheme.base08;
|
||||
# color2 = "#" + scheme.base0B;
|
||||
# color3 = "#" + scheme.base0A;
|
||||
# color4 = "#" + scheme.base0D;
|
||||
# color5 = "#" + scheme.base0E;
|
||||
# color6 = "#" + scheme.base0C;
|
||||
# color7 = "#" + scheme.base05;
|
||||
#
|
||||
# color8 = "#" + scheme.base03;
|
||||
# color9 = "#" + scheme.base08;
|
||||
# color10 = "#" + scheme.base0B;
|
||||
# color11 = "#" + scheme.base0A;
|
||||
# color12 = "#" + scheme.base0D;
|
||||
# color13 = "#" + scheme.base0E;
|
||||
# color14 = "#" + scheme.base0C;
|
||||
# color15 = "#" + scheme.base07;
|
||||
|
||||
shell = lib.mkIf config.mods.fish.enable "fish";
|
||||
}
|
||||
// config.mods.kitty.additionalConfig;
|
||||
color8 = "#" + scheme.base04;
|
||||
color9 = "#" + scheme.base08;
|
||||
color10 = "#" + scheme.base0B;
|
||||
color11 = "#" + scheme.base0A;
|
||||
color12 = "#" + scheme.base0D;
|
||||
color13 = "#" + scheme.base06;
|
||||
color14 = "#" + scheme.base0C;
|
||||
color15 = "#" + scheme.base0B;
|
||||
shell = lib.mkIf config.mods.fish.enable "fish";
|
||||
}
|
||||
// config.mods.kitty.additionalConfig
|
||||
else config.mods.kitty.additionalConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# Copyright (c) 2020-2021 Mihai Fufezan
|
||||
# credits to fufexan https://github.com/fufexan/dotfiles/blob/main/home/terminal/programs/xdg.nix
|
||||
{
|
||||
mkDashDefault,
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
|
|
@ -148,11 +149,11 @@ in {
|
|||
};
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
enable = mkDashDefault true;
|
||||
createDirectories = mkDashDefault true;
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
pws = "${config.home.homeDirectory}/pws";
|
||||
XDG_SCREENSHOTS_DIR = mkDashDefault "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
pws = mkDashDefault "${config.home.homeDirectory}/pws";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,11 +12,8 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables ncspot with a config";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.ncspot.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [ncspot];
|
||||
xdg.configFile."ncspot/config.toml".source = (pkgs.formats.toml {}).generate "ncspot" {
|
||||
config = lib.mkOption {
|
||||
default = {
|
||||
notify = true;
|
||||
shuffle = true;
|
||||
cover_max_scale = 2;
|
||||
|
|
@ -52,6 +49,16 @@
|
|||
body = "%title";
|
||||
};
|
||||
};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "config";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.ncspot.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [ncspot];
|
||||
xdg.configFile."ncspot/config.toml".source =
|
||||
lib.mkIf config.mods.ncspot.useConfig (pkgs.formats.toml {}).generate "ncspot" config.mods.ncspot.config;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
code_format = "[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)";
|
||||
in {
|
||||
enable = true;
|
||||
interactiveOnly = true;
|
||||
interactiveOnly = mkDashDefault true;
|
||||
presets = lib.mkIf config.mods.starship.useDefaultPrompt ["pastel-powerline"];
|
||||
settings =
|
||||
lib.mkIf config.mods.starship.useDefaultPrompt {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
|
|
@ -88,11 +89,11 @@
|
|||
(lib.optionalAttrs (options ? stylix) {
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ../../base/black.jpg;
|
||||
polarity = "dark";
|
||||
image = mkDashDefault ../../base/black.jpg;
|
||||
polarity = mkDashDefault "dark";
|
||||
targets = {
|
||||
nixvim.enable = false;
|
||||
fish.enable = false;
|
||||
nixvim.enable = mkDashDefault false;
|
||||
fish.enable = mkDashDefault false;
|
||||
};
|
||||
fonts = config.mods.stylix.fonts;
|
||||
cursor = config.mods.stylix.cursor;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
|
|
@ -41,15 +42,15 @@ in {
|
|||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
package = mkDashDefault pkgs.qemu_kvm;
|
||||
swtpm.enable = mkDashDefault true;
|
||||
ovmf.enable = mkDashDefault true;
|
||||
ovmf.packages = [pkgs.OVMFFull.fd];
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
spiceUSBRedirection.enable = mkDashDefault true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.spice-vdagentd.enable = mkDashDefault true;
|
||||
|
||||
users.users.${config.conf.username}.extraGroups = [
|
||||
"libvirtd"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue