3 Commits

Author SHA1 Message Date
fb4216264d -repl-flakes, fix:homeConfiguration module 2024-11-25 09:49:35 +01:00
c6d1b9a2ad video15 2024-10-17 18:57:52 +02:00
6c720bdac6 video13 2024-10-10 14:52:28 +02:00
14 changed files with 147 additions and 29 deletions

32
flake.lock generated
View File

@ -50,11 +50,11 @@
]
},
"locked": {
"lastModified": 1726524467,
"narHash": "sha256-xkPPPvfHhHK7BNX5ZrQ9N6AIEixCmFzRZHduDf0zv30=",
"lastModified": 1728922573,
"narHash": "sha256-FegyBabjV4868aJUbvFtqH0zKDEtUpeCAfnB1vWXeBg=",
"owner": "nix-community",
"repo": "disko",
"rev": "22ee467a54a3ab7fa9d637ccad5330c6c087e9dc",
"rev": "3b778f10eb275573da9f5c8a7a49e774200b87e5",
"type": "github"
},
"original": {
@ -66,11 +66,11 @@
"dotfiles": {
"flake": false,
"locked": {
"lastModified": 1725956275,
"narHash": "sha256-4tHKP+PLpJKnFfOT6MY3p/NDBr/3NDyWljB8/iELVZs=",
"lastModified": 1726139078,
"narHash": "sha256-FiyYP/hTiSOkj99P1YcIxc9uJjjInpMPAp6fKtZlkNs=",
"ref": "refs/heads/master",
"rev": "b1393f4b54b8e908b770450ccc49400713d8e457",
"revCount": 1,
"rev": "d9f3a3ba9d8430306a4f6f7e9fd3ad618d274c8e",
"revCount": 2,
"type": "git",
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
},
@ -107,11 +107,11 @@
]
},
"locked": {
"lastModified": 1712016346,
"narHash": "sha256-O2nO7pD+krq+4HgkLB4VThRtAucIPfXDs/jJqCGlK1w=",
"lastModified": 1726817922,
"narHash": "sha256-gO91NgBTTbVHBlvnn6g6XFeXzJquBH5MrVhYMFTnB0Q=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4be0464472675212654dedf3e021bd5f1d58b92f",
"rev": "f48b181f0161db6246a1bd1b05d70a7b3a87ab41",
"type": "github"
},
"original": {
@ -138,11 +138,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1724531977,
"narHash": "sha256-XROVLf9ti4rrNCFLr+DmXRZtPjCQTW4cYy59owTEmxk=",
"lastModified": 1726447378,
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2527da1ef492c495d5391f3bcf9c1dd9f4514e32",
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
"type": "github"
},
"original": {
@ -154,11 +154,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"lastModified": 1726463316,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
"type": "github"
},
"original": {

View File

@ -34,8 +34,6 @@
outputs = {
self,
agenix,
disko,
dotfiles,
home-manager,
nixpkgs,
...
@ -53,6 +51,7 @@
packages =
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
overlays = import ./overlays {inherit inputs;};
homeManagerModules = import ./modules/home-manager;
nixosConfigurations = {
m3-kratos-vm = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};

View File

@ -5,6 +5,7 @@
pkgs,
...
}: {
imports = builtins.attrValues outputs.homeManagerModules;
nixpkgs = {
# You can add overlays here
overlays = [

View File

@ -26,7 +26,8 @@
home.packages = with pkgs; [
kitty
wofi
zellij-ps
firefox
n8n
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
@ -81,4 +82,26 @@
# Let Home Manager install and manage itself.
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"
}
}
'';
};
}

View File

@ -96,5 +96,5 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (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?
}

View File

@ -2,7 +2,7 @@
virtualisation.oci-containers.containers."echo-http-service" = {
image = "hashicorp/http-echo";
extraOptions = ["-text='Hello, World!'" "--network=web"];
ports = ["5678:5678"];
ports = ["5679:5678"];
};
system.activationScripts.createPodmanNetworkWeb = lib.mkAfter ''
if ! /run/current-system/sw/bin/podman network exists web; then

View File

@ -1,5 +1,6 @@
{
imports = [
./containers
./n8n.nix
];
}

View File

@ -0,0 +1,11 @@
{
services.n8n = {
enable = true;
openFirewall = true;
};
systemd.services.n8n = {
environment = {
N8N_SECURE_COOKIE = "false";
};
};
}

View File

@ -0,0 +1,3 @@
{
zellij-ps = import ./zellij-ps.nix;
}

View 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;
};
}

View File

@ -1,16 +1,13 @@
{ inputs, ... }: {
{inputs, ...}: {
# 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
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev:
{
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
};
modifications = final: prev: {
n8n = import ./mods/n8n.nix {inherit prev;};
};
stable-packages = final: _prev: {
stable = import inputs.nixpkgs-stable {

17
overlays/mods/n8n.nix Normal file
View 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=";
};
})

View File

@ -1,4 +1,5 @@
{pkgs, ...}: {
# Define your custom packages here
zellij-ps = pkgs.callPackage ./zellij-ps {};
n8n-custom = pkgs.callPackage ./n8n-custom {};
}

View 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=";
};
})