diff options
Diffstat (limited to 'nix-personal')
-rw-r--r-- | nix-personal/configuration.nix | 50 | ||||
-rw-r--r-- | nix-personal/flake.nix | 5 | ||||
-rw-r--r-- | nix-personal/hosts/puppy.nix (renamed from nix-personal/disk-config.nix) | 27 | ||||
-rw-r--r-- | nix-personal/profiles/common.nix | 10 | ||||
-rw-r--r-- | nix-personal/profiles/landing/default.nix | 7 | ||||
-rw-r--r-- | nix-personal/profiles/landing/html/index.html (renamed from nix-personal/landing/index.html) | 0 | ||||
-rw-r--r-- | nix-personal/profiles/nginx.nix | 4 |
7 files changed, 48 insertions, 55 deletions
diff --git a/nix-personal/configuration.nix b/nix-personal/configuration.nix deleted file mode 100644 index 537a32e..0000000 --- a/nix-personal/configuration.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - modulesPath, - config, - lib, - pkgs, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - (modulesPath + "/profiles/qemu-guest.nix") - ./disk-config.nix - ]; - - # Basic setup - system.stateVersion = "23.11"; - - boot.loader.grub = { - # no need to set devices, disko will add all devices that have a EF02 partition to the list already - # devices = [ ]; - efiSupport = true; - efiInstallAsRemovable = true; - }; - - deployment = { - targetHost = "puppy.girlth.ing"; - buildOnTarget = true; - }; - - # SSH Access - services.openssh.enable = true; - users.users.root.openssh.authorizedKeys.keys = [ - "no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPpKjZfzPN1KxVskFRnmTTCwzyCtjwcXVZc4i1rNfl9oAAAABHNzaDo= me@aria.rip" - ]; - - # Networking setup - networking = { - hostName = "puppy"; - domain = "girlth.ing"; - }; - - # Basic nginx placeholder - networking.firewall.allowedTCPPorts = [80]; - services.nginx = { - enable = true; - virtualHosts."girlth.ing" = { - default = true; - root = ./landing; - }; - }; -} diff --git a/nix-personal/flake.nix b/nix-personal/flake.nix index e9722a4..7fe8056 100644 --- a/nix-personal/flake.nix +++ b/nix-personal/flake.nix @@ -10,7 +10,7 @@ }: let imports = [ disko.nixosModules.disko - ./configuration.nix + ./hosts/puppy.nix ]; in { devShells.x86_64-linux.default = let @@ -32,9 +32,8 @@ }; }; - # Also see the non-Flakes hive.nix example above. puppy = {...}: { - imports = imports; + inherit imports; }; }; }; diff --git a/nix-personal/disk-config.nix b/nix-personal/hosts/puppy.nix index 5fb5fbc..948b243 100644 --- a/nix-personal/disk-config.nix +++ b/nix-personal/hosts/puppy.nix @@ -1,5 +1,15 @@ -# Example to create a bios compatible gpt partition -{lib, ...}: { +{ + modulesPath, + lib, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + (modulesPath + "/profiles/qemu-guest.nix") + ../profiles/common.nix + ../profiles/landing + ]; + disko.devices = { disk.disk1 = { device = lib.mkDefault "/dev/sda"; @@ -45,4 +55,17 @@ }; }; }; + + boot.loader.grub = { + # no need to set devices, disko will add all devices that have a EF02 partition to the list already + # devices = [ ]; + efiSupport = true; + efiInstallAsRemovable = true; + }; + + networking.hostName = "puppy"; + deployment = { + targetHost = "puppy.girlth.ing"; + buildOnTarget = true; + }; } diff --git a/nix-personal/profiles/common.nix b/nix-personal/profiles/common.nix new file mode 100644 index 0000000..b4e1337 --- /dev/null +++ b/nix-personal/profiles/common.nix @@ -0,0 +1,10 @@ +{...}: { + system.stateVersion = "23.11"; + + networking.domain = "girlth.ing"; + + services.openssh.enable = true; + users.users.root.openssh.authorizedKeys.keys = [ + "no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPpKjZfzPN1KxVskFRnmTTCwzyCtjwcXVZc4i1rNfl9oAAAABHNzaDo= me@aria.rip" + ]; +} diff --git a/nix-personal/profiles/landing/default.nix b/nix-personal/profiles/landing/default.nix new file mode 100644 index 0000000..83fc770 --- /dev/null +++ b/nix-personal/profiles/landing/default.nix @@ -0,0 +1,7 @@ +{...}: { + imports = [../nginx.nix]; + services.nginx.virtualHosts."girlth.ing" = { + default = true; + root = ./.; + }; +} diff --git a/nix-personal/landing/index.html b/nix-personal/profiles/landing/html/index.html index 5d5f6be..5d5f6be 100644 --- a/nix-personal/landing/index.html +++ b/nix-personal/profiles/landing/html/index.html diff --git a/nix-personal/profiles/nginx.nix b/nix-personal/profiles/nginx.nix new file mode 100644 index 0000000..60124e2 --- /dev/null +++ b/nix-personal/profiles/nginx.nix @@ -0,0 +1,4 @@ +{...}: { + networking.firewall.allowedTCPPorts = [80]; + services.nginx.enable = true; +} |