nix machine / user configurations

wip

Changed files
+91 -9
hosts
modules
base
pkgs-set
overlays
secrets
shells
+44
flake.lock
···
{
"nodes": {
"all-cabal-json": {
"flake": false,
"locked": {
···
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
···
},
"root": {
"inputs": {
"bernbot": "bernbot",
"blender-bin": "blender-bin",
"blog": "blog",
···
{
"nodes": {
+
"agenix": {
+
"inputs": {
+
"darwin": "darwin",
+
"nixpkgs": [
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1682101079,
+
"narHash": "sha256-MdAhtjrLKnk2uiqun1FWABbKpLH090oeqCSiWemtuck=",
+
"owner": "ryantm",
+
"repo": "agenix",
+
"rev": "2994d002dcff5353ca1ac48ec584c7f6589fe447",
+
"type": "github"
+
},
+
"original": {
+
"owner": "ryantm",
+
"repo": "agenix",
+
"type": "github"
+
}
+
},
"all-cabal-json": {
"flake": false,
"locked": {
···
"original": {
"owner": "ipetkov",
"repo": "crane",
+
"type": "github"
+
}
+
},
+
"darwin": {
+
"inputs": {
+
"nixpkgs": [
+
"agenix",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1673295039,
+
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
+
"owner": "lnl7",
+
"repo": "nix-darwin",
+
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
+
"type": "github"
+
},
+
"original": {
+
"owner": "lnl7",
+
"ref": "master",
+
"repo": "nix-darwin",
"type": "github"
}
},
···
},
"root": {
"inputs": {
+
"agenix": "agenix",
"bernbot": "bernbot",
"blender-bin": "blender-bin",
"blog": "blog",
+3
flake.nix
···
vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
# needed for hyprland setup
# hyprland.url = "github:hyprwm/Hyprland";
# hyprland.inputs.nixpkgs.follows = "nixpkgs";
···
vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
+
agenix.url = "github:ryantm/agenix";
+
agenix.inputs.nixpkgs.follows = "nixpkgs";
+
# needed for hyprland setup
# hyprland.url = "github:hyprwm/Hyprland";
# hyprland.inputs.nixpkgs.follows = "nixpkgs";
+1
hosts/tkaronto/default.nix
···
imports = with inputs;
with nixos-hardware.nixosModules;
[
nixpkgs.nixosModules.notDetected
nixos-persistence.nixosModule
common-pc-ssd
···
imports = with inputs;
with nixos-hardware.nixosModules;
[
+
inputs.agenix.nixosModules.default
nixpkgs.nixosModules.notDetected
nixos-persistence.nixosModule
common-pc-ssd
+5
hosts/tkaronto/modules/nix.nix
···
···
+
{config, ...}: {
+
nix.extraOptions = ''
+
!include ${config.age.secrets.nixGithubAccessToken.path}
+
'';
+
}
+4
hosts/tkaronto/modules/secrets.nix
···
···
+
{
+
age.secrets.nixGithubAccessToken.file = ../../../secrets/nixGithubAccessToken.age;
+
age.secrets.wgServerPrivateKey.file = ../../../secrets/wgServerPrivateKey.age;
+
}
+11
hosts/tkaronto/modules/wireguard.nix
···
···
+
{config, ...}: {
+
networking.wireguard.enable = true;
+
networking.wireguard.interfaces."wg0" = {
+
privateKeyFile = config.age.secrets.wgServerPrivateKey.path;
+
peers = [{
+
publicKey = import ./wgProxyPublicKey.key.pub;
+
allowedIPs = ["10.99.0.1/32"];
+
endpoint = "${import ./wgProxyPublicIp}:51820";
+
}];
+
};
+
}
+4 -5
hosts/wolumonde/default.nix
···
{
inputs,
-
pkgs,
-
config,
-
lib,
tlib,
...
-
}: {
-
imports = tlib.importFolder (toString ./modules);
boot.cleanTmpDir = true;
zramSwap.enable = true;
···
{
inputs,
tlib,
...
+
}: {
+
imports = [
+
inputs.agenix.nixosModules.default
+
] ++ (tlib.importFolder (toString ./modules));
boot.cleanTmpDir = true;
zramSwap.enable = true;
+4
hosts/wolumonde/modules/secrets.nix
···
···
+
{
+
age.secrets.bernbotToken.file = ../../../secrets/bernbotToken.age;
+
age.secrets.wgProxyPrivateKey.file = ../../../secrets/wgProxyPrivateKey.age;
+
}
+11
hosts/wolumonde/modules/wireguard.nix
···
···
+
{config, ...}: {
+
networking.wireguard.enable = true;
+
networking.wireguard.interfaces."wg0" = {
+
listenPort = 51820;
+
privateKeyFile = config.age.secrets.wgProxyPrivateKey.path;
+
peers = [{
+
publicKey = import ./wgServerPublicKey.key.pub;
+
allowedIPs = ["10.99.0.2/32"];
+
}];
+
};
+
}
-2
modules/base/nix.nix
···
pkgs,
lib,
inputs,
-
config,
...
}: {
nix = {
···
fallback = true
extra-experimental-features = nix-command flakes
builders-use-substitutes = true
-
netrc-file = /etc/nix/netrc
'';
nixPath = ["nixpkgs=${inputs.nixpkgs}" "home-manager=${inputs.home}"];
};
···
pkgs,
lib,
inputs,
...
}: {
nix = {
···
fallback = true
extra-experimental-features = nix-command flakes
builders-use-substitutes = true
'';
nixPath = ["nixpkgs=${inputs.nixpkgs}" "home-manager=${inputs.home}"];
};
+3
pkgs-set/overlays/agenix.nix
···
···
+
{inputs}: final: prev: {
+
agenix = inputs.agenix.packages."${final.system}".agenix;
+
}
secrets/secrets.nix

This is a binary file and will not be displayed.

-1
secrets/ssh-key.pub
···
-
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDUeDBW4hnHgnT0SjVFeGDztht9owObSmiyWXmmIEGQp2IMPqFpCxkOU61osvfCf4ZT92Ok9iJTohLwFBvHJRD/+CH8/b54sgFAx1lLObkJOMLz4iWZ5y4fNtBYuIA2McQSQoMDpDz6TDym7v7HF7zoUyBmfHMT/9WiX/z6Ft9hY63eh9DcF7WVURzeUvXLApt9wUYUxxdC2KZ/VrDPrIOxCcOgj3le+1zTiD8zwfAGhkzRD3IEx0yCYK6oztrh6WTwA5ZW+cLziH2sVEvSHFa2O398gIvZpzsdYTcQt06d/oyZIvftcpxD8IvjpGgHEsN/mAg0ovexyqAVk+TV/1XySKaoPPVCekap0R50CVD9kEk+GlD78XBYi++aAMIq0/D+NOXkgksfODt3yJPPzQx4KH8gcn0dQJM5zeyTwDfclzMRqCwL1eVHY00EbtG9IcLmMsWk/lM6vpHfyHqHlqNJ3CnUuDBccz9p5ORC1cuj4r9CmXPPmh7OYk7gGiQb4oxuqsYClzp93qmU7qMvGwmxBJaVagNIJgBqb5fsne0OMlcer5CH4L31ozszkSkzCXtFWNoTdgQHU1J3DxxL9WQJCfKku4EPJadYOh80USnauOke5CqfsGtf6uMq4l5Ylcc1QcNhRqxpeTLAIZx0EYDhmQ4eGjAZbiv6ddUp9dAdiQ== openpgp:0xDE3C8FCD
···
secrets/wolumonde.key.pub

This is a binary file and will not be displayed.

secrets/yusdacra.key.pub

This is a binary file and will not be displayed.

+1 -1
shells/default.nix
···
default = with pkgs;
mkShell {
name = "prts";
-
buildInputs = [git git-crypt alejandra helix];
shellHook = "echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"";
};
})
···
default = with pkgs;
mkShell {
name = "prts";
+
buildInputs = [git git-crypt alejandra helix agenix];
shellHook = "echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"";
};
})