Check for work system

This commit is contained in:
Erwin Boskma 2022-11-14 18:49:06 +01:00
parent 703c3bd081
commit c18b9b3060
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU
5 changed files with 21 additions and 16 deletions

View file

@ -5,6 +5,7 @@
}:
with lib; let
cfg = config.eboskma.programs.ssh;
var = config.eboskma.var;
personalKey = "~/.ssh/id_ed25519_sk";
horusKey = "~/.ssh/id_ed25519_sk_horus";
in
@ -27,7 +28,7 @@ in
SetEnv = "TERM=xterm-256color";
};
};
home = {
home = mkIf (!var.workSystem) {
host = "home";
hostname = "10.0.0.2";
extraOptions = {
@ -36,7 +37,7 @@ in
};
};
horus = {
horus = mkIf (!var.workSystem) {
host = "horus";
hostname = "10.1.0.2";
proxyJump = "home";
@ -46,26 +47,26 @@ in
};
};
proxy = {
proxy = mkIf (!var.workSystem) {
forwardAgent = true;
hostname = "10.0.0.251";
};
gitea = {
gitea = mkIf (!var.workSystem) {
forwardAgent = true;
hostname = "10.0.0.201";
};
drone = {
drone = mkIf (!var.workSystem) {
forwardAgent = true;
hostname = "10.0.0.202";
};
"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";
user = "pi";
};

View file

@ -23,6 +23,7 @@ in
# nixpkgs.config.allowUnfree = true;
eboskma = {
var.workSystem = true;
users = {
erwin = {
enable = true;
@ -68,7 +69,7 @@ in
networking = {
hostName = "mimir";
useDHCP = false;
networkmanager.enable = false;
networkmanager.enable = true;
useNetworkd = true;
firewall = {

View file

@ -7,19 +7,19 @@ with lib; let
cfg = config.eboskma.var;
in
{
options.eboskma.var.mainUser = lib.mkOption {
options.eboskma.var = {
mainUser = lib.mkOption {
type = lib.types.str;
default = "erwin";
description = ''
The main system user
'';
};
};
options.eboskma.system = lib.mkOption {
type = lib.types.str;
default = "x86_64-linux";
description = ''
System type
'';
workSystem = lib.mkOption {
description = "Is this system for work or home?";
type = lib.types.bool;
default = false;
};
};
}

View file

@ -231,6 +231,7 @@ in
];
}
inputs.hyprland.homeManagerModules.default
../../modules/options
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
};

View file

@ -24,6 +24,7 @@ in
nixpkgs.config.allowUnfree = true;
eboskma = {
var.workSystem = true;
programs = {
alacritty.enable = true;
bat.enable = true;
@ -181,6 +182,7 @@ in
];
}
inputs.hyprland.homeManagerModules.default
../../modules/options
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
home.stateVersion = "22.11";