Compare commits

...

3 Commits

Author SHA1 Message Date
5a15be813f feat(pumo): add config for phone pumo 2026-05-01 14:44:55 +02:00
5b4ca2a13f feat(packages): add QGIS 2026-04-29 19:24:21 +02:00
f3141d6108 feat(i18n): proper multilingual input
Use fcitx5 to switch between different inputs. Installed mozc-ut for
Japanese input with the bepo layout, as well as fcitx5-chinese to load
table-defined layouts for the IPA/X-SAMPA input method.

Currently, mozc_server and fcitx5 need to be launched by the
compositor (only Hyprland for now), auto-launching from module options
needs to be implemented in the future.
2026-04-28 10:47:38 +02:00
17 changed files with 1863 additions and 31 deletions

17
flake.lock generated
View File

@@ -411,6 +411,22 @@
"url": "https://labs.phundrak.com/phundrak/jj-cz"
}
},
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1772289954,
"narHash": "sha256-iDdtwk/dFb6AsXMtcOpZixxXl6C1HNUPe6cglxxHO7M=",
"owner": "mobile-nixos",
"repo": "mobile-nixos",
"rev": "1a9e0af79dc7b5e29ed772f1a8a76fcbd9d45fdf",
"type": "github"
},
"original": {
"owner": "mobile-nixos",
"repo": "mobile-nixos",
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": [
@@ -593,6 +609,7 @@
"flake-utils": "flake-utils_2",
"home-manager": "home-manager",
"jj-cz": "jj-cz",
"mobile-nixos": "mobile-nixos",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs",
"opencode": "opencode",

View File

@@ -30,6 +30,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
mobile-nixos = {
url = "github:mobile-nixos/mobile-nixos";
flake = false; # It is not as a flake
};
opencode = {
url = "github:anomalyco/opencode/v1.3.15";
inputs.nixpkgs.follows = "nixpkgs";
@@ -85,6 +90,7 @@
nixpkgs,
flake-utils,
home-manager,
mobile-nixos,
srvos,
...
} @ inputs:
@@ -176,6 +182,14 @@
./hosts/naromk3/configuration.nix
];
};
pumo = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
inherit specialArgs;
modules = withSystemModules [
(import "${mobile-nixos}/lib/configuration.nix" {device = "oneplus-enchilada";})
./hosts/pumo
];
};
tilo = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/tilo/configuration.nix;

View File

@@ -41,6 +41,7 @@
};
sound.enable = true;
};
i18n.input.enable = true;
misc.keymap = "fr-bepo";
networking = {
hostname = "gampo";

View File

@@ -86,6 +86,7 @@
scarlett.enable = true;
};
};
i18n.input.enable = true;
misc.keymap = "fr-bepo";
networking = {
hostname = "marpa";

92
hosts/pumo/default.nix Normal file
View File

@@ -0,0 +1,92 @@
# Minimal configuration for OnePlus 6 (enchilada) NixOS Mobile
# Focus on essentials: SSH, wireless, and basic tools
{
pkgs,
inputs,
...
}: {
imports = [
inputs.sops-nix.nixosModules.sops
../../system
];
nixpkgs.config.permittedInsecurePackages = ["olm-3.2.16"];
mobile.boot.boot-control.enable = false;
mySystem = {
desktop = {
hyprland.enable = true;
niri.enable = true;
waydroid.enable = true;
xserver = {
enable = true;
de = "gnome";
};
};
dev.docker = {
enable = true;
podman.enable = true;
autoprune.enable = true;
};
hardware = {
bluetooth.enable = true;
sound = {
enable = true;
usePulseaudio = true;
};
};
i18n.input.enable = true;
misc = {
keymap = "fr-bepo";
mobile = true;
};
networking = {
hostname = "pumo";
id = "93595b88";
};
packages = {
appimage.enable = true;
flatpak.enable = true;
nix.nix-ld.enable = true;
};
services = {
languagetool.enable = true;
printing.enable = true;
ssh.enable = true;
};
users = {
root.disablePassword = true;
phundrak = {
enable = true;
trusted = true;
extraGroups = ["feedbackd"];
};
};
};
programs = {
dconf.enable = true;
calls.enable = true;
zsh.enable = true;
};
hardware.sensor.iio.enable = true;
# Minimal essential packages
environment.systemPackages = with pkgs; [
chatty # IM and SMS
epiphany
nixd
git
vim
emacs
wget
curl
jujutsu
firefox
kitty
];
system.stateVersion = "25.11";
}

View File

@@ -54,7 +54,7 @@ in {
};
};
config.boot = {
config.boot = mkIf (! config.mySystem.misc.mobile) {
initrd.kernelModules = lib.lists.singleton (
if config.mySystem.hardware.amdgpu.enable
then "amdgpu"

View File

@@ -30,6 +30,7 @@ in {
example = "fr-bepo";
description = "Keymap to use in the TTY console";
};
mobile = mkEnableOption "Enable if using Mobile NixOS";
};
config = {

View File

@@ -30,6 +30,7 @@ in {
games.enable = false;
gnome-remote-desktop.enable = true;
gnome-online-accounts.enable = true;
gnome-keyring.enable = true;
sushi.enable = true;
};

View File

@@ -8,7 +8,8 @@ with lib; let
cfg = config.mySystem.hardware.sound;
in {
options.mySystem.hardware.sound = {
enable = mkEnableOption "Whether to enable sounds with Pipewire";
enable = mkEnableOption "Whether to enable sounds";
usePulseaudio = mkEnableOption "Activate sound support with pulseaudio";
scarlett.enable = mkEnableOption "Activate support for Scarlett sound card";
alsa = mkOption {
type = types.bool;
@@ -32,13 +33,14 @@ in {
config = {
environment.systemPackages = mkIf cfg.scarlett.enable [pkgs.alsa-scarlett-gui];
services.pipewire = mkIf cfg.enable {
enable = true;
alsa = mkIf cfg.alsa {
services = {
pipewire.enable = mkForce (cfg.enable && ! cfg.usePulseaudio);
pipewire.alsa = {
enable = mkDefault true;
support32Bit = mkDefault true;
};
jack.enable = mkDefault cfg.jack;
pipewire.jack.enable = cfg.jack;
pulseaudio.enable = cfg.usePulseaudio;
};
programs.noisetorch = mkIf cfg.enable {
inherit (cfg) enable;

View File

@@ -1,5 +1,6 @@
{
imports = [
./input.nix
./locale.nix
];
}

25
system/i18n/input.nix Normal file
View File

@@ -0,0 +1,25 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.mySystem.i18n.input;
in {
options.mySystem.i18n.input.enable = mkEnableOption "Enable i18n input with fcitx5";
config.i18n.inputMethod = mkIf cfg.enable {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-mozc-ut # Japanese input support
fcitx5-nord
fcitx5-table-other # X-SAMPA to IPA support
qt6Packages.fcitx5-chinese-addons # allow to load table addons
qt6Packages.fcitx5-configtool
qt6Packages.fcitx5-with-addons
];
};
}

View File

@@ -1,5 +1,4 @@
{
pkgs,
lib,
config,
...
@@ -11,12 +10,7 @@ in {
enable = mkEnableOption "Enable Flatpak support";
builder.enable = mkEnableOption "Enable Flatpak builder";
};
config = {
services.flatpak = mkIf cfg.enable {
inherit (cfg) enable;
};
environment.systemPackages = mkIf cfg.builder.enable [
pkgs.flatpak-buildR
];
config.services.flatpak = mkIf cfg.enable {
inherit (cfg) enable;
};
}

View File

@@ -10,13 +10,18 @@ in {
options.mySystem.users.phundrak = {
enable = mkEnableOption "Enables user phundrak";
trusted = mkEnableOption "Mark the user as trusted by Nix";
extraGroups = mkOption {
type = types.listOf types.str;
default = [];
example = ["feedbackd"];
};
};
config = {
users.users.phundrak = mkIf cfg.enable {
isNormalUser = true;
description = "Lucien Cartier-Tilet";
extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman" "plugdev" "games" "audio" "input"];
extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman" "plugdev" "games" "audio" "input"] ++ cfg.extraGroups;
shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = lib.filesystem.listFilesRecursive ../../users/phundrak/keys;
};

View File

@@ -50,10 +50,13 @@ in {
systemd.enable = false;
importantPrefixes = ["$left" "$right" "$up" "$down" "$menu"];
settings = {
env = [
"XMODIFIERS,@im=fcitx"
"XCURSOR_SIZE,12"
];
input = {
kb_layout = "fr,us";
kb_variant = "bepo_afnor,";
# kb_options = "caps:ctrl_modifier";
numlock_by_default = true;
follow_mouse = 1;
touchpad.natural_scroll = false;
@@ -106,6 +109,8 @@ in {
"pactl load-module module-switch-on-connect"
"${pkgs.mpc}/bin/mpc stop"
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"${pkgs.mozc}/lib/mozc/mozc_server"
"${pkgs.fcitx5}/bin/fcitx5 -d"
]
++ lib.lists.optional (! caelestiaEnabled) "${pkgs.networkmanagerapplet}/bin/nm-applet";
};
@@ -170,8 +175,6 @@ in {
bind = SUPER_SHIFT, minus, movetoworkspace, 8
bind = SUPER_SHIFT, slash, movetoworkspace, 9
bind = SUPER_SHIFT, asterisk, movetoworkspace, 10
env = XCURSOR_SIZE,12
'';
};
};

1673
users/phundrak/XCompose Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -157,16 +157,19 @@
vcs.jj.signing.enable = true;
};
fullDesktop = true;
file."${config.home.homeDirectory}/.ssh/allowed_signers" = {
enable = true;
text = lib.strings.join "\n" (
map (file: let
content = lib.strings.trim (builtins.readFile file);
parts = lib.strings.splitString " " content;
email = lib.lists.last parts;
in "${email} namespaces=\"git\" ${content}")
(lib.filesystem.listFilesRecursive ./keys)
);
file = {
".XCompose".source = ./XCompose;
"${config.home.homeDirectory}/.ssh/allowed_signers" = {
enable = true;
text = lib.strings.join "\n" (
map (file: let
content = lib.strings.trim (builtins.readFile file);
parts = lib.strings.splitString " " content;
email = lib.lists.last parts;
in "${email} namespaces=\"git\" ${content}")
(lib.filesystem.listFilesRecursive ./keys)
);
};
};
};

View File

@@ -32,17 +32,16 @@ in {
audacity
plexamp
plex-desktop
spicetify-cli
pavucontrol # Volume control
# Social
vesktop # Discord alternative that works well with wayland
element-desktop
signal-desktop
# Misc
bitwarden-desktop
# gplates
qgis
kicad
handy
libnotify
nextcloud-client