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.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||||
|
|
||||||
|
time.timeZone = "America/Phoenix";
|
||||||
|
|
||||||
systemd.services.nix-key-setup = {
|
systemd.services.nix-key-setup = {
|
||||||
description = "Generate a nix build signing key";
|
description = "Generate a nix build signing key";
|
||||||
script = ''
|
script = ''
|
||||||
|
|
32
flake.nix
32
flake.nix
|
@ -3,8 +3,7 @@
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
nixbsd.url = "github:nixos-bsd/nixbsd/main";
|
nixbsd.url = "github:nixos-bsd/nixbsd/main";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, nixbsd, ... }: {
|
outputs = { self, nixpkgs, nixbsd, ... }: let
|
||||||
nixosConfigurations = let
|
|
||||||
sitesFiles = builtins.readDir ./sites;
|
sitesFiles = builtins.readDir ./sites;
|
||||||
sitesNames = builtins.filter (name: builtins.pathExists ./sites/${name}/configuration.nix) (builtins.attrNames sitesFiles);
|
sitesNames = builtins.filter (name: builtins.pathExists ./sites/${name}/configuration.nix) (builtins.attrNames sitesFiles);
|
||||||
systemTypes = {
|
systemTypes = {
|
||||||
|
@ -12,21 +11,24 @@
|
||||||
nixbsd = nixbsd.lib.nixbsdSystem;
|
nixbsd = nixbsd.lib.nixbsdSystem;
|
||||||
};
|
};
|
||||||
systemName = name: builtins.replaceStrings ["\n"] [""] (builtins.readFile ./sites/${name}/system);
|
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);
|
nixosConfigurations = platform: builtins.listToAttrs (builtins.map (name: {
|
||||||
in configurations;
|
inherit name;
|
||||||
|
value = let evaluated = systemTypes.${systemName name} {
|
||||||
packages = let
|
modules = [
|
||||||
forBuildSystem = platform: let
|
./configuration.nix
|
||||||
toBuildSystem = config: config.extendModules { modules = [ { nixpkgs.buildPlatform = platform; } ]; };
|
./configuration-${systemName name}.nix
|
||||||
toToplevel = extended: {
|
./sites/${name}/configuration.nix
|
||||||
inherit (extended) config;
|
{ nixpkgs.buildPlatform = platform; }
|
||||||
system = extended.config.system.build.toplevel;
|
];
|
||||||
|
}; in {
|
||||||
|
inherit (evaluated) config;
|
||||||
|
system = evaluated.config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
toSystem = name: config: toToplevel (toBuildSystem config);
|
}) sitesNames);
|
||||||
configurations = builtins.mapAttrs toSystem self.nixosConfigurations;
|
in {
|
||||||
in configurations;
|
packages = let
|
||||||
buildPlatforms = [ "x86_64-linux" "aarch64-linux" "x86_64-freebsd" "aarch64-freebsd" ];
|
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;
|
packagesList = builtins.map toPackagesList buildPlatforms;
|
||||||
in builtins.listToAttrs packagesList;
|
in builtins.listToAttrs packagesList;
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,4 +4,22 @@
|
||||||
|
|
||||||
networking.hostName = "chrysanthemum";
|
networking.hostName = "chrysanthemum";
|
||||||
networking.hostId = "6bb591ac";
|
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.hostName = "daisy";
|
||||||
networking.hostId = "293a1290";
|
networking.hostId = "293a1290";
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Phoenix";
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [ 22 80 443 1337 8081 ];
|
networking.firewall.allowedTCPPorts = [ 22 80 443 1337 8081 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 1337 ];
|
networking.firewall.allowedUDPPorts = [ 1337 ];
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
networking.hostName = "sunflower";
|
networking.hostName = "sunflower";
|
||||||
networking.hostId = "77d68c52";
|
networking.hostId = "77d68c52";
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Phoenix";
|
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
Loading…
Reference in New Issue