Compare commits

...

2 commits

2 changed files with 13 additions and 12 deletions
flake.nix
hosts/home/services

View file

@ -73,15 +73,20 @@
(hostname: { system, ... }: system == x86_64-darwin)
hosts;
mkDeploymentModule = targetHost: ({ lib, ... }: {
mkDeploymentModule = { targetHost, system, ... }: ({ lib, ... }: {
options.deployment = with lib; {
system = mkOption {
type = types.str;
readOnly = true;
internal = true;
};
targetHost = mkOption {
type = types.nullOr types.str;
readOnly = true;
internal = true;
};
};
config.deployment = { inherit targetHost; };
config.deployment = { inherit targetHost system; };
});
baseHomeManagerModule = ({ ... }: {
@ -114,8 +119,8 @@
let
pkgs = import nixpkgs { inherit system; };
machineRebuild = { system, ...}:
if system == x86_64-linux
machineRebuild = machine:
if machine.config.deployment.system == x86_64-linux
then pkgs.nixos-rebuild
else inputs.nix-darwin.packages.${x86_64-darwin}.darwin-rebuild;
@ -209,7 +214,7 @@
impermanence.nixosModules.impermanence
])
++ [
(mkDeploymentModule targetHost)
(mkDeploymentModule { inherit system targetHost; })
baseHomeManagerModule
]
++ extraModules
@ -242,7 +247,7 @@
])
++ [
(baseDarwinModule system)
(mkDeploymentModule targetHost)
(mkDeploymentModule { inherit system targetHost; })
baseHomeManagerModule
]
++ extraModules

View file

@ -11,16 +11,12 @@
end
section: links
home:
left = macbook-pro
down = macbook-pro
down(0,40) = macbook-pro(0,100)
macbook-pro:
right = home
up = home
up(1,99) = home(0,40)
end
section: options
# Включение синхронизации буфера обмена
clipboardSharing = true
# Максимальный размер данных в килобайтах
clipboardSharingSize = 2048
end
'';