This commit is contained in:
Erwin Boskma 2022-11-11 12:51:48 +01:00
parent 2bdd175d38
commit 1bd21593bf
Signed by: erwin
SSH key fingerprint: SHA256:Vw4O4qA0i5x65Y7yyjDpWDCSMSXAhqT4X7cJ3frdnLY
7 changed files with 59 additions and 285 deletions

View file

@ -89,15 +89,18 @@
++ [
{
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nixpkgs.overlays = [
self.overlays.default
ha-now-playing.overlays.${system}
pamedia.overlays.${system}
] ++ nixpkgs.lib.optional (system == "aarch64-linux")
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // { allowMissing = true; });
});
nixpkgs = {
overlays = [
self.overlays.default
ha-now-playing.overlays.${system}
pamedia.overlays.${system}
] ++ nixpkgs.lib.optional (system == "aarch64-linux")
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // { allowMissing = true; });
});
};
}
baseConfig

View file

@ -15,6 +15,9 @@
loki = {
config = (import ./loki/configuration.nix inputs);
};
mimir = {
config = (import ./mimir/configuration.nix inputs);
};
proxy = {
config = (import ./proxy/configuration.nix inputs);
};

View file

@ -2,15 +2,16 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, nixos-hardware, ... }:
{ self, nixpkgs, nixos-hardware, ... }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
{
imports =
[
# Include the results of the hardware scan.
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-gpu-nvidia
nixos-hardware.nixosModules.common-pc-ssd
./hardware-configuration.nix
@ -19,11 +20,14 @@
../../users/root
];
nixpkgs.config.allowUnfree = true;
eboskma = {
users = {
erwin = {
enable = true;
work = true;
terminal = "Alacritty";
};
};
@ -61,7 +65,7 @@
networking = {
hostName = "mimir";
useDHCP = false;
networkManager.enable = true;
networkmanager.enable = true;
useNetworkd = true;
firewall = {

View file

@ -4,281 +4,48 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ];
boot.extraModulePackages = [ ] ++
(with config.boot.kernelPackages; [ rtl88x2bu zenpower ]);
boot.extraModprobeConfig = ''
options amd-pstate shared_mem=true
'';
fileSystems."/" =
{
device = "/dev/disk/by-uuid/a07b9942-e77a-4ba7-b766-ad9d94d6bfb7";
device = "/dev/disk/by-label/root";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{
device = "/dev/disk/by-uuid/5200-060F";
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
fileSystems."/recovery" =
{
device = "/dev/disk/by-uuid/5200-3497";
fsType = "vfat";
};
fileSystems."/snap/kde-frameworks-5-core18/32" =
{
device = "/var/lib/snapd/snaps/kde-frameworks-5-core18_32.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/lxd/17629" =
{
device = "/var/lib/snapd/snaps/lxd_17629.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/gnome-3-28-1804/145" =
{
device = "/var/lib/snapd/snaps/gnome-3-28-1804_145.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/backup" =
{
device = "/dev/disk/by-uuid/87a9da5a-3eb4-4e2b-8bb0-de1c0e660048";
fsType = "btrfs";
};
fileSystems."/yocto" =
{
device = "/dev/disk/by-uuid/5ce7439d-7ff9-4bb1-ab63-d69feb899cfe";
fsType = "ext4";
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/ff039faf-f7d7-4c5b-b6dc-50482b9af677";
device = "/dev/disk/by-label/home";
fsType = "ext4";
};
fileSystems."/snap/bare/5" =
{
device = "/var/lib/snapd/snaps/bare_5.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core/13741" =
{
device = "/var/lib/snapd/snaps/core_13741.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core/13886" =
{
device = "/var/lib/snapd/snaps/core_13886.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core18/2566" =
{
device = "/var/lib/snapd/snaps/core18_2566.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core18/2620" =
{
device = "/var/lib/snapd/snaps/core18_2620.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core20/1634" =
{
device = "/var/lib/snapd/snaps/core20_1634.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core20/1695" =
{
device = "/var/lib/snapd/snaps/core20_1695.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/core22/310" =
{
device = "/var/lib/snapd/snaps/core22_310.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/doctl/1096" =
{
device = "/var/lib/snapd/snaps/doctl_1096.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/doctl/1122" =
{
device = "/var/lib/snapd/snaps/doctl_1122.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/gnome-3-28-1804/161" =
{
device = "/var/lib/snapd/snaps/gnome-3-28-1804_161.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/gnome-3-34-1804/72" =
{
device = "/var/lib/snapd/snaps/gnome-3-34-1804_72.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/gnome-3-34-1804/77" =
{
device = "/var/lib/snapd/snaps/gnome-3-34-1804_77.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/go/9952" =
{
device = "/var/lib/snapd/snaps/go_9952.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/go/9981" =
{
device = "/var/lib/snapd/snaps/go_9981.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/gtk-common-themes/1534" =
{
device = "/var/lib/snapd/snaps/gtk-common-themes_1534.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/gtk-common-themes/1535" =
{
device = "/var/lib/snapd/snaps/gtk-common-themes_1535.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/lxi-tools/1563" =
{
device = "/var/lib/snapd/snaps/lxi-tools_1563.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/lxi-tools/1577" =
{
device = "/var/lib/snapd/snaps/lxi-tools_1577.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/snapcraft/8513" =
{
device = "/var/lib/snapd/snaps/snapcraft_8513.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/snapcraft/8528" =
{
device = "/var/lib/snapd/snaps/snapcraft_8528.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/snapd/17029" =
{
device = "/var/lib/snapd/snaps/snapd_17029.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/snapd/17336" =
{
device = "/var/lib/snapd/snaps/snapd_17336.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/yq/1805" =
{
device = "/var/lib/snapd/snaps/yq_1805.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/snap/yq/1920" =
{
device = "/var/lib/snapd/snaps/yq_1920.snap";
fsType = "squashfs";
options = [ "loop" ];
};
fileSystems."/var/lib/docker/overlay2/4e29ec585458a234ac12358c1f1916710e9280d18f3055db6f9a872e3f3ceacc/merged" =
{
device = "overlay";
fsType = "overlay";
};
fileSystems."/var/lib/docker/overlay2/1f0b089d78d0820ce1858129b6af0b957d8e63d7a10664d6c469cc092cb8465c/merged" =
{
device = "overlay";
fsType = "overlay";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/82969dda-8804-4314-b916-2d4b5db904d5"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.br-0d184fb18be7.useDHCP = lib.mkDefault true;
# networking.interfaces.br-ce69977bdefc.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.veth8f1e18a.useDHCP = lib.mkDefault true;
# networking.interfaces.vethbb81f0b.useDHCP = lib.mkDefault true;
# networking.interfaces.virbr0.useDHCP = lib.mkDefault true;
# networking.interfaces.wg0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = "ondemand";
hardware = {
video.hidpi.enable = true;
enableAllFirmware = true;
nixpkgs.hostPlatform = lib.mkDefault warning: the group 'nixbld' specified in 'build-users-group' does not exist;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
opengl = {
extraPackages = with pkgs; [
vaapiVdpau
];
};
};
services.xserver.videoDrivers = [ "nvidia" ];
}

View file

@ -20,7 +20,7 @@ in
};
config =
mkIf cfg.desktop {
mkIf cfg.home {
home-manager.users.erwin = {
_module.args.flake-inputs = inputs;

View file

@ -6,11 +6,6 @@ in
{
options.eboskma.users.erwin = {
work = mkEnableOption "work profile";
terminal = mkOption {
type = types.str;
default = "Alacritty";
description = "Terminal emulator to use. Specify the .desktop filename, e.g. 'foot' or 'Alacritty'";
};
};
config = mkIf (cfg.work) {
@ -23,7 +18,7 @@ in
home.username = "erwin";
home.homeDirectory = "/home/erwin";
home.sessionVariables = {
EDITOR = "${config.eboskma.programs.emacs.package}/bin/emacsclient -c";
EDITOR = "${config.home-manager.users.erwin.eboskma.programs.emacs.package}/bin/emacsclient -c";
};
nixpkgs.config = { allowUnfree = true; };
@ -42,7 +37,7 @@ in
enable = true;
work = true;
};
fish.enabel = true;
fish.enable = true;
git = {
enable = true;
name = "Erwin Boskma";
@ -69,10 +64,10 @@ in
};
}
];
rofi.enable = true;
ssh.enable = true;
zellij.enable = true;
};
rofi.enable = true;
ssh.enable = true;
zellij.enable = true;
};
services = {
xbanish.enable = true;
@ -80,11 +75,11 @@ in
};
home.keyboard = {
layout = "us,us";
variant = "colemak,";
model = "pc105";
options = [ "ctrl:nocaps" "eurosign:5" "lv5:ralt_switch" "lv3:rwin_switch" "grp:shifts_toggle" "grp_led:caps" ];
};
layout = "us,us";
variant = "colemak,";
model = "pc105";
options = [ "ctrl:nocaps" "eurosign:5" "lv5:ralt_switch" "lv3:rwin_switch" "grp:shifts_toggle" "grp_led:caps" ];
};
home.packages = with pkgs; [
atool
@ -185,11 +180,12 @@ in
inputs.emacs-overlay.overlay
];
}
inputs.hyprland.homeManagerModules.default
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
home.stateVersion = "22.11";
};
programs.wireshark = {
enable = true;
package = pkgs.wireshark;

View file

@ -1,5 +1,6 @@
{ pkgs, ... }: {
users.users.root = {
initialHashedPassword = "";
openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl {
url = "https://github.com/eboskma.keys";