diff --git a/flake.lock b/flake.lock index 5d8d27b..5390d67 100755 --- a/flake.lock +++ b/flake.lock @@ -98,6 +98,22 @@ "type": "github" } }, + "nixpkgs-vicuna": { + "locked": { + "lastModified": 1751274312, + "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "phps": { "inputs": { "flake-compat": "flake-compat", @@ -124,6 +140,7 @@ "inputs": { "agenix": "agenix", "nixpkgs": "nixpkgs", + "nixpkgs-vicuna": "nixpkgs-vicuna", "phps": "phps" } }, diff --git a/flake.nix b/flake.nix index fd0af08..b19cf93 100755 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + nixpkgs-vicuna.url = "github:nixos/nixpkgs/nixos-24.11"; phps = { url = "github:fossar/nix-phps"; inputs.nixpkgs.follows = "nixpkgs"; @@ -13,20 +14,30 @@ }; }; - outputs = { self, nixpkgs, phps, agenix }: - let inherit (nixpkgs.lib) nixosSystem; - in { - nixosModules.common = ./modules/common.nix; - nixosConfigurations = { - marauder = nixosSystem { - system = "x86_64-linux"; - modules = [ - ./hosts/marauder - self.nixosModules.common - agenix.nixosModules.default - ]; - specialArgs = { inherit phps agenix; }; - }; + outputs = { self, nixpkgs, nixpkgs-vicuna, phps, agenix }: { + nixosModules.common = ./modules/common.nix; + nixosConfigurations = { + marauder = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/marauder + self.nixosModules.common + agenix.nixosModules.default + { + environment.systemPackages = + [ agenix.packages.x86_64-linux.default ]; + } + ]; + specialArgs = { inherit phps; }; + }; + apogee = nixpkgs-vicuna.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/apogee + self.nixosModules.common + agenix.nixosModules.default + ]; }; }; + }; } diff --git a/hosts/apogee/default.nix b/hosts/apogee/default.nix new file mode 100644 index 0000000..f74e348 --- /dev/null +++ b/hosts/apogee/default.nix @@ -0,0 +1,7 @@ +{ ... }: { + imports = [ ./gandicloud.nix ]; + + networking.hostName = "apogee"; + + promptSymbol = "🔭"; +} diff --git a/hosts/apogee/gandicloud.nix b/hosts/apogee/gandicloud.nix new file mode 100644 index 0000000..8df6e08 --- /dev/null +++ b/hosts/apogee/gandicloud.nix @@ -0,0 +1,46 @@ +# This is the configuration required to run NixOS on GandiCloud. +{ lib, modulesPath, ... }: { + imports = [ (modulesPath + "/virtualisation/openstack-config.nix") ]; + config = { + boot.initrd.kernelModules = [ + "xen-blkfront" + "xen-tpmfront" + "xen-kbdfront" + "xen-fbfront" + "xen-netfront" + "xen-pcifront" + "xen-scsifront" + ]; + + # Show debug kernel message on boot then reduce loglevel once booted + boot.consoleLogLevel = 7; + boot.kernel.sysctl."kernel.printk" = "4 4 1 7"; + + # For "openstack console log show" + boot.kernelParams = [ "console=ttyS0" ]; + systemd.services."serial-getty@ttyS0" = { + enable = true; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Restart = "always"; + }; + + # The device exposed by Xen + boot.loader.grub.device = lib.mkForce "/dev/xvda"; + + # This is to get a prompt via the "openstack console url show" command + systemd.services."getty@tty1" = { + enable = lib.mkForce true; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Restart = "always"; + }; + + # This is required to get an IPv6 address on our infrastructure + networking.tempAddresses = "disabled"; + + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + system.stateVersion = "24.11"; + }; +} diff --git a/hosts/marauder/default.nix b/hosts/marauder/default.nix index ab5c824..0bcdb8e 100755 --- a/hosts/marauder/default.nix +++ b/hosts/marauder/default.nix @@ -1,4 +1,4 @@ -{ pkgs, phps, agenix, ... }: +{ pkgs, phps, ... }: let fortune = pkgs.writeShellScript "cgi" '' echo "Content-type: text/html" @@ -132,7 +132,6 @@ in { mullvad-vpn qbittorrent system-config-printer - agenix.packages.x86_64-linux.default ]; programs.steam = { diff --git a/modules/common.nix b/modules/common.nix index 3750d5b..c4a9b02 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -7,6 +7,12 @@ }; config = { + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + users.defaultUserShell = pkgs.fish; users.users.nettika = { @@ -70,5 +76,7 @@ set -g fish_prompt_pwd_full_dirs 999 ''; }; + + documentation.man.generateCaches = false; }; }