mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2026-11-25 14:56:01 +01:00
rename laptop
This commit is contained in:
parent
0767bab5bd
commit
0646067843
6 changed files with 3 additions and 3 deletions
|
|
@ -117,13 +117,13 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
catbook-j = nixpkgs.lib.nixosSystem {
|
denkbrett = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags;
|
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags;
|
||||||
};
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/catbook-j/configuration.nix
|
./hosts/denkbrett/configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
|
|
||||||
100
hosts/denkbrett/configuration.nix
Normal file
100
hosts/denkbrett/configuration.nix
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"electron-25.9.0"
|
||||||
|
"electron-27.3.11"
|
||||||
|
];
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../common.nix
|
||||||
|
../../modules
|
||||||
|
./modules
|
||||||
|
];
|
||||||
|
jade = {
|
||||||
|
hwKey.pamAuth.enable = true;
|
||||||
|
desktop = {
|
||||||
|
dm.autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
delay = 5;
|
||||||
|
};
|
||||||
|
syncthing.enable = true;
|
||||||
|
kdeconnect.enable = true;
|
||||||
|
cloud.enable = true;
|
||||||
|
social.enable = true;
|
||||||
|
mail.enable = true;
|
||||||
|
gaming.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
|
hardware.usb-modeswitch.enable = true;
|
||||||
|
systemd.services."ModemManager".enable = true;
|
||||||
|
systemd.services."ModemManager".wants = ["NetworkManager.service"];
|
||||||
|
systemd.services."ModemManager".wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.wireshark.enable = true;
|
||||||
|
|
||||||
|
boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
|
||||||
|
boot.kernelParams = ["resume_offset=7380652"];
|
||||||
|
|
||||||
|
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.plantuml
|
||||||
|
pkgs.mqttui
|
||||||
|
pkgs.mobile-broadband-provider-info
|
||||||
|
pkgs.modem-manager-gui
|
||||||
|
pkgs.wireshark
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Setup keyfile
|
||||||
|
boot.initrd.secrets = {
|
||||||
|
"/crypto_keyfile.bin" = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
|
||||||
|
# networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.hostName = "denkbrett";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
|
LC_NAME = "de_DE.UTF-8";
|
||||||
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# 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 = "23.05"; # Did you read the comment?
|
||||||
|
}
|
||||||
64
hosts/denkbrett/hardware-configuration.nix
Normal file
64
hosts/denkbrett/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
# 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,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||||
|
boot.initrd.kernelModules = ["i915"];
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=@" "compress=zstd:3" "noatime"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" = {
|
||||||
|
device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=@home" "compress=zstd:3"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/swap" = {
|
||||||
|
device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=@/@swap" "noatime"];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-9cd75cce-6829-4db8-8c5c-a9fb9ec3e122".device = "/dev/disk/by-uuid/9cd75cce-6829-4db8-8c5c-a9fb9ec3e122";
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/C6CA-5DE8";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = 1024 * 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wwp0s20f0u2i12.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
6
hosts/denkbrett/modules/default.nix
Normal file
6
hosts/denkbrett/modules/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./input.nix
|
||||||
|
./graphics.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
12
hosts/denkbrett/modules/graphics.nix
Normal file
12
hosts/denkbrett/modules/graphics.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
hardware.graphics = {
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-ocl
|
||||||
|
intel-media-driver
|
||||||
|
intel-vaapi-driver
|
||||||
|
intel-compute-runtime
|
||||||
|
libvdpau-va-gl
|
||||||
|
mesa.drivers
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
27
hosts/denkbrett/modules/input.nix
Normal file
27
hosts/denkbrett/modules/input.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{...}: {
|
||||||
|
# key remapping
|
||||||
|
jade.input.remapping = {
|
||||||
|
enable = true;
|
||||||
|
devices."AT Translated Set 2 keyboard" = {
|
||||||
|
swapKeys = [
|
||||||
|
["KEY_Y" "KEY_Z"]
|
||||||
|
["KEY_LEFTALT" "KEY_LEFTMETA"]
|
||||||
|
];
|
||||||
|
dual_role = [
|
||||||
|
{
|
||||||
|
input = "KEY_CAPSLOCK";
|
||||||
|
hold = ["KEY_LEFTCTRL"];
|
||||||
|
tap = ["KEY_ESC"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.trackpoint = {
|
||||||
|
enable = true;
|
||||||
|
device = "TPPS/2 IBM TrackPoint";
|
||||||
|
sensitivity = 256;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.libinput.touchpad.tapping = true;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue