setup desktop with nixos

This commit is contained in:
Vinzenz Schroeter 2023-08-27 13:28:13 +02:00
parent 4585904bdc
commit be2290371c
9 changed files with 106 additions and 24 deletions

View file

@ -6,5 +6,6 @@ When adding a new host:
3. copy an existing devicename.nix
5. change import to `new-devicename-hardware-configuration.nix`
6. set the hostname and optional imports in `new-devicename.nix`
7. `ln -s ./new-devicename.nix /etc/nixos/configuration`
8. apply
7. `ln -s ./new-devicename.nix /etc/nixos/configuration.nix`
8. `sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager`
9. apply

View file

@ -18,10 +18,7 @@
boot.loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
efi.canTouchEfiVariables = true;
};
networking = {

View file

@ -31,4 +31,15 @@
gnome-music
pkgs.gnome-connections
];
home-manager.users.vinzenz = {
config,
pkgs,
...
}: {
home.packages = with pkgs; [
gnome.gpaste
amberol
];
};
}

View file

@ -38,9 +38,7 @@
# gnome-secrets
tdesktop
lutris
amberol
simple-scan
gnome.gpaste
wireguard-tools
# steamlink
element-desktop

29
kde.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
services = {
# Enable the KDE Plasma Desktop Environment.
xserver = {
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
};
home-manager.users.vinzenz = {
config,
pkgs,
...
}: {
home = {
packages = with pkgs; [
];
};
services.kdeconnect = {
enable = true;
indicator = true;
};
};
}

View file

@ -1,6 +1,3 @@
# 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,
@ -12,10 +9,13 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot = {
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
initrd.kernelModules = [];
kernelModules = ["kvm-intel"];
extraModulePackages = [];
loader.efi.efiSysMountPoint = "/boot/efi";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf";

View file

@ -1,9 +0,0 @@
{...}: {
networking.hostName = "vinzenz-pc2";
imports = [
./vinzenz-pc2-hardware-configuration.nix
./common.nix
./kde.nix
];
}

View file

@ -0,0 +1,46 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ]; # "usb_storage"
initrd.kernelModules = [ ];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
loader.efi.efiSysMountPoint = "/boot";
};
fileSystems = {
"/" =
{ device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
fsType = "btrfs";
options = [ "subvol=@" ];
};
"/boot" =
{ device = "/dev/disk/by-uuid/AF67-8F16";
fsType = "vfat";
};
};
fileSystems."/sdmanjaro" =
{ device = "/dev/disk/by-uuid/b6b4c0b8-4b16-4a72-a18d-d7923a2bb532";
fsType = "btrfs";
options = [ "subvol=@" ];
};
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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

9
vinzenz-pc3.nix Normal file
View file

@ -0,0 +1,9 @@
{...}: {
networking.hostName = "vinzenz-pc3";
imports = [
./vinzenz-pc3-hardware-configuration.nix
./common.nix
./kde.nix
];
}