From 2f228d3ed02741257f48b00ffe8c4ca67ccb5daf Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 30 Nov 2024 11:59:46 +0000 Subject: [PATCH] Add colmena --- flake.nix | 22 ++++++++++++++++++++++ hosts/muho/configuration.nix | 3 --- modules/nixos/core/network.nix | 5 +++++ modules/nixos/core/nix.nix | 6 +++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index c57197a..38d293b 100644 --- a/flake.nix +++ b/flake.nix @@ -39,5 +39,27 @@ }; homeManagerModules.default = ./modules/home; + + colmena = { + meta = { + nixpkgs = import inputs.nixpkgs { inherit system; }; + + specialArgs = { inherit nixpkgs inputs system; }; + }; + + # Remote host name + "mups" = { name, nodes, ... }: { + deployment.targetHost = "muon.host"; # SSH IP + deployment.targetUser = "root"; # SSH username + + # modules + imports = [ + ./hosts/mups/configuration.nix + ./modules/nixos + inputs.home-manager.nixosModules.default + inputs.stylix.nixosModules.stylix + ]; + }; + }; }; } diff --git a/hosts/muho/configuration.nix b/hosts/muho/configuration.nix index a3154cf..e7ec3f5 100644 --- a/hosts/muho/configuration.nix +++ b/hosts/muho/configuration.nix @@ -5,9 +5,6 @@ in { # Hardware imports = [ ./hardware-configuration.nix ]; - environment.systemPackages = with inputs.nix-alien.packages.${system}; - [ nix-alien ]; - # System mods.user.name = "muon"; networking.hostName = "muho"; diff --git a/modules/nixos/core/network.nix b/modules/nixos/core/network.nix index fc2badf..50f112e 100644 --- a/modules/nixos/core/network.nix +++ b/modules/nixos/core/network.nix @@ -28,6 +28,11 @@ in with lib; { networking.networkmanager.enable = true; services.resolved.enable = true; + # udev 250 doesn't reliably reinitialize devices after restart + systemd.services.systemd-udevd.restartIfChanged = false; + systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; + systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; + services.tailscale.enable = cfg.tailscale.enable; services.openvpn.servers = mkIf cfg.openvpn.enable { diff --git a/modules/nixos/core/nix.nix b/modules/nixos/core/nix.nix index c5e42e7..acdb298 100644 --- a/modules/nixos/core/nix.nix +++ b/modules/nixos/core/nix.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, ... }: { +{ pkgs, lib, config, inputs, system, ... }: { programs.nh = { enable = true; clean.enable = true; @@ -22,5 +22,9 @@ ]; }; + environment.systemPackages = with pkgs; [ + inputs.nix-alien.packages.${system}.nix-alien + colmena + ]; programs.nix-ld.enable = true; }