From 0ce50fb0dee650714a67c681cef6505ca7caaf7d Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 5 Feb 2024 21:46:55 +0100 Subject: [PATCH] add new laptop --- modules/desktop/gnome-home.nix | 1 + modules/hardware/vinzenz-lpt2.nix | 40 +++++++++++++++++++++++++++++++ vinzenz-lpt2.nix | 28 ++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 modules/hardware/vinzenz-lpt2.nix create mode 100644 vinzenz-lpt2.nix diff --git a/modules/desktop/gnome-home.nix b/modules/desktop/gnome-home.nix index bdc0d1e..92a3635 100644 --- a/modules/desktop/gnome-home.nix +++ b/modules/desktop/gnome-home.nix @@ -34,6 +34,7 @@ in { "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; clock-show-seconds = true; + show-battery-percentage = true; }; "org/gnome/tweaks" = { show-extensions-notice = false; diff --git a/modules/hardware/vinzenz-lpt2.nix b/modules/hardware/vinzenz-lpt2.nix new file mode 100644 index 0000000..5aec4f5 --- /dev/null +++ b/modules/hardware/vinzenz-lpt2.nix @@ -0,0 +1,40 @@ +# 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" "thunderbolt" "nvme" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + boot.initrd.luks.devices."luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3".device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/E2B7-2BC1"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/vinzenz-lpt2.nix b/vinzenz-lpt2.nix new file mode 100644 index 0000000..9db0074 --- /dev/null +++ b/vinzenz-lpt2.nix @@ -0,0 +1,28 @@ +{...}: { + imports = [ + (import ./modules { + hostName = "vinzenz-lpt2"; + enableHomeManager = true; + }) + ]; + + config = { + my = { + enabledUsers = ["vinzenz"]; + tailscale.enable = true; + desktop = { + enableGnome = true; + enableGaming = true; + enablePrinting = true; + }; + buildtools = { + dotnet = true; + }; + }; + + users.users.vinzenz.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ]; + }; +}