diff --git a/flake.lock b/flake.lock index c646fe8..7a8ac69 100644 --- a/flake.lock +++ b/flake.lock @@ -296,11 +296,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1749195551, - "narHash": "sha256-W5GKQHgunda/OP9sbKENBZhMBDNu2QahoIPwnsF6CeM=", + "lastModified": 1749832440, + "narHash": "sha256-lfxhuxAaHlYFGr8yOrAXZqdMt8PrFLzjVqH9v3lQaoY=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "4602f7e1d3f197b3cb540d5accf5669121629628", + "rev": "db030f62a449568345372bd62ed8c5be4824fa49", "type": "github" }, "original": { @@ -312,11 +312,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1749285348, - "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "lastModified": 1749794982, + "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", "type": "github" }, "original": { @@ -328,11 +328,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1749237914, - "narHash": "sha256-N5waoqWt8aMr/MykZjSErOokYH6rOsMMXu3UOVH5kiw=", + "lastModified": 1749727998, + "narHash": "sha256-mHv/yeUbmL91/TvV95p+mBVahm9mdQMJoqaTVTALaFw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "70c74b02eac46f4e4aa071e45a6189ce0f6d9265", + "rev": "fd487183437963a59ba763c0cc4f27e3447dd6dd", "type": "github" }, "original": { @@ -403,11 +403,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1749389855, - "narHash": "sha256-//wZBnlBJ7Ki5/ZdafiAZwVFZd/2HhKqEbOupo/HcRA=", + "lastModified": 1749908208, + "narHash": "sha256-0nf9P4kRAzsBvf5jbY7M3NlnGSwBzU50kJAYGZH5Ez4=", "owner": "danth", "repo": "stylix", - "rev": "bf5ab9df57a3d77847289c39c3a537bd6e6ac6f4", + "rev": "67c8eca32f1baf158ffb9a56f28a2fc8e9852fb0", "type": "github" }, "original": { diff --git a/hosts/ext-julia/default.nix b/hosts/ext-julia/default.nix index 92c90f8..0128b09 100644 --- a/hosts/ext-julia/default.nix +++ b/hosts/ext-julia/default.nix @@ -1,37 +1,37 @@ -{pkgs, ...}:{ +{pkgs, rootPath, lib, ...}:{ imports = [ ./boot.nix ./hardware-configuration.nix + (rootPath + /system_profiles/server.nix) + (rootPath + /modules/pkg_mgrmnt/unattended-updates.nix) - #../../modules/hosting/wordpress-simple/kiezpalme.nix - #../../modules/hosting/wordpress-simple/pertineo.nix - ../../modules/hosting/wordpress.nix - ../../modules/sec_auth/ssh-server.nix - - ../../system_profiles/server.nix + (rootPath + /modules/hosting/wordpress-simple/kiezpalme.nix) + (rootPath + /modules/hosting/wordpress-simple/pertineo.nix) + #(rootPath + /modules/hosting/wordpress.nix) ]; - #services.mysql = { + services.mysql = { + enable = true; + package = pkgs.mariadb; + settings.mysqld.bind-address = "127.0.0.1"; + }; + + #services.cWordpress."example-site" = { # enable = true; - # package = pkgs.mariadb; + # sitePort = 80; #}; - services.cWordpress."example-site" = { - enable = true; - sitePort = 80; - }; + #services.cWordpress."example-site2" = { + # enable = true; + # sitePort = 81; + #}; - services.cWordpress."example-site2" = { - enable = true; - sitePort = 81; - }; - - services.openssh.ports = [11522]; + services.openssh.ports = lib.mkForce [11522]; users = let username = "root"; in { users."${username}".openssh.authorizedKeys.keyFiles = [ - ../../certificates/id_ed25519_ext-julia.pub + (rootPath + /certificates/id_ed25519_ext-julia.pub) ]; }; } diff --git a/hosts/ext-julia/hardware-configuration.nix b/hosts/ext-julia/hardware-configuration.nix index 1e4a7ab..e26ed92 100644 --- a/hosts/ext-julia/hardware-configuration.nix +++ b/hosts/ext-julia/hardware-configuration.nix @@ -6,10 +6,6 @@ modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - boot = { initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; initrd.kernelModules = []; diff --git a/hosts/game-luanti/default.nix b/hosts/game-luanti/default.nix index c69c055..cbac390 100644 --- a/hosts/game-luanti/default.nix +++ b/hosts/game-luanti/default.nix @@ -1,20 +1,18 @@ -{ +{rootPath, ...}: { imports = [ ./boot.nix ./hardware-configuration.nix + (rootPath + /system_profiles/server.nix) - ../../modules/game/server/luanti - ../../modules/sec_auth/ssh-server.nix - ../../modules/pkg_mgrmnt/unattended-updates.nix - - ../../system_profiles/server.nix + (rootPath + /modules/game/server/luanti) + (rootPath + /modules/pkg_mgrmnt/unattended-updates.nix) ]; users = let username = "root"; in { users."${username}".openssh.authorizedKeys.keyFiles = [ - ../../certificates/id_ed25519_game-luanti.pub + (rootPath + /certificates/id_ed25519_game-luanti.pub) ]; }; diff --git a/hosts/game-luanti/hardware-configuration.nix b/hosts/game-luanti/hardware-configuration.nix index 6bbf7a7..e26ed92 100644 --- a/hosts/game-luanti/hardware-configuration.nix +++ b/hosts/game-luanti/hardware-configuration.nix @@ -6,9 +6,6 @@ modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; boot = { initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; initrd.kernelModules = []; diff --git a/hosts/jitsi/default.nix b/hosts/jitsi/default.nix deleted file mode 100644 index a13ea41..0000000 --- a/hosts/jitsi/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{...}: { - nixpkgs.config = { - # Disable if you don't want unfree packages - allowUnfree = true; - }; - - imports = [ - ./hardware-configuration.nix - - ../../system_profiles/defaults.nix - ../../system_profiles/mini-container.nix - ]; -} diff --git a/hosts/jitsi/hardware-configuration.nix b/hosts/jitsi/hardware-configuration.nix deleted file mode 100644 index f8c86aa..0000000 --- a/hosts/jitsi/hardware-configuration.nix +++ /dev/null @@ -1,3 +0,0 @@ -{lib, ...}: { - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/hosts/srv-videoconf/default.nix b/hosts/srv-videoconf/default.nix new file mode 100644 index 0000000..a1a0222 --- /dev/null +++ b/hosts/srv-videoconf/default.nix @@ -0,0 +1,7 @@ +{rootPath, ...}: { + imports = [ + ./hardware-configuration.nix + + (rootPath + /system_profiles/server.nix) + ]; +} diff --git a/hosts/srv-videoconf/hardware-configuration.nix b/hosts/srv-videoconf/hardware-configuration.nix new file mode 100644 index 0000000..e26ed92 --- /dev/null +++ b/hosts/srv-videoconf/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + lib, + modulesPath, + ... +}: { + boot = { + initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + initrd.kernelModules = []; + kernelModules = []; + extraModulePackages = []; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/d290e12c-d93c-45f6-b737-135b551c1951"; + fsType = "ext4"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/8c56f52e-568a-4e03-b22c-6d1c7de7c118";} + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/modules/default.nix b/modules/default.nix index e1045b5..a2abd41 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -11,7 +11,6 @@ ./locale.nix ./networking.nix #./plymouth.nix # increases boot time too much - #./serial-console.nix # probably only for servers ./theming.nix ]; } diff --git a/outputs.nix b/outputs.nix index 67d0073..5c64096 100644 --- a/outputs.nix +++ b/outputs.nix @@ -15,11 +15,11 @@ in { nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) { crocoite = {stateVersion = "24.05";}; - #jitsi = {stateVersion = "24.11";}; + #srv-videoconf = {stateVersion = "24.11";}; game-luanti = {stateVersion = "25.05";}; - #ext-julia = {stateVersion = "24.11";}; + ext-julia = {stateVersion = "25.05";}; }; # Your custom packages diff --git a/system_profiles/components/nixpkgs-ng.nix b/system_profiles/components/nixpkgs-ng.nix new file mode 100644 index 0000000..4321bdd --- /dev/null +++ b/system_profiles/components/nixpkgs-ng.nix @@ -0,0 +1,5 @@ +{ + system = { + rebuild.enableNg = false; + }; +} diff --git a/system_profiles/components/qemu.nix b/system_profiles/components/qemu.nix new file mode 100644 index 0000000..39b817d --- /dev/null +++ b/system_profiles/components/qemu.nix @@ -0,0 +1,6 @@ +{modulesPath, ...}; { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + services.qemuGuest.enable = true; +} diff --git a/modules/serial-console.nix b/system_profiles/components/serial-console.nix similarity index 100% rename from modules/serial-console.nix rename to system_profiles/components/serial-console.nix diff --git a/system_profiles/desktop.nix b/system_profiles/desktop.nix index c2da4f2..dc96afc 100644 --- a/system_profiles/desktop.nix +++ b/system_profiles/desktop.nix @@ -1,6 +1,7 @@ { imports = [ ./components/nix-defaults.nix + #./components/nixpkgs-ng.nix ./importers/desktop.nix ./importers/general.nix diff --git a/system_profiles/importers/server.nix b/system_profiles/importers/server.nix index 66f1e60..4e0c313 100644 --- a/system_profiles/importers/server.nix +++ b/system_profiles/importers/server.nix @@ -1,6 +1,7 @@ {rootPath, ...}: { imports = [ (rootPath + /modules/customisation.nix) + (rootPath + /modules/sec_auth/ssh-server.nix) (rootPath + /modules/software/neovim.nix) (rootPath + /modules/software/packages/core.nix) ]; diff --git a/system_profiles/server.nix b/system_profiles/server.nix index 8810958..56b00fe 100644 --- a/system_profiles/server.nix +++ b/system_profiles/server.nix @@ -2,6 +2,7 @@ imports = [ ./components/minify.nix ./components/nix-defaults.nix + ./components/qemu.nix ./importers/general.nix ./importers/server.nix