diff --git a/flake.nix b/flake.nix index 6a7e305..d6aa1fa 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ inherit modules; }; in - { + rec { homeConfigurations."anvaure@Allegro23-12" = homeConfig [ { home.username = "anvaure"; } ./home/more-software.nix @@ -54,6 +54,15 @@ { targets.genericLinux.enable = true; } ]; + homeConfigurations."anvaure@msm-lnx-ipva-01" = homeConfig [ + { home.username = "anvaure"; } + ./home/base.nix + ({pkgs, ...}: { + programs.fish.loginShellInit = "source ${pkgs.nix}/etc/profile.d/nix.fish"; + }) + ]; + homeConfigurations."anvaure@msm-lnx-demo-01" = homeConfigurations."anvaure@msm-lnx-ipva-01"; + homeConfigurations."ant@hs" = homeConfig [ { home.username = "ant"; } ./home/more-software.nix diff --git a/home/base.nix b/home/base.nix index 79bbc8e..c23b4f2 100644 --- a/home/base.nix +++ b/home/base.nix @@ -5,11 +5,9 @@ ./fish.nix ]; - # Home Manager needs a bit of information about you and the paths it should - # manage. + nix.package = pkgs.nixVersions.latest; home.homeDirectory = "/home/${config.home.username}"; - home.stateVersion = "23.05"; # Please read the comment before changing. home.packages = with pkgs; [ @@ -30,6 +28,7 @@ ]; home.sessionVariables = { + EDITOR = "nvim"; GOPATH = "${config.home.homeDirectory}/.local/share/go"; GOMODCACHE = "${config.home.homeDirectory}/.cache/go/pkg/mod"; CCACHE_MAXSIZE = "100Gi"; diff --git a/os/3proxy.nix b/os/3proxy.nix new file mode 100644 index 0000000..82785e0 --- /dev/null +++ b/os/3proxy.nix @@ -0,0 +1,26 @@ +{ + services._3proxy = { + enable = true; + services = [ + { + type = "socks"; + auth = [ "strong" ]; + acl = [ { + rule = "allow"; + users = [ "user1" ]; + } + ]; + } + ]; + usersFile = "/etc/3proxy.passwd"; + }; + + environment.etc = { + "3proxy.passwd".text = '' + user1:CR:$1$TqAb0wvc$e.O2GhdhXaMYSxNdNBmzh/ + ''; + }; + + networking.firewall.allowedTCPPorts = [ 1080 ]; + networking.firewall.allowedUDPPorts = [ 1080 ]; +} diff --git a/os/basado/configuration.nix b/os/basado/configuration.nix index 5590562..fb96c85 100644 --- a/os/basado/configuration.nix +++ b/os/basado/configuration.nix @@ -107,4 +107,17 @@ in services.udev.packages = [ pkgs.android-udev-rules ]; + + nix.distributedBuilds = true; + nix.settings.builders-use-substitutes = true; + nix.buildMachines = [ + { + hostName = "192.168.1.5"; + protocol = "ssh-ng"; + sshUser = "remotebuild"; + sshKey = "/home/ant/.ssh/id_ed25519"; + system = pkgs.stdenv.hostPlatform.system; + supportedFeatures = [ "nixos-test" "big-parallel" "kvm" "gccarch-x86-64-v3" ]; + } + ]; } diff --git a/os/builder.nix b/os/builder.nix index be34f52..5fea133 100644 --- a/os/builder.nix +++ b/os/builder.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let sshKeys = with (import ../sshKeys.nix); [ hs + basado ]; in { @@ -16,4 +17,13 @@ in users.groups.remotebuild = {}; nix.settings.extra-trusted-users = [ "remotebuild" ]; + nix.settings.system-features = [ + "benchmark" + "big-parallel" + "ca-derivations" + "kvm" + "nixos-test" + "gccarch-x86-64-v2" + "gccarch-x86-64-v3" + ]; } diff --git a/os/hs/configuration.nix b/os/hs/configuration.nix index f170691..bdd1ca6 100644 --- a/os/hs/configuration.nix +++ b/os/hs/configuration.nix @@ -18,6 +18,7 @@ in { ../common.nix ../forgejo.nix (import ../remote-disk-unlock.nix ["r8169"] sshKeys) + ../builder.nix ]; boot = { @@ -146,7 +147,6 @@ in { nix.distributedBuilds = true; nix.settings.builders-use-substitutes = true; - nix.buildMachines = [ { hostName = "192.168.1.2"; @@ -154,7 +154,7 @@ in { sshUser = "remotebuild"; sshKey = "/home/ant/.ssh/id_ed25519"; system = pkgs.stdenv.hostPlatform.system; - supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ]; + supportedFeatures = [ "nixos-test" "big-parallel" "kvm" "gccarch-x86-64-v3" ]; } ]; } diff --git a/os/ks/configuration.nix b/os/ks/configuration.nix index f4530af..afa2af2 100644 --- a/os/ks/configuration.nix +++ b/os/ks/configuration.nix @@ -8,6 +8,7 @@ in { imports = [ ./hardware-configuration.nix ../common.nix + ../3proxy.nix inputs.simple-nixos-mailserver.nixosModule ];