Use defaultMonitor instead of monitor
This commit is contained in:
parent
3ac742cc45
commit
2c45bcf6ad
8 changed files with 128 additions and 93 deletions
|
|
@ -60,7 +60,11 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang
|
|||
conf = {
|
||||
# change this to your monitor and your pc name
|
||||
# should be something like DP-1
|
||||
monitor = "YOURMONITOR";
|
||||
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
|
||||
|
|
@ -72,41 +76,46 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang
|
|||
mods = {
|
||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
drives = {
|
||||
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" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
# 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;
|
||||
hyprland.monitor = [
|
||||
# default
|
||||
# TODO change this to your resolution
|
||||
"${config.conf.monitor},1920x1080@144,0x0,1"
|
||||
# all others
|
||||
",highrr,auto,1"
|
||||
];
|
||||
# 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}"
|
||||
# # all others
|
||||
# ",highrr,auto,1"
|
||||
# ];
|
||||
# or amd, whatever you have
|
||||
gpu.nvidia.enable = true;
|
||||
kde_connect.enable = true;
|
||||
# TODO change this to your main resolution
|
||||
# -> this will be your login manager
|
||||
greetd = { resolution = "3440x1440@180"; };
|
||||
# login manager:
|
||||
# default is greetd
|
||||
# greetd = { };
|
||||
# sddm = { };
|
||||
# gdm = { };
|
||||
};
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@
|
|||
conf = {
|
||||
# change this to your monitor and your pc name
|
||||
# should be something like DP-1
|
||||
monitor = "YOURMONITOR";
|
||||
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
|
||||
|
|
@ -17,51 +21,54 @@
|
|||
mods = {
|
||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
drives = {
|
||||
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"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
# 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;
|
||||
hyprland.monitor = [
|
||||
# default
|
||||
# TODO change this to your resolution
|
||||
"${config.conf.monitor},1920x1080@144,0x0,1"
|
||||
# all others
|
||||
",highrr,auto,1"
|
||||
];
|
||||
# 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}"
|
||||
# # all others
|
||||
# ",highrr,auto,1"
|
||||
# ];
|
||||
# or amd, whatever you have
|
||||
gpu.nvidia.enable = true;
|
||||
kde_connect.enable = true;
|
||||
# TODO change this to your main resolution
|
||||
# -> this will be your login manager
|
||||
greetd = {
|
||||
resolution = "3440x1440@180";
|
||||
};
|
||||
# login manager:
|
||||
# default is greetd
|
||||
# greetd = { };
|
||||
# sddm = { };
|
||||
# gdm = { };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
'';
|
||||
};
|
||||
|
||||
monitor = lib.mkOption {
|
||||
defaultMonitor = lib.mkOption {
|
||||
default = "";
|
||||
example = "eDP-1";
|
||||
type = lib.types.str;
|
||||
|
|
@ -48,12 +48,21 @@
|
|||
'';
|
||||
};
|
||||
|
||||
scale = lib.mkOption {
|
||||
default = "1.0";
|
||||
example = "1.0";
|
||||
defaultMonitorMode = lib.mkOption {
|
||||
default = "";
|
||||
example = "3440x1440@180";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Scale for the monitor
|
||||
main monitor
|
||||
'';
|
||||
};
|
||||
|
||||
defaultMonitorScale = lib.mkOption {
|
||||
default = "1";
|
||||
example = "1.5";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
main monitor scaling
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{ config
|
||||
, lib
|
||||
, inputs
|
||||
, pkgs
|
||||
, options
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.mods = {
|
||||
|
|
@ -17,7 +18,7 @@
|
|||
'';
|
||||
};
|
||||
monitor = lib.mkOption {
|
||||
default = "${config.conf.monitor}";
|
||||
default = "${config.conf.defaultMonitor}";
|
||||
example = "eDP-1";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
'';
|
||||
};
|
||||
scale = lib.mkOption {
|
||||
default = "${config.conf.scale}";
|
||||
default = "${config.conf.defaultMonitorScale}";
|
||||
example = "1.5";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
|
|
@ -35,7 +36,7 @@
|
|||
'';
|
||||
};
|
||||
resolution = lib.mkOption {
|
||||
default = "auto";
|
||||
default = "${config.conf.defaultMonitorMode}";
|
||||
example = "3440x1440@180";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
|
|
|
|||
|
|
@ -42,9 +42,13 @@
|
|||
'';
|
||||
};
|
||||
custom_css = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = '''';
|
||||
example = ''
|
||||
#window {
|
||||
border-radius: none;
|
||||
}
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
Custom anyrun css.
|
||||
Will be merged with default css if enabled.
|
||||
|
|
@ -133,7 +137,7 @@
|
|||
border-radius: 10px;
|
||||
}
|
||||
''
|
||||
++ config.mods.hyprland.anyrun.custom_css
|
||||
+ config.mods.hyprland.anyrun.custom_css
|
||||
else
|
||||
config.mods.hyprland.anyrun.custom_css;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@
|
|||
'';
|
||||
};
|
||||
monitor = lib.mkOption {
|
||||
default = [ ];
|
||||
default = [
|
||||
# main monitor
|
||||
"${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}"
|
||||
# all others
|
||||
",highrr,auto,1"
|
||||
];
|
||||
example = [ "DP-1,3440x1440@180,2560x0,1,vrr,0" ];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "${config.conf.monitor}";
|
||||
monitor = "${config.conf.defaultMonitor}";
|
||||
|
||||
placeholder_text = "password or something";
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
label = [
|
||||
{
|
||||
monitor = "${config.conf.monitor}";
|
||||
monitor = "${config.conf.defaultMonitor}";
|
||||
text = "$TIME";
|
||||
font_size = 50;
|
||||
position = "0, 200";
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ in
|
|||
#"another_feature"
|
||||
];
|
||||
config = {
|
||||
monitors."${config.conf.monitor}" = {
|
||||
monitors."${config.conf.defaultMonitor}" = {
|
||||
end = config.conf.ironbar.modules ++ [
|
||||
{
|
||||
type = "sys_info";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue