Check for work system
This commit is contained in:
parent
703c3bd081
commit
c18b9b3060
5 changed files with 21 additions and 16 deletions
|
@ -5,6 +5,7 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.eboskma.programs.ssh;
|
cfg = config.eboskma.programs.ssh;
|
||||||
|
var = config.eboskma.var;
|
||||||
personalKey = "~/.ssh/id_ed25519_sk";
|
personalKey = "~/.ssh/id_ed25519_sk";
|
||||||
horusKey = "~/.ssh/id_ed25519_sk_horus";
|
horusKey = "~/.ssh/id_ed25519_sk_horus";
|
||||||
in
|
in
|
||||||
|
@ -27,7 +28,7 @@ in
|
||||||
SetEnv = "TERM=xterm-256color";
|
SetEnv = "TERM=xterm-256color";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home = {
|
home = mkIf (!var.workSystem) {
|
||||||
host = "home";
|
host = "home";
|
||||||
hostname = "10.0.0.2";
|
hostname = "10.0.0.2";
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
@ -36,7 +37,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
horus = {
|
horus = mkIf (!var.workSystem) {
|
||||||
host = "horus";
|
host = "horus";
|
||||||
hostname = "10.1.0.2";
|
hostname = "10.1.0.2";
|
||||||
proxyJump = "home";
|
proxyJump = "home";
|
||||||
|
@ -46,26 +47,26 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
proxy = {
|
proxy = mkIf (!var.workSystem) {
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
hostname = "10.0.0.251";
|
hostname = "10.0.0.251";
|
||||||
};
|
};
|
||||||
|
|
||||||
gitea = {
|
gitea = mkIf (!var.workSystem) {
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
hostname = "10.0.0.201";
|
hostname = "10.0.0.201";
|
||||||
};
|
};
|
||||||
|
|
||||||
drone = {
|
drone = mkIf (!var.workSystem) {
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
hostname = "10.0.0.202";
|
hostname = "10.0.0.202";
|
||||||
};
|
};
|
||||||
|
|
||||||
"git.datarift.nl" = {
|
"git.datarift.nl" = {
|
||||||
hostname = "10.0.0.201";
|
hostname = (if var.workSystem then "direct.datarift.nl" else "10.0.0.201");
|
||||||
};
|
};
|
||||||
|
|
||||||
fluiddpi = {
|
fluiddpi = mkIf (!var.workSystem) {
|
||||||
hostname = "10.0.0.120";
|
hostname = "10.0.0.120";
|
||||||
user = "pi";
|
user = "pi";
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,6 +23,7 @@ in
|
||||||
# nixpkgs.config.allowUnfree = true;
|
# nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
eboskma = {
|
eboskma = {
|
||||||
|
var.workSystem = true;
|
||||||
users = {
|
users = {
|
||||||
erwin = {
|
erwin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -68,7 +69,7 @@ in
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "mimir";
|
hostName = "mimir";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
networkmanager.enable = false;
|
networkmanager.enable = true;
|
||||||
useNetworkd = true;
|
useNetworkd = true;
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|
|
@ -7,7 +7,8 @@ with lib; let
|
||||||
cfg = config.eboskma.var;
|
cfg = config.eboskma.var;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.eboskma.var.mainUser = lib.mkOption {
|
options.eboskma.var = {
|
||||||
|
mainUser = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "erwin";
|
default = "erwin";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -15,11 +16,10 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
options.eboskma.system = lib.mkOption {
|
workSystem = lib.mkOption {
|
||||||
type = lib.types.str;
|
description = "Is this system for work or home?";
|
||||||
default = "x86_64-linux";
|
type = lib.types.bool;
|
||||||
description = ''
|
default = false;
|
||||||
System type
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,6 +231,7 @@ in
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
inputs.hyprland.homeManagerModules.default
|
inputs.hyprland.homeManagerModules.default
|
||||||
|
../../modules/options
|
||||||
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
|
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ in
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
eboskma = {
|
eboskma = {
|
||||||
|
var.workSystem = true;
|
||||||
programs = {
|
programs = {
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
bat.enable = true;
|
bat.enable = true;
|
||||||
|
@ -181,6 +182,7 @@ in
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
inputs.hyprland.homeManagerModules.default
|
inputs.hyprland.homeManagerModules.default
|
||||||
|
../../modules/options
|
||||||
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
|
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
|
||||||
|
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
|
|
Loading…
Reference in a new issue