Compare commits
3 commits
9b1e8798c0
...
0dbd1faaa6
| Author | SHA1 | Date | |
|---|---|---|---|
| 0dbd1faaa6 | |||
| 200ff43096 | |||
| cb3ec0cb57 |
7 changed files with 35 additions and 3 deletions
|
|
@ -28,7 +28,8 @@ inputs = {
|
||||||
nix-impermanence.url = "github:nix-community/impermanence";
|
nix-impermanence.url = "github:nix-community/impermanence";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstable, nixos-hardware, nix-impermanence, ... }: {
|
outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstable, nixos-hardware, nix-impermanence, ... } @inputs: {
|
||||||
|
|
||||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||||
name = "Environment for toast's nixos configurations";
|
name = "Environment for toast's nixos configurations";
|
||||||
# The agenix cli is not needed to activate a configuration, so instead of installing it
|
# The agenix cli is not needed to activate a configuration, so instead of installing it
|
||||||
|
|
@ -46,6 +47,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
Archie = nixpkgs-unstable.lib.nixosSystem {
|
Archie = nixpkgs-unstable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; };
|
||||||
/*
|
/*
|
||||||
I used to set up nixpkgs in the flake, but doing that made
|
I used to set up nixpkgs in the flake, but doing that made
|
||||||
defining overlays in modules impossible (or at least I could
|
defining overlays in modules impossible (or at least I could
|
||||||
|
|
@ -67,6 +69,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
|
||||||
|
|
||||||
SurfaceGo = nixpkgs.lib.nixosSystem {
|
SurfaceGo = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { systemPkgs = inputs.nixpkgs; };
|
||||||
modules = [
|
modules = [
|
||||||
# Needed for nix-index
|
# Needed for nix-index
|
||||||
{ nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; }
|
{ nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; }
|
||||||
|
|
@ -82,6 +85,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl
|
||||||
|
|
||||||
Everest = nixpkgs.lib.nixosSystem {
|
Everest = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { systemPkgs = inputs.nixpkgs; };
|
||||||
modules = [
|
modules = [
|
||||||
# Needed for nix-index
|
# Needed for nix-index
|
||||||
{ nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; }
|
{ nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./programs
|
./programs
|
||||||
./services/avahi.nix
|
./services
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ config, systemPkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nix = {
|
nix = {
|
||||||
|
|
@ -10,6 +10,9 @@ experimental-features = nix-command flakes
|
||||||
from = { id = "agenix"; type = "indirect"; };
|
from = { id = "agenix"; type = "indirect"; };
|
||||||
to = { owner = "ryantm"; repo = "agenix"; type = "github"; };
|
to = { owner = "ryantm"; repo = "agenix"; type = "github"; };
|
||||||
};
|
};
|
||||||
|
# Write the system's nixpkgs into the registry to avoid mixing nixpkgs versions
|
||||||
|
# https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html
|
||||||
|
system.flake = systemPkgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
roles/common/services/default.nix
Normal file
8
roles/common/services/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./avahi.nix
|
||||||
|
./tailscale.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
8
roles/common/services/tailscale.nix
Normal file
8
roles/common/services/tailscale.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
useRoutingFeatures = lib.mkDefault "client";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -13,5 +13,6 @@
|
||||||
./ddclient.nix
|
./ddclient.nix
|
||||||
./beep.nix
|
./beep.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
|
./tailscale.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
roles/server/tailscale.nix
Normal file
8
roles/server/tailscale.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.tailscale = {
|
||||||
|
# This is needed for being an exit node
|
||||||
|
useRoutingFeatures = "server";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue