WIP mobile, broken build

This commit is contained in:
Henry Hiles 2025-07-12 18:21:49 -04:00
parent b506e8af60
commit 4a03eb9193
No known key found for this signature in database
14 changed files with 95 additions and 82 deletions

View file

@ -0,0 +1,8 @@
{inputs, ...}: {
imports = [inputs.nixpkgs-gnome-mobile.nixosModules.gnome-mobile];
i18n.inputMethod = {
enable = true;
type = "ibus";
};
}

View file

@ -0,0 +1,20 @@
{
config,
inputs,
pkgs,
lib,
...
}: {
imports = [
(_:
import
"${inputs.sdm845}/nixos/profiles/boot/kernel/sdm845-mainline"
{
inherit pkgs lib config;
inputs = inputs.sdm845.inputs;
})
];
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.config.allowBroken = true;
}

View file

@ -1,4 +0,0 @@
{inputs, ...}: {
imports = ["${inputs.sdm845}/nixos/profiles/boot/kernel/sdm845-mainline"];
hardware.graphics.enable32Bit = false;
}

View file

@ -14,16 +14,26 @@ in {
enable = true;
partitions."03-root".Type = "root";
};
boot.initrd.systemd = {
enable = true;
root = "gpt-auto";
};
boot.initrd.supportedFilesystems.ext4 = true;
fileSystems."/".device = "/dev/disk/by-label/nixos";
fileSystems."/".fsType = "ext4";
fileSystems."/boot".device = "/dev/disk/by-label/ESP";
fileSystems."/boot".fsType = "vfat";
boot.initrd = {
supportedFilesystems.ext4 = true;
systemd = {
enable = true;
root = "gpt-auto";
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
};
image.repart = {
name = "image";
partitions = {

51
flake.lock generated
View file

@ -1084,6 +1084,21 @@
"type": "github"
}
},
"gnome-mobile": {
"locked": {
"lastModified": 1748795015,
"narHash": "sha256-+XyXaa3KmgOykQpo6k4XsEaHWDGj8inCxMMGOWat4EM=",
"owner": "chuangzhu",
"repo": "nixpkgs-gnome-mobile",
"rev": "825ebb10c8bf02cb4b6553f3b85e169dc92484d7",
"type": "github"
},
"original": {
"owner": "chuangzhu",
"repo": "nixpkgs-gnome-mobile",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
@ -1599,26 +1614,6 @@
"type": "github"
}
},
"nh": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751375534,
"narHash": "sha256-9z1W64dDVtVxqgPzUbjIQqRfygg1hdivUOZ6d/H+yFg=",
"owner": "nix-community",
"repo": "nh",
"rev": "d0abb8eebe32f79ce4659e68dd777cf497a5d3d2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nh",
"type": "github"
}
},
"niri-flake": {
"inputs": {
"niri-stable": [
@ -2548,10 +2543,10 @@
"disko": "disko",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts",
"gnome-mobile": "gnome-mobile",
"grapevine": "grapevine",
"home-manager": "home-manager_2",
"matrixoidc": "matrixoidc",
"nh": "nh",
"nix-matrix-appservices": "nix-matrix-appservices",
"nixpkgs": "nixpkgs_2",
"ooye": "ooye",
@ -2732,16 +2727,16 @@
"weird-deployer": "weird-deployer"
},
"locked": {
"lastModified": 1752251688,
"narHash": "sha256-u2hG3OGbZnhDNliMdWk5iGXRS5q6/XLLhvBCN7Fi/jE=",
"owner": "linyinfeng",
"repo": "dotfiles",
"rev": "0662e5ab50c35541d0b56cf5b568ca3c940b52bf",
"lastModified": 1752351560,
"narHash": "sha256-l78+LOhFBdKktQJ9ipDcJ+gne7hprjQUqeafVGU8EzQ=",
"owner": "Henry-Hiles",
"repo": "dotfiles-fork",
"rev": "1daa02b1628000a8958d444100693b8a3763c401",
"type": "github"
},
"original": {
"owner": "linyinfeng",
"repo": "dotfiles",
"owner": "Henry-Hiles",
"repo": "dotfiles-fork",
"type": "github"
}
},

View file

@ -1,5 +1,6 @@
{
inputs = {
gnome-mobile.url = "github:chuangzhu/nixpkgs-gnome-mobile";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
wrapper-manager.url = "github:viperML/wrapper-manager";
flake-parts.url = "github:hercules-ci/flake-parts";
@ -47,16 +48,12 @@
url = "github:wamserma/flake-programs-sqlite";
inputs.nixpkgs.follows = "nixpkgs";
};
nh = {
url = "github:nix-community/nh";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false;
};
sdm845 = {
url = "github:linyinfeng/dotfiles";
url = "github:Henry-Hiles/dotfiles-fork";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@ -67,25 +64,25 @@
opt = lib.optionals;
dirFiles = type: dir: lib.filter (lib.hasSuffix type) (lib.filesystem.listFilesRecursive dir);
};
system = hostname: isDesktop: isGraphical: arch:
system = info:
lib.nixosSystem {
system = "${arch}-linux";
specialArgs = {
inherit inputs isDesktop dirUtils;
inherit inputs dirUtils;
isDesktop = info.isDesktop or false;
};
modules = with dirUtils;
[
./wrappers
{networking.hostName = hostname;}
./wrappers/default.nix
{networking.hostName = info.hostname;}
inputs.agenix.nixosModules.default
inputs.run0-sudo-shim.nixosModules.default
]
++ dirFiles ".nix" ./clients/${hostname}
++ dirFiles ".nix" ./clients/${info.hostname}
++ dirFiles ".nix" ./modules/common
++ opt (!isDesktop) (dirFiles ".nix" ./modules/server)
++ opt isDesktop (dirFiles ".nix" ./modules/desktop)
++ opt isGraphical (
++ opt (info.isServer or false) (dirFiles ".nix" ./modules/server)
++ opt (info.isDesktop or false) (dirFiles ".nix" ./modules/desktop)
++ opt (info.isGraphical or info.isDesktop or false) (
(dirFiles ".nix" ./modules/graphical)
++ [
inputs.home-manager.nixosModules.home-manager
@ -102,15 +99,11 @@
formatter = pkgs.alejandra;
};
flake.nixosConfigurations = builtins.mapAttrs (name: value: system name value.isDesktop (value.isGraphical or value.isDesktop) (value.arch or "x86_64")) {
"quadraticserver".isDesktop = false;
flake.nixosConfigurations = builtins.mapAttrs (name: value: system (value // {hostname = name;})) {
"quadraticpc".isDesktop = true;
"quadtop".isDesktop = true;
"quadphone" = {
isDesktop = true;
isGraphical = true;
arch = "aarch64";
};
"quadraticserver".isServer = true;
"quadphone".isGraphical = true;
};
};
}

6
modules/common/arch.nix Normal file
View file

@ -0,0 +1,6 @@
{lib, ...}: {
nixpkgs = {
hostPlatform = lib.mkDefault "x86_64-linux";
buildPlatform = "x86_64-linux";
};
}

View file

@ -1,23 +1,14 @@
{
inputs,
pkgs,
lib,
...
}: let
pkg = inputs.nh.packages.${pkgs.system}.default;
exe = lib.getExe pkg;
in {
programs.nh = {
enable = true;
package = pkg;
clean.enable = true;
flake = "/home/quadradical/.config/nixos";
};
environment.shellAliases = {
clean = "${exe} clean all";
clean = "nh clean all";
update = "env -C ~/.config/nixos nix flake update && rebuild";
rebuild = "${exe} os switch";
rebuild-server = "${exe} os switch --hostname quadraticserver --target-host 192.168.0.132";
rebuild = "nh os switch";
rebuild-server = "nh os switch --hostname quadraticserver --target-host 192.168.0.132";
};
}

View file

@ -5,6 +5,7 @@
inkscape
r2modman
libreoffice
cinny-desktop
prismlauncher
nexusmods-app-unfree
];

View file

@ -8,7 +8,6 @@
wl-clipboard
google-cursor
authenticator
cinny-desktop
papirus-icon-theme
];
}

View file

@ -1,6 +0,0 @@
{
# wrappers.steam = {
# basePackage = pkgs.steam;
# env.MANGOHUD.value = "1";
# };
}

View file

@ -9,7 +9,7 @@
(inputs.wrapper-manager.lib {
inherit pkgs;
specialArgs = {inherit inputs;};
modules = with dirUtils; dirFiles ".nix" ./common ++ opt isDesktop (dirFiles ".nix" ./common-desktop);
modules = with dirUtils; dirFiles ".nix" ./common ++ opt isDesktop (dirFiles ".nix" ./desktop);
})
.config.build.toplevel
];