Reorganize
This commit is contained in:
parent
0ce1331346
commit
b506e8af60
27 changed files with 2045 additions and 98 deletions
4
clients/quadphone/hardware-configuration.nix.nix
Normal file
4
clients/quadphone/hardware-configuration.nix.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = ["${inputs.sdm845}/nixos/profiles/boot/kernel/sdm845-mainline"];
|
||||||
|
hardware.graphics.enable32Bit = false;
|
||||||
|
}
|
72
clients/quadphone/repart.nix
Normal file
72
clients/quadphone/repart.nix
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
modulesPath,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
efiArch = pkgs.stdenv.hostPlatform.efiArch;
|
||||||
|
in {
|
||||||
|
imports = ["${modulesPath}/image/repart.nix"];
|
||||||
|
boot.loader.grub.enable = false;
|
||||||
|
|
||||||
|
systemd.repart = {
|
||||||
|
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";
|
||||||
|
image.repart = {
|
||||||
|
name = "image";
|
||||||
|
partitions = {
|
||||||
|
"10-uboot-padding" = {
|
||||||
|
repartConfig = {
|
||||||
|
Type = "linux-generic";
|
||||||
|
Label = "uboot-padding";
|
||||||
|
SizeMinBytes = "10M";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"20-esp" = {
|
||||||
|
contents = {
|
||||||
|
"/EFI/EDK2-UEFI-SHELL/SHELL.EFI".source = "${pkgs.edk2-uefi-shell.overrideAttrs {env.NIX_CFLAGS_COMPILE = "-Wno-error=maybe-uninitialized";}}/shell.efi";
|
||||||
|
"/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi";
|
||||||
|
"/EFI/Linux/${config.system.boot.loader.ukiFile}".source = "${config.system.build.uki}/${config.system.boot.loader.ukiFile}";
|
||||||
|
"/loader/loader.conf".source = pkgs.writeText "loader.conf" ''
|
||||||
|
timeout 5
|
||||||
|
console-mode keep
|
||||||
|
'';
|
||||||
|
"/loader/entries/shell.conf".source = pkgs.writeText "shell.conf" ''
|
||||||
|
title EDK2 UEFI Shell
|
||||||
|
efi /EFI/EDK2-UEFI-SHELL/SHELL.EFI
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
repartConfig = {
|
||||||
|
Type = "esp";
|
||||||
|
Format = "vfat";
|
||||||
|
Label = "ESP";
|
||||||
|
SizeMinBytes = "500M";
|
||||||
|
GrowFileSystem = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"30-root" = {
|
||||||
|
storePaths = [config.system.build.toplevel];
|
||||||
|
contents."/boot".source = pkgs.runCommand "boot" {} "mkdir $out";
|
||||||
|
repartConfig = {
|
||||||
|
Type = "root";
|
||||||
|
Format = "ext4";
|
||||||
|
Label = "nixos";
|
||||||
|
Minimize = "guess";
|
||||||
|
GrowFileSystem = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1930
flake.lock
generated
1930
flake.lock
generated
File diff suppressed because it is too large
Load diff
48
flake.nix
48
flake.nix
|
@ -2,14 +2,11 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
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";
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
firefox-gnome-theme = {
|
|
||||||
url = "github:rafaelmardojai/firefox-gnome-theme";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
run0-sudo-shim = {
|
run0-sudo-shim = {
|
||||||
url = "github:lordgrimmauld/run0-sudo-shim";
|
url = "github:lordgrimmauld/run0-sudo-shim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -54,6 +51,14 @@
|
||||||
url = "github:nix-community/nh";
|
url = "github:nix-community/nh";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
firefox-gnome-theme = {
|
||||||
|
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
sdm845 = {
|
||||||
|
url = "github:linyinfeng/dotfiles";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: let
|
outputs = inputs: let
|
||||||
|
@ -62,9 +67,9 @@
|
||||||
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:
|
system = hostname: isDesktop: isGraphical: arch:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "${arch}-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs isDesktop dirUtils;
|
inherit inputs isDesktop dirUtils;
|
||||||
};
|
};
|
||||||
|
@ -79,8 +84,9 @@
|
||||||
++ dirFiles ".nix" ./clients/${hostname}
|
++ dirFiles ".nix" ./clients/${hostname}
|
||||||
++ dirFiles ".nix" ./modules/common
|
++ dirFiles ".nix" ./modules/common
|
||||||
++ opt (!isDesktop) (dirFiles ".nix" ./modules/server)
|
++ opt (!isDesktop) (dirFiles ".nix" ./modules/server)
|
||||||
++ opt isDesktop (
|
++ opt isDesktop (dirFiles ".nix" ./modules/desktop)
|
||||||
(dirFiles ".nix" ./modules/desktop)
|
++ opt isGraphical (
|
||||||
|
(dirFiles ".nix" ./modules/graphical)
|
||||||
++ [
|
++ [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
|
@ -88,13 +94,23 @@
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
nixosConfigurations = builtins.mapAttrs (name: value: system name value) {
|
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
"quadraticserver" = false;
|
systems = ["aarch64-linux" "x86_64-linux"];
|
||||||
"quadraticpc" = true;
|
|
||||||
"quadtop" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
perSystem = {pkgs, ...}: {
|
||||||
};
|
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;
|
||||||
|
"quadraticpc".isDesktop = true;
|
||||||
|
"quadtop".isDesktop = true;
|
||||||
|
"quadphone" = {
|
||||||
|
isDesktop = true;
|
||||||
|
isGraphical = true;
|
||||||
|
arch = "aarch64";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
networking.networkmanager.wifi.macAddress = "random";
|
|
||||||
}
|
|
|
@ -1,27 +1,11 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
services.xserver.excludePackages = [pkgs.xterm];
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
tuba
|
|
||||||
gimp
|
gimp
|
||||||
deno
|
|
||||||
heroic
|
heroic
|
||||||
aspell
|
|
||||||
ptyxis
|
|
||||||
muzika
|
|
||||||
foliate
|
|
||||||
gapless
|
|
||||||
inkscape
|
inkscape
|
||||||
r2modman
|
r2modman
|
||||||
pciutils
|
|
||||||
resources
|
|
||||||
libreoffice
|
libreoffice
|
||||||
wl-clipboard
|
|
||||||
google-cursor
|
|
||||||
prismlauncher
|
prismlauncher
|
||||||
authenticator
|
|
||||||
cinny-desktop
|
|
||||||
papirus-icon-theme
|
|
||||||
nexusmods-app-unfree
|
nexusmods-app-unfree
|
||||||
hunspellDicts.en_CA-large
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writeTextDir "share/polkit-1/actions/com.henryhiles.quados.policy" ''
|
|
||||||
<!DOCTYPE policyconfig PUBLIC '-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN' 'http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd'>
|
|
||||||
|
|
||||||
<policyconfig>
|
|
||||||
<action id='com.henryhiles.quados.rebuild'>
|
|
||||||
<description>Rebuild</description>
|
|
||||||
<message>Authentication is required to rebuild the system</message>
|
|
||||||
<defaults>
|
|
||||||
<allow_any>auth_admin_keep</allow_any>
|
|
||||||
<allow_inactive>auth_admin_keep</allow_inactive>
|
|
||||||
<allow_active>auth_admin_keep</allow_active>
|
|
||||||
</defaults>
|
|
||||||
<annotate key='org.freedesktop.policykit.exec.path'>/home/quadradical/.local/bin/rebuildExec</annotate>
|
|
||||||
</action>
|
|
||||||
</policyconfig>
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
1
modules/graphical/mac.nix
Normal file
1
modules/graphical/mac.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{networking.networkmanager.wifi.macAddress = "random";}
|
14
modules/graphical/packages.nix
Normal file
14
modules/graphical/packages.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services.xserver.excludePackages = [pkgs.xterm];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tuba
|
||||||
|
ptyxis
|
||||||
|
gapless
|
||||||
|
resources
|
||||||
|
wl-clipboard
|
||||||
|
google-cursor
|
||||||
|
authenticator
|
||||||
|
cinny-desktop
|
||||||
|
papirus-icon-theme
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
buildLinux,
|
|
||||||
fetchFromGitLab,
|
|
||||||
...
|
|
||||||
} @ args: let
|
|
||||||
src = fetchFromGitLab {
|
|
||||||
owner = "sdm845-mainline";
|
|
||||||
repo = "linux";
|
|
||||||
rev = "sdm845/6.16-dev";
|
|
||||||
hash = "sha256-Nu7BwSl40Ytm7nCzyctNed7nqwq7NcVVxHLF3KFMKC4=";
|
|
||||||
};
|
|
||||||
version = "${rec {
|
|
||||||
file = "${src}/Makefile";
|
|
||||||
version = toString (builtins.match ".+VERSION = ([0-9]+).+" (builtins.readFile file));
|
|
||||||
patchlevel = toString (builtins.match ".+PATCHLEVEL = ([0-9]+).+" (builtins.readFile file));
|
|
||||||
sublevel = toString (builtins.match ".+SUBLEVEL = ([0-9]+).+" (builtins.readFile file));
|
|
||||||
extraversion = toString (builtins.match ".+EXTRAVERSION = ([a-z0-9-]+).+" (builtins.readFile file));
|
|
||||||
string = "${version + "." + patchlevel + "." + sublevel + (lib.optionalString (extraversion != "") extraversion)}";
|
|
||||||
}.string}";
|
|
||||||
in (buildLinux (
|
|
||||||
args
|
|
||||||
// {
|
|
||||||
inherit src version;
|
|
||||||
modDirVersion = version;
|
|
||||||
extraMeta = {
|
|
||||||
platforms = ["aarch64-linux"];
|
|
||||||
hydraPlatforms = [""];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// (args.argsOverride or {})
|
|
||||||
))
|
|
Loading…
Add table
Add a link
Reference in a new issue