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-07-18 21:46:25 +02:00
|
|
|
|
|
|
|
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
|
2024-08-03 20:42:39 +02:00
|
|
|
|
|
|
|
rgba =
|
|
|
|
color: transparency:
|
|
|
|
''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${transparency})'';
|
|
|
|
|
2024-07-18 21:46:25 +02:00
|
|
|
bg = ''linear-gradient(${rgba "base00" "0.7"}, ${rgba "base00" "0.7"})'';
|
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-08-03 21:26:45 +02:00
|
|
|
nixpkgs.overlays = with self.overlays; [ phinger-cursors ];
|
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-12 01:23:54 +02:00
|
|
|
programs.man.generateCaches = mkForce false;
|
2024-07-18 04:45:40 +02:00
|
|
|
|
2024-08-11 02:55:04 +02:00
|
|
|
xdg = {
|
|
|
|
desktopEntries = {
|
|
|
|
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;
|
|
|
|
mullvad-vpn = no;
|
|
|
|
nixos-manual = no;
|
|
|
|
image-analyzer = no;
|
|
|
|
activate-linux = no;
|
2024-08-12 19:39:58 +02:00
|
|
|
kvantummanager = 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"
|
|
|
|
"org.gnome.Contacts.desktop"
|
|
|
|
"org.gnome.Calendar.desktop"
|
|
|
|
];
|
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" = {
|
2024-08-11 21:37:48 +02:00
|
|
|
lock-screen = [ "upcoming-events" ];
|
|
|
|
|
2024-07-20 00:26:44 +02:00
|
|
|
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-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 {
|
|
|
|
background: ${bg}, url('file:///home/${username}/wall-lock.jpg');
|
|
|
|
}
|
|
|
|
|
|
|
|
phosh-app-grid {
|
|
|
|
background: ${bg}, url('file:///home/${username}/wall-grid.jpg');
|
|
|
|
}
|
|
|
|
|
|
|
|
phosh-top-panel {
|
|
|
|
background: ${bg}, url('file:///home/${username}/wall-panel.jpg');
|
|
|
|
}
|
|
|
|
|
|
|
|
phosh-home {
|
|
|
|
background: ${bg}, url('file:///home/${username}/wall-home.jpg');
|
|
|
|
}
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
|
|
|
systemPackages = attrValues {
|
|
|
|
inherit (self.packages.${pkgs.system}) webp-thumbnailer;
|
|
|
|
inherit (pkgs.gnome) gnome-contacts;
|
|
|
|
|
|
|
|
inherit (pkgs)
|
|
|
|
chatty
|
|
|
|
megapixels
|
|
|
|
livi
|
|
|
|
gnome-calendar
|
|
|
|
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-07-18 21:46:25 +02:00
|
|
|
xserver = {
|
|
|
|
displayManager.lightdm.enable = false;
|
|
|
|
|
|
|
|
desktopManager.phosh = {
|
|
|
|
enable = true;
|
|
|
|
group = "users";
|
|
|
|
user = username;
|
|
|
|
|
|
|
|
phocConfig = {
|
|
|
|
xwayland = "immediate";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-18 01:07:11 +02:00
|
|
|
udisks2.enable = mkForce false;
|
|
|
|
pipewire.enable = mkForce false;
|
2024-07-18 21:46:25 +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-07-17 12:49:30 +02:00
|
|
|
documentation.man.generateCaches = false;
|
|
|
|
|
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-07-24 01:18:49 +02:00
|
|
|
min = 912000;
|
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
|
|
|
}
|