feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
|
@ -5,10 +5,10 @@
|
|||
lib,
|
||||
config,
|
||||
nodeName,
|
||||
localDomainName,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
nixos-x13s = {
|
||||
enable = true;
|
||||
# TODO: use hardware address
|
||||
|
@ -41,8 +41,8 @@
|
|||
echo $?
|
||||
)
|
||||
'';
|
||||
requiredBy = ["bluetooth.service"];
|
||||
before = ["bluetooth.service"];
|
||||
requiredBy = [ "bluetooth.service" ];
|
||||
before = [ "bluetooth.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
|
@ -103,20 +103,15 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
home-manager.users.root = _: {
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
home-manager.users.root = _: { home.stateVersion = "23.11"; };
|
||||
home-manager.users.steveej = _: {
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
../../../home-manager/configuration/graphical-fullblown.nix
|
||||
];
|
||||
imports = [ ../../../home-manager/configuration/graphical-fullblown.nix ];
|
||||
|
||||
home.sessionVariables = {};
|
||||
home.sessionVariables = { };
|
||||
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
home.packages = with pkgs; [ ];
|
||||
|
||||
# TODO: currently unsupported
|
||||
services.gammastep.enable = lib.mkForce false;
|
||||
|
@ -127,7 +122,7 @@
|
|||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = lib.mkForce false;
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
blacklistedKernelModules = ["wwan"];
|
||||
blacklistedKernelModules = [ "wwan" ];
|
||||
|
||||
initrd.kernelModules = [
|
||||
"uas"
|
||||
|
@ -153,7 +148,8 @@
|
|||
"firmware/qcom/sc8280xp/LENOVO/21BX/qccdsp8280.mbn".source = pkgs.linux-firmware;
|
||||
"firmware/qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn".source = pkgs.linux-firmware;
|
||||
"firmware/qcom/sc8280xp/LENOVO/21BX/qcslpi8280.mbn".source = pkgs.linux-firmware;
|
||||
"firmware/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn".source = nodeFlake.inputs.nixos-x13s.packages.${system}."x13s/extra-firmware";
|
||||
"firmware/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn".source =
|
||||
nodeFlake.inputs.nixos-x13s.packages.${system}."x13s/extra-firmware";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -6,21 +6,23 @@
|
|||
nodeFlake,
|
||||
localDomainName ? "internal",
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit repoFlake nodeName nodeFlake system;
|
||||
inherit
|
||||
repoFlake
|
||||
nodeName
|
||||
nodeFlake
|
||||
system
|
||||
;
|
||||
packages' = repoFlake.packages.${system};
|
||||
nodePackages' = nodeFlake.packages.${system};
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({inputs', ...}: inputs');
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({ inputs', ... }: inputs');
|
||||
|
||||
inherit localDomainName;
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} =
|
||||
import nodeFlake.inputs.nixpkgs.outPath
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath { inherit system; };
|
||||
|
||||
${nodeName} = {
|
||||
deployment.targetHost = "${nodeName}.${localDomainName}";
|
||||
|
@ -29,8 +31,6 @@
|
|||
|
||||
# nixpkgs.pkgs = nodeFlake.inputs.nixpkgs.legacyPackages.${system};
|
||||
|
||||
imports = [
|
||||
(repoFlake + "/nix/os/devices/${nodeName}/configuration.nix")
|
||||
];
|
||||
imports = [ (repoFlake + "/nix/os/devices/${nodeName}/configuration.nix") ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
|
@ -24,7 +22,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "x13s-usb-crypt";
|
||||
extraOpenArgs = [];
|
||||
extraOpenArgs = [ ];
|
||||
# disable settings.keyFile if you want to use interactive password entry
|
||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||
settings = {
|
||||
|
@ -36,19 +34,28 @@
|
|||
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
|
|
|
@ -22,71 +22,66 @@
|
|||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
system = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
in {
|
||||
lib = {
|
||||
mkNixosConfiguration = {
|
||||
nodeName,
|
||||
extraModules ? [],
|
||||
...
|
||||
} @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
in
|
||||
{
|
||||
lib = {
|
||||
mkNixosConfiguration =
|
||||
{
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
inherit system;
|
||||
inherit nodeName repoFlake;
|
||||
nodeName,
|
||||
extraModules ? [ ],
|
||||
...
|
||||
}@attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate attrs {
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
inherit system;
|
||||
inherit nodeName repoFlake;
|
||||
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
nodeName = "steveej-x13s-rmvbl";
|
||||
in {
|
||||
native = self.lib.mkNixosConfiguration {
|
||||
inherit system nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
users.commonUsers.installPassword = "install";
|
||||
}
|
||||
];
|
||||
modules = extraModules;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
cross = self.lib.mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
nixosConfigurations =
|
||||
let
|
||||
nodeName = "steveej-x13s-rmvbl";
|
||||
in
|
||||
{
|
||||
native = self.lib.mkNixosConfiguration {
|
||||
inherit system nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = system;
|
||||
}
|
||||
];
|
||||
};
|
||||
{ users.commonUsers.installPassword = "install"; }
|
||||
];
|
||||
};
|
||||
|
||||
cross = self.lib.mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = system;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue