refactor
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
{
|
||||
config,
|
||||
facts,
|
||||
lib,
|
||||
pkgs,
|
||||
repo,
|
||||
}:
|
||||
let
|
||||
nixosConfigDir = repo.account.nixosConfigurationPath;
|
||||
nixosConfigDir = facts.account.nixosConfigurationPath;
|
||||
mkTerminalScript =
|
||||
{
|
||||
name,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
repo = config.repo;
|
||||
facts = config.facts;
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
@@ -37,21 +37,20 @@ in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
borderPalette = repo.theme.kanagawa.palette.niri.border;
|
||||
borderPalette = facts.theme.kanagawa.palette.niri.border;
|
||||
shortcuts = import ./_shortcuts.nix {
|
||||
inherit
|
||||
config
|
||||
facts
|
||||
lib
|
||||
pkgs
|
||||
repo
|
||||
;
|
||||
};
|
||||
machine = osConfig.facts.machine;
|
||||
machine = config.facts.machine;
|
||||
in
|
||||
{
|
||||
home = {
|
||||
@@ -71,12 +70,6 @@ in
|
||||
programs.niri.settings = {
|
||||
outputs = lib.mapAttrs (
|
||||
_: display:
|
||||
let
|
||||
scale = display.scale or null;
|
||||
width = display.width or null;
|
||||
height = display.height or null;
|
||||
refresh = display.refresh or null;
|
||||
in
|
||||
{
|
||||
position = {
|
||||
x = display.x or 0;
|
||||
@@ -86,19 +79,19 @@ in
|
||||
// lib.optionalAttrs (display.primary or false) {
|
||||
"focus-at-startup" = true;
|
||||
}
|
||||
// lib.optionalAttrs (scale != null) {
|
||||
inherit scale;
|
||||
// lib.optionalAttrs (display ? scale) {
|
||||
inherit (display) scale;
|
||||
}
|
||||
// lib.optionalAttrs (width != null && height != null && refresh != null) {
|
||||
// lib.optionalAttrs (display ? width && display ? height && display ? refresh) {
|
||||
mode = {
|
||||
inherit
|
||||
width
|
||||
inherit (display)
|
||||
height
|
||||
refresh
|
||||
width
|
||||
;
|
||||
};
|
||||
}
|
||||
) (machine.displays or { });
|
||||
) machine.displays;
|
||||
|
||||
environment.DISPLAY = ":0";
|
||||
spawn-at-startup = [
|
||||
|
||||
Reference in New Issue
Block a user