Add host "apogee"

This commit is contained in:
Nettika 2025-07-06 01:01:21 -07:00
parent bb53530665
commit d03bb62c23
6 changed files with 104 additions and 16 deletions

17
flake.lock generated
View file

@ -98,6 +98,22 @@
"type": "github" "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": { "phps": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -124,6 +140,7 @@
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-vicuna": "nixpkgs-vicuna",
"phps": "phps" "phps": "phps"
} }
}, },

View file

@ -3,6 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixpkgs-vicuna.url = "github:nixos/nixpkgs/nixos-24.11";
phps = { phps = {
url = "github:fossar/nix-phps"; url = "github:fossar/nix-phps";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -13,19 +14,29 @@
}; };
}; };
outputs = { self, nixpkgs, phps, agenix }: outputs = { self, nixpkgs, nixpkgs-vicuna, phps, agenix }: {
let inherit (nixpkgs.lib) nixosSystem;
in {
nixosModules.common = ./modules/common.nix; nixosModules.common = ./modules/common.nix;
nixosConfigurations = { nixosConfigurations = {
marauder = nixosSystem { marauder = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/marauder ./hosts/marauder
self.nixosModules.common self.nixosModules.common
agenix.nixosModules.default 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
]; ];
specialArgs = { inherit phps agenix; };
}; };
}; };
}; };

7
hosts/apogee/default.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [ ./gandicloud.nix ];
networking.hostName = "apogee";
promptSymbol = "🔭";
}

View file

@ -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";
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, phps, agenix, ... }: { pkgs, phps, ... }:
let let
fortune = pkgs.writeShellScript "cgi" '' fortune = pkgs.writeShellScript "cgi" ''
echo "Content-type: text/html" echo "Content-type: text/html"
@ -132,7 +132,6 @@ in {
mullvad-vpn mullvad-vpn
qbittorrent qbittorrent
system-config-printer system-config-printer
agenix.packages.x86_64-linux.default
]; ];
programs.steam = { programs.steam = {

View file

@ -7,6 +7,12 @@
}; };
config = { config = {
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
users.users.nettika = { users.users.nettika = {
@ -70,5 +76,7 @@
set -g fish_prompt_pwd_full_dirs 999 set -g fish_prompt_pwd_full_dirs 999
''; '';
}; };
documentation.man.generateCaches = false;
}; };
} }