separa configuración en plataformas

This commit is contained in:
Fabián Montero 2022-11-29 13:55:12 -06:00
parent 1433a1f96b
commit 11b9855244
8 changed files with 83 additions and 17 deletions

View file

@ -1,14 +1,15 @@
{ nixpkgs, unstable, self, hm-isolation }:
{ self, nixpkgs, unstable, hm-isolation }:
{ config, pkgs, lib, ... } :
with lib;
{
imports = [
(hm-isolation.homeManagerModule)
./allowUnfreeWhitelist.nix
./gui
./isolation.nix
./local.nix
./path.nix
./systemd
./allowUnfreeWhitelist.nix
];
nixpkgs.overlays = [ self.overlay ];

View file

@ -87,14 +87,13 @@ with lib;
workspaceOutputAssign = [
{
output = "DisplayPort-0";
output = config.local.display."0";
workspace = "1";
}
{
output = "DisplayPort-1";
] ++ optional (config.local.display."1" != null) {
output = config.local.display."1";
workspace = "10";
}
];
};
bars = [ ];
};

19
home/local.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, lib, ... } :
with lib;
{
options.local = with types; {
platform = mkOption {
type = str;
};
display = {
"0" = mkOption {
type = str;
};
"1" = mkOption {
type = nullOr str;
};
};
};
}

View file

@ -0,0 +1,6 @@
{
config.local.display = {
"0" = "DisplayPort-0";
"1" = "DisplayPort-1";
};
}

View file

@ -0,0 +1,6 @@
{
config.local.display = {
"0" = "eDP-1";
"1" = null;
};
}