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

View file

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