[SiriusA] Adds configuration. [MCP] Cleans up config file.

This commit is contained in:
2026-05-14 15:53:51 -07:00
parent 68b7915ad2
commit 3c0445b179
6 changed files with 172 additions and 10 deletions

View File

@@ -59,6 +59,9 @@
mcp = mkNixosConfig {
path = ./system/hosts/mcp;
};
sirius-a = mkNixosConfig {
path = ./system/hosts/sirius-a;
};
};
features = {
development = import ./home-manager/features/development/development.nix;

View File

@@ -45,12 +45,6 @@
LC_TIME = "en_US.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.drew = {
isNormalUser = true;
@@ -67,11 +61,9 @@
linger = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
# List packages installed in system profile.
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
vim
];
# Some programs need SUID wrappers, can be configured further or are

View File

@@ -0,0 +1,76 @@
{
pkgs,
...
}:
{
imports = [
./gandicloud.nix
];
networking = {
hostName = "sirius-a"; # Define your hostname.
# Enable networking
networkmanager.enable = true;
# Disable wpa-supplicant to avoid conflicts with network manager.
wireless.enable = false;
firewall.allowedTCPPorts = [ 22 ];
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
programs.zsh.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.drew = {
isNormalUser = true;
description = "Drew Haven";
extraGroups = [
"networkmanager"
"wheel"
"docker-registry"
"docker"
];
shell = pkgs.zsh;
# Enable linger so that systemd services run for this user are started and
# persist even without an active session.
linger = true;
};
security.sudo = {
enable = true;
extraConfig = ''
Defaults:root,%wheel timestamp_timeout=30
'';
};
system.stateVersion = "24.11"; # Did you read the comment?
# Enable flakes
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}

View File

@@ -0,0 +1,18 @@
{ ... }:
{
imports = [
./configuration.nix
../../authorized-keys.nix
../../features/gc.nix
];
nixpkgs.config.allowUnfree = true;
home-manager.users.drew =
{ ... }:
{
imports = [
./drew.nix
];
};
}

View File

@@ -0,0 +1,26 @@
{ ... }:
{
imports = map (x: ../../../home-manager + x) [
"/features/development/development.nix"
];
# This config file is needed for nix shell to allow unfree programs. I'm not
# sure why this isn't a home-manager option.
home = {
file.".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
stateVersion = "24.11";
username = "drew";
homeDirectory = "/home/drew";
};
programs.git.settings = {
user = {
name = "Drew Haven";
email = "periodic@blazestar.net";
};
};
}

View File

@@ -0,0 +1,47 @@
# 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";
};
}