Compare commits

..

4 commits

Author SHA1 Message Date
aea964c745
flake update and fstrim 2024-04-20 09:08:27 +00:00
0a8c6eb54e
tweaks for arduino plus bat 2024-04-20 09:08:20 +00:00
9a4993661b
change this for better bat 2024-04-20 09:08:14 +00:00
40a8d3b711
scarab init 2024-04-20 09:07:49 +00:00
6 changed files with 99 additions and 20 deletions

View file

@ -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": {

View file

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

View file

@ -25,6 +25,7 @@ in
security.sudo.wheelNeedsPassword = false;
security.rtkit.enable = true;
services = {
fstrim.enable = true;
resolved = {
enable = true;
dnsovertls = "opportunistic";

View file

@ -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"
@ -62,16 +70,11 @@
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;
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;

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

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