chore: cleanup all files
This commit is contained in:
parent
f4e47cbf97
commit
9cc9955425
43 changed files with 2893 additions and 2834 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<div align = center>
|
||||
|
||||

|
||||
|
|
@ -7,7 +6,6 @@
|
|||
|
||||
An opinionated flake to bootstrap NixOS systems with default configurations for various programs and services from both NixOS and HomeManager which can be enabled, disabled, configured or replaced at will.
|
||||
|
||||
|
||||
# Usage
|
||||
|
||||
This flake is intended to be used as an input to your own NixOS configuration:
|
||||
|
|
@ -57,26 +55,52 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang
|
|||
|
||||
```nix
|
||||
{config, ...}: {
|
||||
# TODO denote important changes
|
||||
|
||||
# variables for system
|
||||
# TODO important changes
|
||||
conf = {
|
||||
# change this to your monitor and your pc name
|
||||
# TODO your username
|
||||
username = "YOURNAME";
|
||||
# TODO only needed when you use intel -> amd is default
|
||||
# cpu = "intel";
|
||||
# TODO your xkb layout
|
||||
locale = "something.UTF-8";
|
||||
# TODO your timezone
|
||||
timezone = "CONTINENT/CITY";
|
||||
};
|
||||
|
||||
# modules
|
||||
mods = {
|
||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
sops.enable = false;
|
||||
nextcloud.enable = false;
|
||||
hypr.hyprland = {
|
||||
# TODO monitor configuration for hyprland (hyprland is default)
|
||||
# should be something like DP-1
|
||||
defaultMonitor = "YOURMONITOR";
|
||||
# width x height @ refreshrate
|
||||
defaultMonitorMode = "1920x1080@60";
|
||||
# scale for your main monitor
|
||||
defaultMonitorScale = "1";
|
||||
# your username
|
||||
username = "YOURNAME";
|
||||
# TODO only needed when you use intel -> amd is default
|
||||
# cpu = "intel";
|
||||
locale = "something.UTF-8";
|
||||
timezone = "CONTINENT/CITY";
|
||||
# additional configruation can be done as well
|
||||
# customConfig = {
|
||||
# monitor = [
|
||||
# # default
|
||||
# "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}"
|
||||
# # second example monitor
|
||||
# "DP-2,3440x1440@180,auto,1"
|
||||
# # all others
|
||||
# ",highrr,auto,1"
|
||||
# ];
|
||||
# }
|
||||
};
|
||||
# modules
|
||||
mods = {
|
||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
gpu.nvidia.enable = true;
|
||||
kdeConnect.enable = true;
|
||||
# login manager:
|
||||
# default is greetd
|
||||
# greetd = { };
|
||||
# sddm = { };
|
||||
# gdm = { };
|
||||
drives = {
|
||||
# default assumes ROOT, BOOT, HOME and SWAP labaled drives exist
|
||||
# for an example without HOME see below
|
||||
|
|
@ -102,26 +126,6 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang
|
|||
# You can also use disko to format your disks on installation.
|
||||
# Please refer to the Documentation about the drives module for an example.
|
||||
};
|
||||
sops.enable = false;
|
||||
nextcloud.enable = false;
|
||||
# default hyprland monitor config -> uncomment when necessary
|
||||
# TODO: Add more monitors when needed
|
||||
# hyprland.monitor = [
|
||||
# # default
|
||||
# "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}"
|
||||
# # second example monitor
|
||||
# "DP-2,3440x1440@180,auto,1"
|
||||
# # all others
|
||||
# ",highrr,auto,1"
|
||||
# ];
|
||||
# or amd, whatever you have
|
||||
gpu.nvidia.enable = true;
|
||||
kdeConnect.enable = true;
|
||||
# login manager:
|
||||
# default is greetd
|
||||
# greetd = { };
|
||||
# sddm = { };
|
||||
# gdm = { };
|
||||
};
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,71 +1,43 @@
|
|||
{config, ...}: {
|
||||
# TODO denote important changes
|
||||
|
||||
# variables for system
|
||||
# TODO important changes
|
||||
conf = {
|
||||
# change this to your monitor and your pc name
|
||||
# TODO your username
|
||||
username = "YOURNAME";
|
||||
# TODO only needed when you use intel -> amd is default
|
||||
# cpu = "intel";
|
||||
# TODO your xkb layout
|
||||
locale = "something.UTF-8";
|
||||
# TODO your timezone
|
||||
timezone = "CONTINENT/CITY";
|
||||
};
|
||||
|
||||
# modules
|
||||
mods = {
|
||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
sops.enable = false;
|
||||
nextcloud.enable = false;
|
||||
hypr.hyprland = {
|
||||
# TODO monitor configuration for hyprland (hyprland is default)
|
||||
# should be something like DP-1
|
||||
defaultMonitor = "YOURMONITOR";
|
||||
# width x height @ refreshrate
|
||||
defaultMonitorMode = "1920x1080@60";
|
||||
# scale for your main monitor
|
||||
defaultMonitorScale = "1";
|
||||
# your username
|
||||
username = "YOURNAME";
|
||||
# TODO only needed when you use intel -> amd is default
|
||||
# cpu = "intel";
|
||||
locale = "something.UTF-8";
|
||||
timezone = "CONTINENT/CITY";
|
||||
};
|
||||
# modules
|
||||
mods = {
|
||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
drives = {
|
||||
# WARNING: Only do this when installing for the first time, as I am not sure if disko would format your disk
|
||||
variant = "disko";
|
||||
# default assumes ROOT, BOOT, HOME and SWAP labaled drives exist
|
||||
# for an example without HOME see below
|
||||
#defaultDrives.enable = false;
|
||||
#extraDrives = [
|
||||
# {
|
||||
# name = "boot";
|
||||
# drive = {
|
||||
# device = "/dev/disk/by-label/BOOT";
|
||||
# fsType = "vfat";
|
||||
# options = [
|
||||
# "rw"
|
||||
# "fmask=0022"
|
||||
# "dmask=0022"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# name = "";
|
||||
# drive = {
|
||||
# device = "/dev/disk/by-label/ROOT";
|
||||
# fsType = "ext4";
|
||||
# options = [
|
||||
# "noatime"
|
||||
# "nodiratime"
|
||||
# "discard"
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
#];
|
||||
};
|
||||
sops.enable = false;
|
||||
nextcloud.enable = false;
|
||||
# default hyprland monitor config -> uncomment when necessary
|
||||
# TODO: Add more monitors when needed
|
||||
# hyprland.monitor = [
|
||||
# additional configruation can be done as well
|
||||
# customConfig = {
|
||||
# monitor = [
|
||||
# # default
|
||||
# "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}"
|
||||
# "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}"
|
||||
# # second example monitor
|
||||
# "DP-2,3440x1440@180,auto,1"
|
||||
# # all others
|
||||
# ",highrr,auto,1"
|
||||
# ];
|
||||
# or amd, whatever you have
|
||||
# }
|
||||
};
|
||||
gpu.nvidia.enable = true;
|
||||
kdeConnect.enable = true;
|
||||
# login manager:
|
||||
|
|
@ -73,5 +45,30 @@
|
|||
# greetd = { };
|
||||
# sddm = { };
|
||||
# gdm = { };
|
||||
drives = {
|
||||
# default assumes ROOT, BOOT, HOME and SWAP labaled drives exist
|
||||
# for an example without HOME see below
|
||||
# defaultDrives.enable = false;
|
||||
# extraDrives = [
|
||||
# {
|
||||
# name = "boot";
|
||||
# drive = {
|
||||
# device = "/dev/disk/by-label/BOOT";
|
||||
# fsType = "vfat";
|
||||
# options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ];
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# name = "";
|
||||
# drive = {
|
||||
# device = "/dev/disk/by-label/ROOT";
|
||||
# fsType = "ext4";
|
||||
# options = [ "noatime" "nodiratime" "discard" ];
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
# You can also use disko to format your disks on installation.
|
||||
# Please refer to the Documentation about the drives module for an example.
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
37
flake.nix
37
flake.nix
|
|
@ -11,6 +11,9 @@
|
|||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
|
||||
# Darkreader requires es20, hence a stable pin
|
||||
pkgsDarkreader.url = "github:NixOs/nixpkgs/nixos-24.11";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
|
|
@ -78,30 +81,17 @@
|
|||
"jitsi-meet-1.0.8043"
|
||||
"nextcloud-27.1.11"
|
||||
];
|
||||
stable = import inputs.stable {
|
||||
system = currentSystem;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = permittedPackages;
|
||||
stable = import ./lib/importPkgs.nix {
|
||||
inherit inputs permittedPackages currentSystem;
|
||||
pkgs = inputs.stable;
|
||||
};
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
inputs.chaoticNyx.overlays.default
|
||||
];
|
||||
unstable = import ./lib/importPkgs.nix {
|
||||
inherit inputs permittedPackages currentSystem;
|
||||
pkgs = inputs.unstable;
|
||||
};
|
||||
unstable = import inputs.unstable {
|
||||
system = currentSystem;
|
||||
config = {
|
||||
allowUnsupportedSystem = true;
|
||||
permittedInsecurePackages = permittedPackages;
|
||||
# Often happens with neovim, this should not block everything.
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
inputs.chaoticNyx.overlays.default
|
||||
];
|
||||
pkgsDarkreader = import ./lib/importPkgs.nix {
|
||||
inherit inputs permittedPackages currentSystem;
|
||||
pkgs = inputs.pkgsDarkreader;
|
||||
};
|
||||
in rec {
|
||||
dashNixLib = import ./lib {
|
||||
|
|
@ -111,6 +101,9 @@
|
|||
unstable
|
||||
stable
|
||||
;
|
||||
dashNixAdditionalProps = {
|
||||
inherit pkgsDarkreader;
|
||||
};
|
||||
system = currentSystem;
|
||||
lib = inputs.unstable.lib;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
additionalHomeConfig,
|
||||
additionalHomeMods,
|
||||
additionalInputs,
|
||||
dashNixAdditionalProps,
|
||||
config,
|
||||
homeMods,
|
||||
inputs,
|
||||
|
|
@ -27,7 +28,16 @@
|
|||
useGlobalPkgs = mkDashDefault true;
|
||||
useUserPackages = mkDashDefault true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs root additionalInputs alternativePkgs system stable unstable;
|
||||
inherit
|
||||
inputs
|
||||
root
|
||||
additionalInputs
|
||||
alternativePkgs
|
||||
system
|
||||
stable
|
||||
unstable
|
||||
dashNixAdditionalProps
|
||||
;
|
||||
mkDashDefault = import ../lib/override.nix {inherit lib;};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -290,14 +290,18 @@
|
|||
'';
|
||||
browsername = config.mods.homePackages.browser;
|
||||
profiles =
|
||||
if config.mods.homePackages.browser == "firefox" then
|
||||
config.mods.browser.firefox.profiles
|
||||
else if config.mods.homePackages.browser == "zen" then
|
||||
config.mods.browser.zen.profiles
|
||||
else if config.mods.homePackages.browser == "librewolf" then
|
||||
[{name = "default"; value = {};}]
|
||||
else
|
||||
[];
|
||||
if config.mods.homePackages.browser == "firefox"
|
||||
then config.mods.browser.firefox.profiles
|
||||
else if config.mods.homePackages.browser == "zen"
|
||||
then config.mods.browser.zen.profiles
|
||||
else if config.mods.homePackages.browser == "librewolf"
|
||||
then [
|
||||
{
|
||||
name = "default";
|
||||
value = {};
|
||||
}
|
||||
]
|
||||
else [];
|
||||
profileNamesFn =
|
||||
builtins.catAttrs "name";
|
||||
chromesFn = builtins.map (
|
||||
|
|
@ -315,11 +319,11 @@
|
|||
else {}
|
||||
);
|
||||
moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {};
|
||||
mkFirefoxTheme = (profiles:
|
||||
mkFirefoxTheme = (
|
||||
profiles:
|
||||
profiles
|
||||
|> profileNamesFn
|
||||
|> chromesFn
|
||||
|> moduleFn
|
||||
);
|
||||
in
|
||||
{home.file = mkFirefoxTheme profiles;}
|
||||
in {home.file = mkFirefoxTheme profiles;}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
self,
|
||||
stable,
|
||||
system,
|
||||
dashNixAdditionalProps ? {},
|
||||
...
|
||||
}: {
|
||||
/*
|
||||
|
|
@ -92,6 +93,8 @@
|
|||
root
|
||||
stable
|
||||
unstable
|
||||
additionalInputs
|
||||
dashNixAdditionalProps
|
||||
;
|
||||
pkgs = lib.mkForce (
|
||||
if overridePkgs
|
||||
|
|
@ -105,7 +108,6 @@
|
|||
hostName = name;
|
||||
homeMods = mods.home;
|
||||
additionalHomeMods = additionalMods.home;
|
||||
additionalInputs = additionalInputs;
|
||||
mkDashDefault = import ./override.nix {inherit lib;};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
stable,
|
||||
dashNixAdditionalProps,
|
||||
pkgs,
|
||||
name,
|
||||
...
|
||||
|
|
@ -24,9 +24,16 @@ in {
|
|||
(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")
|
||||
(mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../patches/darkreader.nix {inherit lib dashNixAdditionalProps;}}/latest.xpi")
|
||||
];
|
||||
example = [
|
||||
{
|
||||
"78272b6fa58f4a1abaac99321d503a20@proton.me" = {
|
||||
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/proton-pass/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
}
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf anything;
|
||||
description = ''
|
||||
List of extensions via attrsets:
|
||||
17
lib/importPkgs.nix
Normal file
17
lib/importPkgs.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
inputs,
|
||||
currentSystem,
|
||||
permittedPackages,
|
||||
pkgs,
|
||||
}:
|
||||
import pkgs {
|
||||
system = currentSystem;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = permittedPackages;
|
||||
};
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
inputs.chaoticNyx.overlays.default
|
||||
];
|
||||
}
|
||||
|
|
@ -76,7 +76,8 @@
|
|||
|
||||
additionalBootKernalParams = lib.mkOption {
|
||||
default = [
|
||||
"video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}"
|
||||
# TODO test if needed
|
||||
#"video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}"
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf str;
|
||||
|
|
@ -85,33 +86,6 @@
|
|||
'';
|
||||
};
|
||||
|
||||
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"];
|
||||
|
|
|
|||
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;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
++ config.mods.basePackages.additionalPackages
|
||||
else config.mods.basePackages.additionalPackages;
|
||||
|
||||
gtk.iconCache.enable = false;
|
||||
gtk.iconCache.enable = mkDashDefault false;
|
||||
services =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
|
|
@ -102,6 +102,8 @@
|
|||
programs =
|
||||
if config.mods.basePackages.enable
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
nix-ld = {
|
||||
enable = mkDashDefault true;
|
||||
|
|
@ -122,7 +124,8 @@
|
|||
};
|
||||
gnupg.agent.enable = mkDashDefault true;
|
||||
}
|
||||
// config.mods.basePackages.specialPrograms
|
||||
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,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,10 +1,10 @@
|
|||
# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix
|
||||
{
|
||||
lib,
|
||||
dashNixAdditionalProps,
|
||||
config,
|
||||
options,
|
||||
inputs,
|
||||
stable,
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
name = "zen";
|
||||
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,4 +1,5 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
|
|
@ -518,7 +519,7 @@ in {
|
|||
};
|
||||
programs.vscode = lib.mkIf config.mods.coding.vscodium.enable {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
package = mkDashDefault pkgs.vscodium;
|
||||
profiles.default.extensions = config.mods.coding.vscodium.extensions;
|
||||
};
|
||||
xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) {
|
||||
|
|
|
|||
|
|
@ -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,6 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./acpid.nix
|
||||
./anyrun.nix
|
||||
./basePackages.nix
|
||||
./bluetooth.nix
|
||||
./browser
|
||||
|
|
@ -19,7 +20,8 @@
|
|||
./gpu.nix
|
||||
./greetd.nix
|
||||
./homePackages.nix
|
||||
./hyprland
|
||||
./hypr
|
||||
./ironbar.nix
|
||||
./kde.nix
|
||||
./kdeConnect.nix
|
||||
./keepassxc.nix
|
||||
|
|
|
|||
|
|
@ -1,32 +1,20 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? home.packages) {
|
||||
xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch) {
|
||||
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;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
modules = lib.mkOption {
|
||||
default = [
|
||||
"title"
|
||||
"separator"
|
||||
{
|
||||
|
|
@ -61,6 +49,25 @@
|
|||
"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.enable) {
|
||||
source = (pkgs.formats.json {}).generate "config.jsonc" {
|
||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||
logo = {
|
||||
type = mkDashDefault "kitty";
|
||||
source = mkDashDefault ../../assets/logo2.png;
|
||||
width = mkDashDefault 35;
|
||||
padding = mkDashDefault {
|
||||
top = mkDashDefault 1;
|
||||
};
|
||||
};
|
||||
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
|
||||
];
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
then config.mods.homePackages.browser.meta.mainProgram
|
||||
else config.mods.homePackages.browser.pname;
|
||||
in {
|
||||
options.mods.hyprland = {
|
||||
options.mods.hypr.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
|
|
@ -23,10 +23,34 @@ in {
|
|||
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.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}"
|
||||
"${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"];
|
||||
|
|
@ -59,6 +83,14 @@ in {
|
|||
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;
|
||||
|
|
@ -103,7 +135,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.enable (
|
||||
config = lib.mkIf config.mods.hypr.hyprland.enable (
|
||||
lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
|
||||
# install Hyprland related packages
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -122,12 +154,12 @@ in {
|
|||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings =
|
||||
if config.mods.hyprland.useDefaultConfig
|
||||
if config.mods.hypr.hyprland.useDefaultConfig
|
||||
then
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
"$mod" = "SUPER";
|
||||
"$mod" = mkDashDefault "SUPER";
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
|
|
@ -148,15 +180,15 @@ in {
|
|||
"$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.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"
|
||||
(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")
|
||||
|
|
@ -243,15 +275,15 @@ in {
|
|||
];
|
||||
|
||||
general = {
|
||||
gaps_out = "3,5,5,5";
|
||||
border_size = 3;
|
||||
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.hyprland.noAtomic true;
|
||||
allow_tearing = lib.mkIf config.mods.hypr.hyprland.noAtomic true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 4;
|
||||
rounding = mkDashDefault 4;
|
||||
};
|
||||
|
||||
render = {
|
||||
|
|
@ -259,7 +291,7 @@ in {
|
|||
};
|
||||
|
||||
animations = {
|
||||
bezier = "penguin,0.05,0.9,0.1,1.0";
|
||||
bezier = mkDashDefault "penguin,0.05,0.9,0.1,1.0";
|
||||
animation = [
|
||||
"windowsMove,1,4,default"
|
||||
"windows,1,7,default,popin 70%"
|
||||
|
|
@ -272,51 +304,51 @@ in {
|
|||
};
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
pseudotile = 0;
|
||||
permanent_direction_override = false;
|
||||
preserve_split = mkDashDefault true;
|
||||
pseudotile = mkDashDefault 0;
|
||||
permanent_direction_override = mkDashDefault false;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "${config.mods.xkb.layout}";
|
||||
kb_variant = "${config.mods.xkb.variant}";
|
||||
repeat_delay = 200;
|
||||
force_no_accel = true;
|
||||
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 = true;
|
||||
tap-to-click = true;
|
||||
tap-and-drag = true;
|
||||
natural_scroll = mkDashDefault true;
|
||||
tap-to-click = mkDashDefault true;
|
||||
tap-and-drag = mkDashDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = 1;
|
||||
enable_swallow = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_hyprland_logo = true;
|
||||
swallow_regex = "^(.*)(kitty)(.*)$";
|
||||
initial_workspace_tracking = 1;
|
||||
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 = true;
|
||||
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 = false;
|
||||
sync_gsettings_theme = mkDashDefault false;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe = mkDashDefault true;
|
||||
};
|
||||
|
||||
monitor = config.mods.hyprland.monitor;
|
||||
workspace = config.mods.hyprland.workspace;
|
||||
monitor = mkDashDefault config.mods.hypr.hyprland.monitor;
|
||||
workspace = mkDashDefault config.mods.hypr.hyprland.workspace;
|
||||
|
||||
env = [
|
||||
"GTK_CSD,0"
|
||||
|
|
@ -335,7 +367,7 @@ in {
|
|||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
''EDITOR,"neovide --novsync --nofork"''
|
||||
(lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1")
|
||||
(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")
|
||||
|
|
@ -375,35 +407,35 @@ in {
|
|||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
|
||||
# other programs
|
||||
"hyprpaper"
|
||||
"ironbar"
|
||||
"${browserName}"
|
||||
"oxipaste_daemon"
|
||||
"oxinoti"
|
||||
(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.hyprland.extraAutostart;
|
||||
++ config.mods.hypr.hyprland.extraAutostart;
|
||||
|
||||
plugin =
|
||||
lib.mkMerge
|
||||
[
|
||||
{
|
||||
hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable {
|
||||
hyprspace = lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable {
|
||||
bind = [
|
||||
"SUPER, W, overview:toggle, toggle"
|
||||
];
|
||||
};
|
||||
}
|
||||
config.mods.hyprland.pluginConfig
|
||||
config.mods.hypr.hyprland.pluginConfig
|
||||
];
|
||||
}
|
||||
config.mods.hyprland.customConfig
|
||||
config.mods.hypr.hyprland.customConfig
|
||||
]
|
||||
else lib.mkForce config.mods.hyprland.customConfig;
|
||||
else lib.mkForce config.mods.hypr.hyprland.customConfig;
|
||||
plugins =
|
||||
[
|
||||
(lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
|
||||
(lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
|
||||
]
|
||||
++ config.mods.hyprland.plugins;
|
||||
++ 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
|
||||
config =
|
||||
if config.mods.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;
|
||||
};
|
||||
lib.mkMerge
|
||||
[
|
||||
monitorConfig
|
||||
config.mods.ironbar.customConfig
|
||||
]
|
||||
else config.mods.ironbar.customConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
@ -12,30 +12,14 @@
|
|||
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)
|
||||
'';
|
||||
example = "";
|
||||
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
|
||||
|
||||
|
|
@ -56,10 +40,35 @@
|
|||
[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" = 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,6 +65,8 @@ in {
|
|||
programs.kitty = {
|
||||
enable = true;
|
||||
settings =
|
||||
if config.mods.kitty.useDefaultConfig
|
||||
then
|
||||
{
|
||||
enable_audio_bell = "no";
|
||||
window_alert_on_bell = "no";
|
||||
|
|
@ -111,28 +119,10 @@ in {
|
|||
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;
|
||||
// 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"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix
|
||||
{
|
||||
lib,
|
||||
stable,
|
||||
dashNixAdditionalProps,
|
||||
...
|
||||
}:
|
||||
stable.buildNpmPackage rec {
|
||||
}: let
|
||||
stable = dashNixAdditionalProps.pkgsDarkreader;
|
||||
in
|
||||
stable.buildNpmPackage rec {
|
||||
version = "4.9.99";
|
||||
pname = "dark-reader";
|
||||
npmDepsHash = "sha256-m41HkwgbeRRmxJALQFJl/grYjjIqFOc47ltaesob1FA=";
|
||||
|
|
@ -20,4 +22,4 @@ stable.buildNpmPackage rec {
|
|||
mkdir -p $out
|
||||
cp build/release/darkreader-firefox.xpi $out/latest.xpi
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue