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-21 19:11:55 +02:00
|
|
|
|
inherit (lib.gvariant) mkTuple mkUint32;
|
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-09-04 04:34:05 +02:00
|
|
|
|
phosh-backgrounds = self.packages.${pkgs.system}.phosh-backgrounds.override {
|
|
|
|
|
color = config.lib.stylix.colors.base00;
|
|
|
|
|
};
|
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-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-18 04:45:40 +02:00
|
|
|
|
dconf.settings = {
|
2024-07-18 06:02:32 +02:00
|
|
|
|
"sm/puri/phosh" = {
|
2024-07-19 02:47:24 +02:00
|
|
|
|
app-filter-mode = [ ];
|
2024-07-18 06:02:32 +02:00
|
|
|
|
enable-suspend = true;
|
2024-08-11 21:35:33 +02:00
|
|
|
|
|
|
|
|
|
favorites = [
|
|
|
|
|
"org.gnome.Calls.desktop"
|
|
|
|
|
"sm.puri.Chatty.desktop"
|
2024-09-02 02:03:22 +02:00
|
|
|
|
"kitty.desktop"
|
|
|
|
|
"librewolf.desktop"
|
2024-08-11 21:35:33 +02:00
|
|
|
|
];
|
2024-07-18 06:02:32 +02:00
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 04:45:40 +02:00
|
|
|
|
"sm/puri/phosh/lockscreen" = {
|
|
|
|
|
shuffle-keypad = true;
|
|
|
|
|
};
|
2024-07-18 04:46:02 +02:00
|
|
|
|
|
2024-07-20 00:26:44 +02:00
|
|
|
|
"sm/puri/phosh/plugins" = {
|
|
|
|
|
quick-settings = [
|
|
|
|
|
"night-light-quick-setting"
|
2024-07-21 19:41:37 +02:00
|
|
|
|
"caffeine-quick-setting"
|
2024-07-20 00:26:44 +02:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 04:46:02 +02:00
|
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
|
show-battery-percentage = true;
|
|
|
|
|
};
|
2024-07-18 04:46:32 +02:00
|
|
|
|
|
2024-09-01 20:15:26 +02:00
|
|
|
|
"org/postmarketos/megapixels" = {
|
|
|
|
|
save-raw = false;
|
2024-09-04 05:16:09 +02:00
|
|
|
|
postprocessor = "${pkgs.megapixels}/share/megapixels/postprocess.sh";
|
2024-09-01 20:15:26 +02:00
|
|
|
|
};
|
|
|
|
|
|
2024-07-21 19:11:55 +02:00
|
|
|
|
"org/gnome/desktop/session" = {
|
|
|
|
|
idle-delay = mkUint32 60;
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 06:03:37 +02:00
|
|
|
|
"org/gnome/desktop/input-sources" = {
|
|
|
|
|
sources = [
|
2024-08-03 20:42:39 +02:00
|
|
|
|
(mkTuple [
|
|
|
|
|
"xkb"
|
|
|
|
|
"us"
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
(mkTuple [
|
|
|
|
|
"xkb"
|
|
|
|
|
"jp+kana"
|
|
|
|
|
])
|
2024-07-18 06:03:37 +02:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-18 04:46:32 +02:00
|
|
|
|
"org/gnome/eog/ui" = {
|
|
|
|
|
image-gallery = true;
|
|
|
|
|
sidebar = false;
|
|
|
|
|
};
|
2024-07-18 19:01:23 +02:00
|
|
|
|
|
|
|
|
|
"org/gnome/settings-daemon/plugins/power" = {
|
|
|
|
|
sleep-inactive-ac-type = "nothing";
|
|
|
|
|
sleep-inactive-battery-type = "suspend";
|
|
|
|
|
};
|
2024-07-18 04:45:40 +02:00
|
|
|
|
};
|
2024-07-17 12:49:30 +02:00
|
|
|
|
};
|
2024-07-18 21:46:25 +02:00
|
|
|
|
|
|
|
|
|
background = {
|
2024-08-03 20:42:39 +02:00
|
|
|
|
stylix.targets.gtk.extraCss = # css
|
|
|
|
|
''
|
|
|
|
|
phosh-lockscreen {
|
2024-09-04 04:34:05 +02:00
|
|
|
|
background: url('${phosh-backgrounds}/wall-lock.jpg');
|
2024-08-03 20:42:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
phosh-app-grid {
|
2024-09-04 04:34:05 +02:00
|
|
|
|
background: url('${phosh-backgrounds}/wall-grid.jpg');
|
2024-08-03 20:42:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
phosh-top-panel {
|
2024-09-04 04:34:05 +02:00
|
|
|
|
background: url('${phosh-backgrounds}/wall-panel.jpg');
|
2024-08-03 20:42:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
phosh-home {
|
2024-09-04 04:34:05 +02:00
|
|
|
|
background: url('${phosh-backgrounds}/wall-home.jpg');
|
2024-08-03 20:42:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
phosh-lockscreen, phosh-app-grid, phosh-top-panel, phosh-home {
|
|
|
|
|
background-size: cover;
|
|
|
|
|
background-position: center;
|
|
|
|
|
}
|
|
|
|
|
'';
|
2024-07-18 21:46:25 +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
|
|
|
|
}
|