2024-08-03 20:42:39 +02:00
|
|
|
|
{
|
|
|
|
|
self,
|
|
|
|
|
pkgs,
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2024-06-15 16:46:45 +02:00
|
|
|
|
|
2024-06-15 17:56:02 +02:00
|
|
|
|
let
|
2024-07-18 23:49:55 +02:00
|
|
|
|
inherit (lib) mkIf mkForce;
|
2024-07-18 21:46:25 +02:00
|
|
|
|
inherit (config.modules.system) username;
|
2024-06-16 18:50:49 +02:00
|
|
|
|
inherit (builtins) attrValues;
|
2024-08-16 23:41:53 +02:00
|
|
|
|
|
2024-08-09 03:38:09 +02:00
|
|
|
|
no = {
|
|
|
|
|
name = "";
|
|
|
|
|
settings = {
|
|
|
|
|
Hidden = "true";
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-06-15 17:56:02 +02:00
|
|
|
|
in
|
2024-06-15 16:46:45 +02:00
|
|
|
|
{
|
2024-06-28 05:02:38 +02:00
|
|
|
|
imports = attrValues self.nixosModules;
|
2024-06-25 02:12:02 +02:00
|
|
|
|
|
2024-09-02 01:44:17 +02:00
|
|
|
|
nixpkgs = {
|
|
|
|
|
overlays = with self.overlays; [ phinger-cursors ];
|
|
|
|
|
|
|
|
|
|
config.permittedInsecurePackages = [
|
|
|
|
|
"olm-3.2.16"
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-06-25 01:10:49 +02:00
|
|
|
|
|
|
|
|
|
home-manager.sharedModules = attrValues {
|
2024-07-19 01:41:23 +02:00
|
|
|
|
inherit (self.homeModules)
|
2024-09-09 01:09:10 +02:00
|
|
|
|
dconf
|
2024-06-25 01:10:49 +02:00
|
|
|
|
eza
|
|
|
|
|
fish
|
|
|
|
|
git
|
|
|
|
|
gpg
|
|
|
|
|
gtk
|
|
|
|
|
htop
|
2024-08-12 01:23:54 +02:00
|
|
|
|
kitty
|
2024-06-25 01:10:49 +02:00
|
|
|
|
librewolf
|
|
|
|
|
neovim
|
|
|
|
|
starship
|
|
|
|
|
xdg-user-dirs
|
|
|
|
|
xresources
|
|
|
|
|
;
|
2024-07-17 12:49:30 +02:00
|
|
|
|
|
|
|
|
|
config = {
|
2024-08-16 21:06:00 +02:00
|
|
|
|
programs = {
|
|
|
|
|
fish.functions.video = # fish
|
|
|
|
|
''
|
|
|
|
|
${pkgs.v4l-utils}/bin/media-ctl -d1 --links '"gc2145 3-003c":0->1:0[0],"ov5640 3-004c":0->1:0[1]'
|
|
|
|
|
${pkgs.v4l-utils}/bin/media-ctl -d1 --set-v4l2 '"ov5640 3-004c":0[fmt:UYVY8_2X8/1280x720@1/30]'
|
|
|
|
|
|
|
|
|
|
ffmpeg \
|
|
|
|
|
-input_format yuv420p \
|
|
|
|
|
-s 1280x720 \
|
|
|
|
|
-f video4linux2 \
|
|
|
|
|
-thread_queue_size 4096 \
|
|
|
|
|
-i /dev/video1 \
|
|
|
|
|
-f pulse \
|
|
|
|
|
-thread_queue_size 256 \
|
|
|
|
|
-i alsa_input.platform-sound.Voice_Call__DigitalMic__source \
|
|
|
|
|
-c:a libopus \
|
|
|
|
|
-c:v libx264 \
|
|
|
|
|
-preset ultrafast \
|
|
|
|
|
-qp 23 \
|
2024-08-30 01:08:47 +02:00
|
|
|
|
"$(date '+%x(%a)%R').mp4"
|
2024-08-16 21:06:00 +02:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
man.generateCaches = mkForce false;
|
|
|
|
|
};
|
2024-07-18 04:45:40 +02:00
|
|
|
|
|
2024-08-11 02:55:04 +02:00
|
|
|
|
xdg = {
|
|
|
|
|
desktopEntries = {
|
2024-08-16 23:48:45 +02:00
|
|
|
|
anki = no;
|
2024-08-11 02:55:04 +02:00
|
|
|
|
htop = no;
|
|
|
|
|
fish = no;
|
|
|
|
|
nvim = no;
|
|
|
|
|
yazi = no;
|
2024-08-12 19:39:58 +02:00
|
|
|
|
qt5ct = no;
|
|
|
|
|
qt6ct = no;
|
2024-08-11 02:55:04 +02:00
|
|
|
|
gcdemu = no;
|
|
|
|
|
nixos-manual = no;
|
|
|
|
|
image-analyzer = no;
|
2024-08-12 19:39:58 +02:00
|
|
|
|
kvantummanager = no;
|
2024-08-16 23:48:45 +02:00
|
|
|
|
chromium-browser = no;
|
2024-08-10 01:26:42 +02:00
|
|
|
|
|
2024-08-11 02:55:04 +02:00
|
|
|
|
"org.gnome.Extensions" = no;
|
|
|
|
|
"org.pwmt.zathura" = no;
|
|
|
|
|
"org.gnome.eog" = no;
|
|
|
|
|
"org.gnome.Settings" = no;
|
|
|
|
|
"org.sigxcpu.Livi" = no;
|
|
|
|
|
};
|
2024-08-10 01:26:42 +02:00
|
|
|
|
|
2024-08-11 02:55:04 +02:00
|
|
|
|
userDirs = {
|
2024-08-16 04:18:36 +02:00
|
|
|
|
download = mkForce "/home/${username}";
|
|
|
|
|
documents = mkForce "/home/${username}";
|
|
|
|
|
music = mkForce "/home/${username}";
|
|
|
|
|
pictures = mkForce "/home/${username}";
|
|
|
|
|
videos = mkForce "/home/${username}";
|
2024-08-11 02:55:04 +02:00
|
|
|
|
};
|
2024-07-25 22:50:14 +02:00
|
|
|
|
};
|
2024-07-17 12:49:30 +02:00
|
|
|
|
};
|
2024-06-25 01:10:49 +02:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-12 01:23:54 +02:00
|
|
|
|
environment = {
|
|
|
|
|
sessionVariables = {
|
|
|
|
|
LIBGL_ALWAYS_SOFTWARE = "true";
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-02 00:07:43 +02:00
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
|
chatty
|
|
|
|
|
megapixels
|
|
|
|
|
livi
|
|
|
|
|
gnome-contacts
|
|
|
|
|
eog
|
|
|
|
|
];
|
2024-07-08 20:07:18 +02:00
|
|
|
|
};
|
2024-06-16 21:45:01 +02:00
|
|
|
|
|
2024-06-19 08:09:54 +02:00
|
|
|
|
modules = {
|
|
|
|
|
system = {
|
|
|
|
|
hostName = "mobile-nixos";
|
|
|
|
|
stateVersion = "23.11";
|
2024-07-17 12:49:30 +02:00
|
|
|
|
mullvad = true;
|
2024-08-16 06:22:14 +02:00
|
|
|
|
phone = true;
|
2024-06-20 19:22:41 +02:00
|
|
|
|
};
|
2024-06-20 17:08:22 +02:00
|
|
|
|
|
2024-06-24 22:21:22 +02:00
|
|
|
|
hardware.keyboardBinds = true;
|
2024-06-16 18:50:49 +02:00
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 21:46:25 +02:00
|
|
|
|
i18n.inputMethod.enable = mkForce false;
|
|
|
|
|
|
2024-06-15 17:56:02 +02:00
|
|
|
|
programs = {
|
|
|
|
|
calls.enable = true;
|
2024-07-18 01:07:11 +02:00
|
|
|
|
|
|
|
|
|
cdemu.enable = mkForce false;
|
2024-07-18 21:46:25 +02:00
|
|
|
|
hyprland.enable = mkForce false;
|
2024-07-24 20:39:31 +02:00
|
|
|
|
thunar.enable = mkForce false;
|
2024-06-15 17:56:02 +02:00
|
|
|
|
};
|
2024-06-15 16:46:45 +02:00
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
wireless.enable = false;
|
2024-06-15 18:07:24 +02:00
|
|
|
|
wireguard.enable = true;
|
2024-07-18 01:07:11 +02:00
|
|
|
|
|
2024-08-13 02:02:56 +02:00
|
|
|
|
networkmanager.ensureProfiles.profiles = {
|
|
|
|
|
mobile = {
|
|
|
|
|
connection = {
|
|
|
|
|
id = "4G";
|
|
|
|
|
type = "gsm";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
gsm.apn = "NXTGENPHONE";
|
|
|
|
|
ipv4.method = "auto";
|
|
|
|
|
|
|
|
|
|
ipv6 = {
|
|
|
|
|
addr-gen-mode = "default";
|
|
|
|
|
method = "auto";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 01:07:11 +02:00
|
|
|
|
firewall.checkReversePath = mkForce false;
|
2024-06-15 16:46:45 +02:00
|
|
|
|
};
|
|
|
|
|
|
2024-06-15 18:06:53 +02:00
|
|
|
|
services = {
|
2024-08-29 01:55:24 +02:00
|
|
|
|
xserver = {
|
|
|
|
|
displayManager.lightdm.enable = false;
|
|
|
|
|
|
|
|
|
|
desktopManager.phosh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
group = "users";
|
|
|
|
|
user = username;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 01:07:11 +02:00
|
|
|
|
udisks2.enable = mkForce false;
|
|
|
|
|
pipewire.enable = mkForce false;
|
2024-08-29 01:55:24 +02:00
|
|
|
|
greetd.enable = mkForce false;
|
2024-07-18 01:07:11 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
enableContainers = false;
|
|
|
|
|
|
|
|
|
|
binfmt.emulatedSystems = mkForce [ ];
|
2024-07-18 23:49:55 +02:00
|
|
|
|
loader.systemd-boot.enable = mkIf (pkgs.system == "aarch64-linux") (mkForce false);
|
2024-08-03 18:46:41 +02:00
|
|
|
|
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
|
"vm.dirty_background_ratio" = 5;
|
|
|
|
|
"vm.dirty_ratio" = 10;
|
|
|
|
|
};
|
2024-06-17 17:27:00 +02:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-17 21:25:04 +02:00
|
|
|
|
documentation = {
|
|
|
|
|
enable = false;
|
|
|
|
|
man.generateCaches = false;
|
|
|
|
|
};
|
2024-07-17 12:49:30 +02:00
|
|
|
|
|
2024-07-18 01:07:11 +02:00
|
|
|
|
hardware.graphics.enable32Bit = mkForce false;
|
|
|
|
|
|
2024-06-28 19:55:20 +02:00
|
|
|
|
powerManagement = {
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
cpufreq = rec {
|
2024-08-17 05:59:05 +02:00
|
|
|
|
min = 816000;
|
2024-06-28 19:55:20 +02:00
|
|
|
|
max = min;
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-20 00:28:32 +02:00
|
|
|
|
cpuFreqGovernor = "performance";
|
2024-06-28 19:55:20 +02:00
|
|
|
|
};
|
2024-06-15 16:46:45 +02:00
|
|
|
|
}
|