Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e07adbd1ff | ||
![]() |
b186227e81 | ||
![]() |
d22b436fb1 | ||
![]() |
d0b1d9b775 | ||
![]() |
c6d1b9a2ad | ||
![]() |
6c720bdac6 | ||
![]() |
6139657197 | ||
![]() |
e7ec54ef4f | ||
![]() |
78a720e1a3 | ||
![]() |
b2c3dba781 | ||
![]() |
6a0334cd38 | ||
![]() |
aa7dcee696 | ||
![]() |
1808004efe | ||
![]() |
8f009006f9 | ||
![]() |
1f6e2b3a64 | ||
![]() |
d20945d5f3 | ||
![]() |
6a18670749 |
288
flake.lock
generated
288
flake.lock
generated
@ -1,17 +1,149 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"home-manager": {
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"colmena": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"stable": "stable"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1728263678,
|
||||||
|
"narHash": "sha256-gyUVsPAWY9AgVKjrNPoowrIr5BvK4gI0UkDXvv8iSxA=",
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "colmena",
|
||||||
|
"rev": "b0a62f234fae02a006123e661ff70e62af16106b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "colmena",
|
||||||
|
"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": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712016346,
|
"lastModified": 1728922573,
|
||||||
"narHash": "sha256-O2nO7pD+krq+4HgkLB4VThRtAucIPfXDs/jJqCGlK1w=",
|
"narHash": "sha256-FegyBabjV4868aJUbvFtqH0zKDEtUpeCAfnB1vWXeBg=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"rev": "3b778f10eb275573da9f5c8a7a49e774200b87e5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dotfiles": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726139078,
|
||||||
|
"narHash": "sha256-FiyYP/hTiSOkj99P1YcIxc9uJjjInpMPAp6fKtZlkNs=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "d9f3a3ba9d8430306a4f6f7e9fd3ad618d274c8e",
|
||||||
|
"revCount": 2,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1650374568,
|
||||||
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659877975,
|
||||||
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703113217,
|
||||||
|
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "4be0464472675212654dedf3e021bd5f1d58b92f",
|
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -20,13 +152,111 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726817922,
|
||||||
|
"narHash": "sha256-gO91NgBTTbVHBlvnn6g6XFeXzJquBH5MrVhYMFTnB0Q=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "f48b181f0161db6246a1bd1b05d70a7b3a87ab41",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730184279,
|
||||||
|
"narHash": "sha256-6OB+WWR6gnaWiqSS28aMJypKeK7Pjc2Wm6L0MtOrTuA=",
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "b379bd4d872d159e5189053ce9a4adf86d56db4b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nix-darwin",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711703276,
|
"lastModified": 1703013332,
|
||||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726447378,
|
||||||
|
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725103162,
|
||||||
|
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729665710,
|
||||||
|
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
||||||
|
"path": "/nix/store/lsy6c2f9alj2gkjj36h754kk63x6701l-source",
|
||||||
|
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726463316,
|
||||||
|
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -36,27 +266,47 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"agenix": "agenix",
|
||||||
|
"colmena": "colmena",
|
||||||
|
"disko": "disko",
|
||||||
|
"dotfiles": "dotfiles",
|
||||||
|
"home-manager": "home-manager_2",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711668574,
|
"lastModified": 1724316499,
|
||||||
"narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
|
"narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
|
"rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"systems": {
|
||||||
"inputs": {
|
"locked": {
|
||||||
"home-manager": "home-manager",
|
"lastModified": 1681028828,
|
||||||
"nixpkgs": "nixpkgs",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
57
flake.nix
57
flake.nix
@ -17,12 +17,29 @@
|
|||||||
};
|
};
|
||||||
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";
|
||||||
|
|
||||||
|
colmena.url = "github:zhaofengli/colmena";
|
||||||
|
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
|
disko = {
|
||||||
|
url = "github:nix-community/disko";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
dotfiles = {
|
||||||
|
url = "git+https://code.m3tam3re.com/m3tam3re/dotfiles-flake-demo.git";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
|
agenix,
|
||||||
home-manager,
|
home-manager,
|
||||||
|
nix-darwin,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
nixpkgs-stable,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
@ -38,18 +55,52 @@
|
|||||||
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 = nixpkgs.lib.nixosSystem {
|
m3-kratos-vm = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [./hosts/m3-kratos];
|
modules = [
|
||||||
|
./hosts/m3-kratos
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
agenix.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
m3-hermes-hetzner = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs outputs;};
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/m3-hermes
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
agenix.nixosModules.default
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"m3tam3re@m3tam3re" = 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/m3-kratos.nix];
|
modules = [./home/m3tam3re/m3-kratos.nix];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
colmena = {
|
||||||
|
meta = {
|
||||||
|
nixpkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
specialArgs = {inherit inputs outputs;};
|
||||||
|
};
|
||||||
|
m3-kratos-vm = {
|
||||||
|
deployment = {
|
||||||
|
targetHost = "m3-kratos-vm";
|
||||||
|
targetUser = "m3tam3re";
|
||||||
|
tags = ["vm"];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
|
./hosts/m3-kratos
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
agenix.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = builtins.attrValues outputs.homeManagerModules;
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
|
34
home/features/cli/default.nix
Normal file
34
home/features/cli/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./fish.nix
|
||||||
|
./fzf.nix
|
||||||
|
./neofetch.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
extraOptions = ["-l" "--icons" "--git" "-a"];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bat = {enable = true;};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
fd
|
||||||
|
gcc
|
||||||
|
htop
|
||||||
|
httpie
|
||||||
|
jq
|
||||||
|
procs
|
||||||
|
ripgrep
|
||||||
|
tldr
|
||||||
|
zip
|
||||||
|
];
|
||||||
|
}
|
33
home/features/cli/fish.nix
Normal file
33
home/features/cli/fish.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.cli.fish;
|
||||||
|
in {
|
||||||
|
options.features.cli.fish.enable = mkEnableOption "enable extended fish configuration";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
loginShellInit = ''
|
||||||
|
set -x NIX_PATH nixpkgs=channel:nixos-unstable
|
||||||
|
set -x NIX_LOG info
|
||||||
|
set -x TERMINAL kitty
|
||||||
|
source /run/agenix/${config.home.username}-secrets
|
||||||
|
|
||||||
|
if test (tty) = "/dev/tty1"
|
||||||
|
exec Hyprland &> /dev/null
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
shellAbbrs = {
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
ls = "eza";
|
||||||
|
grep = "rg";
|
||||||
|
ps = "procs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
38
home/features/cli/fzf.nix
Normal file
38
home/features/cli/fzf.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.cli.fzf;
|
||||||
|
in {
|
||||||
|
options.features.cli.fzf.enable = mkEnableOption "enable fuzzy finder";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
"fg" = "#f8f8f2";
|
||||||
|
"bg" = "#282a36";
|
||||||
|
"hl" = "#bd93f9";
|
||||||
|
"fg+" = "#f8f8f2";
|
||||||
|
"bg+" = "#44475a";
|
||||||
|
"hl+" = "#bd93f9";
|
||||||
|
"info" = "#ffb86c";
|
||||||
|
"prompt" = "#50fa7b";
|
||||||
|
"pointer" = "#ff79c6";
|
||||||
|
"marker" = "#ff79c6";
|
||||||
|
"spinner" = "#ffb86c";
|
||||||
|
"header" = "#6272a4";
|
||||||
|
};
|
||||||
|
defaultOptions = [
|
||||||
|
"--preview='bat --color=always -n {}'"
|
||||||
|
"--bind 'ctrl-/:toggle-preview'"
|
||||||
|
];
|
||||||
|
defaultCommand = "fd --type f --exclude .git --follow --hidden";
|
||||||
|
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
home/features/cli/neofetch.nix
Normal file
15
home/features/cli/neofetch.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.cli.neofetch;
|
||||||
|
in {
|
||||||
|
options.features.cli.neofetch.enable = mkEnableOption "enable neofetch";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [neofetch];
|
||||||
|
};
|
||||||
|
}
|
10
home/features/desktop/default.nix
Normal file
10
home/features/desktop/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./fonts.nix
|
||||||
|
./hyprland.nix
|
||||||
|
./wayland.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
];
|
||||||
|
}
|
23
home/features/desktop/fonts.nix
Normal file
23
home/features/desktop/fonts.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.desktop.fonts;
|
||||||
|
in {
|
||||||
|
options.features.desktop.fonts.enable =
|
||||||
|
mkEnableOption "install additional fonts for desktop apps";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fira-code
|
||||||
|
fira-code-symbols
|
||||||
|
fira-code-nerdfont
|
||||||
|
font-manager
|
||||||
|
font-awesome_5
|
||||||
|
noto-fonts
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
188
home/features/desktop/hyprland.nix
Normal file
188
home/features/desktop/hyprland.nix
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.desktop.hyprland;
|
||||||
|
in {
|
||||||
|
options.features.desktop.hyprland.enable = mkEnableOption "hyprland config";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
xwayland = {
|
||||||
|
force_zero_scaling = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"waybar"
|
||||||
|
"hyprpaper"
|
||||||
|
"hypridle"
|
||||||
|
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
|
||||||
|
];
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"XCURSOR_SIZE,32"
|
||||||
|
"WLR_NO_HARDWARE_CURSORS,1"
|
||||||
|
"GTK_THEME,Dracula"
|
||||||
|
];
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "us";
|
||||||
|
kb_variant = "";
|
||||||
|
kb_model = "";
|
||||||
|
kb_rules = "";
|
||||||
|
kb_options = "ctrl:nocaps";
|
||||||
|
follow_mouse = 1;
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
sensitivity = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 5;
|
||||||
|
border_size = 1;
|
||||||
|
"col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg";
|
||||||
|
"col.inactive_border" = "rgba(595959aa)";
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
"col.shadow" = "rgba(1E202966)";
|
||||||
|
drop_shadow = true;
|
||||||
|
shadow_range = 60;
|
||||||
|
shadow_offset = "1 2";
|
||||||
|
shadow_render_power = 3;
|
||||||
|
shadow_scale = 0.97;
|
||||||
|
rounding = 8;
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 3;
|
||||||
|
passes = 3;
|
||||||
|
};
|
||||||
|
active_opacity = 0.9;
|
||||||
|
inactive_opacity = 0.5;
|
||||||
|
};
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = true;
|
||||||
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||||
|
animation = [
|
||||||
|
"windows, 1, 7, myBezier"
|
||||||
|
"windowsOut, 1, 7, default, popin 80%"
|
||||||
|
"border, 1, 10, default"
|
||||||
|
"borderangle, 1, 8, default"
|
||||||
|
"fade, 1, 7, default"
|
||||||
|
"workspaces, 1, 6, default"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
master = {};
|
||||||
|
|
||||||
|
gestures = {
|
||||||
|
workspace_swipe = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
windowrule = [
|
||||||
|
"float, file_progress"
|
||||||
|
"float, confirm"
|
||||||
|
"float, dialog"
|
||||||
|
"float, download"
|
||||||
|
"float, notification"
|
||||||
|
"float, error"
|
||||||
|
"float, splash"
|
||||||
|
"float, confirmreset"
|
||||||
|
"float, title:Open File"
|
||||||
|
"float, title:branchdialog"
|
||||||
|
"float, Lxappearance"
|
||||||
|
"float, Wofi"
|
||||||
|
"float, dunst"
|
||||||
|
"animation none,Wofi"
|
||||||
|
"float,viewnior"
|
||||||
|
"float,feh"
|
||||||
|
"float, pavucontrol-qt"
|
||||||
|
"float, pavucontrol"
|
||||||
|
"float, file-roller"
|
||||||
|
"fullscreen, wlogout"
|
||||||
|
"float, title:wlogout"
|
||||||
|
"fullscreen, title:wlogout"
|
||||||
|
"idleinhibit focus, mpv"
|
||||||
|
"idleinhibit fullscreen, firefox"
|
||||||
|
"float, title:^(Media viewer)$"
|
||||||
|
"float, title:^(Volume Control)$"
|
||||||
|
"float, title:^(Picture-in-Picture)$"
|
||||||
|
"size 800 600, title:^(Volume Control)$"
|
||||||
|
"move 75 44%, title:^(Volume Control)$"
|
||||||
|
];
|
||||||
|
|
||||||
|
"$mainMod" = "SUPER";
|
||||||
|
|
||||||
|
bind = [
|
||||||
|
"$mainMod, return, exec, kitty -e zellij-ps"
|
||||||
|
"$mainMod, t, exec, kitty -e fish -c 'neofetch; exec fish'"
|
||||||
|
"$mainMod SHIFT, e, exec, kitty -e zellij_nvim"
|
||||||
|
"$mainMod, o, exec, thunar"
|
||||||
|
"$mainMod, Escape, exec, wlogout -p layer-shell"
|
||||||
|
"$mainMod, Space, togglefloating"
|
||||||
|
"$mainMod, q, killactive"
|
||||||
|
"$mainMod, M, exit"
|
||||||
|
"$mainMod, F, fullscreen"
|
||||||
|
"$mainMod, V, togglefloating"
|
||||||
|
"$mainMod, D, exec, wofi --show drun --allow-images"
|
||||||
|
"$mainMod SHIFT, S, exec, bemoji"
|
||||||
|
"$mainMod, P, exec, wofi-pass"
|
||||||
|
"$mainMod SHIFT, P, pseudo"
|
||||||
|
"$mainMod, J, togglesplit"
|
||||||
|
"$mainMod, left, movefocus, l"
|
||||||
|
"$mainMod, right, movefocus, r"
|
||||||
|
"$mainMod, up, movefocus, u"
|
||||||
|
"$mainMod, down, movefocus, d"
|
||||||
|
"$mainMod, 1, workspace, 1"
|
||||||
|
"$mainMod, 2, workspace, 2"
|
||||||
|
"$mainMod, 3, workspace, 3"
|
||||||
|
"$mainMod, 4, workspace, 4"
|
||||||
|
"$mainMod, 5, workspace, 5"
|
||||||
|
"$mainMod, 6, workspace, 6"
|
||||||
|
"$mainMod, 7, workspace, 7"
|
||||||
|
"$mainMod, 8, workspace, 8"
|
||||||
|
"$mainMod, 9, workspace, 9"
|
||||||
|
"$mainMod, 0, workspace, 10"
|
||||||
|
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||||
|
"$mainMod, mouse_down, workspace, e+1"
|
||||||
|
"$mainMod, mouse_up, workspace, e-1"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
"$mainMod, mouse:272, movewindow"
|
||||||
|
"$mainMod, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrulev2 = [
|
||||||
|
"workspace 1,class:(Emacs)"
|
||||||
|
"workspace 3,opacity 1.0, class:(brave-browser)"
|
||||||
|
"workspace 4,class:(com.obsproject.Studio)"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
251
home/features/desktop/wayland.nix
Normal file
251
home/features/desktop/wayland.nix
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.features.desktop.wayland;
|
||||||
|
in {
|
||||||
|
options.features.desktop.wayland.enable = mkEnableOption "wayland extra tools and config";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
@define-color background-darker rgba(30, 31, 41, 230);
|
||||||
|
@define-color background #282a36;
|
||||||
|
@define-color selection #44475a;
|
||||||
|
@define-color foreground #f8f8f2;
|
||||||
|
@define-color comment #6272a4;
|
||||||
|
@define-color cyan #8be9fd;
|
||||||
|
@define-color green #50fa7b;
|
||||||
|
@define-color orange #ffb86c;
|
||||||
|
@define-color pink #ff79c6;
|
||||||
|
@define-color purple #bd93f9;
|
||||||
|
@define-color red #ff5555;
|
||||||
|
@define-color yellow #f1fa8c;
|
||||||
|
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
font-family: FiraCode Nerd Font;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: rgba(21, 18, 27, 0);
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
background: #1e1e2e;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-width: 2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #11111b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 5px;
|
||||||
|
color: #313244;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: #11111b;
|
||||||
|
background: #a6e3a1;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
color: #a6adc8;
|
||||||
|
background: #eba0ac;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
color: #11111b;
|
||||||
|
background: #a6e3a1;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: #11111b;
|
||||||
|
color: #cdd6f4;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-language,
|
||||||
|
#custom-updates,
|
||||||
|
#custom-caffeine,
|
||||||
|
#custom-weather,
|
||||||
|
#window,
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#pulseaudio,
|
||||||
|
#network,
|
||||||
|
#workspaces,
|
||||||
|
#tray,
|
||||||
|
#backlight {
|
||||||
|
background: #1e1e2e;
|
||||||
|
padding: 0px 10px;
|
||||||
|
margin: 3px 0px;
|
||||||
|
margin-top: 10px;
|
||||||
|
border: 1px solid #181825;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background: #1e1e2e;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
padding-right: 0px;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-caffeine {
|
||||||
|
color: #89dceb;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
border-right: 0px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-language {
|
||||||
|
color: #f38ba8;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-updates {
|
||||||
|
color: #f5c2e7;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: 60px;
|
||||||
|
margin-right: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
color: #fab387;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
margin-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
color: #f9e2af;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
color: #89b4fa;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.microphone {
|
||||||
|
color: #cba6f7;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
color: #a6e3a1;
|
||||||
|
border-radius: 0 10px 10px 0;
|
||||||
|
margin-right: 10px;
|
||||||
|
border-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-weather {
|
||||||
|
border-radius: 0px 10px 10px 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
mainbar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
mod = "dock";
|
||||||
|
exclusive = true;
|
||||||
|
passthrough = false;
|
||||||
|
gtk-layer-shell = true;
|
||||||
|
height = 0;
|
||||||
|
modules-left = ["clock" "custom/weather" "hyprland/workspaces"];
|
||||||
|
modules-center = ["hyprland/window"];
|
||||||
|
modules-right = [
|
||||||
|
"tray"
|
||||||
|
];
|
||||||
|
|
||||||
|
"hyprland/window" = {
|
||||||
|
format = "👉 {}";
|
||||||
|
seperate-outputs = true;
|
||||||
|
};
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
all-outputs = true;
|
||||||
|
on-click = "activate";
|
||||||
|
format = " {name} {icon} ";
|
||||||
|
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||||
|
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||||
|
format-icons = {
|
||||||
|
"1" = "";
|
||||||
|
"2" = "";
|
||||||
|
"3" = "";
|
||||||
|
"4" = "";
|
||||||
|
"5" = "";
|
||||||
|
"6" = "";
|
||||||
|
"7" = "";
|
||||||
|
};
|
||||||
|
persistent_workspaces = {
|
||||||
|
"1" = [];
|
||||||
|
"2" = [];
|
||||||
|
"3" = [];
|
||||||
|
"4" = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"custom/weather" = {
|
||||||
|
format = "{}°C";
|
||||||
|
tooltip = true;
|
||||||
|
interval = 3600;
|
||||||
|
exec = "wttrbar --location Pockau-Lengefeld";
|
||||||
|
return-type = "json";
|
||||||
|
};
|
||||||
|
tray = {
|
||||||
|
icon-size = 13;
|
||||||
|
spacing = 10;
|
||||||
|
};
|
||||||
|
clock = {
|
||||||
|
format = " {:%R %d/%m}";
|
||||||
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
grim
|
||||||
|
hyprlock
|
||||||
|
qt6.qtwayland
|
||||||
|
slurp
|
||||||
|
waypipe
|
||||||
|
wf-recorder
|
||||||
|
wl-mirror
|
||||||
|
wl-clipboard
|
||||||
|
wlogout
|
||||||
|
wtype
|
||||||
|
ydotool
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
8
home/m3tam3re/dotfiles/bat.nix
Normal file
8
home/m3tam3re/dotfiles/bat.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
home.file.".config/bat/config".text = ''
|
||||||
|
--theme="Dracula"
|
||||||
|
|
||||||
|
# Show line numbers, Git modifications and file header (but no grid)
|
||||||
|
--style="numbers,changes,header"
|
||||||
|
'';
|
||||||
|
}
|
10
home/m3tam3re/dotfiles/default.nix
Normal file
10
home/m3tam3re/dotfiles/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./bat.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".config/nvim" = {
|
||||||
|
source = "${inputs.dotfiles}/nvim";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
103
home/m3tam3re/home-server.nix
Normal file
103
home/m3tam3re/home-server.nix
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
# This is a default home.nix generated by the follwing hone-manager command
|
||||||
|
#
|
||||||
|
# home-manager init ./
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
# manage.
|
||||||
|
home.username = lib.mkDefault "your-name";
|
||||||
|
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
|
# introduces backwards incompatible changes.
|
||||||
|
#
|
||||||
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
|
# release notes.
|
||||||
|
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# The home.packages option allows you to install Nix packages into your
|
||||||
|
# environment.
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
|
# # "Hello, world!" when run.
|
||||||
|
# pkgs.hello
|
||||||
|
|
||||||
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||||
|
# # fonts?
|
||||||
|
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||||
|
|
||||||
|
# # You can also create simple shell scripts directly inside your
|
||||||
|
# # configuration. For example, this adds a command 'my-hello' to your
|
||||||
|
# # environment:
|
||||||
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
# '')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
|
# # symlink to the Nix store copy.
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
|
# # You can also set the file content immediately.
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager can also manage your environment variables through
|
||||||
|
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||||
|
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||||
|
# either
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/m3tam3re/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
home.sessionVariables = {
|
||||||
|
# EDITOR = "emacs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
@ -1,10 +1,12 @@
|
|||||||
# This is a default home.nix generated by the follwing hone-manager command
|
# This is a default home.nix generated by the follwing hone-manager command
|
||||||
#
|
#
|
||||||
# home-manager init ./
|
# home-manager init ./
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
# manage.
|
# manage.
|
||||||
home.username = lib.mkDefault "your-name";
|
home.username = lib.mkDefault "your-name";
|
||||||
@ -21,7 +23,11 @@
|
|||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
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
|
||||||
@ -76,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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
15
home/m3tam3re/m3-hermes.nix
Normal file
15
home/m3tam3re/m3-hermes.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../common
|
||||||
|
../features/cli
|
||||||
|
./home-server.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
features = {
|
||||||
|
cli = {
|
||||||
|
fish.enable = true;
|
||||||
|
fzf.enable = true;
|
||||||
|
neofetch.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1 +1,50 @@
|
|||||||
{ config, ... }: { imports = [ ./home.nix ../common ]; }
|
{
|
||||||
|
imports = [
|
||||||
|
../common
|
||||||
|
./dotfiles
|
||||||
|
../features/cli
|
||||||
|
../features/desktop
|
||||||
|
./home.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
features = {
|
||||||
|
cli = {
|
||||||
|
fish.enable = true;
|
||||||
|
fzf.enable = true;
|
||||||
|
neofetch.enable = true;
|
||||||
|
};
|
||||||
|
desktop = {
|
||||||
|
fonts.enable = true;
|
||||||
|
hyprland.enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
settings = {
|
||||||
|
device = [
|
||||||
|
{
|
||||||
|
name = "keyboard";
|
||||||
|
kb_layout = "us";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "mouse";
|
||||||
|
sensitivity = -0.5;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
monitor = [
|
||||||
|
"DP-1,2560x1440@144,0x0,1"
|
||||||
|
"DP-2,2560x1440@144,2560x0,1"
|
||||||
|
];
|
||||||
|
workspace = [
|
||||||
|
"1, monitor:DP-1, default:true"
|
||||||
|
"2, monitor:DP-1"
|
||||||
|
"3, monitor:DP-1"
|
||||||
|
"4, monitor:DP-2"
|
||||||
|
"5, monitor:DP-1"
|
||||||
|
"6, monitor:DP-2"
|
||||||
|
"7, monitor:DP-2"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
# Common configuration for all hosts
|
# Common configuration for all hosts
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
./extraServices
|
||||||
|
./users
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
};
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
@ -30,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 = [
|
||||||
@ -43,9 +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;
|
||||||
}
|
}
|
||||||
|
5
hosts/common/extraServices/default.nix
Normal file
5
hosts/common/extraServices/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./podman.nix
|
||||||
|
];
|
||||||
|
}
|
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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
32
hosts/common/extraServices/podman.nix
Normal file
32
hosts/common/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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
3
hosts/common/users/default.nix
Normal file
3
hosts/common/users/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [./m3tam3re.nix];
|
||||||
|
}
|
30
hosts/common/users/m3tam3re.nix
Normal file
30
hosts/common/users/m3tam3re.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
users.users.m3tam3re = {
|
||||||
|
initialHashedPassword = "$y$j9T$IoChbWGYRh.rKfmm0G86X0$bYgsWqDRkvX.EBzJTX.Z0RsTlwspADpvEF3QErNyCMC";
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "m3tam3re";
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
"libvirtd"
|
||||||
|
"flatpak"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"plugdev"
|
||||||
|
"input"
|
||||||
|
"kvm"
|
||||||
|
"qemu-libvirtd"
|
||||||
|
];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3YEmpYbM+cpmyD10tzNRHEn526Z3LJOzYpWEKdJg8DaYyPbDn9iyVX30Nja2SrW4Wadws0Y8DW+Urs25/wVB6mKl7jgPJVkMi5hfobu3XAz8gwSdjDzRSWJrhjynuaXiTtRYED2INbvjLuxx3X8coNwMw58OuUuw5kNJp5aS2qFmHEYQErQsGT4MNqESe3jvTP27Z5pSneBj45LmGK+RcaSnJe7hG+KRtjuhjI7RdzMeDCX73SfUsal+rHeuEw/mmjYmiIItXhFTDn8ZvVwpBKv7xsJG90DkaX2vaTk0wgJdMnpVIuIRBa4EkmMWOQ3bMLGkLQeK/4FUkNcvQ/4+zcZsg4cY9Q7Fj55DD41hAUdF6SYODtn5qMPsTCnJz44glHt/oseKXMSd556NIw2HOvihbJW7Rwl4OEjGaO/dF4nUw4c9tHWmMn9dLslAVpUuZOb7ykgP0jk79ldT3Dv+2Hj0CdAWT2cJAdFX58KQ9jUPT3tBnObSF1lGMI7t77VU= m3tam3re@m3-nix"
|
||||||
|
];
|
||||||
|
packages = [inputs.home-manager.packages.${pkgs.system}.default];
|
||||||
|
};
|
||||||
|
home-manager.users.m3tam3re =
|
||||||
|
import ../../../home/m3tam3re/${config.networking.hostName}.nix;
|
||||||
|
}
|
91
hosts/m3-hermes/configuration.nix
Normal file
91
hosts/m3-hermes/configuration.nix
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./disko-config.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.grub = {
|
||||||
|
efiSupport = true;
|
||||||
|
efiInstallAsRemovable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "m3-hermes"; # Define your hostname.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
|
LC_NAME = "de_DE.UTF-8";
|
||||||
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
# wget
|
||||||
|
neovim
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings.PermitRootLogin = "no";
|
||||||
|
allowSFTP = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
#security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
security.sudo.extraConfig = "m3tam3re ALL=(ALL) NOPASSWD: ALL";
|
||||||
|
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# 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.
|
||||||
|
# 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.11"; # Did you read the comment?
|
||||||
|
}
|
41
hosts/m3-hermes/default.nix
Normal file
41
hosts/m3-hermes/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# A staring point is the basic NIXOS configuration generated by the ISO installer.
|
||||||
|
# On an existing NIXOS install you can use the following command in your flakes basedir:
|
||||||
|
# sudo nixos-generate-config --dir ./hosts/m3tam3re
|
||||||
|
#
|
||||||
|
# Please make sure to change the first couple of lines in your configuration.nix:
|
||||||
|
# { config, inputs, ouputs, lib, pkgs, ... }:
|
||||||
|
#
|
||||||
|
# {
|
||||||
|
# imports = [ # Include the results of the hardware scan.
|
||||||
|
# ./hardware-configuration.nix
|
||||||
|
# inputs.home-manager.nixosModules.home-manager
|
||||||
|
# ];
|
||||||
|
# ...
|
||||||
|
#
|
||||||
|
# Moreover please update the packages option in your user configuration and add the home-manager options:
|
||||||
|
# users.users = {
|
||||||
|
# m3tam3re = {
|
||||||
|
# isNormalUser = true;
|
||||||
|
# initialPassword = "12345";
|
||||||
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
# packages = [ inputs.home-manager.packages.${pkgs.system}.default ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# home-manager = {
|
||||||
|
# useUserPackages = true;
|
||||||
|
# extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
# users.m3tam3re =
|
||||||
|
# import ../../home/m3tam3re/${config.networking.hostName}.nix;
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# Please also change your hostname accordingly:
|
||||||
|
#:w
|
||||||
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../common
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
extraServices.podman.enable = true;
|
||||||
|
}
|
36
hosts/m3-hermes/disko-config.nix
Normal file
36
hosts/m3-hermes/disko-config.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
nixos = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sda";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
24
hosts/m3-hermes/hardware-configuration.nix
Normal file
24
hosts/m3-hermes/hardware-configuration.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
@ -4,13 +4,13 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
|
./disko-config.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.grub.useOSProber = true;
|
|
||||||
|
|
||||||
networking.hostName = "m3-kratos"; # Define your hostname.
|
networking.hostName = "m3-kratos"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
@ -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";
|
||||||
|
|
||||||
@ -46,14 +46,6 @@
|
|||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.m3tam3re = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "m3tam3re";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -87,17 +79,27 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
networking.nat.enable = true;
|
||||||
|
networking.nat.internalInterfaces = ["ve-+"];
|
||||||
|
networking.nat.externalInterface = "enp1s0";
|
||||||
|
|
||||||
|
#security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
security.sudo.extraConfig = "m3tam3re ALL=(ALL) NOPASSWD: ALL";
|
||||||
|
|
||||||
|
# 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?
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,12 @@
|
|||||||
#:w
|
#:w
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
{
|
{
|
||||||
imports = [../common ./configuration.nix];
|
imports = [
|
||||||
|
../common
|
||||||
|
./configuration.nix
|
||||||
|
./secrets.nix
|
||||||
|
./services
|
||||||
|
./specialisations.nix
|
||||||
|
];
|
||||||
|
extraServices.podman.enable = true;
|
||||||
}
|
}
|
||||||
|
36
hosts/m3-kratos/disko-config.nix
Normal file
36
hosts/m3-kratos/disko-config.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
nixos = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/vda";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,11 +1,15 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
|
||||||
@ -13,13 +17,6 @@
|
|||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/b3fbba01-1206-44d9-9b15-72e6313b4f72";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
@ -29,4 +26,3 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
hosts/m3-kratos/services/containers/default.nix
Normal file
7
hosts/m3-kratos/services/containers/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./echo.nix
|
||||||
|
./httpd.nix
|
||||||
|
./nginx.nix
|
||||||
|
];
|
||||||
|
}
|
12
hosts/m3-kratos/services/containers/echo.nix
Normal file
12
hosts/m3-kratos/services/containers/echo.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
virtualisation.oci-containers.containers."echo-http-service" = {
|
||||||
|
image = "hashicorp/http-echo";
|
||||||
|
extraOptions = ["-text='Hello, World!'" "--network=web"];
|
||||||
|
ports = ["5679:5678"];
|
||||||
|
};
|
||||||
|
system.activationScripts.createPodmanNetworkWeb = lib.mkAfter ''
|
||||||
|
if ! /run/current-system/sw/bin/podman network exists web; then
|
||||||
|
/run/current-system/sw/bin/podman network create web
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
6
hosts/m3-kratos/services/default.nix
Normal file
6
hosts/m3-kratos/services/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
83
hosts/m3-kratos/specialisations.nix
Normal file
83
hosts/m3-kratos/specialisations.nix
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
specialisation = {
|
||||||
|
"HTTPD".configuration = {
|
||||||
|
system.nixos.tags = ["HTTPD"];
|
||||||
|
services.httpd.enable = true;
|
||||||
|
services.httpd.virtualHosts."foo.example.com" = {
|
||||||
|
documentRoot = "/var/www/foo";
|
||||||
|
extraConfig = ''
|
||||||
|
<Directory /var/www/foo>
|
||||||
|
Options Indexes FollowSymLinks MultiViews
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"NGINX".configuration = {
|
||||||
|
system.nixos.tags = ["NGINX"];
|
||||||
|
services.httpd.enable = false;
|
||||||
|
services.nginx.enable = true;
|
||||||
|
services.nginx.config = ''
|
||||||
|
http {
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name bar.example.com;
|
||||||
|
|
||||||
|
root /var/www/bar;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
index index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"NVIDIA".configuration = {
|
||||||
|
boot.kernelParams = [
|
||||||
|
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||||
|
"nvidia-drm.modeset=1"
|
||||||
|
];
|
||||||
|
system.nixos.tags = ["NVIDIA"];
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
hardware = {
|
||||||
|
nvidia = {
|
||||||
|
open = false;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
};
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.sessionVariables = {
|
||||||
|
GBM_BACKEND = "nvidia-drm";
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "switch-spec" ''
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "Usage: switch-spec <specialisation>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo /nix/var/nix/profiles/system/specialisation/$1/bin/switch-to-configuration switch
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
environment.sessionVariables = lib.mkIf (config.specialisation != {}) {
|
||||||
|
SPECIALISATION = "NONE";
|
||||||
|
};
|
||||||
|
}
|
42
justfile
Normal file
42
justfile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
# List available commands
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Deploy system configuration
|
||||||
|
deploy SYSTEM:
|
||||||
|
nixos-rebuild switch --flake .#{{SYSTEM}} --target-host {{SYSTEM}} --use-remote-sudo
|
||||||
|
|
||||||
|
# Update flake
|
||||||
|
update:
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
# Commit and push changes
|
||||||
|
commit MESSAGE:
|
||||||
|
git add .
|
||||||
|
git commit -m "{{MESSAGE}}"
|
||||||
|
git push
|
||||||
|
|
||||||
|
# Update, commit, and push changes
|
||||||
|
update-and-commit MESSAGE: update
|
||||||
|
@just commit "{{MESSAGE}}"
|
||||||
|
|
||||||
|
# Deploy, update, commit, and push changes
|
||||||
|
deploy-update-commit SYSTEM MESSAGE: (deploy SYSTEM) update
|
||||||
|
@just commit "{{MESSAGE}}"
|
||||||
|
|
||||||
|
# Check flake
|
||||||
|
check:
|
||||||
|
nix flake check
|
||||||
|
|
||||||
|
# Show flake info
|
||||||
|
show:
|
||||||
|
nix flake show
|
||||||
|
|
||||||
|
# Build system configuration
|
||||||
|
build SYSTEM:
|
||||||
|
nixos-rebuild build --flake .#{{SYSTEM}}
|
||||||
|
|
||||||
|
# Enter a development shell
|
||||||
|
dev-shell:
|
||||||
|
nix develop
|
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;
|
||||||
|
};
|
||||||
|
}
|
@ -5,11 +5,8 @@
|
|||||||
# 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
|
||||||
|
¶»qñQ¥?NƒË¯:a1)§\<5C>Ë&¹Ezl[Ê'¯Ö`%¯QQÞÁ9Ö/{Ûßà&<w›®ÅåÙÄ–°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
|
||||||
|
º£µéaŒè²Ck ®ýlà !¡\Hˆ>܃¥HJ{C:ŒD¦Ñ£&¦îøˆÅ²PEŠ¬Š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];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user