Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
fb4216264d | |||
c6d1b9a2ad | |||
6c720bdac6 | |||
6139657197 |
32
flake.lock
generated
32
flake.lock
generated
@ -50,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": {
|
||||||
@ -66,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"
|
||||||
},
|
},
|
||||||
@ -107,11 +107,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712016346,
|
"lastModified": 1726817922,
|
||||||
"narHash": "sha256-O2nO7pD+krq+4HgkLB4VThRtAucIPfXDs/jJqCGlK1w=",
|
"narHash": "sha256-gO91NgBTTbVHBlvnn6g6XFeXzJquBH5MrVhYMFTnB0Q=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "4be0464472675212654dedf3e021bd5f1d58b92f",
|
"rev": "f48b181f0161db6246a1bd1b05d70a7b3a87ab41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -138,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": {
|
||||||
@ -154,11 +154,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711703276,
|
"lastModified": 1726463316,
|
||||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
agenix,
|
agenix,
|
||||||
disko,
|
|
||||||
dotfiles,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
@ -53,6 +51,7 @@
|
|||||||
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;};
|
||||||
@ -67,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
|
||||||
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -96,5 +96,5 @@
|
|||||||
# 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?
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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,16 +1,13 @@
|
|||||||
{ 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: {
|
||||||
stable = import inputs.nixpkgs-stable {
|
stable = import inputs.nixpkgs-stable {
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user