refactor
This commit is contained in:
17
flake.nix
17
flake.nix
@@ -62,6 +62,7 @@
|
|||||||
username = "primary";
|
username = "primary";
|
||||||
hostname = "muffin";
|
hostname = "muffin";
|
||||||
eth_interface = "enp4s0";
|
eth_interface = "enp4s0";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
service_configs = rec {
|
service_configs = rec {
|
||||||
zpool_ssds = "tank";
|
zpool_ssds = "tank";
|
||||||
@@ -133,12 +134,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
hostPlatform = system;
|
||||||
|
buildPlatform = builtins.currentSystem;
|
||||||
|
};
|
||||||
lib = import ./lib.nix { inherit inputs pkgs; };
|
lib = import ./lib.nix { inherit inputs pkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||||
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
specialArgs = rec {
|
specialArgs = rec {
|
||||||
inherit
|
inherit
|
||||||
username
|
username
|
||||||
@@ -154,8 +160,7 @@
|
|||||||
(
|
(
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config.assertions = [
|
||||||
assertions = [
|
|
||||||
{
|
{
|
||||||
assertion =
|
assertion =
|
||||||
let
|
let
|
||||||
@@ -166,7 +171,6 @@
|
|||||||
message = "Duplicate ports detected in 'ports' configuration";
|
message = "Duplicate ports detected in 'ports' configuration";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -193,10 +197,7 @@
|
|||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
username,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
stateVersion,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -217,7 +218,7 @@
|
|||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
user = "root";
|
user = "root";
|
||||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.muffin;
|
path = deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.muffin;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user