diff --git a/docs/src/README.md b/docs/src/README.md index fd143cb..1fc179d 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -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 = { }; }; } ``` diff --git a/example/hosts/example/configuration.nix b/example/hosts/example/configuration.nix index 392656e..95ace40 100644 --- a/example/hosts/example/configuration.nix +++ b/example/hosts/example/configuration.nix @@ -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 = { }; }; } diff --git a/modules/conf.nix b/modules/conf.nix index 7123c9f..15d6fda 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -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 ''; }; diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index b31e4cb..5a3f598 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -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 = '' diff --git a/modules/programs/hyprland/anyrun.nix b/modules/programs/hyprland/anyrun.nix index 8d8ac1b..5be6ad9 100644 --- a/modules/programs/hyprland/anyrun.nix +++ b/modules/programs/hyprland/anyrun.nix @@ -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; }; diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index d4fc079..5f35aec 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -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 = '' diff --git a/modules/programs/hyprland/hyprlock.nix b/modules/programs/hyprland/hyprlock.nix index 091bb9e..5aa5934 100644 --- a/modules/programs/hyprland/hyprlock.nix +++ b/modules/programs/hyprland/hyprlock.nix @@ -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"; diff --git a/modules/programs/hyprland/ironbar.nix b/modules/programs/hyprland/ironbar.nix index dabf38f..578b542 100644 --- a/modules/programs/hyprland/ironbar.nix +++ b/modules/programs/hyprland/ironbar.nix @@ -162,7 +162,7 @@ in #"another_feature" ]; config = { - monitors."${config.conf.monitor}" = { + monitors."${config.conf.defaultMonitor}" = { end = config.conf.ironbar.modules ++ [ { type = "sys_info";