diff --git a/instances/minos/configuration.nix b/instances/minos/configuration.nix index 018c8727..31685c6b 100644 --- a/instances/minos/configuration.nix +++ b/instances/minos/configuration.nix @@ -6,76 +6,77 @@ ... }: { + imports = [ + (import { device = "lenovo-krane"; }) + ./hardware-configuration.nix + # + ]; nixpkgs.system = "aarch64-linux"; - # nix.package = pkgs.nix; - nixpkgs.buildPlatform = { system = "x86_64-linux"; }; - nixpkgs.hostPlatform = { system = "aarch64-linux"; }; - imports = [ (import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "lenovo-krane";} ) ]; - mobile.boot.stage-1.kernel.useStrictKernelConfig = lib.mkDefault true; - # hardware.keyboard.zsa.enable = true; - services.gnome.core-utilities.enable = lib.mkForce false; - users.users.root.initialPassword = "hunter2"; - # users.users.xyno.initialPassword = "hunter2"; - # home-manager.users.${config.xyno.system.user.name} = ( - # { ... }: - # { - # xyno.git.enable = true; - # xyno.borgmatic.enable = true; - # home.packages = [ - # # work - # pkgs.jetbrains.rider - # (pkgs.firefox-devedition.overrideAttrs (super: self: { meta.priority = 1; })) - # ]; - # services.flatpak.update.auto.enable = true; - # services.flatpak = { - # enable = true; - # packages = [ - # "com.unicornsonlsd.finamp" - # # "io.github.softfever.OrcaSlicer" - # "io.anytype.anytype" - # "org.bionus.Grabber" - # "org.getmonero.Monero" - # { - # appId = "org.gimp.GIMP"; - # origin = "flathub-beta"; - # } - # "org.kicad.KiCad" - # "org.pencil2d.Pencil2D" - # ]; - # }; - # } - # ); - # environment.systemPackages = with pkgs; [ - # aerc - # glib # rider wants gsettings - # ]; - time.timeZone = "Europe/Berlin"; - networking.firewall.allowedTCPPorts = [ 1880 2021 ]; - networking.firewall.allowedUDPPorts = [ 1880 2021 ]; + networking.firewall.allowedTCPPorts = [ + 1880 + 2021 + ]; + networking.firewall.allowedUDPPorts = [ + 1880 + 2021 + ]; - # services.tailscale.enable = true; - # services.tailscale.useRoutingFeatures = "client"; - # xyno.desktop.common-programs.enable = true; - # xyno.hardware.kmonad.enable = true; - # xyno.presets.cli.enable = true; - # xyno.presets.gui.enable = true; - # xyno.presets.home-manager.enable = true; - # xyno.system.user.enable = true; - # xyno.user-services.syncthing = { - # enable = true; - # tray = true; - # }; + # fix accelerometer + services.udev.extraRules = '' + ACTION=="remove", GOTO="sensor_end" + + SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="platform", + ATTRS{modalias}=="platform:cros-ec-accel", + ENV{ACCEL_MOUNT_MATRIX}="0, 1, 0; -1, 0, 0; 0, 0, -1", + GOTO="sensor_end" + + LABEL="sensor_end" + ''; + environment.etc."libinput/local-overrides.quirks".text = '' + [Touchpad pressure override] + MatchUdevType=touchpad + MatchName=Google Inc. Hammer + AttrPressureRange=20:10 + ''; + + security.rtkit.enable = true; + services.tailscale.enable = true; + services.tailscale.useRoutingFeatures = "client"; + xyno.hardware.kmonad.enable = true; + xyno.presets.cli.enable = true; + xyno.presets.gui.enable = true; + xyno.presets.home-manager.enable = true; + xyno.system.user.enable = true; + xyno.user-services.syncthing = { + enable = true; + tray = true; + }; xyno.networking.networkd = { enable = true; - enableWifi = true; + # enableWifi = true; }; - # xyno.desktop.easyeffects.enable = true; - # xyno.desktop.fcitx5.enable = true; - # hardware.bluetooth.enable = true; - # services.blueman.enable = true; - # services.power-profiles-daemon.enable = true; - # services.flatpak.enable = true; + + # Enable power management options + powerManagement.enable = true; + + users.users."xyno".extraGroups = [ + "dialout" + "feedbackd" + "networkmanager" + "video" + "wheel" + ]; + # It's recommended to keep enabled on these constrained devices + zramSwap.enable = true; + # Use Network Manager + networking.wireless.enable = false; + networking.networkmanager.enable = true; + hardware.bluetooth.enable = true; + services.blueman.enable = true; + services.power-profiles-daemon.enable = true; + programs.kdeconnect.enable = true; + services.flatpak.enable = true; system.stateVersion = "24.11"; programs.nh.enable = true; diff --git a/instances/minos/hardware-configuration.nix b/instances/minos/hardware-configuration.nix new file mode 100644 index 00000000..489f2f8c --- /dev/null +++ b/instances/minos/hardware-configuration.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +{ + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/0565c87f-d576-4016-ada7-b3d44ce5e6b3"; + fsType = "ext4"; + }; + }; + + boot.initrd.luks.devices = { + "LUKS-MINOS-ROOTFS" = { + device = "/dev/disk/by-uuid/a9134654-519e-4611-894d-b6244d1ea0f7"; + }; + }; + + nix.settings.max-jobs = lib.mkDefault 4; +} diff --git a/instances/theseus/configuration.nix b/instances/theseus/configuration.nix index 0368cff2..f1675406 100644 --- a/instances/theseus/configuration.nix +++ b/instances/theseus/configuration.nix @@ -44,6 +44,7 @@ jabref glib # rider wants gsettings (pkgs.writeShellScriptBin "sudo" "run0 $@") + krita ]; time.timeZone = "Europe/Berlin"; diff --git a/instances/theseus/hardware-configuration.nix b/instances/theseus/hardware-configuration.nix index cb7065b6..100ae330 100644 --- a/instances/theseus/hardware-configuration.nix +++ b/instances/theseus/hardware-configuration.nix @@ -15,6 +15,9 @@ (modulesPath + "/installer/scan/not-detected.nix") "${inputs.nixos-hardware}/framework/13-inch/7040-amd" ]; + hardware.framework.laptop13.audioEnhancement.enable = true; + # hardware.framework.laptop13.audioEnhancement.hideRawDevice = false; + services.fwupd.enable = true; boot.initrd.availableKernelModules = [ "nvme"