create users desktop module
This commit is contained in:
@@ -1,99 +1,57 @@
|
||||
#
|
||||
# Specific system configuration settings for desktop
|
||||
#
|
||||
# flake.nix
|
||||
# ├─ ./hosts
|
||||
# │ └─ ./laptop
|
||||
# │ ├─ default.nix *
|
||||
# │ └─ hardware-configuration.nix
|
||||
# └─ ./modules
|
||||
# ├─ ./desktop
|
||||
# │ └─ ./hyprland
|
||||
# │ └─ hyprland.nix
|
||||
# ├─ ./modules
|
||||
# │ └─ ./programs
|
||||
# │ └─ waybar.nix
|
||||
# └─ ./hardware
|
||||
# └─ default.nix
|
||||
# Lifebook laptop — system configuration
|
||||
#
|
||||
|
||||
{ inputs, lib, config, pkgs, user, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = # For now, if applying to other system, swap files
|
||||
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
[(import ../../modules/wm/niri/default.nix)] ++ # Window Manager
|
||||
(import ../../modules/wm/virtualisation) ++ # libvirt + Docker
|
||||
[(import ../../modules/wm/virtualisation/kvm-intel.nix)] ++ # kvm module options
|
||||
(import ../../modules/hardware); # Hardware devices
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/desktop
|
||||
];
|
||||
|
||||
boot = { # Boot options
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
initrd.prepend = [ "${./patched-SSDT4}" ];
|
||||
# ── Desktop module options ──────────────────────────────────────────────
|
||||
myDesktop.windowManager = "niri";
|
||||
myDesktop.cpu = "intel";
|
||||
myDesktop.virtualisation.enable = true;
|
||||
|
||||
loader = { # EFI Boot
|
||||
systemd-boot.enable = lib.mkForce false;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
timeout = 1; # Grub auto select time
|
||||
myDesktop.laptop.enable = true;
|
||||
myDesktop.laptop.lidSwitch = "suspend-then-hibernate";
|
||||
myDesktop.laptop.hibernateDelaySec = "1h";
|
||||
|
||||
myDesktop.nitrokey.enable = true;
|
||||
|
||||
myDesktop.syncthing.enable = true;
|
||||
myDesktop.syncthing.devices = {
|
||||
"jupiter.home.opel-online.de" = { id = "T53WU6Z-3NT74ZE-PZVZB2N-7FBTZ5K-HESC2ZM-W4ABDAS-NWXHTGI-ST4CDQR"; };
|
||||
"hades.home.opel-online.de" = { id = "3VPCBVW-RH7XKFM-TWJGQHC-ZRAQ575-CQKGGKP-NAB4VXE-KCKJFUT-AMCUQQA"; };
|
||||
};
|
||||
myDesktop.syncthing.folders = {
|
||||
"Sync" = {
|
||||
path = "/home/kabbone/Sync";
|
||||
devices = [ "jupiter.home.opel-online.de" "hades.home.opel-online.de" ];
|
||||
ignorePerms = false;
|
||||
};
|
||||
};
|
||||
|
||||
myDesktop.extraSystemPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-compute-runtime
|
||||
];
|
||||
|
||||
# ── Host-specific settings ──────────────────────────────────────────────
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
initrd.prepend = [ "${./patched-SSDT4}" ];
|
||||
loader = {
|
||||
systemd-boot.enable = lib.mkForce false;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = "/boot";
|
||||
timeout = 1;
|
||||
};
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
nitrokey.enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
linux-firmware
|
||||
intel-media-driver
|
||||
intel-compute-runtime
|
||||
];
|
||||
};
|
||||
|
||||
systemd.sleep.extraConfig = "HibernateDelaySec=1h";
|
||||
services = {
|
||||
logind.settings.Login.HandleLidSwitch = "suspend-then-hibernate"; # Laptop does not go to sleep when lid is closed
|
||||
blueman.enable = true;
|
||||
avahi = { # Needed to find wireless printer
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
publish = { # Needed for detecting the scanner
|
||||
enable = true;
|
||||
addresses = true;
|
||||
userServices = true;
|
||||
};
|
||||
};
|
||||
#tailscale.enable = true;
|
||||
syncthing = {
|
||||
enable = true;
|
||||
group = "users";
|
||||
user = "kabbone";
|
||||
dataDir = "/home/${config.services.syncthing.user}/Sync";
|
||||
configDir = "/home/${config.services.syncthing.user}/.config/syncthing";
|
||||
overrideDevices = true; # overrides any devices added or deleted through the WebUI
|
||||
overrideFolders = true; # overrides any folders added or deleted through the WebUI
|
||||
openDefaultPorts = true;
|
||||
settings = {
|
||||
devices = {
|
||||
"jupiter.home.opel-online.de" = { id = "T53WU6Z-3NT74ZE-PZVZB2N-7FBTZ5K-HESC2ZM-W4ABDAS-NWXHTGI-ST4CDQR"; };
|
||||
"hades.home.opel-online.de" = { id = "3VPCBVW-RH7XKFM-TWJGQHC-ZRAQ575-CQKGGKP-NAB4VXE-KCKJFUT-AMCUQQA"; };
|
||||
};
|
||||
folders = {
|
||||
"Sync" = { # Name of folder in Syncthing, also the folder ID
|
||||
path = "/home/${config.services.syncthing.user}/Sync"; # Which folder to add to Syncthing
|
||||
devices = [ "jupiter.home.opel-online.de" "hades.home.opel-online.de" ]; # Which devices to share the folder with
|
||||
ignorePerms = false; # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
|
||||
};
|
||||
};
|
||||
};
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,49 +1,29 @@
|
||||
#
|
||||
# Home-manager configuration for laptop
|
||||
#
|
||||
# flake.nix
|
||||
# ├─ ./hosts
|
||||
# │ └─ ./laptop
|
||||
# │ └─ home.nix *
|
||||
# └─ ./modules
|
||||
# └─ ./desktop
|
||||
# └─ ./hyprland
|
||||
# └─ hyprland.nix
|
||||
# Lifebook laptop — home-manager host-specific additions
|
||||
# (WM home config is loaded by modules/desktop based on myDesktop.windowManager)
|
||||
#
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
#../../modules/wm/hyprland/home.nix # Window Manager
|
||||
../../modules/wm/niri/home.nix # Window Manager
|
||||
../../modules/home.nix # Window Manager
|
||||
];
|
||||
imports = [
|
||||
../../modules/home.nix # cmds / theme options
|
||||
];
|
||||
|
||||
home = { # Specific packages for laptop
|
||||
packages = with pkgs; [
|
||||
# Applications
|
||||
libreoffice # Office packages
|
||||
#firefox
|
||||
chromium
|
||||
thunderbird
|
||||
streamlink
|
||||
streamlink-twitch-gui-bin
|
||||
intel-gpu-tools
|
||||
pulsemixer
|
||||
|
||||
# Power Management
|
||||
#auto-cpufreq # Power management
|
||||
#tlp # Power management
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
libreoffice
|
||||
chromium
|
||||
thunderbird
|
||||
streamlink
|
||||
streamlink-twitch-gui-bin
|
||||
intel-gpu-tools
|
||||
pulsemixer
|
||||
];
|
||||
|
||||
services = { # Applets
|
||||
blueman-applet.enable = true; # Bluetooth
|
||||
network-manager-applet.enable = true; # Network
|
||||
services = {
|
||||
blueman-applet.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
};
|
||||
|
||||
xsession.preferStatusNotifierItems = true;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user