diff --git a/hosts/meta.nix b/hosts/meta.nix new file mode 100644 index 0000000..d4312a6 --- /dev/null +++ b/hosts/meta.nix @@ -0,0 +1,39 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + res = lib.mkOption { + type = lib.types.str; + default = "1920x1080"; + description = "screen resolution"; + }; + }; + + # config = { + # age = { + # secrets = { + # zsh_remote = { + # file = ../../secrets/zsh_remote.age; + # owner = "synchronous"; + # mode = "0400"; + # }; + # tailscale-rq = { + # file = ../../secrets/tailscale-rq.age; + # owner = "synchronous"; + # mode = "0400"; + # }; + # ssh-pub = { + # file = ../../secrets/ssh-pub.age; + # owner = "synchronous"; + # mode = "0400"; + # }; + # }; + # secretsDir = "/home/synchronous/.agenix/agenix"; + # secretsMountPoint = "/home/synchronous/.agenix/agenix.d"; + # identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; + # }; + # }; +} diff --git a/hosts/rq/configuration.nix b/hosts/rq/configuration.nix index 93c920f..1bd5c16 100644 --- a/hosts/rq/configuration.nix +++ b/hosts/rq/configuration.nix @@ -7,22 +7,9 @@ imports = [ ./hardware-configuration.nix ../../system/system.nix + ../meta.nix ]; - options = { - res = lib.mkOption { - type = lib.types.str; - default = "1920x1080"; - description = "screen resolution"; - }; - - # zsh_remote = lib.mkOption { - # type = lib.types.str; - # default = "1920x1080"; - # description = "zsh remote secret"; - # }; - }; - config = { networking.hostName = "rq"; # Define your hostname. res = "2560x1440"; @@ -34,13 +21,6 @@ users.synchronous.imports = [../../home/home.nix]; }; - # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/nvme0n1"; - boot.loader.grub.useOSProber = true; - boot.loader.grub.version = 2; - services.logind.lidSwitchExternalPower = "ignore"; - age = { secrets = { zsh_remote = { @@ -59,12 +39,18 @@ mode = "0400"; }; }; - secretsDir = "/home/synchronous/.agenix/agenix"; secretsMountPoint = "/home/synchronous/.agenix/agenix.d"; identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; }; + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/nvme0n1"; + boot.loader.grub.useOSProber = true; + boot.loader.grub.version = 2; + services.logind.lidSwitchExternalPower = "ignore"; + #boot = { # loader.systemd-boot = { # enable = true; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index eada54e..9564054 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -7,17 +7,10 @@ imports = [ ./hardware-configuration.nix ../../system/system.nix + ../meta.nix ./ssh.nix ]; - options = { - res = lib.mkOption { - type = lib.types.str; - default = "1920x1080"; - description = "screen resolution"; - }; - }; - config = { networking.hostName = "server"; # Define your hostname. res = "2560x1440"; @@ -29,17 +22,6 @@ users.synchronous.imports = [../../home/home.nix]; }; - # Bootloader. - # boot.loader.grub.enable = true; - # boot.loader.grub.device = "/dev/nvme0n1"; - # boot.loader.grub.useOSProber = true; - # boot.loader.grub.version = 2; - # services.logind.lidSwitchExternalPower = "ignore"; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.grub.enable = false; - age = { secrets = { zsh_remote = { @@ -63,6 +45,17 @@ identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; }; + # Bootloader. + # boot.loader.grub.enable = true; + # boot.loader.grub.device = "/dev/nvme0n1"; + # boot.loader.grub.useOSProber = true; + # boot.loader.grub.version = 2; + # services.logind.lidSwitchExternalPower = "ignore"; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.grub.enable = false; + #boot = { # loader.systemd-boot = { # enable = true; diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index f26ab10..1b430b0 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -7,27 +7,13 @@ imports = [ ./hardware-configuration.nix ../../system/system.nix + ../meta.nix ]; - options = { - res = lib.mkOption { - type = lib.types.str; - default = "1920x1080"; - description = "screen resolution"; - }; - }; - config = { networking.hostName = "thonkpad"; # Define your hostname. res = "1366x768"; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "hm-backup"; - users.synchronous.imports = [../../home/home.nix]; - }; - age = { secrets = { zsh_remote = { @@ -46,12 +32,18 @@ mode = "0400"; }; }; - secretsDir = "/home/synchronous/.agenix/agenix"; secretsMountPoint = "/home/synchronous/.agenix/agenix.d"; identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; }; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "hm-backup"; + users.synchronous.imports = [../../home/home.nix]; + }; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.grub.enable = false; diff --git a/hosts/yoga/configuration.nix b/hosts/yoga/configuration.nix index 1aab427..1c2414a 100644 --- a/hosts/yoga/configuration.nix +++ b/hosts/yoga/configuration.nix @@ -10,13 +10,13 @@ ../../system/system.nix ]; - options = { - res = lib.mkOption { - type = lib.types.str; - default = "1920x1080"; - description = "screen resolution"; - }; - }; + # options = { + # res = lib.mkOption { + # type = lib.types.str; + # default = "1920x1080"; + # description = "screen resolution"; + # }; + # }; config = { networking.hostName = "yoga"; # Define your hostname.