From a8b23e0189c6f7bf7100aafe3a2d24bb69efe924 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 08:40:08 +0000 Subject: [PATCH 01/37] scarab init --- flake.nix | 11 +++++++ hosts/scarab/default.nix | 64 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 hosts/scarab/default.nix diff --git a/flake.nix b/flake.nix index d0b592b..82621cd 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,17 @@ } ]; }; + scarab = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + { _module.args = { inherit inputs; }; } + (import "${inputs.mobile-nixos}/lib/configuration.nix" { + device = "oneplus-enchilada"; + }) + ./packages/default.nix + ./hosts/scarab/default.nix + ]; + }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix new file mode 100644 index 0000000..f63b472 --- /dev/null +++ b/hosts/scarab/default.nix @@ -0,0 +1,64 @@ +{ config, lib, pkgs, ... }: +let + + defaultUserName = "nixos"; + +in +{ + imports = [ ../default.nix ]; + + users.users."${defaultUserName}" = { + isNormalUser = true; + password = "1234"; + extraGroups = [ + "dialout" + "feedbackd" + "networkmanager" + "video" + "wheel" + ]; + }; + + mobile = { + beautification = { + silentBoot = lib.mkDefault true; + splash = lib.mkDefault true; + }; + boot.stage-1 = { + kernel.useStrictKernelConfig = true; + networking.enable = true; + }; + }; + + services.openssh.enable = true; + #services.pipewire = { + # enable = true; + # pulse.enable = true; + #}; + services.xserver.desktopManager.phosh = { + enable = true; + user = defaultUserName; + group = "users"; + }; + + #services.xserver.desktopManager.plasma5 = { + # enable = true; + # mobile.enable = true; + #}; + + programs.firefox.enable = true; + programs.calls.enable = true; + + hardware = { + bluetooth.enable = true; + sensor.iio.enable = true; + }; + + networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "oneplus-sdm845-firmware" + "oneplus-sdm845-firmware-xz" + ]; + system.stateVersion = "23.11"; +} From 16ae89045854dc506c72f6253a2e9384cf247452 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 10:10:47 +0000 Subject: [PATCH 02/37] Update framework config --- config/hypr/hyprpaper.conf | 12 +++---- flake.lock | 17 +++++++++ flake.nix | 15 ++++---- hosts/default.nix | 17 ++++++++- hosts/lappy/default.nix | 70 ++++++++++++++++++-------------------- 5 files changed, 80 insertions(+), 51 deletions(-) diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index e07a445..c98267c 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -1,10 +1,10 @@ -preload = ~/.config/wallpapers/wallpaper.png +preload = ~/.config/wallpapers/current_wallpaper.png -wallpaper = eDP-1,~/.config/wallpapers/wallpaper.png -wallpaper = DP-1,~/.config/wallpapers/wallpaper.png -wallpaper = DP-2,~/.config/wallpapers/wallpaper.png -wallpaper = DP-3,~/.config/wallpapers/wallpaper.png -wallpaper = DP-4,~/.config/wallpapers/wallpaper.png +wallpaper = eDP-1,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png splash=false ipc = off diff --git a/flake.lock b/flake.lock index 5e2a4bb..111e20f 100644 --- a/flake.lock +++ b/flake.lock @@ -68,6 +68,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1711352745, + "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "owner": "Nixos", + "repo": "nixos-hardware", + "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "type": "github" + }, + "original": { + "owner": "Nixos", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1710272261, @@ -123,6 +139,7 @@ "inputs": { "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "osu-nixos": "osu-nixos" } diff --git a/flake.nix b/flake.nix index d0b592b..36cee01 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = inputs@{ nixpkgs, + nixos-hardware, home-manager, osu-nixos, ... @@ -32,6 +33,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + nixos-hardware.nixosModules.framework-12th-gen-intel ./packages/default.nix ./hosts/lappy/default.nix @@ -68,17 +70,16 @@ }; inputs = { - mobile-nixos = { - url = "github:nixos/mobile-nixos"; - flake = false; - }; - nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-unstable"; - }; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + mobile-nixos = { + url = "github:nixos/mobile-nixos"; + flake = false; + }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:Nixos/nixos-hardware/master"; osu-nixos.url = "github:Asqiir/osu-nixos"; }; } diff --git a/hosts/default.nix b/hosts/default.nix index 62d4c4c..d738e3a 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -24,7 +24,22 @@ in security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; - services.xserver.displayManager.lightdm.enable = false; + services = { + resolved = { + enable = true; + dnsovertls = "opportunistic"; + fallbackDns = [ + "2620:fe::10#dns10.quad9.net" + "2620:fe::fe:10#dns10.quad9.net" + "9.9.9.10#dns10.quad9.net" + "149.112.112.10#dns10.quad9.net" + ]; + extraConfig = '' + DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net + ''; + }; + xserver.displayManager.lightdm.enable = false; + }; # Wireguard stuff, to-do make better networking.firewall = { diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index e0bee12..00b4beb 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -12,23 +12,8 @@ artPkgs.enable = true; }; - system.nixos.tags = [ "Nya_Beginnings" ]; - services.logind.powerKey = "ignore"; services.logind.powerKeyLongPress = "poweroff"; - services.resolved = { - enable = true; - dnsovertls = "opportunistic"; - fallbackDns = [ - "2620:fe::10#dns10.quad9.net" - "2620:fe::fe:10#dns10.quad9.net" - "9.9.9.10#dns10.quad9.net" - "149.112.112.10#dns10.quad9.net" - ]; - extraConfig = '' - DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net - ''; - }; networking = { hostName = "lappy"; networkmanager.enable = true; @@ -36,53 +21,64 @@ time.timeZone = "America/Lost_Angeles"; boot.kernelParams = [ - #"intel_pstate=no_hwp" - "kernel.yama.ptrace_scope=0" - #"mem_sleep_default=deep" - "acpi_osi=\"!Windows 2020\"" - "module_blacklist=hid_sensor_hub" + #"i915.enable_guc=7" "intel_iommu=on" "iommu=pt" - "nvme.noacpi=1" - #"i915.enable_guc=7" + "kernel.yama.ptrace_scope=0" ]; virtualisation.libvirtd.enable = true; hardware.bluetooth.enable = true; + hardware.bluetooth.settings.General.Experimental = true; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; - extraPackages = with pkgs; [ - intel-compute-runtime - intel-media-driver - ]; + extraPackages = lib.attrVals [ + "intel-compute-runtime" + "intel-media-driver" + ] pkgs; }; - systemd.extraConfig = - "AllowedCPUs=8-15" - ; + systemd.extraConfig = "AllowedCPUs=8-15"; services.tlp = { enable = true; settings = { - TLP_DEFAULT_MODE = "BAT"; - TLP_PERSISTENT_DEFAULT = 1; - - CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - + CPU_HWP_DYN_BOOST_ON_BAT = false; + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_MIN_PERF_ON_AC = 0; CPU_MAX_PERF_ON_AC = 100; CPU_MIN_PERF_ON_BAT = 0; CPU_MAX_PERF_ON_BAT = 50; - #Optional helps save long term battery health - START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge - STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging + INTEL_GPU_MAX_FREQ_ON_BAT = 800; + INTEL_GPU_BOOST_FREQ_ON_BAT = 1000; + NMI_WATCHDOG = false; + PCIE_ASPM_ON_AC = "default"; + PCIE_ASPM_ON_BAT = "powersupersave"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + RUNTIME_PM_ON_BAT = true; + WOL_DISABLE = true; + SCHED_POWERSAVE_ON_BAT = true; + + USB_AUTOSUSPEND = true; + USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN = true; + USB_EXCLUDE_AUDIO = true; + USB_EXCLUDE_BTUSB = false; + USB_EXCLUDE_PHONE = false; + USB_EXCLUDE_PRINTER = true; + + TLP_DEFAULT_MODE = "BAT"; + TLP_PERSISTENT_DEFAULT = 1; + + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging }; }; From ed6489c55997f06669c38b7a505045a937d3d59a Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 10:10:47 +0000 Subject: [PATCH 03/37] Update framework config --- config/hypr/hyprpaper.conf | 12 +++---- flake.lock | 17 +++++++++ flake.nix | 15 ++++---- hosts/default.nix | 17 ++++++++- hosts/lappy/default.nix | 70 ++++++++++++++++++-------------------- 5 files changed, 80 insertions(+), 51 deletions(-) diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index e07a445..c98267c 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -1,10 +1,10 @@ -preload = ~/.config/wallpapers/wallpaper.png +preload = ~/.config/wallpapers/current_wallpaper.png -wallpaper = eDP-1,~/.config/wallpapers/wallpaper.png -wallpaper = DP-1,~/.config/wallpapers/wallpaper.png -wallpaper = DP-2,~/.config/wallpapers/wallpaper.png -wallpaper = DP-3,~/.config/wallpapers/wallpaper.png -wallpaper = DP-4,~/.config/wallpapers/wallpaper.png +wallpaper = eDP-1,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png splash=false ipc = off diff --git a/flake.lock b/flake.lock index 5e2a4bb..111e20f 100644 --- a/flake.lock +++ b/flake.lock @@ -68,6 +68,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1711352745, + "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "owner": "Nixos", + "repo": "nixos-hardware", + "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "type": "github" + }, + "original": { + "owner": "Nixos", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1710272261, @@ -123,6 +139,7 @@ "inputs": { "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "osu-nixos": "osu-nixos" } diff --git a/flake.nix b/flake.nix index 82621cd..8235e59 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = inputs@{ nixpkgs, + nixos-hardware, home-manager, osu-nixos, ... @@ -43,6 +44,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + nixos-hardware.nixosModules.framework-12th-gen-intel ./packages/default.nix ./hosts/lappy/default.nix @@ -79,17 +81,16 @@ }; inputs = { - mobile-nixos = { - url = "github:nixos/mobile-nixos"; - flake = false; - }; - nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-unstable"; - }; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + mobile-nixos = { + url = "github:nixos/mobile-nixos"; + flake = false; + }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:Nixos/nixos-hardware/master"; osu-nixos.url = "github:Asqiir/osu-nixos"; }; } diff --git a/hosts/default.nix b/hosts/default.nix index 62d4c4c..d738e3a 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -24,7 +24,22 @@ in security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; - services.xserver.displayManager.lightdm.enable = false; + services = { + resolved = { + enable = true; + dnsovertls = "opportunistic"; + fallbackDns = [ + "2620:fe::10#dns10.quad9.net" + "2620:fe::fe:10#dns10.quad9.net" + "9.9.9.10#dns10.quad9.net" + "149.112.112.10#dns10.quad9.net" + ]; + extraConfig = '' + DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net + ''; + }; + xserver.displayManager.lightdm.enable = false; + }; # Wireguard stuff, to-do make better networking.firewall = { diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index e0bee12..00b4beb 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -12,23 +12,8 @@ artPkgs.enable = true; }; - system.nixos.tags = [ "Nya_Beginnings" ]; - services.logind.powerKey = "ignore"; services.logind.powerKeyLongPress = "poweroff"; - services.resolved = { - enable = true; - dnsovertls = "opportunistic"; - fallbackDns = [ - "2620:fe::10#dns10.quad9.net" - "2620:fe::fe:10#dns10.quad9.net" - "9.9.9.10#dns10.quad9.net" - "149.112.112.10#dns10.quad9.net" - ]; - extraConfig = '' - DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net - ''; - }; networking = { hostName = "lappy"; networkmanager.enable = true; @@ -36,53 +21,64 @@ time.timeZone = "America/Lost_Angeles"; boot.kernelParams = [ - #"intel_pstate=no_hwp" - "kernel.yama.ptrace_scope=0" - #"mem_sleep_default=deep" - "acpi_osi=\"!Windows 2020\"" - "module_blacklist=hid_sensor_hub" + #"i915.enable_guc=7" "intel_iommu=on" "iommu=pt" - "nvme.noacpi=1" - #"i915.enable_guc=7" + "kernel.yama.ptrace_scope=0" ]; virtualisation.libvirtd.enable = true; hardware.bluetooth.enable = true; + hardware.bluetooth.settings.General.Experimental = true; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; - extraPackages = with pkgs; [ - intel-compute-runtime - intel-media-driver - ]; + extraPackages = lib.attrVals [ + "intel-compute-runtime" + "intel-media-driver" + ] pkgs; }; - systemd.extraConfig = - "AllowedCPUs=8-15" - ; + systemd.extraConfig = "AllowedCPUs=8-15"; services.tlp = { enable = true; settings = { - TLP_DEFAULT_MODE = "BAT"; - TLP_PERSISTENT_DEFAULT = 1; - - CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - + CPU_HWP_DYN_BOOST_ON_BAT = false; + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_MIN_PERF_ON_AC = 0; CPU_MAX_PERF_ON_AC = 100; CPU_MIN_PERF_ON_BAT = 0; CPU_MAX_PERF_ON_BAT = 50; - #Optional helps save long term battery health - START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge - STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging + INTEL_GPU_MAX_FREQ_ON_BAT = 800; + INTEL_GPU_BOOST_FREQ_ON_BAT = 1000; + NMI_WATCHDOG = false; + PCIE_ASPM_ON_AC = "default"; + PCIE_ASPM_ON_BAT = "powersupersave"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + RUNTIME_PM_ON_BAT = true; + WOL_DISABLE = true; + SCHED_POWERSAVE_ON_BAT = true; + + USB_AUTOSUSPEND = true; + USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN = true; + USB_EXCLUDE_AUDIO = true; + USB_EXCLUDE_BTUSB = false; + USB_EXCLUDE_PHONE = false; + USB_EXCLUDE_PRINTER = true; + + TLP_DEFAULT_MODE = "BAT"; + TLP_PERSISTENT_DEFAULT = 1; + + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging }; }; From ba4ac7f1f4e46f6cce9deb4f31197a6e8a2297a9 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:09:20 +0000 Subject: [PATCH 04/37] change this for better bat --- hosts/lappy/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 00b4beb..123528c 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -20,6 +20,14 @@ }; time.timeZone = "America/Lost_Angeles"; + services.syncthing = { + enable = true; + user = "stitchynyan"; + openDefaultPorts = true; + databaseDir = "/home/stitchynyan/.local/share/syncthing"; + dataDir = "/home/stitchynyan"; + }; + boot.kernelParams = [ #"i915.enable_guc=7" "intel_iommu=on" @@ -67,11 +75,6 @@ SCHED_POWERSAVE_ON_BAT = true; USB_AUTOSUSPEND = true; - USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN = true; - USB_EXCLUDE_AUDIO = true; - USB_EXCLUDE_BTUSB = false; - USB_EXCLUDE_PHONE = false; - USB_EXCLUDE_PRINTER = true; TLP_DEFAULT_MODE = "BAT"; TLP_PERSISTENT_DEFAULT = 1; From a66a3015cd405084d162b82f522d8fa85a9c1551 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:32:39 +0000 Subject: [PATCH 05/37] enable some config only on desktop systems --- users/stitchynyan/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index b5a819c..a233760 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -15,29 +15,29 @@ programs = { firefox.enable = true; - hyprland.enable = true; - openvpn3.enable = true; + hyprland.enable = lib.mkIf( config.stitchyconf.form == "pc") true; + openvpn3.enable = lib.mkIf( config.stitchyconf.form == "pc") true; steam = { - enable = true; + enable = lib.mkIf( config.stitchyconf.form == "pc") true; remotePlay.openFirewall = true; }; }; services = { avahi = { - enable = true; + enable = false; nssmdns4 = true; openFirewall = true; }; blueman.enable = true; - gnome.gnome-keyring.enable = true; + gnome.gnome-keyring.enable = lib.mkIf( config.stitchyconf.form == "pc") true; pipewire = { enable = true; pulse.enable = true; alsa.enable = true; }; - printing.enable = true; - usbmuxd.enable = true; + printing.enable = false + usbmuxd.enable = false; xserver.enable = true; }; From 615dce3e41134291075dd44f9e02cd63deff8eed Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:37:49 +0000 Subject: [PATCH 06/37] need to import user config --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 8235e59..eb85aff 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ }) ./packages/default.nix ./hosts/scarab/default.nix + ./users/stitchynyan/default.nix ]; }; lappy = nixpkgs.lib.nixosSystem { From f5bff2f354ddebd8938bc1079a6e20a265141f05 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:47:00 +0000 Subject: [PATCH 07/37] user changes --- hosts/scarab/default.nix | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index f63b472..62ce7dd 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -1,25 +1,11 @@ { config, lib, pkgs, ... }: let - defaultUserName = "nixos"; - in { imports = [ ../default.nix ]; - users.users."${defaultUserName}" = { - isNormalUser = true; - password = "1234"; - extraGroups = [ - "dialout" - "feedbackd" - "networkmanager" - "video" - "wheel" - ]; - }; - - mobile = { + mobile = { beautification = { silentBoot = lib.mkDefault true; splash = lib.mkDefault true; @@ -30,14 +16,10 @@ in }; }; - services.openssh.enable = true; - #services.pipewire = { - # enable = true; - # pulse.enable = true; - #}; + #services.openssh.enable = true; services.xserver.desktopManager.phosh = { enable = true; - user = defaultUserName; + user = "stitchynyan"; group = "users"; }; From 11fb88b3ccdaf6eb63fcbfd5e2f8edc0fddcd95c Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:49:04 +0000 Subject: [PATCH 08/37] I hade phone keyboards --- config/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/zshrc b/config/zshrc index e15d2a8..0daeece 100755 --- a/config/zshrc +++ b/config/zshrc @@ -8,6 +8,9 @@ unsetopt PROMPT_SP bindkey -v # End of lines configured by zsh-newuser-install +# Temporary Rebuild shortcut +alias re-scarab="sudo nixos-rebuild --flake '/etc/nixos#scarab'" + export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" From 8d69eb76d63ae30e6eaaf5bd0bd7f18fa6b0f39b Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 5 Apr 2024 02:21:55 -0700 Subject: [PATCH 09/37] better way of doing this --- hosts/malachite/default.nix | 97 ++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 08a6ceb..14f6574 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,65 +1,74 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let - passthrough = pkgs.writeShellScript "pasthrough.sh" '' - GUEST_NAME="$1" - HOOK_NAME="$2" - STATE_NAME="$3" + passthrough = pkgs.writeShellApplication { + name = "pasthrough.sh"; + runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirtd" "procps" ] pkgs; + text = '' + GUEST_NAME="$1" + HOOK_NAME="$2" + STATE_NAME="$3" - set -e - set -x - - # For the windows 10 VM - if [[ "$GUEST_NAME" == "win10" ]]; then + echo 19>/home/stitchynyan/startlogfile + BASH_XTRACEFD=19 + set -x - # Prepare hook - if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then + # For the windows 10 VM + if [[ "$GUEST_NAME" == "win10" ]]; then - # Remove Hyprland - ${pkgs.busybox}/bin/pkill Hyprland + # Prepare hook + if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then - # Unbind VTconsoles - ${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon0/bind - ${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon1/bind + # Remove Hyprland + pkill Hyprland - # Unbind EFI-Framebuffer - ${pkgs.busybox}/bin/echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind + # Unbind VTconsoles + echo 0 > /sys/class/vtconsole/vtcon0/bind + echo 0 > /sys/class/vtconsole/vtcon1/bind - # Unload Modules - ${pkgs.busybox}/bin/modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia + # Unbind EFI-Framebuffer + echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind - # Unbind the GPU from display driver - ${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_0 - ${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_1 + # We love race conditions + sleep 2 - # Load VFIO Kernel Module - ${pkgs.busybox}/bin/modprobe vfio_pci + # Unload Modules + modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia - elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then + # Unbind the GPU from display driver + virsh nodedev-detach pci_0000_01_00_0 + virsh nodedev-detach pci_0000_01_00_1 - # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) - ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0 - ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_1 + # Load VFIO Kernel Module + modprobe vfio_pci - ${pkgs.busybox}/bin/modprobe -r vfio-pci + sleep 2 - #bind efi - ${pkgs.busybox}/bin/echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then - # Reload nvidia modules - ${pkgs.busybox}/bin/modprobe nvidia_drm - ${pkgs.busybox}/bin/modprobe nvidia_modeset - ${pkgs.busybox}/bin/modprobe nvidia_uvm - ${pkgs.busybox}/bin/modprobe nvidia + # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) + virsh nodedev-reattach pci_0000_01_00_0 + virsh nodedev-reattach pci_0000_01_00_1 - # Rebind VT consoles - ${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon0/bind - ${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon1/bind + modprobe -r vfio-pci + + #bind efi + echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + + # Reload nvidia modules + modprobe nvidia_drm + modprobe nvidia_modeset + modprobe nvidia_uvm + modprobe nvidia + + # Rebind VT consoles + echo 1 > /sys/class/vtconsole/vtcon0/bind + bin/echo 1 > /sys/class/vtconsole/vtcon1/bind + + fi fi - fi - - ''; + ''; in { imports = [ From 101d47fa29c42951cddedc12a4c04ebc50488e2d Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 5 Apr 2024 02:23:27 -0700 Subject: [PATCH 10/37] moar malachite fixes --- hosts/malachite/default.nix | 12 +++++++++++- hosts/malachite/hardware-configuration.nix | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 14f6574..b546972 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -2,7 +2,7 @@ let passthrough = pkgs.writeShellApplication { name = "pasthrough.sh"; - runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirtd" "procps" ] pkgs; + runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs; text = '' GUEST_NAME="$1" HOOK_NAME="$2" @@ -69,6 +69,7 @@ let fi ''; + }; in { imports = [ @@ -88,6 +89,15 @@ in { steam-hardware.enable = true; }; + networking.networkmanager.enable = true; + services.syncthing = { + enable = true; + user = "stitchynyan"; + openDefaultPorts = true; + databaseDir = "/home/stitchynyan/.local/share/syncthing"; + dataDir = "/home/stitchynyan"; + }; + networking.hostName = "malachite"; time.timeZone = "America/Los_Angeles"; diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index da77e9a..1cbe4bc 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -7,7 +7,7 @@ boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; boot.extraModulePackages = [ ]; boot.kernelParams = [ From 73a035567cf02a0515e059c01424e2c29f6cd077 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 01:39:54 +0000 Subject: [PATCH 11/37] flake update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 111e20f..628c13a 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ ] }, "locked": { - "lastModified": 1710349883, - "narHash": "sha256-bjbdS2mC76xNJwt1d/uZa+JdHR8CCyYbF4Ey/NgOJus=", + "lastModified": 1712390667, + "narHash": "sha256-ebq+fJZfobqpsAdGDGpxNWSySbQejRwW9cdiil6krCo=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f0db7d418e781354d8a3c50e611e3b1cd413087", + "rev": "b787726a8413e11b074cde42704b4af32d95545c", "type": "github" }, "original": { @@ -55,11 +55,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1710655727, - "narHash": "sha256-TOJraNC9vW2gP/ov1RBD+J61pUEJm4q7481Iu6G4ieo=", + "lastModified": 1711757427, + "narHash": "sha256-PqHK0J9YCRKlxpJp+UG+/xpwfIQRPVUPspvbbP3FB2M=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "8c59592e8d44c1b30be3fa4e6df7938fa9672be3", + "rev": "f7087f8fdbd1309af315ef8c92345320aadc5edf", "type": "github" }, "original": { @@ -70,11 +70,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1711352745, - "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "lastModified": 1712324865, + "narHash": "sha256-+BatEWd4HlMeK7Ora+gYIkarjxFVCg9oKrIeybHIIX4=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "rev": "f3b959627bca46a9f7052b8fbc464b8323e68c2c", "type": "github" }, "original": { @@ -86,11 +86,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "lastModified": 1712163089, + "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "type": "github" }, "original": { From e64ef40ed366493eeccd229a230e66dfb3e67056 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 01:43:19 +0000 Subject: [PATCH 12/37] thyingy --- users/stitchynyan/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index a233760..352fe50 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -36,7 +36,7 @@ pulse.enable = true; alsa.enable = true; }; - printing.enable = false + printing.enable = false; usbmuxd.enable = false; xserver.enable = true; }; From d31d3beb06e45c4859c600654f9e388a1131ca4d Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 01:44:49 +0000 Subject: [PATCH 13/37] alsjkdf --- hosts/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/default.nix b/hosts/default.nix index d738e3a..9063f24 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -15,7 +15,7 @@ in }; boot = { - kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; + #kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; loader = { efi.canTouchEfiVariables = lib.mkDefault true; systemd-boot.enable = lib.mkDefault true; From 4469ec41f72d80a7038a1c93ab1ddb4aff92d058 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 01:47:14 +0000 Subject: [PATCH 14/37] asdf --- users/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/users/default.nix b/users/default.nix index ecc5e31..00303d3 100644 --- a/users/default.nix +++ b/users/default.nix @@ -6,5 +6,6 @@ mutableUsers = false; users.root.initialHashedPassword = "!"; }; + hardware.pulseaudio.enable = false; }; } From 6404b1e3569b07483a76cf385274cf6fcceec956 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 02:56:53 +0000 Subject: [PATCH 15/37] bad steam --- users/stitchynyan/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 352fe50..6f65da2 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -15,11 +15,13 @@ programs = { firefox.enable = true; - hyprland.enable = lib.mkIf( config.stitchyconf.form == "pc") true; - openvpn3.enable = lib.mkIf( config.stitchyconf.form == "pc") true; - steam = { - enable = lib.mkIf( config.stitchyconf.form == "pc") true; - remotePlay.openFirewall = true; + lib.mkIf( config.stitchyconf.form == "pc") { + hyprland.enable = true; + openvpn3.enable = true; + steam = { + enable = true; + remotePlay.openFirewall = true; + }; }; }; From 4091d2aeab12c8312c4593cd4f8ab157b2c697ff Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 03:04:05 +0000 Subject: [PATCH 16/37] finally steam dead? --- hosts/scarab/default.nix | 4 +++- users/stitchynyan/default.nix | 12 +++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 62ce7dd..8fb2a75 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -5,7 +5,9 @@ in { imports = [ ../default.nix ]; - mobile = { + stitchyconf.form = "handheld"; + + mobile = { beautification = { silentBoot = lib.mkDefault true; splash = lib.mkDefault true; diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 6f65da2..a019c7c 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -15,13 +15,11 @@ programs = { firefox.enable = true; - lib.mkIf( config.stitchyconf.form == "pc") { - hyprland.enable = true; - openvpn3.enable = true; - steam = { - enable = true; - remotePlay.openFirewall = true; - }; + hyprland.enable = config.stitchyconf.form == "pc"; + openvpn3.enable = config.stitchyconf.form == "pc"; + steam = { + enable = config.stitchyconf.form == "pc"; + remotePlay.openFirewall = true; }; }; From 7d4d14795ff323258336f46a4c6ad8ab81e1e0d0 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 04:30:43 +0000 Subject: [PATCH 17/37] add necessary packages --- packages/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/default.nix b/packages/default.nix index ffe07f9..4f7fe19 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -11,6 +11,8 @@ let ] pkgs; handheldPkgs = lib.attrVals [ "chatty" + "fluffychat" + "gnome-console" "gnome-text-editor" "megapixels" ] pkgs; From d73fca4bf2cf4878ac608beaaa2a7daefa9b1ac6 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 04:52:03 +0000 Subject: [PATCH 18/37] boot --- hosts/scarab/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 8fb2a75..7bb9053 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -18,6 +18,10 @@ in }; }; + boot.loader = { + efi.canTouchEfiVariables = false; + systemd-boot.enable = false; + }; #services.openssh.enable = true; services.xserver.desktopManager.phosh = { enable = true; From eb10c1c3af1b5d43dc8dda766f2f8152eb42ac27 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 7 Apr 2024 05:30:28 +0000 Subject: [PATCH 19/37] jacky --- users/stitchynyan/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index a019c7c..7b1c5d8 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -33,8 +33,9 @@ gnome.gnome-keyring.enable = lib.mkIf( config.stitchyconf.form == "pc") true; pipewire = { enable = true; - pulse.enable = true; alsa.enable = true; + jack.enable = true; + pulse.enable = true; }; printing.enable = false; usbmuxd.enable = false; From d5714a3e84313e5a40637429d192cdb16b9c2ee9 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 10 Apr 2024 05:49:56 +0000 Subject: [PATCH 20/37] enable qualcom quirks --- hosts/scarab/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 7bb9053..aeca5f1 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -1,9 +1,13 @@ -{ config, lib, pkgs, ... }: +{ config, inputs, lib, pkgs, ... }: let in { - imports = [ ../default.nix ]; + imports = [ + "../default.nix" + "${inputs.mobile-nixos}/modules/quirks/qualcomm/sdm845-modem.nix" + "${inputs.mobile-nixos}/modules/quirks/audio.nix" + ]; stitchyconf.form = "handheld"; @@ -16,6 +20,10 @@ in kernel.useStrictKernelConfig = true; networking.enable = true; }; + quirks = { + audio.alsa-ucm-meld = true; + qualcomm.sdm845-modem.enable = true; + }; }; boot.loader = { From c8f468585a317ef786ea3a7bd6312b24bfd6e767 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 10 Apr 2024 06:03:34 +0000 Subject: [PATCH 21/37] hwa? --- hosts/scarab/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index aeca5f1..2cacec7 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -4,9 +4,9 @@ let in { imports = [ - "../default.nix" - "${inputs.mobile-nixos}/modules/quirks/qualcomm/sdm845-modem.nix" - "${inputs.mobile-nixos}/modules/quirks/audio.nix" + ../default.nix + #"${inputs.mobile-nixos}/modules/quirks/qualcomm/sdm845-modem.nix" + #"${inputs.mobile-nixos}/modules/quirks/audio.nix" ]; stitchyconf.form = "handheld"; From 0fe053607398307933731f5ec58259337bbb1490 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 18 Apr 2024 09:29:41 +0000 Subject: [PATCH 22/37] try wireplumber thingy --- hosts/scarab/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 2cacec7..bb81954 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -50,7 +50,20 @@ in sensor.iio.enable = true; }; - networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; + networking.networkmanager = { + enable = true; + unmanaged = [ "rndis0" "usb0" ]; + }; + + systemd.user.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR = pkgs.runCommand "wireplumber-config" {} '' + cp -a "${pkgs.wireplumber}/share/wireplumber" "$out" + chmod +w "$out" "$out/main.lua.d" + ln -s ${pkgs.fetchurl { + url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua"; + hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk="; + }} "$out/main.lua.d/51-qcom-sdm845.lua" + ''; + systemd.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR = config.systemd.user.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "oneplus-sdm845-firmware" From 40a8d3b711306f2102fab323101a8b795db18310 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 08:40:08 +0000 Subject: [PATCH 23/37] scarab init --- flake.nix | 11 +++++++ hosts/scarab/default.nix | 64 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 hosts/scarab/default.nix diff --git a/flake.nix b/flake.nix index 36cee01..8235e59 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,17 @@ } ]; }; + scarab = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + { _module.args = { inherit inputs; }; } + (import "${inputs.mobile-nixos}/lib/configuration.nix" { + device = "oneplus-enchilada"; + }) + ./packages/default.nix + ./hosts/scarab/default.nix + ]; + }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix new file mode 100644 index 0000000..f63b472 --- /dev/null +++ b/hosts/scarab/default.nix @@ -0,0 +1,64 @@ +{ config, lib, pkgs, ... }: +let + + defaultUserName = "nixos"; + +in +{ + imports = [ ../default.nix ]; + + users.users."${defaultUserName}" = { + isNormalUser = true; + password = "1234"; + extraGroups = [ + "dialout" + "feedbackd" + "networkmanager" + "video" + "wheel" + ]; + }; + + mobile = { + beautification = { + silentBoot = lib.mkDefault true; + splash = lib.mkDefault true; + }; + boot.stage-1 = { + kernel.useStrictKernelConfig = true; + networking.enable = true; + }; + }; + + services.openssh.enable = true; + #services.pipewire = { + # enable = true; + # pulse.enable = true; + #}; + services.xserver.desktopManager.phosh = { + enable = true; + user = defaultUserName; + group = "users"; + }; + + #services.xserver.desktopManager.plasma5 = { + # enable = true; + # mobile.enable = true; + #}; + + programs.firefox.enable = true; + programs.calls.enable = true; + + hardware = { + bluetooth.enable = true; + sensor.iio.enable = true; + }; + + networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "oneplus-sdm845-firmware" + "oneplus-sdm845-firmware-xz" + ]; + system.stateVersion = "23.11"; +} From 9a4993661ba4d2c5b1a8513c8903707e8b513d0c Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:09:20 +0000 Subject: [PATCH 24/37] change this for better bat --- hosts/lappy/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 00b4beb..123528c 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -20,6 +20,14 @@ }; time.timeZone = "America/Lost_Angeles"; + services.syncthing = { + enable = true; + user = "stitchynyan"; + openDefaultPorts = true; + databaseDir = "/home/stitchynyan/.local/share/syncthing"; + dataDir = "/home/stitchynyan"; + }; + boot.kernelParams = [ #"i915.enable_guc=7" "intel_iommu=on" @@ -67,11 +75,6 @@ SCHED_POWERSAVE_ON_BAT = true; USB_AUTOSUSPEND = true; - USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN = true; - USB_EXCLUDE_AUDIO = true; - USB_EXCLUDE_BTUSB = false; - USB_EXCLUDE_PHONE = false; - USB_EXCLUDE_PRINTER = true; TLP_DEFAULT_MODE = "BAT"; TLP_PERSISTENT_DEFAULT = 1; From 0a8c6eb54e771602ea1b394cae5220fa392ead88 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 19 Apr 2024 21:09:00 +0000 Subject: [PATCH 25/37] tweaks for arduino plus bat --- hosts/lappy/default.nix | 2 +- users/stitchynyan/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 123528c..1a30eab 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -70,7 +70,7 @@ PCIE_ASPM_ON_AC = "default"; PCIE_ASPM_ON_BAT = "powersupersave"; PLATFORM_PROFILE_ON_BAT = "low-power"; - RUNTIME_PM_ON_BAT = true; + RUNTIME_PM_ON_BAT = "auto"; WOL_DISABLE = true; SCHED_POWERSAVE_ON_BAT = true; diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index b5a819c..f85557b 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -25,7 +25,7 @@ services = { avahi = { - enable = true; + enable = config.stitchyconf.form == "pc"; nssmdns4 = true; openFirewall = true; }; @@ -48,7 +48,7 @@ shell = pkgs.zsh; home = "/home/stitchynyan"; description = "Personal user"; - extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" ]; + extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" "dialout" ]; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; }; } From aea964c7459e29b8323500a40da3258f65b566c7 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 20 Apr 2024 09:07:01 +0000 Subject: [PATCH 26/37] flake update and fstrim --- flake.lock | 24 ++++++++++++------------ hosts/default.nix | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 111e20f..9220a36 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ ] }, "locked": { - "lastModified": 1710349883, - "narHash": "sha256-bjbdS2mC76xNJwt1d/uZa+JdHR8CCyYbF4Ey/NgOJus=", + "lastModified": 1713547570, + "narHash": "sha256-i8tNz47Lfsq5QWFLyE3rIm0gs2UUvXXAxfWTC24e370=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f0db7d418e781354d8a3c50e611e3b1cd413087", + "rev": "7c61e400a99f33cdff3118c1e4032bcb049e1a30", "type": "github" }, "original": { @@ -55,11 +55,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1710655727, - "narHash": "sha256-TOJraNC9vW2gP/ov1RBD+J61pUEJm4q7481Iu6G4ieo=", + "lastModified": 1713034591, + "narHash": "sha256-zEtSq4e1hsf5nPoTzsx+cvHTusQxFdyDpD3mOa360A0=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "8c59592e8d44c1b30be3fa4e6df7938fa9672be3", + "rev": "5455e4455b231218f6198b39383a0ad4c1d6638e", "type": "github" }, "original": { @@ -70,11 +70,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1711352745, - "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "lastModified": 1713521961, + "narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", "type": "github" }, "original": { @@ -86,11 +86,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "lastModified": 1713297878, + "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", "type": "github" }, "original": { diff --git a/hosts/default.nix b/hosts/default.nix index d738e3a..84d0a96 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -25,6 +25,7 @@ in security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; services = { + fstrim.enable = true; resolved = { enable = true; dnsovertls = "opportunistic"; From 846f6fdbc3a84705b256b3f218c94723bf611d9f Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 20 Apr 2024 09:14:45 +0000 Subject: [PATCH 27/37] try again pipewire --- hosts/scarab/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index bb81954..1534ac8 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -55,15 +55,14 @@ in unmanaged = [ "rndis0" "usb0" ]; }; - systemd.user.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR = pkgs.runCommand "wireplumber-config" {} '' - cp -a "${pkgs.wireplumber}/share/wireplumber" "$out" - chmod +w "$out" "$out/main.lua.d" - ln -s ${pkgs.fetchurl { - url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua"; - hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk="; - }} "$out/main.lua.d/51-qcom-sdm845.lua" - ''; - systemd.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR = config.systemd.user.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR; + services.pipewire.wireplumber.configPackages = [ + (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' + ${pkgs.fetchurl { + url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua"; + hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk="; + }} + '') + ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "oneplus-sdm845-firmware" From c2012c8ccf974072f68776062d6d00e3951cbb0c Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 20 Apr 2024 09:31:04 +0000 Subject: [PATCH 28/37] read the file? --- hosts/scarab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 1534ac8..5cac94f 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -57,10 +57,10 @@ in services.pipewire.wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' - ${pkgs.fetchurl { + ${builtins.readFile (pkgs.fetchurl { url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua"; hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk="; - }} + })} '') ]; From 38cb13e81efc4e3f3f18b17f2fa9cb71e705d10b Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 20 Apr 2024 09:37:16 +0000 Subject: [PATCH 29/37] die pulse --- hosts/scarab/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 5cac94f..6316917 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -47,6 +47,7 @@ in hardware = { bluetooth.enable = true; + pulseaudio.enable = lib.mkForce false; sensor.iio.enable = true; }; From f1703644003fb7c90daec918e1d303a3d0cc2311 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 20 Apr 2024 10:14:18 +0000 Subject: [PATCH 30/37] please --- hosts/scarab/default.nix | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 6316917..7bae50c 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -56,14 +56,50 @@ in unmanaged = [ "rndis0" "usb0" ]; }; - services.pipewire.wireplumber.configPackages = [ + /*services.pipewire.wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' ${builtins.readFile (pkgs.fetchurl { url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua"; hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk="; })} '') - ]; + ];*/ + + services.pipewire.wireplumber.configPackages = [ + (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' + -- PipeWire's S24LE default audio format is broken in the kernel driver + alsa_monitor.rules = [ + { + matches = { + { "node.name" = "alsa_output.*.HiFi*__sink" }, + { "node.name" = "alsa_input.*.HiFi*__source" } + ] + actions = { + update-props = { + audio.format = "S16LE", + audio.rate = 48000, + api.alsa.period-size = 4096, + api.alsa.period-num = 6, + api.alsa.headroom = 512, + }, + } + } + }] + + -- Disable suspend for Voice Call devices + alsa_monitor.rules = [ + { + matches = { + { "node.name" = "alsa_output.*.Voice_Call*__sink" }, + { "node.name" ="alsa_input.*.Voice_Call*__source" } + } + actions.update=props = { + audio.format = "S16LE", + session.suspend-timeout-seconds = 0, + } + }] + '') + ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "oneplus-sdm845-firmware" From 5ad595d52522f0f1125e3af3618c6c0b82c7f78f Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 21 Apr 2024 18:03:11 +0000 Subject: [PATCH 31/37] why can't pulse die gracefully --- hosts/scarab/default.nix | 5 +++++ users/stitchynyan/default.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 7bae50c..47d8d8f 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -101,6 +101,11 @@ in '') ]; + services.openssh = { + enable = true; + settings.PasswordAuthentication = true; + }; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "oneplus-sdm845-firmware" "oneplus-sdm845-firmware-xz" diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 7b1c5d8..51d9adf 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -32,7 +32,7 @@ blueman.enable = true; gnome.gnome-keyring.enable = lib.mkIf( config.stitchyconf.form == "pc") true; pipewire = { - enable = true; + enable = lib.mkForce true; alsa.enable = true; jack.enable = true; pulse.enable = true; From 159b4f48262114ef925e8d81a985c63682e6670c Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 21 Apr 2024 19:23:18 +0000 Subject: [PATCH 32/37] try user changes --- hosts/scarab/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index 47d8d8f..d3c7081 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -65,6 +65,7 @@ in '') ];*/ +/* services.pipewire.wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' -- PipeWire's S24LE default audio format is broken in the kernel driver @@ -100,6 +101,7 @@ in }] '') ]; + */ services.openssh = { enable = true; From a6d7a7b04c7b989cbb1f18f414269ced0b1ed780 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 23 Apr 2024 10:31:35 +0000 Subject: [PATCH 33/37] try new thing --- hosts/scarab/default.nix | 41 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index d3c7081..bb34e08 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -65,43 +65,28 @@ in '') ];*/ -/* services.pipewire.wireplumber.configPackages = [ - (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' - -- PipeWire's S24LE default audio format is broken in the kernel driver - alsa_monitor.rules = [ + (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/51-qcom-sdm845.lua" '' + monitor.alsa.rules = [ { - matches = { - { "node.name" = "alsa_output.*.HiFi*__sink" }, - { "node.name" = "alsa_input.*.HiFi*__source" } + matches = [ + { + node.name = "~alsa_output.*" + } ] actions = { update-props = { - audio.format = "S16LE", - audio.rate = 48000, - api.alsa.period-size = 4096, - api.alsa.period-num = 6, - api.alsa.headroom = 512, - }, + audio.format = "S16LE" + audio.rate = 48000 + api.alsa.period-size = 4096 + api.alsa.period-num = 6 + api.alsa.headroom = 512 + } } } - }] - - -- Disable suspend for Voice Call devices - alsa_monitor.rules = [ - { - matches = { - { "node.name" = "alsa_output.*.Voice_Call*__sink" }, - { "node.name" ="alsa_input.*.Voice_Call*__source" } - } - actions.update=props = { - audio.format = "S16LE", - session.suspend-timeout-seconds = 0, - } - }] + ] '') ]; - */ services.openssh = { enable = true; From 9e29339de841e4cf1cf55fa2fc30c444eee1b73f Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 23 Apr 2024 10:35:21 +0000 Subject: [PATCH 34/37] ->.conf --- hosts/scarab/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix index bb34e08..06ca55b 100644 --- a/hosts/scarab/default.nix +++ b/hosts/scarab/default.nix @@ -66,7 +66,7 @@ in ];*/ services.pipewire.wireplumber.configPackages = [ - (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/51-qcom-sdm845.lua" '' + (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/51-qcom-sdm845.conf" '' monitor.alsa.rules = [ { matches = [ From 97a6ae026e332ce02953f3d3fade51b80131615e Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 3 May 2024 04:47:19 +0000 Subject: [PATCH 35/37] get test user on gemini 'server' --- flake.nix | 2 ++ users/cirno/default.nix | 29 +++++++++++++++++++++++++++++ users/cirno/home.nix | 15 +++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 users/cirno/default.nix create mode 100644 users/cirno/home.nix diff --git a/flake.nix b/flake.nix index 8235e59..cc51ece 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ ./packages/default.nix ./hosts/gemini/default.nix ./users/nyadmin/default.nix + ./users/cirno/default.nix home-manager.nixosModules.home-manager { @@ -74,6 +75,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.nyadmin = import ./users/nyadmin/home.nix; + home-manager.users.cirno = import ./users/cirno/home.nix; } ]; }; diff --git a/users/cirno/default.nix b/users/cirno/default.nix new file mode 100644 index 0000000..4870a94 --- /dev/null +++ b/users/cirno/default.nix @@ -0,0 +1,29 @@ +{ config, pkgs, lib, ... }: + +{ + + + config = { + + programs = { + firefox.enable = true; + }; + + services = { + displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + desktopManager.plasma6.enable = true; + }; + + users.users.cirno = { + isNormalUser = true; + shell = pkgs.zsh; + home = "/home/cirno"; + description = "user for guests/cirno people"; + extraGroups = [ "" ]; + initialHashedPassword = "$6$2f8vjQbdKyEBqPRT$FrZBZfzpJGqNqLlCyb7CzRNm0wuZwfRI7Qj/dUQlbtLixyJK5Im9AJT7GXmP5StfhZxSbH/wW8nDGPQm98NXV0"; + }; + }; +} diff --git a/users/cirno/home.nix b/users/cirno/home.nix new file mode 100644 index 0000000..2b43031 --- /dev/null +++ b/users/cirno/home.nix @@ -0,0 +1,15 @@ +{ config, + nixosConfig, + pkgs, + lib, + inputs, + home-manager, + ... }: + let + + in + { + + home.stateVersion = "24.05"; + home.homeDirectory = "/home/cirno"; + } From a6c4098a5c3b70578d56d82f731db38c84b243f3 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 3 May 2024 09:29:43 +0000 Subject: [PATCH 36/37] revert "scarab init" accidentally pushed to master This reverts commit 40a8d3b711306f2102fab323101a8b795db18310. --- flake.nix | 11 ------- hosts/scarab/default.nix | 64 ---------------------------------------- 2 files changed, 75 deletions(-) delete mode 100644 hosts/scarab/default.nix diff --git a/flake.nix b/flake.nix index cc51ece..527b9f2 100644 --- a/flake.nix +++ b/flake.nix @@ -29,17 +29,6 @@ } ]; }; - scarab = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - modules = [ - { _module.args = { inherit inputs; }; } - (import "${inputs.mobile-nixos}/lib/configuration.nix" { - device = "oneplus-enchilada"; - }) - ./packages/default.nix - ./hosts/scarab/default.nix - ]; - }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix deleted file mode 100644 index f63b472..0000000 --- a/hosts/scarab/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ config, lib, pkgs, ... }: -let - - defaultUserName = "nixos"; - -in -{ - imports = [ ../default.nix ]; - - users.users."${defaultUserName}" = { - isNormalUser = true; - password = "1234"; - extraGroups = [ - "dialout" - "feedbackd" - "networkmanager" - "video" - "wheel" - ]; - }; - - mobile = { - beautification = { - silentBoot = lib.mkDefault true; - splash = lib.mkDefault true; - }; - boot.stage-1 = { - kernel.useStrictKernelConfig = true; - networking.enable = true; - }; - }; - - services.openssh.enable = true; - #services.pipewire = { - # enable = true; - # pulse.enable = true; - #}; - services.xserver.desktopManager.phosh = { - enable = true; - user = defaultUserName; - group = "users"; - }; - - #services.xserver.desktopManager.plasma5 = { - # enable = true; - # mobile.enable = true; - #}; - - programs.firefox.enable = true; - programs.calls.enable = true; - - hardware = { - bluetooth.enable = true; - sensor.iio.enable = true; - }; - - networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; - - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "oneplus-sdm845-firmware" - "oneplus-sdm845-firmware-xz" - ]; - system.stateVersion = "23.11"; -} From 30da71c790665f0372badd9102e8124ba8aee134 Mon Sep 17 00:00:00 2001 From: niftion Date: Sat, 4 May 2024 04:31:38 -0700 Subject: [PATCH 37/37] Update users/stitchynyan/default.nix even more alphabetized O.O --- users/stitchynyan/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index f85557b..c91b878 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -4,13 +4,13 @@ imports = [ ../default.nix ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem ( lib.getName pkg) [ + "cudatoolkit" + "nvidia-settings" + "nvidia-x11" "osu-lazer" "steam" "steam-original" "steam-run" - "nvidia-x11" - "nvidia-settings" - "cudatoolkit" ]; programs = { @@ -23,6 +23,8 @@ }; }; + security.pam.services.swaylock = {}; + services = { avahi = { enable = config.stitchyconf.form == "pc"; @@ -32,23 +34,21 @@ blueman.enable = true; gnome.gnome-keyring.enable = true; pipewire = { + alsa.enable = true; enable = true; pulse.enable = true; - alsa.enable = true; }; printing.enable = true; usbmuxd.enable = true; xserver.enable = true; }; - security.pam.services.swaylock = {}; - users.users.stitchynyan = { - isNormalUser = true; - shell = pkgs.zsh; - home = "/home/stitchynyan"; description = "Personal user"; extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" "dialout" ]; + home = "/home/stitchynyan"; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; + isNormalUser = true; + shell = pkgs.zsh; }; }