diff --git a/README.md b/README.md index 21c89372..682fc921 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,42 @@ Deployment: Used as kde config finder, in `~./config` and `~./local/share`: - `find . -type f -regex '.*\(k\|rc\|pulse\|session\|gtk\|autostart\|xbel\).*'` +### Disc encryption steps +```bash +# Cryptoroot, fs and mount +cryptsetup luksFormat /dev/nvme0n1p2 +cryptsetup luksOpen /dev/nvme0n1p2 cryptroot +mkfs.btrfs -L root /dev/mapper/cryptroot +mount /dev/disk/by-label/root /mnt/ + +# Mount boot +# change type of boot to uefi via fdisk +mkdir /mnt/boot +mount /dev/nvme0n1p1 /mnt/boot/ + +# Cryptoswap and makeswap +cryptsetup luksFormat /dev/nvme0n1p3 --label cryptoswap +cryptsetup luksOpen /dev/disk/by-label/cryptoswap swap +sudo mkswap /dev/mapper/swap -L swap + +# get hw-config +nixos-generate-config --root /mnt/ +cp /mnt/etc/nixos/hardware-configuration.nix / +vim /hardware-configuration.nix +# Append: +# swapDevices = [{ +# device = "/dev/disk/by-label/swap"; +# encrypted = { +# enable = true; +# label = "swap"; +# blkDev = "/dev/disk/by-label/cryptoswap"; +# }; +# }]; + +# Deploy config +rm -r /mnt/etc/nixos/ +cp -r dotfiles-master/dotfiles/root-conf/nixos/ /mnt/etc +cp /hardware-configuration.nix /mnt/etc/nixos/DESTINATION + +nixos-install --root /mnt --flake /mnt/etc/nixos#DESTINATION +``` diff --git a/eggs/dconfNixMain/user b/eggs/dconfNixMain/user index a8b10d9e..ac4af554 100644 Binary files a/eggs/dconfNixMain/user and b/eggs/dconfNixMain/user differ diff --git a/eggs/misc/ssh.config b/eggs/misc/ssh.config index 5483b4b4..847a3711 100644 --- a/eggs/misc/ssh.config +++ b/eggs/misc/ssh.config @@ -1,4 +1,4 @@ -Host 78.46.239.229 168.119.171.217 78.47.196.196 5.75.139.112 mail.bak-it.de web.bak-it.de forum.linksjugend-solid.de backuppc.bak-it.de login.bak-it.de stuff.bak-it.de +Host 78.46.239.229 168.119.171.217 78.47.196.196 5.75.139.112 mail.bak-it.de web.bak-it.de cloud.linksjugend-solid.de forum.linksjugend-solid.de backuppc.bak-it.de login.bak-it.de login.linksjugend-solid.de stuff.bak-it.de User root IdentityFile ~/.ssh/solidProd diff --git a/eggs/thunar/thunar/accels.scm b/eggs/thunar/thunar/accels.scm index 62ad89d6..32025e73 100644 --- a/eggs/thunar/thunar/accels.scm +++ b/eggs/thunar/thunar/accels.scm @@ -1,4 +1,4 @@ -; Thunar GtkAccelMap rc-file -*- scheme -*- +; thunar GtkAccelMap rc-file -*- scheme -*- ; this file is an automated accelerator map dump ; ; (gtk_accel_path "/ThunarDetailsView/expandable-folders" "") diff --git a/eggs/thunar/xfce/xfconf/xfce-perchannel-xml/thunar.xml b/eggs/thunar/xfce/xfconf/xfce-perchannel-xml/thunar.xml index 4a35d116..ba956d22 100644 --- a/eggs/thunar/xfce/xfconf/xfce-perchannel-xml/thunar.xml +++ b/eggs/thunar/xfce/xfconf/xfce-perchannel-xml/thunar.xml @@ -6,7 +6,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/eggs/zed/settings.json b/eggs/zed/settings.json index 8583faf2..5827b7de 100644 --- a/eggs/zed/settings.json +++ b/eggs/zed/settings.json @@ -190,7 +190,7 @@ "debugger": { "dock": "bottom", }, - "disable_ai": false, + "disable_ai": true, "terminal": { "toolbar": { "breadcrumbs": false, diff --git a/root-conf/nixos/nixLap/configuration.nix b/root-conf/nixos/nixLap/configuration.nix index 2542b4ff..960dd42c 100644 --- a/root-conf/nixos/nixLap/configuration.nix +++ b/root-conf/nixos/nixLap/configuration.nix @@ -24,26 +24,6 @@ in networking.hostName = "nixLap"; - powerManagement.enable = true; - services.power-profiles-daemon.enable = true; - # Suspend first then hibernate when closing the lid - services.logind.settings.Login.lidSwitch = "suspend-then-hibernate"; - # Hibernate on power button pressed - services.logind.settings.Login.powerKey = "hibernate"; - services.logind.settings.Login.powerKeyLongPress = "poweroff"; - - # Hibernation - boot.resumeDevice = "/dev/disk/by-label/swap"; - # resume offset from: filefrag -v /swapfile # under 0. physical offset - boot.kernelParams = ["mem_sleep_default=freeze" "resume_offset=0" ]; - - - # Define time delay for hibernation - systemd.sleep.settings.Sleep = { - HibernateDelaySec = "30m"; - SuspendState = "mem"; - }; - # Start the driver at boot systemd.services.fprintd = { wantedBy = [ "multi-user.target" ]; @@ -144,6 +124,7 @@ in users.groups.wireshark = {}; users.users.someone = { isNormalUser = true; + uid = 1000; description = "someone"; extraGroups = [ "networkmanager" "wheel" "libvirtd" "wireshark"]; packages = with pkgs; []; diff --git a/root-conf/nixos/nixMain/configuration.nix b/root-conf/nixos/nixMain/configuration.nix index d4deb663..88479229 100644 --- a/root-conf/nixos/nixMain/configuration.nix +++ b/root-conf/nixos/nixMain/configuration.nix @@ -1,7 +1,3 @@ - -# 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, pkgs-unstable, ... }: let optionalPkgs = import ../optional-packages.nix { inherit pkgs; }; @@ -18,9 +14,6 @@ in services.flatpak.enable = true; - - # Hybrantion - boot.resumeDevice = "/dev/disk/by-uuid/1942318f-792a-4c0c-9b42-6e146d835bd7"; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -44,15 +37,6 @@ in SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="gpio", MODE="0660" ''; - services.logind.settings.Login.powerKey = "ignore"; - services.logind.settings.Login.powerKeyLongPress = "ignore"; - services.logind.settings.Login.rebootKey = "ignore"; - - systemd.sleep.settings.Sleep = { - SuspendState = "freeze"; - }; - - # Enable openrgb services.hardware.openrgb.enable = true; @@ -100,6 +84,7 @@ in users.groups.gpio = {}; users.groups.wireshark = {}; users.users.someone = { + uid = 1000; isNormalUser = true; description = "someone"; extraGroups = [ "wheel" "docker" "libvirtd" "gpio" "wireshark" "adbusers" ]; @@ -115,12 +100,19 @@ in shell = pkgs.bash; }; - # Use lemurs as display manager - services.displayManager.ly = { - enable = true; - settings = { - tty = 1; + # Use ly as display manager + services.displayManager = { + ly = { + enable = true; + settings = { + tty = 1; + }; }; + autoLogin = { + enable = true; + user = "someone"; + }; + defaultSession = "hyprland"; }; # Docker @@ -168,6 +160,7 @@ in bind # dig, nslookup # Hyprland stuff + uwsm # might not be needet, test login without kitty dunst waybar diff --git a/root-conf/nixos/nixMain/hardware-configuration.nix b/root-conf/nixos/nixMain/hardware-configuration.nix index 7ac5e834..45109999 100644 --- a/root-conf/nixos/nixMain/hardware-configuration.nix +++ b/root-conf/nixos/nixMain/hardware-configuration.nix @@ -1,7 +1,7 @@ # 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, nixpkgs, modulesPath, ... }: +{ config, lib, pkgs, modulesPath, ... }: { imports = @@ -14,28 +14,26 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/4b53ce3e-72b3-4ea4-8656-e90b48da3b65"; + { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; - options = [ "subvol=@" ]; }; + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/52e65cdf-08a0-45af-87f2-d83d6a5c2321"; + fileSystems."/boot" = - { device = "/dev/disk/by-uuid/9810-0A10"; + { device = "/dev/disk/by-uuid/08D8-2E5B"; fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; + options = [ "fmask=0022" "dmask=0022" ]; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/1942318f-792a-4c0c-9b42-6e146d835bd7"; } - ]; - - # 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.enp6s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + swapDevices = [{ + device = "/dev/disk/by-label/swap"; + encrypted = { + enable = true; + label = "swap"; + blkDev = "/dev/disk/by-label/cryptoswap"; + }; + }]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/root-conf/nixos/shared-conf.nix b/root-conf/nixos/shared-conf.nix index 4953578b..27180f6b 100644 --- a/root-conf/nixos/shared-conf.nix +++ b/root-conf/nixos/shared-conf.nix @@ -36,6 +36,26 @@ networkmanager.enable = true; }; + powerManagement.enable = true; + services.power-profiles-daemon.enable = true; + # Suspend first then hibernate when closing the lid + services.logind.settings.Login.lidSwitch = "suspend-then-hibernate"; + # Hibernate on power button pressed + services.logind.settings.Login.powerKey = "hibernate"; + services.logind.settings.Login.powerKeyLongPress = "poweroff"; + + # Hibernation + boot.resumeDevice = "/dev/disk/by-label/swap"; + # resume offset from: filefrag -v /swapfile # under 0. physical offset + boot.kernelParams = ["mem_sleep_default=freeze" "resume_offset=0" ]; + + + # Define time delay for hibernation + systemd.sleep.settings.Sleep = { + HibernateDelaySec = "30m"; + SuspendState = "mem"; + }; + programs.wireshark = { enable = true; usbmon.enable = true; # Allow USB monitoring diff --git a/use_nix.sh b/use_nix.sh index 956b333a..24e1fea2 100644 --- a/use_nix.sh +++ b/use_nix.sh @@ -95,8 +95,6 @@ if [[ $UPGRADE -eq 1 ]]; then fi ARGS+="--flake /etc/nixos" -echo $ARGS - echo "Running: nixos-rebuild $ARGS" nixos-rebuild $ARGS cp /etc/nixos/flake.lock root-conf/nixos/flake.lock