Compare commits

..

4 Commits

12 changed files with 34 additions and 39 deletions

View File

@@ -17,7 +17,7 @@ in
inputs.colmena.lib.makeHive { inputs.colmena.lib.makeHive {
meta = { meta = {
nixpkgs = import inputs.nixpkgs { nixpkgs = import inputs.nixpkgs {
system = "x86_64-linux"; localSystem = "x86_64-linux";
}; };
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations; nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;

View File

@@ -77,8 +77,10 @@
(lib.genAttrs hostDirNames ( (lib.genAttrs hostDirNames (
host: host:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = import ./hosts/${host}/system.nix; modules = [
modules = [ ./hosts/${host} ]; ./hosts/${host}
{ nixpkgs.hostPlatform = import ./hosts/${host}/system.nix; }
];
specialArgs = { specialArgs = {
inherit inputs outputs dotsPath; inherit inputs outputs dotsPath;
}; };
@@ -86,14 +88,12 @@
)) ))
// { // {
sd-image-orange-pi-aarch64 = nixpkgs.lib.nixosSystem { sd-image-orange-pi-aarch64 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./images/sd-image-orange-pi-aarch64.nix ./images/sd-image-orange-pi-aarch64.nix
{ {
nixpkgs.crossSystem = { nixpkgs.buildPlatform = "x86_64-linux";
system = "aarch64-linux"; nixpkgs.hostPlatform = "aarch64-linux";
};
} }
]; ];
specialArgs = { specialArgs = {
@@ -101,14 +101,12 @@
}; };
}; };
sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem { sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./images/sd-image-raspberry-pi-aarch64.nix ./images/sd-image-raspberry-pi-aarch64.nix
{ {
nixpkgs.crossSystem = { nixpkgs.buildPlatform = "x86_64-linux";
system = "aarch64-linux"; nixpkgs.hostPlatform = "aarch64-linux";
};
} }
]; ];
specialArgs = { specialArgs = {
@@ -130,8 +128,10 @@
}; };
}; };
apps.${system}.colmena = inputs.colmena.apps.${system}.default; apps.${system}.colmena = inputs.colmena.apps.${system}.default // {
colmenaHive = import ./deploy/colmena.nix { meta.description = "Colmena deployment tool";
};
colmena = import ./deploy/colmena.nix {
inherit inherit
self self
inputs inputs
@@ -142,9 +142,11 @@
formatter.${system} = gitHooks.formatter; formatter.${system} = gitHooks.formatter;
devShells.${system} = gitHooks.devShells; devShells.${system} = gitHooks.devShells;
images.sd-image-orange-pi-aarch64 = legacyPackages.${system} = {
sd-image-orange-pi-aarch64 =
self.nixosConfigurations.sd-image-orange-pi-aarch64.config.system.build.sdImage; self.nixosConfigurations.sd-image-orange-pi-aarch64.config.system.build.sdImage;
images.sd-image-raspberry-pi-aarch64 = sd-image-raspberry-pi-aarch64 =
self.nixosConfigurations.sd-image-raspberry-pi-aarch64.config.system.build.sdImage; self.nixosConfigurations.sd-image-raspberry-pi-aarch64.config.system.build.sdImage;
}; };
};
} }

View File

@@ -10,7 +10,10 @@ let
pre-commit-check = git-hooks.lib.${system}.run { pre-commit-check = git-hooks.lib.${system}.run {
inherit src; inherit src;
hooks = { hooks = {
nixfmt.enable = true; nixfmt = {
enable = true;
package = pkgs.nixfmt;
};
statix.enable = true; statix.enable = true;
deadnix.enable = true; deadnix.enable = true;
}; };

View File

@@ -8,7 +8,6 @@ with pkgs;
fzf fzf
htop htop
jq jq
nixfmt-rfc-style
nmap nmap
nodejs_24 nodejs_24
nvimpager nvimpager

View File

@@ -26,7 +26,7 @@ in
}; };
extensions = { extensions = {
force = true; force = true;
packages = with inputs.firefox-addons.packages.${pkgs.system}; [ packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
duckduckgo-privacy-essentials duckduckgo-privacy-essentials
firefox-color firefox-color
istilldontcareaboutcookies istilldontcareaboutcookies

View File

@@ -3,7 +3,7 @@
{ {
config = { config = {
home.packages = [ home.packages = [
inputs.nvim.packages.${pkgs.system}.nvim inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
]; ];
}; };
} }

View File

@@ -35,6 +35,7 @@ in
../../modules/localization ../../modules/localization
../../modules/fonts ../../modules/fonts
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
../../modules/storage
../../modules/stylix ../../modules/stylix
(import ../../modules/secrets { inherit lib inputs config; }) (import ../../modules/secrets { inherit lib inputs config; })
../../modules/docker ../../modules/docker
@@ -86,7 +87,7 @@ in
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
environment.systemPackages = [ environment.systemPackages = [
inputs.colmena.packages.${pkgs.system}.colmena inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena
]; ];
services = { services = {
@@ -100,7 +101,6 @@ in
harden = true; harden = true;
}; };
my.syncthing.enable = true;
networking = { networking = {
# TODO: generate unique hostId on actual host with: head -c 8 /etc/machine-id # TODO: generate unique hostId on actual host with: head -c 8 /etc/machine-id

View File

@@ -35,10 +35,10 @@ in
../../modules/localization ../../modules/localization
../../modules/fonts ../../modules/fonts
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
../../modules/storage
../../modules/stylix ../../modules/stylix
(import ../../modules/secrets { inherit lib inputs config; }) (import ../../modules/secrets { inherit lib inputs config; })
../../modules/docker ../../modules/docker
../../modules/syncthing
../../modules/nfc ../../modules/nfc
]; ];
@@ -81,7 +81,7 @@ in
}; };
environment.systemPackages = [ environment.systemPackages = [
inputs.colmena.packages.${pkgs.system}.colmena inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "wol-andromache"; name = "wol-andromache";
runtimeInputs = [ pkgs.wakeonlan ]; runtimeInputs = [ pkgs.wakeonlan ];
@@ -109,6 +109,4 @@ in
package = pkgs.plocate; package = pkgs.plocate;
}; };
}; };
my.syncthing.enable = true;
} }

View File

@@ -83,15 +83,4 @@ in
enable = true; enable = true;
harden = true; harden = true;
}; };
nix.settings = {
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"astyanax:JY2qJkZUFSax47R3c1nq53AZ8GnLfNqz6mSnJ60cLZ4="
"andromache:XM4VLrEw63RB/3v/56OxzH/Yw+kKXKMBLKCb7UGAXzo="
];
auto-optimise-store = true;
keep-derivations = false;
keep-outputs = false;
};
} }

View File

@@ -25,6 +25,7 @@ in
../../modules/x ../../modules/x
../../modules/fonts ../../modules/fonts
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
../../modules/storage
(import ../../modules/secrets { (import ../../modules/secrets {
inherit lib inputs config; inherit lib inputs config;
}) })

View File

@@ -31,7 +31,7 @@ in
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
hardware.pulseaudio.enable = true; services.pulseaudio.enable = true;
networking.wireless.enable = true; networking.wireless.enable = true;

View File

@@ -0,0 +1,3 @@
{
services.udisks2.enable = true;
}