make * composable; add install medium; archive prevoius code
This commit is contained in:
parent
5ab3bfc58c
commit
93b1488bd9
74 changed files with 955 additions and 1132 deletions
22
nixos/devices/steveej-laptop/boot.nix
Normal file
22
nixos/devices/steveej-laptop/boot.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Bootloader, initrd and Kernel
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.enableCryptodisk = true;
|
||||
boot.loader.grub.version = 2;
|
||||
|
||||
# workaround to disable CPU wining
|
||||
# current CPU has 9 idle cstates.
|
||||
boot.kernelParams = [ "intel_idle.max_cstate=9" ];
|
||||
|
||||
# Workaround for nm-pptp to enforce module load
|
||||
boot.kernelModules = [
|
||||
"nf_conntrack_proto_gre"
|
||||
"nf_conntrack_pptp"
|
||||
];
|
||||
|
||||
boot.tmpOnTmpfs = true;
|
||||
}
|
14
nixos/devices/steveej-laptop/configuration.nix
Normal file
14
nixos/devices/steveej-laptop/configuration.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../profiles/common/configuration.nix
|
||||
../../profiles/graphical/configuration.nix
|
||||
|
||||
./pkg.nix
|
||||
./system.nix
|
||||
./hw.nix
|
||||
./user.nix
|
||||
./boot.nix
|
||||
];
|
||||
}
|
67
nixos/devices/steveej-laptop/hw.nix
Normal file
67
nixos/devices/steveej-laptop/hw.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.maxJobs = 3;
|
||||
nix.buildCores = 3;
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.trackpoint.emulateWheel = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm-intel nested=1
|
||||
options kvm-intel enable_shadow_vmcs=1
|
||||
options kvm-intel enable_apicv=1
|
||||
options kvm-intel ept=1
|
||||
'';
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/445D-DBAA";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/948e84dc-5c4f-4051-8a13-efb30155839f";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/948e84dc-5c4f-4051-8a13-efb30155839f";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/rkt" = {
|
||||
fsType = "tmpfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/cni" = {
|
||||
fsType = "tmpfs";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ label = "vg0swap"; }
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
device = "/dev/sda";
|
||||
efiSupport = true;
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices = [ {
|
||||
name = "btrfsroot";
|
||||
device = "/dev/disk/by-uuid/0e6b5751-0e6d-4de7-84c3-17fe525c4c72";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
}
|
63
nixos/devices/steveej-laptop/pkg.nix
Normal file
63
nixos/devices/steveej-laptop/pkg.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ config,
|
||||
pkgs,
|
||||
... }:
|
||||
|
||||
let
|
||||
gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {};
|
||||
unstablepkgs = import <nixos-unstable> {};
|
||||
|
||||
in
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowBroken = false;
|
||||
allowUnfree = true;
|
||||
|
||||
packageOverrides = pkgs: rec {
|
||||
libvirt = unstablepkgs.libvirt;
|
||||
|
||||
myLinuxPackages = pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor
|
||||
(pkgs.linux_latest.override {
|
||||
kernelPatches = pkgs.linux_latest.kernelPatches ++ [
|
||||
{
|
||||
name = "bfq1";
|
||||
patch = pkgs.fetchurl {
|
||||
url = "ftp://teambelgium.net/bfq/patches/4.7.0-v8r3/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.7.0.patch";
|
||||
sha256 = "116jfdgjgmy1fv6kzz7dm1c7rjy1pbsfzzcjv5mgsb7pnaxq3gd6";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "bfq2";
|
||||
patch = pkgs.fetchurl {
|
||||
url = "ftp://teambelgium.net/bfq/patches/4.7.0-v8r3/0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.7.0.patch";
|
||||
sha256 = "0wjmnym2ycglx42f513n97b45x3xqi33q7z4cs0aiz0zbblm8jql";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "bfq3";
|
||||
patch = pkgs.fetchurl {
|
||||
url = "ftp://teambelgium.net/bfq/patches/4.7.0-v8r3/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch";
|
||||
sha256 = "0898aklynxb9dr0nb0kdhc2incjkjihds9dakxvdy0mwjqr0jd6v";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "bfq4";
|
||||
patch = pkgs.fetchurl {
|
||||
url = "ftp://teambelgium.net/bfq/patches/4.7.0-v8r3/0004-block-bfq-turn-BFQ-v7r11-for-4.7.0-into-BFQ-v8r3-for.patch";
|
||||
sha256 = "09ya3g39zk9k3hzjx4fkl60qkxdgzllnx3kk9dyi7lvydmhp4y6v";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
BFQ_GROUP_IOSCHED y
|
||||
IOSCHED_BFQ y
|
||||
DEFAULT_BFQ y
|
||||
'';
|
||||
})
|
||||
pkgs.linuxPackages_latest
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
}
|
57
nixos/devices/steveej-laptop/system.nix
Normal file
57
nixos/devices/steveej-laptop/system.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
unstablepkgs = import <nixos-unstable> {};
|
||||
|
||||
in rec {
|
||||
# The NixOS release to be compatible with for stateful data such as databases.
|
||||
# system.stateVersion = "unstable";
|
||||
|
||||
networking.hostName = "steveej-laptop"; # Define your hostname.
|
||||
|
||||
# Used for testing local Tectonic clusters
|
||||
environment.etc."NetworkManager/dnsmasq.d/tectonic.conf".text = ''
|
||||
server=/tt.testing/192.168.124.1
|
||||
server=/tectonic-ci.de/192.168.124.1
|
||||
server=/tectonic-ci.lan/192.168.124.1
|
||||
'';
|
||||
networking.firewall.checkReversePath = false;
|
||||
|
||||
networking.bridges."virbr1".interfaces = [];
|
||||
networking.interfaces."virbr1".ipv4.addresses = [
|
||||
{ address = "10.254.254.254"; prefixLength = 24; }
|
||||
];
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
pkgs.hplip
|
||||
unstablepkgs.cups-kyodialog3
|
||||
unstablepkgs.mfcj6510dwlpr
|
||||
unstablepkgs.mfcj6510dw-cupswrapper
|
||||
];
|
||||
};
|
||||
|
||||
services.nix-serve.enable = true;
|
||||
|
||||
services.fprintd.enable = true;
|
||||
security.pam.services = {
|
||||
login.fprintAuth = true;
|
||||
sudo.fprintAuth = true;
|
||||
};
|
||||
|
||||
# Kubernetes
|
||||
# services.kubernetes.roles = ["master" "node"];
|
||||
|
||||
# virtualization
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
virtualbox.host.enable = true;
|
||||
virtualbox.host.addNetworkInterface = true;
|
||||
docker.enable = true;
|
||||
};
|
||||
}
|
18
nixos/devices/steveej-laptop/user.nix
Normal file
18
nixos/devices/steveej-laptop/user.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, ... }:
|
||||
|
||||
let
|
||||
inherit (import ../../lib/default.nix { }) mkUser;
|
||||
|
||||
in
|
||||
{
|
||||
users.extraUsers.steveej2 = mkUser {
|
||||
uid = 1001;
|
||||
};
|
||||
|
||||
users.extraUsers.steveej3 = mkUser {
|
||||
uid = 1002;
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue