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; enable = true;
partitions."03-root".Type = "root"; partitions."03-root".Type = "root";
}; };
boot.initrd.systemd = {
boot.initrd = {
supportedFilesystems.ext4 = true;
systemd = {
enable = true; enable = true;
root = "gpt-auto"; root = "gpt-auto";
}; };
boot.initrd.supportedFilesystems.ext4 = true; };
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
};
fileSystems."/".device = "/dev/disk/by-label/nixos";
fileSystems."/".fsType = "ext4";
fileSystems."/boot".device = "/dev/disk/by-label/ESP";
fileSystems."/boot".fsType = "vfat";
image.repart = { image.repart = {
name = "image"; name = "image";
partitions = { partitions = {

51
flake.lock generated
View file

@ -1084,6 +1084,21 @@
"type": "github" "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": { "gnome-shell": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1599,26 +1614,6 @@
"type": "github" "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": { "niri-flake": {
"inputs": { "inputs": {
"niri-stable": [ "niri-stable": [
@ -2548,10 +2543,10 @@
"disko": "disko", "disko": "disko",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"gnome-mobile": "gnome-mobile",
"grapevine": "grapevine", "grapevine": "grapevine",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"matrixoidc": "matrixoidc", "matrixoidc": "matrixoidc",
"nh": "nh",
"nix-matrix-appservices": "nix-matrix-appservices", "nix-matrix-appservices": "nix-matrix-appservices",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"ooye": "ooye", "ooye": "ooye",
@ -2732,16 +2727,16 @@
"weird-deployer": "weird-deployer" "weird-deployer": "weird-deployer"
}, },
"locked": { "locked": {
"lastModified": 1752251688, "lastModified": 1752351560,
"narHash": "sha256-u2hG3OGbZnhDNliMdWk5iGXRS5q6/XLLhvBCN7Fi/jE=", "narHash": "sha256-l78+LOhFBdKktQJ9ipDcJ+gne7hprjQUqeafVGU8EzQ=",
"owner": "linyinfeng", "owner": "Henry-Hiles",
"repo": "dotfiles", "repo": "dotfiles-fork",
"rev": "0662e5ab50c35541d0b56cf5b568ca3c940b52bf", "rev": "1daa02b1628000a8958d444100693b8a3763c401",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "linyinfeng", "owner": "Henry-Hiles",
"repo": "dotfiles", "repo": "dotfiles-fork",
"type": "github" "type": "github"
} }
}, },

View file

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

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 = { programs.nh = {
enable = true; enable = true;
package = pkg;
clean.enable = true; clean.enable = true;
flake = "/home/quadradical/.config/nixos"; flake = "/home/quadradical/.config/nixos";
}; };
environment.shellAliases = { environment.shellAliases = {
clean = "${exe} clean all"; clean = "nh clean all";
update = "env -C ~/.config/nixos nix flake update && rebuild"; update = "env -C ~/.config/nixos nix flake update && rebuild";
rebuild = "${exe} os switch"; rebuild = "nh os switch";
rebuild-server = "${exe} os switch --hostname quadraticserver --target-host 192.168.0.132"; rebuild-server = "nh os switch --hostname quadraticserver --target-host 192.168.0.132";
}; };
} }

View file

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

View file

@ -8,7 +8,6 @@
wl-clipboard wl-clipboard
google-cursor google-cursor
authenticator authenticator
cinny-desktop
papirus-icon-theme 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 { (inputs.wrapper-manager.lib {
inherit pkgs; inherit pkgs;
specialArgs = {inherit inputs;}; 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 .config.build.toplevel
]; ];