[SiriusA] Adds configuration. [MCP] Cleans up config file.
This commit is contained in:
@@ -59,6 +59,9 @@
|
|||||||
mcp = mkNixosConfig {
|
mcp = mkNixosConfig {
|
||||||
path = ./system/hosts/mcp;
|
path = ./system/hosts/mcp;
|
||||||
};
|
};
|
||||||
|
sirius-a = mkNixosConfig {
|
||||||
|
path = ./system/hosts/sirius-a;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
features = {
|
features = {
|
||||||
development = import ./home-manager/features/development/development.nix;
|
development = import ./home-manager/features/development/development.nix;
|
||||||
|
|||||||
@@ -45,12 +45,6 @@
|
|||||||
LC_TIME = "en_US.UTF-8";
|
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’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.drew = {
|
users.users.drew = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@@ -67,11 +61,9 @@
|
|||||||
linger = true;
|
linger = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile.
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
vim
|
||||||
# wget
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|||||||
76
system/hosts/sirius-a/configuration.nix
Normal file
76
system/hosts/sirius-a/configuration.nix
Normal 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"
|
||||||
|
];
|
||||||
|
}
|
||||||
18
system/hosts/sirius-a/default.nix
Normal file
18
system/hosts/sirius-a/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
26
system/hosts/sirius-a/drew.nix
Normal file
26
system/hosts/sirius-a/drew.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
47
system/hosts/sirius-a/gandicloud.nix
Normal file
47
system/hosts/sirius-a/gandicloud.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user