change cross compiling
This commit is contained in:
parent
b9dfbdcc73
commit
6d9f22f8f3
|
|
@ -166,7 +166,6 @@
|
||||||
url = "github:nix-community/NixOS-WSL";
|
url = "github:nix-community/NixOS-WSL";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
flake-utils.follows = "flake-utils";
|
|
||||||
flake-compat.follows = "flake-compat";
|
flake-compat.follows = "flake-compat";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ with lib; {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
games = {
|
games = {
|
||||||
unnethack.enable = mkDefault true;
|
unnethack.enable = mkDefault false;
|
||||||
dsda-doom.enable = mkDefault true;
|
dsda-doom.enable = mkDefault true;
|
||||||
woof.enable = mkDefault true;
|
woof.enable = mkDefault true;
|
||||||
eternity.enable = mkDefault true;
|
eternity.enable = mkDefault true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
_: {
|
_: {
|
||||||
programs = {
|
programs = {
|
||||||
yazi = {
|
yazi = {
|
||||||
enable = true;
|
enable = false;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,51 +1,58 @@
|
||||||
{ inputs, overlays, ... }: {
|
{ inputs, overlays, lib, config, ... }: {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
inherit overlays;
|
inherit overlays;
|
||||||
};
|
};
|
||||||
nix = {
|
nix =
|
||||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
let
|
||||||
optimise = {
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||||
automatic = true;
|
in
|
||||||
};
|
{
|
||||||
settings = {
|
optimise = {
|
||||||
trusted-users = [ "root" "@wheel" ];
|
automatic = true;
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
};
|
||||||
auto-optimise-store = true;
|
channel.enable = false;
|
||||||
substituters = [
|
|
||||||
#"http://nix-cache.gaja-group.intranet:5000"
|
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
||||||
"https://nix-community.cachix.org"
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||||
];
|
settings = {
|
||||||
trusted-public-keys = [
|
trusted-users = [ "root" "@wheel" ];
|
||||||
#"nix-cache.gaja-group.intranet:EcUsafvI9NUrnab3DA71s2PGjAYMgct0FOvCwdYuStw="
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
auto-optimise-store = true;
|
||||||
|
substituters = [
|
||||||
|
"http://nix-cache.gaja-group.intranet:5000"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-cache.gaja-group.intranet:EcUsafvI9NUrnab3DA71s2PGjAYMgct0FOvCwdYuStw="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
inherit (config.nix) nixPath;
|
||||||
|
};
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
buildMachines = [
|
||||||
|
{
|
||||||
|
hostName = "nix-cache.gaja-group.intranet";
|
||||||
|
#system = "x86_64-linux";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
# if the builder supports building for multiple architectures,
|
||||||
|
# replace the previous line by, e.g.,
|
||||||
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
maxJobs = 4;
|
||||||
|
speedFactor = 2;
|
||||||
|
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||||
|
mandatoryFeatures = [ ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
distributedBuilds = true;
|
||||||
|
# optional, useful when the builder has a faster internet connection than yours
|
||||||
|
extraOptions = ''
|
||||||
|
builders-use-substitutes = true
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
buildMachines = [
|
|
||||||
{
|
|
||||||
hostName = "nix-cache.gaja-group.intranet";
|
|
||||||
#system = "x86_64-linux";
|
|
||||||
protocol = "ssh-ng";
|
|
||||||
# if the builder supports building for multiple architectures,
|
|
||||||
# replace the previous line by, e.g.,
|
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
||||||
maxJobs = 4;
|
|
||||||
speedFactor = 1;
|
|
||||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
|
||||||
mandatoryFeatures = [ ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
distributedBuilds = true;
|
|
||||||
# optional, useful when the builder has a faster internet connection than yours
|
|
||||||
extraOptions = ''
|
|
||||||
builders-use-substitutes = true
|
|
||||||
'';
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.hardware.raspberry-pi.enable {
|
config = lib.mkIf config.hardware.raspberry-pi.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
#libraspberrypi
|
libraspberrypi
|
||||||
#raspberrypi-eeprom
|
raspberrypi-eeprom
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ _:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./kodi
|
./kodi
|
||||||
./jellyfin
|
#./jellyfin
|
||||||
./gokosync
|
./gokosync
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,14 @@
|
||||||
{
|
{
|
||||||
plugin = neorg-telescope;
|
plugin = neorg-telescope;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "guihua";
|
name = "guihua";
|
||||||
src = inputs.guihua;
|
src = inputs.guihua;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "luavit-meta";
|
name = "luavit-meta";
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
crates-nvim.enable = true;
|
crates.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs
|
{ inputs
|
||||||
, inputs
|
|
||||||
, outputs
|
, outputs
|
||||||
, vars
|
, vars
|
||||||
, ...
|
, ...
|
||||||
|
|
@ -40,8 +39,5 @@
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
PATH = "/home/${vars.username}/bin:$PATH";
|
PATH = "/home/${vars.username}/bin:$PATH";
|
||||||
};
|
};
|
||||||
packages = with pkgs; [
|
|
||||||
nix-serve
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{ outputs, ... }: {
|
{ outputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
outputs.homeManagerModules.base
|
outputs.homeManagerModules.base
|
||||||
outputs.homeManagerModules.shell
|
|
||||||
outputs.homeManagerModules.user
|
outputs.homeManagerModules.user
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,26 +19,23 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
#inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
outputs.nixosModules.base
|
outputs.nixosModules.base
|
||||||
outputs.nixosModules.home-manager
|
outputs.nixosModules.home-manager
|
||||||
outputs.nixosModules.mediacenter
|
outputs.nixosModules.mediacenter
|
||||||
outputs.nixosModules.sops
|
outputs.nixosModules.sops
|
||||||
outputs.nixosModules.raspberry-pi
|
outputs.nixosModules.raspberry-pi
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
] ++ map (name: (import ../../../lib/genSslCert.nix {
|
]
|
||||||
|
++ map (name: (import ../../../lib/genSslCert.nix {
|
||||||
inherit name;
|
inherit name;
|
||||||
inherit (config.services.haproxy) user;
|
inherit (config.services.haproxy) user;
|
||||||
dataDir = haproxy.certDir;
|
dataDir = haproxy.certDir;
|
||||||
domain = name;
|
domain = name;
|
||||||
wantedBy = [ "haproxy.service" ];
|
wantedBy = [ "haproxy.service" ];
|
||||||
Before = [ "haproxy.service" ];
|
Before = [ "haproxy.service" ];
|
||||||
})) haproxy.domains;
|
})) haproxy.domains
|
||||||
|
;
|
||||||
nixpkgs.crossSystem = {
|
|
||||||
# target platform
|
|
||||||
system = "riscv64-linux";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
inherit (vars) hostName domain;
|
inherit (vars) hostName domain;
|
||||||
|
|
@ -71,7 +68,6 @@ in
|
||||||
libraspberrypi
|
libraspberrypi
|
||||||
raspberrypi-eeprom
|
raspberrypi-eeprom
|
||||||
libcec
|
libcec
|
||||||
kitty
|
|
||||||
nfs-utils
|
nfs-utils
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "25.05";
|
||||||
|
|
||||||
#nixpkgs.hostPlatform.system = "aarch64-linux";
|
nixpkgs.hostPlatform.system = "aarch64-linux";
|
||||||
|
#nixpkgs.buildPlatform.system = "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
|
|
||||||
HOSTNAME=$1
|
HOSTNAME=$1
|
||||||
|
|
||||||
nix build -L ".#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel"
|
GC_FORCE_UNMAP_ON_GCOLLECT=1 nix build ".#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel"
|
||||||
nix copy --no-check-sigs --to "ssh-ng://root@${HOSTNAME}" "./result"
|
#nix copy --no-check-sigs --to "ssh-ng://root@${HOSTNAME}" "./result"
|
||||||
ssh "root@${HOSTNAME}" nix-env -p /nix/var/nix/profiles/system --set "$(readlink ./result)"
|
#ssh "root@${HOSTNAME}" nix-env -p /nix/var/nix/profiles/system --set "$(readlink ./result)"
|
||||||
ssh "root@${HOSTNAME}" /nix/var/nix/profiles/system/bin/switch-to-configuration switch
|
#ssh "root@${HOSTNAME}" /nix/var/nix/profiles/system/bin/switch-to-configuration switch
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue