now nixbsd works
This commit is contained in:
parent
61be8db799
commit
b0c97ef755
|
@ -10,6 +10,8 @@ in {
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
|
||||
time.timeZone = "America/Phoenix";
|
||||
|
||||
systemd.services.nix-key-setup = {
|
||||
description = "Generate a nix build signing key";
|
||||
script = ''
|
||||
|
|
44
flake.nix
44
flake.nix
|
@ -3,30 +3,32 @@
|
|||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixbsd.url = "github:nixos-bsd/nixbsd/main";
|
||||
};
|
||||
outputs = { self, nixpkgs, nixbsd, ... }: {
|
||||
nixosConfigurations = let
|
||||
sitesFiles = builtins.readDir ./sites;
|
||||
sitesNames = builtins.filter (name: builtins.pathExists ./sites/${name}/configuration.nix) (builtins.attrNames sitesFiles);
|
||||
systemTypes = {
|
||||
nixos = nixpkgs.lib.nixosSystem;
|
||||
nixbsd = nixbsd.lib.nixbsdSystem;
|
||||
outputs = { self, nixpkgs, nixbsd, ... }: let
|
||||
sitesFiles = builtins.readDir ./sites;
|
||||
sitesNames = builtins.filter (name: builtins.pathExists ./sites/${name}/configuration.nix) (builtins.attrNames sitesFiles);
|
||||
systemTypes = {
|
||||
nixos = nixpkgs.lib.nixosSystem;
|
||||
nixbsd = nixbsd.lib.nixbsdSystem;
|
||||
};
|
||||
systemName = name: builtins.replaceStrings ["\n"] [""] (builtins.readFile ./sites/${name}/system);
|
||||
nixosConfigurations = platform: builtins.listToAttrs (builtins.map (name: {
|
||||
inherit name;
|
||||
value = let evaluated = systemTypes.${systemName name} {
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./configuration-${systemName name}.nix
|
||||
./sites/${name}/configuration.nix
|
||||
{ nixpkgs.buildPlatform = platform; }
|
||||
];
|
||||
}; in {
|
||||
inherit (evaluated) config;
|
||||
system = evaluated.config.system.build.toplevel;
|
||||
};
|
||||
systemName = name: builtins.replaceStrings ["\n"] [""] (builtins.readFile ./sites/${name}/system);
|
||||
configurations = builtins.listToAttrs (builtins.map (name: {inherit name; value = systemTypes.${systemName name} { modules = [ ./configuration.nix ./configuration-${systemName name}.nix ./sites/${name}/configuration.nix ]; }; }) sitesNames);
|
||||
in configurations;
|
||||
|
||||
}) sitesNames);
|
||||
in {
|
||||
packages = let
|
||||
forBuildSystem = platform: let
|
||||
toBuildSystem = config: config.extendModules { modules = [ { nixpkgs.buildPlatform = platform; } ]; };
|
||||
toToplevel = extended: {
|
||||
inherit (extended) config;
|
||||
system = extended.config.system.build.toplevel;
|
||||
};
|
||||
toSystem = name: config: toToplevel (toBuildSystem config);
|
||||
configurations = builtins.mapAttrs toSystem self.nixosConfigurations;
|
||||
in configurations;
|
||||
buildPlatforms = [ "x86_64-linux" "aarch64-linux" "x86_64-freebsd" "aarch64-freebsd" ];
|
||||
toPackagesList = platform: { name = platform; value = forBuildSystem platform; };
|
||||
toPackagesList = platform: { name = platform; value = let base = nixosConfigurations platform; in base // { nixosConfigurations = base; }; };
|
||||
packagesList = builtins.map toPackagesList buildPlatforms;
|
||||
in builtins.listToAttrs packagesList;
|
||||
};
|
||||
|
|
|
@ -4,4 +4,22 @@
|
|||
|
||||
networking.hostName = "chrysanthemum";
|
||||
networking.hostId = "6bb591ac";
|
||||
|
||||
system.stateVersion = "25.04";
|
||||
environment.etc.machine-id.text = "d3d521900f0e11f0af2b9d9b219a1c36\n";
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
hardware.opengl.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.accounts-daemon.enable = true;
|
||||
services.consolekit2.enable = true;
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm.enable = true;
|
||||
displayManager.defaultSession = "xfce";
|
||||
desktopManager.xfce = {
|
||||
enable = true;
|
||||
};
|
||||
exportConfiguration = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
networking.hostName = "daisy";
|
||||
networking.hostId = "293a1290";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Phoenix";
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 80 443 1337 8081 ];
|
||||
networking.firewall.allowedUDPPorts = [ 1337 ];
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
networking.hostName = "sunflower";
|
||||
networking.hostId = "77d68c52";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Phoenix";
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
|
Loading…
Reference in New Issue