Compare commits

...

4 commits

Author SHA1 Message Date
a66a3015cd
enable some config only on desktop systems 2024-04-01 21:32:50 +00:00
ba4ac7f1f4
change this for better bat 2024-04-01 21:11:51 +00:00
ed6489c559
Update framework config 2024-04-01 21:11:10 +00:00
a8b23e0189
scarab init 2024-03-31 08:40:08 +00:00
7 changed files with 165 additions and 58 deletions

View file

@ -1,10 +1,10 @@
preload = ~/.config/wallpapers/wallpaper.png preload = ~/.config/wallpapers/current_wallpaper.png
wallpaper = eDP-1,~/.config/wallpapers/wallpaper.png wallpaper = eDP-1,~/.config/wallpapers/current_wallpaper.png
wallpaper = DP-1,~/.config/wallpapers/wallpaper.png wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png
wallpaper = DP-2,~/.config/wallpapers/wallpaper.png wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png
wallpaper = DP-3,~/.config/wallpapers/wallpaper.png wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png
wallpaper = DP-4,~/.config/wallpapers/wallpaper.png wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png
splash=false splash=false
ipc = off ipc = off

View file

@ -68,6 +68,22 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1710272261, "lastModified": 1710272261,
@ -123,6 +139,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"mobile-nixos": "mobile-nixos", "mobile-nixos": "mobile-nixos",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"osu-nixos": "osu-nixos" "osu-nixos": "osu-nixos"
} }

View file

@ -4,6 +4,7 @@
outputs = inputs@{ outputs = inputs@{
nixpkgs, nixpkgs,
nixos-hardware,
home-manager, home-manager,
osu-nixos, osu-nixos,
... ...
@ -28,10 +29,22 @@
} }
]; ];
}; };
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 { lappy = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
nixos-hardware.nixosModules.framework-12th-gen-intel
./packages/default.nix ./packages/default.nix
./hosts/lappy/default.nix ./hosts/lappy/default.nix
@ -68,17 +81,16 @@
}; };
inputs = { inputs = {
mobile-nixos = {
url = "github:nixos/mobile-nixos";
flake = false;
};
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; 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"; osu-nixos.url = "github:Asqiir/osu-nixos";
}; };
} }

View file

@ -24,7 +24,22 @@ in
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
security.rtkit.enable = true; 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 # Wireguard stuff, to-do make better
networking.firewall = { networking.firewall = {

View file

@ -12,77 +12,76 @@
artPkgs.enable = true; artPkgs.enable = true;
}; };
system.nixos.tags = [ "Nya_Beginnings" ];
services.logind.powerKey = "ignore"; services.logind.powerKey = "ignore";
services.logind.powerKeyLongPress = "poweroff"; 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 = { networking = {
hostName = "lappy"; hostName = "lappy";
networkmanager.enable = true; networkmanager.enable = true;
}; };
time.timeZone = "America/Lost_Angeles"; time.timeZone = "America/Lost_Angeles";
services.syncthing = {
enable = true;
user = "stitchynyan";
openDefaultPorts = true;
databaseDir = "/home/stitchynyan/.local/share/syncthing";
dataDir = "/home/stitchynyan";
};
boot.kernelParams = [ boot.kernelParams = [
#"intel_pstate=no_hwp" #"i915.enable_guc=7"
"kernel.yama.ptrace_scope=0"
#"mem_sleep_default=deep"
"acpi_osi=\"!Windows 2020\""
"module_blacklist=hid_sensor_hub"
"intel_iommu=on" "intel_iommu=on"
"iommu=pt" "iommu=pt"
"nvme.noacpi=1" "kernel.yama.ptrace_scope=0"
#"i915.enable_guc=7"
]; ];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.settings.General.Experimental = true;
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = with pkgs; [ extraPackages = lib.attrVals [
intel-compute-runtime "intel-compute-runtime"
intel-media-driver "intel-media-driver"
]; ] pkgs;
}; };
systemd.extraConfig = systemd.extraConfig = "AllowedCPUs=8-15";
"AllowedCPUs=8-15"
;
services.tlp = { services.tlp = {
enable = true; enable = true;
settings = { settings = {
TLP_DEFAULT_MODE = "BAT";
TLP_PERSISTENT_DEFAULT = 1;
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; 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_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100; CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0; CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 50; CPU_MAX_PERF_ON_BAT = 50;
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;
TLP_DEFAULT_MODE = "BAT";
TLP_PERSISTENT_DEFAULT = 1;
#Optional helps save long term battery health #Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging
}; };
}; };

64
hosts/scarab/default.nix Normal file
View file

@ -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";
}

View file

@ -15,29 +15,29 @@
programs = { programs = {
firefox.enable = true; firefox.enable = true;
hyprland.enable = true; hyprland.enable = lib.mkIf( config.stitchyconf.form == "pc") true;
openvpn3.enable = true; openvpn3.enable = lib.mkIf( config.stitchyconf.form == "pc") true;
steam = { steam = {
enable = true; enable = lib.mkIf( config.stitchyconf.form == "pc") true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
}; };
}; };
services = { services = {
avahi = { avahi = {
enable = true; enable = false;
nssmdns4 = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
}; };
blueman.enable = true; blueman.enable = true;
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = lib.mkIf( config.stitchyconf.form == "pc") true;
pipewire = { pipewire = {
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;
alsa.enable = true; alsa.enable = true;
}; };
printing.enable = true; printing.enable = false
usbmuxd.enable = true; usbmuxd.enable = false;
xserver.enable = true; xserver.enable = true;
}; };