From c86f3b00a9157f976d945d0730361ee506128e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 4 Feb 2024 15:31:33 +0200 Subject: [PATCH] Revert "rm -fr vm; add hm to checks" This reverts commit dd5cde36a6d325348c3eedb3429656bf7ec80995. --- flake.nix | 17 ++++++++++++-- hosts/vm/configuration.nix | 47 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 hosts/vm/configuration.nix diff --git a/flake.nix b/flake.nix index 28eda49..2e2d084 100644 --- a/flake.nix +++ b/flake.nix @@ -106,12 +106,23 @@ ]; in { + #nixosConfigurations.vm = nixpkgs.lib.nixosSystem { + # system = "x86_64-linux"; + # modules = [ + # ./hosts/vm/configuration.nix + # ./modules + # ]; + + # specialArgs = {inherit myData;} // inputs; + #}; + nixosConfigurations = { vno1-oh2 = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = [ {nixpkgs.overlays = overlays;} ./hosts/vno1-oh2/configuration.nix + ./modules agenix.nixosModules.default @@ -146,6 +157,7 @@ modules = [ {nixpkgs.overlays = overlays;} ./hosts/fwminex/configuration.nix + ./modules ./modules/profiles/desktop @@ -172,6 +184,7 @@ modules = [ {nixpkgs.overlays = overlays;} ./hosts/vno3-rp3b/configuration.nix + ./modules agenix.nixosModules.default @@ -272,8 +285,9 @@ builtins.mapAttrs ( system: deployLib: deployLib.deployChecks self.deploy + #// self.homeConfigurations.${system}.motiejusja.activationPackage // { - pre-commit-check = pre-commit-hooks.lib.${system}.run { + pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { src = ./.; hooks = { alejandra.enable = true; @@ -281,7 +295,6 @@ statix.enable = true; }; }; - hm-module = self.homeConfigurations.${system}.motiejusja.activationPackage; } ) deploy-rs.lib; diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix new file mode 100644 index 0000000..5babde4 --- /dev/null +++ b/hosts/vm/configuration.nix @@ -0,0 +1,47 @@ +{ + pkgs, + myData, + ... +}: { + mj = { + stateVersion = "23.05"; + timeZone = "UTC"; + + base.users.passwd = { + root.initialPassword = "live"; + }; + }; + + environment = { + systemPackages = with pkgs; [ + tmux + htop + ]; + }; + + services = { + nsd = { + enable = true; + interfaces = ["0.0.0.0" "::"]; + zones = { + "jakstys.lt.".data = myData.jakstysLTZone; + }; + }; + }; + + networking = { + hostName = "vm"; + domain = "jakstys.lt"; + firewall = { + allowedTCPPorts = [53]; + allowedUDPPorts = [53]; + }; + }; + + nix = { + extraOptions = '' + experimental-features = nix-command flakes + trusted-users = vm + ''; + }; +}