WIP
This commit is contained in:
parent
855c463a93
commit
693ae383ef
16 changed files with 63 additions and 474 deletions
|
@ -1,4 +1,5 @@
|
|||
{...}: let
|
||||
{ ... }:
|
||||
let
|
||||
stage1Modules = [
|
||||
"virtio_balloon"
|
||||
"virtio_scsi"
|
||||
|
@ -15,29 +16,36 @@
|
|||
"pata_acpi"
|
||||
"ata_generic"
|
||||
];
|
||||
in {
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/354fb107-2f4a-42ad-80dd-9dddb61bfd02";
|
||||
fsType = "ext4";
|
||||
in
|
||||
{
|
||||
hardware.opinionatedDisk = {
|
||||
enable = true;
|
||||
encrypted = false;
|
||||
diskId = "virtio-virtio-paeNi8Fof9Oe";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/993cce35-cc1f-40cc-b07a-5ea58b99fb5b";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
# fileSystems."/boot" = {
|
||||
# device = "/dev/disk/by-uuid/354fb107-2f4a-42ad-80dd-9dddb61bfd02";
|
||||
# fsType = "ext4";
|
||||
# };
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/993cce35-cc1f-40cc-b07a-5ea58b99fb5b";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
# fileSystems."/" = {
|
||||
# device = "/dev/disk/by-uuid/993cce35-cc1f-40cc-b07a-5ea58b99fb5b";
|
||||
# fsType = "btrfs";
|
||||
# options = [ "subvol=root" ];
|
||||
# neededForBoot = true;
|
||||
# };
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/d16b5f4a-f38c-41c6-8aae-1625be815f9d";}];
|
||||
# fileSystems."/home" = {
|
||||
# device = "/dev/disk/by-uuid/993cce35-cc1f-40cc-b07a-5ea58b99fb5b";
|
||||
# fsType = "btrfs";
|
||||
# options = [ "subvol=home" ];
|
||||
# neededForBoot = true;
|
||||
# };
|
||||
|
||||
boot.loader.grub = {device = "/dev/vda";};
|
||||
# swapDevices = [{ device = "/dev/disk/by-uuid/d16b5f4a-f38c-41c6-8aae-1625be815f9d"; }];
|
||||
|
||||
# boot.loader.grub = { device = "/dev/vda"; };
|
||||
|
||||
boot.initrd.availableKernelModules = stage1Modules;
|
||||
boot.initrd.kernelModules = stage1Modules;
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
nixpkgs.config.packageOverrides = pkgs:
|
||||
with pkgs; {
|
||||
nixPath =
|
||||
(import ../../../default.nix {
|
||||
versionsPath = ./versions.nix;
|
||||
})
|
||||
.nixPath;
|
||||
}).nixPath;
|
||||
};
|
||||
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix {
|
||||
inherit pkgs;
|
||||
|
@ -25,11 +23,11 @@
|
|||
};
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "localhost";
|
||||
system = "x86_64-linux";
|
||||
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
||||
maxJobs = 4;
|
||||
}
|
||||
# {
|
||||
# hostName = "localhost";
|
||||
# system = "x86_64-linux";
|
||||
# supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
||||
# maxJobs = 4;
|
||||
# }
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
keys = import ../../../variables/keys.nix;
|
||||
in {
|
||||
nix.binaryCaches = ["https://cache.holo.host"];
|
||||
|
||||
nix.binaryCachePublicKeys = [
|
||||
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
|
||||
"cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ="
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
# TASK: new device
|
||||
networking.hostName = "sj-pvehtz-0"; # Define your hostname.
|
||||
networking.hostName = "sj-pvehtz0"; # Define your hostname.
|
||||
# networking.domain = "";
|
||||
|
||||
networking.firewall.enable = true;
|
||||
|
@ -35,7 +29,7 @@ in {
|
|||
"prefixLength" = 29;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [];
|
||||
ipv6.addresses = [ ];
|
||||
};
|
||||
|
||||
networking.defaultGateway = {
|
||||
|
@ -48,11 +42,11 @@ in {
|
|||
interface = "eth0";
|
||||
};
|
||||
|
||||
networking.nameservers = ["1.1.1.1"];
|
||||
networking.nameservers = [ "1.1.1.1" ];
|
||||
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = ["ve-+"];
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
externalInterface = "eth0";
|
||||
};
|
||||
|
||||
|
@ -60,35 +54,12 @@ in {
|
|||
# services.kubernetes.roles = ["master" "node"];
|
||||
|
||||
# virtualization
|
||||
virtualisation = {docker.enable = true;};
|
||||
virtualisation = { docker.enable = true; };
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
systemd.services."sshd-status" = {
|
||||
enable = true;
|
||||
description = "sshd-status service";
|
||||
path = [pkgs.systemd];
|
||||
script = ''
|
||||
systemctl status sshd | grep -i tasks
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.sshd.serviceConfig = {TasksMax = 32;};
|
||||
|
||||
systemd.timers."sshd-status" = {
|
||||
description = "Timer to trigger sshd-status periodically";
|
||||
enable = true;
|
||||
wantedBy = ["timer.target" "multi-user.target"];
|
||||
timerConfig = {
|
||||
OnActiveSec = "360s";
|
||||
OnUnitActiveSec = "360s";
|
||||
AccuracySec = "1s";
|
||||
Unit = "sshd-status.service";
|
||||
};
|
||||
};
|
||||
|
||||
nix.gc = {automatic = true;};
|
||||
nix.gc = { automatic = true; };
|
||||
|
||||
networking.useHostResolvConf = true;
|
||||
|
||||
|
@ -100,5 +71,5 @@ in {
|
|||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "20.09"; # Did you read the comment?
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -1,37 +1,18 @@
|
|||
let
|
||||
nixpkgs = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-21.11";
|
||||
ref = "nixos-22.11";
|
||||
rev = "e34c5379866833f41e2a36f309912fa675d687c7";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit nixpkgs;
|
||||
"channels-nixos-stable" = nixpkgs;
|
||||
"channels-nixos-21.05" = {
|
||||
"channels-nixos-22.11" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-21.05";
|
||||
ref = "nixos-22.11";
|
||||
rev = "";
|
||||
};
|
||||
"channels-nixos-20.09" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-20.09";
|
||||
rev = "1c1f5649bb9c1b0d98637c8c365228f57126f361";
|
||||
};
|
||||
"channels-nixos-20.03" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-20.03";
|
||||
rev = "1db42b7fe3878f3f5f7a4f2dc210772fd080e205";
|
||||
};
|
||||
"channels-nixos-19.09" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-19.09";
|
||||
rev = "75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1";
|
||||
};
|
||||
"channels-nixos-unstable" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-unstable";
|
||||
rev = "c71f061c68ba8ce53471b767d5049cbd0f3d8490";
|
||||
};
|
||||
"nixpkgs-master" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "master";
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
let
|
||||
nixpkgs = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-21.11";
|
||||
ref = "nixos-22.11";
|
||||
rev = ''
|
||||
<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '
|
||||
' -%>'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit nixpkgs;
|
||||
"channels-nixos-stable" = nixpkgs;
|
||||
"channels-nixos-21.05" = {
|
||||
"channels-nixos-22.11" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-21.05";
|
||||
ref = "nixos-22.11";
|
||||
rev = ''
|
||||
<% git ls-remote https://github.com/nixos/nixpkgs nixos-20.05 | awk '{ print $1 }' | tr -d '
|
||||
' -%>'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue