mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-21 14:49:10 -04:00
Compare commits
1 Commits
feature/te
...
feature/te
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a38c3488a |
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -128,7 +128,6 @@
|
|||||||
"maxtime",
|
"maxtime",
|
||||||
"mechatroner",
|
"mechatroner",
|
||||||
"mediainfo",
|
"mediainfo",
|
||||||
"microvm",
|
|
||||||
"mklabel",
|
"mklabel",
|
||||||
"mkpart",
|
"mkpart",
|
||||||
"modesetting",
|
"modesetting",
|
||||||
|
|||||||
36
flake.nix
36
flake.nix
@@ -33,8 +33,8 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
microvm = {
|
system_tools = {
|
||||||
url = "github:astro/microvm.nix";
|
url = "github:RichieCahill/system_tools";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -47,10 +47,6 @@
|
|||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
system_tools = {
|
|
||||||
url = "github:RichieCahill/system_tools";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
@@ -60,7 +56,6 @@
|
|||||||
systems,
|
systems,
|
||||||
nixos-cosmic,
|
nixos-cosmic,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
microvm,
|
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
@@ -76,35 +71,10 @@
|
|||||||
in {
|
in {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
overlays = import ./overlays {inherit inputs outputs;};
|
overlays = import ./overlays {inherit inputs outputs;};
|
||||||
|
|
||||||
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
|
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
|
||||||
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
||||||
|
|
||||||
emulated-dev = nixpkgs.lib.nixosSystem {
|
|
||||||
# host system
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = let
|
|
||||||
guestSystem = "aarch64-unknown-linux-gnu";
|
|
||||||
# you can use packages in the guest machine with cross system configuration
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
crossSystem.config = guestSystem;
|
|
||||||
};
|
|
||||||
in [
|
|
||||||
{nixpkgs.crossSystem.config = guestSystem;}
|
|
||||||
microvm.nixosModules.microvm
|
|
||||||
{
|
|
||||||
microvm = {
|
|
||||||
# you can choose what CPU will be emulated by qemu
|
|
||||||
cpu = "cortex-a53";
|
|
||||||
hypervisor = "qemu";
|
|
||||||
};
|
|
||||||
environment.systemPackages = with pkgs; [ cowsay htop ];
|
|
||||||
services.getty.autologinUser = "root";
|
|
||||||
system.stateVersion = "23.11";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
bob = lib.nixosSystem {
|
bob = lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
@@ -7,12 +7,32 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
netdevs = {
|
||||||
|
"20-ioit-vlan" = {
|
||||||
|
netdevConfig = {
|
||||||
|
Kind = "vlan";
|
||||||
|
Name = "ioit-vlan";
|
||||||
|
};
|
||||||
|
vlanConfig.Id = 20;
|
||||||
|
};
|
||||||
|
"21-internal-ioit-vlan" = {
|
||||||
|
netdevConfig = {
|
||||||
|
Kind = "vlan";
|
||||||
|
Name = "internal-ioit-vlan";
|
||||||
|
};
|
||||||
|
vlanConfig.Id = 21;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networks = {
|
networks = {
|
||||||
"10-1GB_Primary" = {
|
"10-1GB_Primary" = {
|
||||||
matchConfig.Name = "enp98s0f0";
|
matchConfig.Name = "enp98s0f0";
|
||||||
address = [ "192.168.95.14/24" ];
|
address = [ "192.168.95.14/24" ];
|
||||||
routes = [{ Gateway = "192.168.95.1"; }];
|
routes = [{ Gateway = "192.168.95.1"; }];
|
||||||
|
vlan = [ "ioit-vlan" "internal-ioit-vlan" ];
|
||||||
linkConfig.RequiredForOnline = "routable";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
};
|
};
|
||||||
"10-1GB_Secondary" = {
|
"10-1GB_Secondary" = {
|
||||||
@@ -28,6 +48,19 @@
|
|||||||
matchConfig.Name = "enp97s0f1np1";
|
matchConfig.Name = "enp97s0f1np1";
|
||||||
DHCP = "yes";
|
DHCP = "yes";
|
||||||
};
|
};
|
||||||
|
"40-ioit-vlan" = {
|
||||||
|
matchConfig.Name = "ioit-vlan";
|
||||||
|
DHCP = "yes";
|
||||||
|
};
|
||||||
|
"41-internal-ioit-vlan" = {
|
||||||
|
matchConfig.Name = "internal-ioit-vlan";
|
||||||
|
DHCP = "yes";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.zerotierone = {
|
||||||
|
enable = true;
|
||||||
|
joinNetworks = [ "e4da7455b2ae64ca" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./nix_builder.nix ];
|
||||||
./nix_builder.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
users.github-runners = {
|
users.github-runners = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, inputs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@@ -6,8 +6,6 @@ let
|
|||||||
vars = import ../vars.nix;
|
vars = import ../vars.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.microvm.nixosModules.microvm ];
|
|
||||||
|
|
||||||
options.services.nix_builder.containers = mkOption {
|
options.services.nix_builder.containers = mkOption {
|
||||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||||
options.enable = mkEnableOption "GitHub runner container";
|
options.enable = mkEnableOption "GitHub runner container";
|
||||||
@@ -83,4 +81,3 @@ in
|
|||||||
}
|
}
|
||||||
) config.services.nix_builder.containers;
|
) config.services.nix_builder.containers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user