Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
fb4216264d | |||
c6d1b9a2ad | |||
6c720bdac6 | |||
6139657197 | |||
e7ec54ef4f | |||
78a720e1a3 |
136
flake.lock
generated
136
flake.lock
generated
@ -1,5 +1,48 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"agenix": {
|
||||||
|
"inputs": {
|
||||||
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1723293904,
|
||||||
|
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700795494,
|
||||||
|
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -7,11 +50,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726524467,
|
"lastModified": 1728922573,
|
||||||
"narHash": "sha256-xkPPPvfHhHK7BNX5ZrQ9N6AIEixCmFzRZHduDf0zv30=",
|
"narHash": "sha256-FegyBabjV4868aJUbvFtqH0zKDEtUpeCAfnB1vWXeBg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "22ee467a54a3ab7fa9d637ccad5330c6c087e9dc",
|
"rev": "3b778f10eb275573da9f5c8a7a49e774200b87e5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -23,11 +66,11 @@
|
|||||||
"dotfiles": {
|
"dotfiles": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725956275,
|
"lastModified": 1726139078,
|
||||||
"narHash": "sha256-4tHKP+PLpJKnFfOT6MY3p/NDBr/3NDyWljB8/iELVZs=",
|
"narHash": "sha256-FiyYP/hTiSOkj99P1YcIxc9uJjjInpMPAp6fKtZlkNs=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "b1393f4b54b8e908b770450ccc49400713d8e457",
|
"rev": "d9f3a3ba9d8430306a4f6f7e9fd3ad618d274c8e",
|
||||||
"revCount": 1,
|
"revCount": 2,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
|
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
|
||||||
},
|
},
|
||||||
@ -39,15 +82,36 @@
|
|||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712016346,
|
"lastModified": 1703113217,
|
||||||
"narHash": "sha256-O2nO7pD+krq+4HgkLB4VThRtAucIPfXDs/jJqCGlK1w=",
|
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "4be0464472675212654dedf3e021bd5f1d58b92f",
|
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726817922,
|
||||||
|
"narHash": "sha256-gO91NgBTTbVHBlvnn6g6XFeXzJquBH5MrVhYMFTnB0Q=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "f48b181f0161db6246a1bd1b05d70a7b3a87ab41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -58,15 +122,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711703276,
|
"lastModified": 1703013332,
|
||||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
@ -74,11 +138,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724531977,
|
"lastModified": 1726447378,
|
||||||
"narHash": "sha256-XROVLf9ti4rrNCFLr+DmXRZtPjCQTW4cYy59owTEmxk=",
|
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2527da1ef492c495d5391f3bcf9c1dd9f4514e32",
|
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -88,14 +152,46 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726463316,
|
||||||
|
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"agenix": "agenix",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"dotfiles": "dotfiles",
|
"dotfiles": "dotfiles",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -31,8 +33,7 @@
|
|||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
disko,
|
agenix,
|
||||||
dotfiles,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
@ -50,12 +51,14 @@
|
|||||||
packages =
|
packages =
|
||||||
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||||
overlays = import ./overlays {inherit inputs;};
|
overlays = import ./overlays {inherit inputs;};
|
||||||
|
homeManagerModules = import ./modules/home-manager;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
m3-kratos-vm = nixpkgs.lib.nixosSystem {
|
m3-kratos-vm = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/m3-kratos
|
./hosts/m3-kratos
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
|
agenix.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -63,7 +66,7 @@
|
|||||||
"m3tam3re@m3-kratos-vm" = home-manager.lib.homeManagerConfiguration {
|
"m3tam3re@m3-kratos-vm" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
modules = [./home/m3tam3re/m3tam3re.nix];
|
modules = [./home/m3tam3re/m3-kratos.nix];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
{ config, lib, outputs, pkgs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
outputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = builtins.attrValues outputs.homeManagerModules;
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
@ -29,7 +36,7 @@
|
|||||||
nix = {
|
nix = {
|
||||||
package = lib.mkDefault pkgs.nix;
|
package = lib.mkDefault pkgs.nix;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
coreutils
|
coreutils
|
||||||
fd
|
fd
|
||||||
|
gcc
|
||||||
htop
|
htop
|
||||||
httpie
|
httpie
|
||||||
jq
|
jq
|
||||||
|
@ -15,6 +15,7 @@ in {
|
|||||||
set -x NIX_PATH nixpkgs=channel:nixos-unstable
|
set -x NIX_PATH nixpkgs=channel:nixos-unstable
|
||||||
set -x NIX_LOG info
|
set -x NIX_LOG info
|
||||||
set -x TERMINAL kitty
|
set -x TERMINAL kitty
|
||||||
|
source /run/agenix/${config.home.username}-secrets
|
||||||
|
|
||||||
if test (tty) = "/dev/tty1"
|
if test (tty) = "/dev/tty1"
|
||||||
exec Hyprland &> /dev/null
|
exec Hyprland &> /dev/null
|
||||||
|
@ -30,7 +30,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
kb_layout = "de,us";
|
kb_layout = "us";
|
||||||
kb_variant = "";
|
kb_variant = "";
|
||||||
kb_model = "";
|
kb_model = "";
|
||||||
kb_rules = "";
|
kb_rules = "";
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
kitty
|
kitty
|
||||||
wofi
|
wofi
|
||||||
|
firefox
|
||||||
|
n8n
|
||||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
# # "Hello, world!" when run.
|
# # "Hello, world!" when run.
|
||||||
# pkgs.hello
|
# pkgs.hello
|
||||||
@ -80,4 +82,26 @@
|
|||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
programs.zellij-ps = {
|
||||||
|
enable = true;
|
||||||
|
projectFolders = [
|
||||||
|
"${config.home.homeDirectory}/.config"
|
||||||
|
];
|
||||||
|
layout = ''
|
||||||
|
layout {
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="zellij:tab-bar"
|
||||||
|
}
|
||||||
|
pane size="70%" command="nvim"
|
||||||
|
pane split_direction="vertical" {
|
||||||
|
pane
|
||||||
|
pane command="unimatrix"
|
||||||
|
}
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="zellij:status-bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = let
|
||||||
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||||
|
in {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
trusted-users = [
|
trusted-users = [
|
||||||
@ -53,10 +55,8 @@
|
|||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
registry =
|
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||||
(lib.mapAttrs (_: flake: {inherit flake;}))
|
nixPath = ["/etc/nix/path"] ++ lib.mapAttrsToList (flakeName: _: "${flakeName}=flake:${flakeName}") flakeInputs;
|
||||||
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
|
||||||
nixPath = ["/etc/nix/path"];
|
|
||||||
};
|
};
|
||||||
users.defaultUserShell = pkgs.fish;
|
users.defaultUserShell = pkgs.fish;
|
||||||
}
|
}
|
||||||
|
5
hosts/common/extraServices/extraServices/default.nix
Normal file
5
hosts/common/extraServices/extraServices/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./podman.nix
|
||||||
|
];
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.extraServices.podman;
|
||||||
|
in {
|
||||||
|
options.extraServices.podman.enable = mkEnableOption "enable podman";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
flags = [
|
||||||
|
"--filter=until=24h"
|
||||||
|
"--filter=label!=important"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
podman-compose
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.extraServices.podman;
|
||||||
|
in {
|
||||||
|
options.extraServices.podman.enable = mkEnableOption "enable podman";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
flags = [
|
||||||
|
"--filter=until=24h"
|
||||||
|
"--filter=label!=important"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
podman-compose
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
32
hosts/common/extraServices/extraServices/podman.nix
Normal file
32
hosts/common/extraServices/extraServices/podman.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.extraServices.podman;
|
||||||
|
in {
|
||||||
|
options.extraServices.podman.enable = mkEnableOption "enable podman";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
flags = [
|
||||||
|
"--filter=until=24h"
|
||||||
|
"--filter=label!=important"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
podman-compose
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
networking.networkmanager.unmanaged = ["interface-name:ve-*"];
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
@ -86,13 +86,15 @@
|
|||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
|
networking.nat.enable = true;
|
||||||
|
networking.nat.internalInterfaces = ["ve-+"];
|
||||||
|
networking.nat.externalInterface = "enp1s0";
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../common
|
../common
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
./secrets.nix
|
||||||
./services
|
./services
|
||||||
];
|
];
|
||||||
|
|
||||||
|
13
hosts/m3-kratos/secrets.nix
Normal file
13
hosts/m3-kratos/secrets.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
age = {
|
||||||
|
secrets = {
|
||||||
|
secret1 = {
|
||||||
|
file = ../../secrets/secret1.age;
|
||||||
|
};
|
||||||
|
m3tam3re-secrets = {
|
||||||
|
file = ../../secrets/m3tam3re-secrets.age;
|
||||||
|
owner = "m3tam3re";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./echo.nix
|
./echo.nix
|
||||||
|
./httpd.nix
|
||||||
|
./nginx.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
virtualisation.oci-containers.containers."echo-http-service" = {
|
virtualisation.oci-containers.containers."echo-http-service" = {
|
||||||
image = "hashicorp/http-echo";
|
image = "hashicorp/http-echo";
|
||||||
extraOptions = ["-text='Hello, World!'" "--network=web"];
|
extraOptions = ["-text='Hello, World!'" "--network=web"];
|
||||||
ports = ["5678:5678"];
|
ports = ["5679:5678"];
|
||||||
};
|
};
|
||||||
system.activationScripts.createPodmanNetworkWeb = lib.mkAfter ''
|
system.activationScripts.createPodmanNetworkWeb = lib.mkAfter ''
|
||||||
if ! /run/current-system/sw/bin/podman network exists web; then
|
if ! /run/current-system/sw/bin/podman network exists web; then
|
||||||
|
56
hosts/m3-kratos/services/containers/httpd.nix
Normal file
56
hosts/m3-kratos/services/containers/httpd.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
containers.httpd = {
|
||||||
|
autoStart = true;
|
||||||
|
ephemeral = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "192.168.100.10";
|
||||||
|
localAddress = "192.168.100.11";
|
||||||
|
forwardPorts = [
|
||||||
|
{
|
||||||
|
containerPort = 80;
|
||||||
|
hostPort = 80;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
config = {...}: {
|
||||||
|
services.httpd = {
|
||||||
|
enable = true;
|
||||||
|
adminAddr = "foo@example.org";
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [80];
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
bindMounts = {
|
||||||
|
"/root/data" = {
|
||||||
|
hostPath = "/home/m3tam3re/data/";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
containers.httpd2 = {
|
||||||
|
autoStart = true;
|
||||||
|
ephemeral = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "192.168.100.10";
|
||||||
|
localAddress = "192.168.100.12";
|
||||||
|
forwardPorts = [
|
||||||
|
{
|
||||||
|
containerPort = 80;
|
||||||
|
hostPort = 8080;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
config = {...}: {
|
||||||
|
services.httpd = {
|
||||||
|
enable = true;
|
||||||
|
adminAddr = "foo@example.org";
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [80];
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
bindMounts = {
|
||||||
|
"/root/data" = {
|
||||||
|
hostPath = "/home/m3tam3re/data/";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
hosts/m3-kratos/services/containers/nginx.nix
Normal file
8
hosts/m3-kratos/services/containers/nginx.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{config, ...}: {
|
||||||
|
virtualisation.oci-containers.containers."nginx" = {
|
||||||
|
image = "docker.io/nginx:alpine";
|
||||||
|
environmentFiles = [
|
||||||
|
config.age.secrets.secret1.path
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./containers
|
./containers
|
||||||
|
./n8n.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
11
hosts/m3-kratos/services/n8n.nix
Normal file
11
hosts/m3-kratos/services/n8n.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
services.n8n = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
systemd.services.n8n = {
|
||||||
|
environment = {
|
||||||
|
N8N_SECURE_COOKIE = "false";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
modules/home-manager/default.nix
Normal file
3
modules/home-manager/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
zellij-ps = import ./zellij-ps.nix;
|
||||||
|
}
|
44
modules/home-manager/zellij-ps.nix
Normal file
44
modules/home-manager/zellij-ps.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.programs.zellij-ps;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
programs.zellij-ps = {
|
||||||
|
enable = mkEnableOption "Zellij Project Selector";
|
||||||
|
projectFolders = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.path;
|
||||||
|
description = "List of project folders for zellij-ps.";
|
||||||
|
default = ["${config.home.homeDirectory}/projects"];
|
||||||
|
};
|
||||||
|
layout = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Layout for zellij";
|
||||||
|
default = ''
|
||||||
|
layout {
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="zellij:tab-bar"
|
||||||
|
}
|
||||||
|
pane
|
||||||
|
pane split_direction="vertical" {
|
||||||
|
pane
|
||||||
|
pane command="htop"
|
||||||
|
}
|
||||||
|
pane size=2 borderless=true {
|
||||||
|
plugin location="zellij:status-bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [pkgs.zellij-ps];
|
||||||
|
home.sessionVariables.PROJECT_FOLDERS = lib.concatStringsSep ":" cfg.projectFolders;
|
||||||
|
home.file.".config/zellij/layouts/zellij-ps.kdl".text = cfg.layout;
|
||||||
|
};
|
||||||
|
}
|
@ -1,15 +1,12 @@
|
|||||||
{ inputs, ... }: {
|
{inputs, ...}: {
|
||||||
# This one brings our custom packages from the 'pkgs' directory
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
additions = final: _prev: import ../pkgs {pkgs = final;};
|
||||||
|
|
||||||
# This one contains whatever you want to overlay
|
# This one contains whatever you want to overlay
|
||||||
# You can change versions, add patches, set compilation flags, anything really.
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
# https://nixos.wiki/wiki/Overlays
|
# https://nixos.wiki/wiki/Overlays
|
||||||
modifications = final: prev:
|
modifications = final: prev: {
|
||||||
{
|
n8n = import ./mods/n8n.nix {inherit prev;};
|
||||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
|
||||||
# ...
|
|
||||||
# });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
stable-packages = final: _prev: {
|
stable-packages = final: _prev: {
|
||||||
|
17
overlays/mods/n8n.nix
Normal file
17
overlays/mods/n8n.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{prev}:
|
||||||
|
prev.n8n.overrideAttrs (oldAttrs: rec {
|
||||||
|
pname = oldAttrs.pname;
|
||||||
|
version = "1.63.0";
|
||||||
|
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "n8n-io";
|
||||||
|
repo = "n8n";
|
||||||
|
rev = "n8n@${version}";
|
||||||
|
hash = "sha256-zJHveCbBPJs8qbgCsU+dgucoXpAKa7PVLH4tfdcJZlE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
pnpmDeps = prev.pnpm.fetchDeps {
|
||||||
|
inherit pname version src;
|
||||||
|
hash = "sha256-FsBA/QENfreCJnYCw8MnX5W2D+WJ3DUuTIakH78TYU8=";
|
||||||
|
};
|
||||||
|
})
|
@ -1,5 +1,5 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
# Define your custom packages here
|
# Define your custom packages here
|
||||||
# my-package = pkgs.callPackage ./my-package {};
|
zellij-ps = pkgs.callPackage ./zellij-ps {};
|
||||||
|
n8n-custom = pkgs.callPackage ./n8n-custom {};
|
||||||
}
|
}
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
# Your custom nix-package
|
|
||||||
# ...
|
|
21
pkgs/n8n-custom/default.nix
Normal file
21
pkgs/n8n-custom/default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
fetchFromGitHub,
|
||||||
|
n8n,
|
||||||
|
pnpm,
|
||||||
|
}:
|
||||||
|
n8n.overrideAttrs (oldAttrs: rec {
|
||||||
|
pname = oldAttrs.pname;
|
||||||
|
version = "1.63.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "n8n-io";
|
||||||
|
repo = "n8n";
|
||||||
|
rev = "n8n@${version}";
|
||||||
|
hash = "sha256-zJHveCbBPJs8qbgCsU+dgucoXpAKa7PVLH4tfdcJZlE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
pnpmDeps = pnpm.fetchDeps {
|
||||||
|
inherit pname version src;
|
||||||
|
hash = "sha256-FsBA/QENfreCJnYCw8MnX5W2D+WJ3DUuTIakH78TYU8=";
|
||||||
|
};
|
||||||
|
})
|
39
pkgs/zellij-ps/default.nix
Normal file
39
pkgs/zellij-ps/default.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
fish,
|
||||||
|
fd,
|
||||||
|
fzf,
|
||||||
|
makeWrapper,
|
||||||
|
zellij,
|
||||||
|
fetchFromGitea,
|
||||||
|
stdenv,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "zellij-ps";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitea {
|
||||||
|
domain = "code.m3tam3re.com";
|
||||||
|
owner = "m3tam3re";
|
||||||
|
repo = "helper-scripts";
|
||||||
|
rev = "08a3217b83391c1110545c1ee3161eecd5dbe5e9";
|
||||||
|
sha256 = "1sc4i58mwcg3qsq0wwl5rvk08ykbxc497bq7mrxiirndsarskby7";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [];
|
||||||
|
nativeBuildInputs = [makeWrapper];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp zellij-ps.fish $out/bin/zellij-ps
|
||||||
|
wrapProgram $out/bin/zellij-ps \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [fish fd fzf zellij]}
|
||||||
|
'';
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A small project script for zellij";
|
||||||
|
homepage = "https://code.m3tam3re.com/m3tam3re/helper-scripts";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [m3tam3re];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
15
secrets/m3tam3re-secrets.age
Normal file
15
secrets/m3tam3re-secrets.age
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 l/KTwg +8dkEwTxSxpSykhcm+qqMU5c9FxuL0VURTO+Et3Hqjg
|
||||||
|
IPzfKtktyMQdv5SceryhZrYhCeB/TVLgXAlu78ihMTw
|
||||||
|
-> ssh-rsa DQlE7w
|
||||||
|
j4z7/+j+OxQn5pyhuzYdhUYKVhsU7VndBt62wHkt/3akh4a31GbXDmhhFasO/0LX
|
||||||
|
vj0MnsoNQSyWxSE16oP3abFL3dnv8u5nUNsTUUKnd7gv58RglfGzUI3vZ5iIQVZx
|
||||||
|
ryAiRhmZbzb+oXN4Kzi3Mj1yNExnmDK5JXwKMZpWRPlgmnEAvoRnBGK9povIk+Av
|
||||||
|
vACdqLC0jZPsw3B2zw1L35iVSeb2HbbqYdUab3ElClPu6HVQBa7JGSSNfyVJY3c4
|
||||||
|
zbz9H9gwDvspu0jexK6D7cZjDalh3UCYly7JvPGoUd6bWHUCNhHOyAhZFIZlNIhj
|
||||||
|
pD1BqBis9Mh5xtCElml+PQkfKQKqGJz7KZ6v6bs6EGq/0nXaEiMmn3HRYnPEL98O
|
||||||
|
u63SVH5vevAcUewVw6/iENN+0vUTK19C3vkEFDaEwuPTituAMReicx+9vZZvz7ZE
|
||||||
|
nTUDblgl+8MngAQBaRjH4HrsXb3mx/4vFhSMO7gBYwYq8xpPXLqlwqgyBS54fBSU
|
||||||
|
|
||||||
|
--- T7qcXQKB/ktQb5Epx0/k+EDOdpbJV1x7VaZKEGEfaOE
|
||||||
|
<0C><>q<EFBFBD>Q<>?N<>˯:a1)<29>\<5C><>&<26>Ezl[<5B>'<27><>`%<25>QQ<51><51>9<>/{<7B><><EFBFBD>&<w<><0F><><EFBFBD><EFBFBD>Ė<EFBFBD>s
|
15
secrets/secret1.age
Normal file
15
secrets/secret1.age
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 l/KTwg rtb9YLrncvwCrLgxUrpsyWQKh5EpORg+M3V2jWFEI0Q
|
||||||
|
+QaPHNxR+5GcIKt9+0EbP/9UbZPe1ET6OS+NOByeZ90
|
||||||
|
-> ssh-rsa DQlE7w
|
||||||
|
k2jNaCjCwamanfwOn2U+mxjo1n4445GvfEk2U8OG75AGox4UxlvCBqbzecx9jx+t
|
||||||
|
w3CBDstgVvJgEMjZ70g4fhok6gISiyMKc/KQxU9TLRYlTU3ulvX3nf+/4pX05YVv
|
||||||
|
Xj+7amLZtEPSMNgNDbRnverPToVTCEgzpG7XELzhrhV+cbLvI702f2ws2puySvkR
|
||||||
|
rMkAyyHNA3UfYv42FX4ZitIiOKHALdAVw89oxVFLj4qcYIuo6GdmDoMiRQCLdDvs
|
||||||
|
CkRyPm7qtrcc6Kmeyl0xLZnTWi90IOF8tHmwbOhSxbhRpWPn05Gzdw27hbX41gkZ
|
||||||
|
qqerT71oFVJhueK8gCJPtePQQXIXLsOc4gjI78WXaRB/BlpwWK4GlKEeaIHP9f35
|
||||||
|
HVN8PAjWmgA9MR2/p9azmwYjVduaZoRrINmSVMwtS31h6eZD1m5XAuO3orBZHKqX
|
||||||
|
8Z9gkpaeIOvGhdP0ye861l3PSduI01CNe9dT0T+iIWhXbMkJ3woVaQTOl8h/IVb6
|
||||||
|
|
||||||
|
--- Q6mzi+/lp1nHSpHoVZqH4RXzNh0Jei8FRhBgU4IjHCQ
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>a<EFBFBD><EFBFBD><05>Ck <09><>l<EFBFBD> !<21>\H<>>܃<>HJ{C:<3A>D<EFBFBD>ѣ&<26><><EFBFBD><EFBFBD>ŲPE<50><45><EFBFBD>W
|
7
secrets/secrets.nix
Normal file
7
secrets/secrets.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
let
|
||||||
|
m3-kratos-vm = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE+8dfimMlWKZOlpjEGI6/2hVFDhytJVTi/P92Jf9mTz";
|
||||||
|
m3tam3re = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3YEmpYbM+cpmyD10tzNRHEn526Z3LJOzYpWEKdJg8DaYyPbDn9iyVX30Nja2SrW4Wadws0Y8DW+Urs25/wVB6mKl7jgPJVkMi5hfobu3XAz8gwSdjDzRSWJrhjynuaXiTtRYED2INbvjLuxx3X8coNwMw58OuUuw5kNJp5aS2qFmHEYQErQsGT4MNqESe3jvTP27Z5pSneBj45LmGK+RcaSnJe7hG+KRtjuhjI7RdzMeDCX73SfUsal+rHeuEw/mmjYmiIItXhFTDn8ZvVwpBKv7xsJG90DkaX2vaTk0wgJdMnpVIuIRBa4EkmMWOQ3bMLGkLQeK/4FUkNcvQ/4+zcZsg4cY9Q7Fj55DD41hAUdF6SYODtn5qMPsTCnJz44glHt/oseKXMSd556NIw2HOvihbJW7Rwl4OEjGaO/dF4nUw4c9tHWmMn9dLslAVpUuZOb7ykgP0jk79ldT3Dv+2Hj0CdAWT2cJAdFX58KQ9jUPT3tBnObSF1lGMI7t77VU=";
|
||||||
|
in {
|
||||||
|
"secret1.age".publicKeys = [m3-kratos-vm m3tam3re];
|
||||||
|
"m3tam3re-secrets.age".publicKeys = [m3-kratos-vm m3tam3re];
|
||||||
|
}
|
Reference in New Issue
Block a user