Compare commits

..
10 Commits
9 changed files with 117 additions and 40 deletions
Generated
+36 -21
View File
@@ -8,11 +8,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778716662, "lastModified": 1782949081,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779213149, "lastModified": 1785496534,
"narHash": "sha256-Cf+p/T4Z3n9Sw0TiR3kQaIwQI+/hfvLJcoTzeq6yS3E=", "narHash": "sha256-EASdusMYLuPhOCrE3LmsAGOvGhX3vnKBLxFvj9lI8tU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bd868f769a69d3b6091a1da68a75cb83a181033c", "rev": "e8827fbbb12015a8dd9f66285aec79d655bcb9f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -43,11 +43,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1778869304, "lastModified": 1785454630,
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", "narHash": "sha256-LQy14TZp77TwbQf40gg1V3jo8FwJG0jGDkAH+zRHqg8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb", "rev": "1559d3daa3ecc813a650b79375ea61b6741b8746",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -57,20 +57,34 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1784555310,
"narHash": "sha256-/FCliTPgiuV1owejZFNx3Ch9irdvkOfOFl+HHZ+DrtM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "421eebfd0ec7bccd4abe826ce62d7e6e83129493",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": [ "nixpkgs": "nixpkgs_2",
"nixpkgs"
],
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1779296766, "lastModified": 1785364321,
"narHash": "sha256-kbgeL14JdJL2prN7khpZtYT88ibaSUNDSUJkaHlz4xQ=", "narHash": "sha256-BLuHl+nZKb+FDq3GAM6L+UBEiyVepXANA31fT1F56pw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "c7e82d37c2ed3cbddf54e36b8a13b3518ff1dc2f", "rev": "acd69cc15d57004e8cb4495034320263a3d362ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -94,11 +108,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777944972, "lastModified": 1783174389,
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=", "narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
"owner": "mic92", "owner": "mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c", "rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -109,15 +123,16 @@
}, },
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1774449309,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "c29398b59d2048c4ab79345812849c9bd15e9150",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"ref": "future-26.11",
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
+1 -4
View File
@@ -11,10 +11,7 @@
url = "github:mic92/sops-nix"; url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = { nixvim.url = "github:nix-community/nixvim";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
+20
View File
@@ -1,7 +1,9 @@
{ {
config, config,
osConfig ? null, osConfig ? null,
inputs,
lib, lib,
pkgs,
... ...
}: }:
let let
@@ -20,6 +22,24 @@ in
kekleo = lib.mkIf (osConfig != null) (mkDefaultSharedAttrs config.kekleo (osConfig.kekleo or { })); kekleo = lib.mkIf (osConfig != null) (mkDefaultSharedAttrs config.kekleo (osConfig.kekleo or { }));
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
lib.mkDefault {
package = pkgs.nix;
settings = {
experimental-features = osConfig.nix.settings.experimental-features or "nix-command flakes";
# Opinionated: disable global registry
flake-registry = "";
};
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
home.sessionVariables = { home.sessionVariables = {
XDG_CACHE_HOME = "$HOME/.cache"; XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config"; XDG_CONFIG_HOME = "$HOME/.config";
-7
View File
@@ -1,12 +1,9 @@
{ {
config,
lib,
pkgs, pkgs,
... ...
}: }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
git-credential-oauth
git-crypt git-crypt
]; ];
@@ -15,10 +12,6 @@
settings = { settings = {
user.name = "Leonhard Kost"; user.name = "Leonhard Kost";
user.email = "leonhard.kost@gmail.com"; user.email = "leonhard.kost@gmail.com";
credential.helper = [
"cache --timeout 21600"
("oauth" + lib.optionalString (!config.kekleo.graphical) " -device")
];
}; };
}; };
} }
+1 -1
View File
@@ -2,7 +2,7 @@
{ {
imports = [ imports = [
./cmp.nix ./cmp.nix
./dap.nix #./dap.nix
./lsp.nix ./lsp.nix
./fmt.nix ./fmt.nix
./treesitter.nix ./treesitter.nix
+1 -1
View File
@@ -16,7 +16,7 @@
let let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in in
{ lib.mkForce {
settings = { settings = {
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes";
# Opinionated: disable global registry # Opinionated: disable global registry
+20 -1
View File
@@ -7,6 +7,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
./secrets ./secrets
./dyndns ./dyndns
./gitea.nix
./vaultwarden.nix ./vaultwarden.nix
]; ];
@@ -47,7 +48,25 @@
PasswordAuthentication = false; PasswordAuthentication = false;
KbdInteractiveAuthentication = false; KbdInteractiveAuthentication = false;
PermitRootLogin = "no"; PermitRootLogin = "no";
AllowUsers = [ "leonhard" ]; };
};
security.acme = {
acceptTerms = true;
defaults.email = "admin@${config.kekleo.domain}";
defaults.webroot = "/var/lib/acme/acme-challenge/";
certs.${config.kekleo.domain} = {
group = config.services.nginx.group;
};
};
services.nginx = {
enable = true;
virtualHosts.${config.kekleo.domain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
locations."/.well-known/".root = config.security.acme.defaults.webroot;
}; };
}; };
} }
+34
View File
@@ -0,0 +1,34 @@
{
config,
...
}:
let
domain = config.kekleo.domain;
gitDomain = "git.${domain}";
in
{
services.gitea = {
enable = true;
settings.server.ROOT_URL = "https://${gitDomain}";
settings.server.SSH_PORT = builtins.elemAt config.services.openssh.ports 0;
settings.service.DISABLE_REGISTRATION = true;
settings.log.LEVEL = "Critical";
};
security.acme.certs.${domain}.extraDomainNames = [
gitDomain
];
services.nginx = {
enable = true;
virtualHosts.${gitDomain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}";
proxyWebsockets = true;
};
};
};
}
+4 -5
View File
@@ -20,17 +20,16 @@ in
}; };
}; };
security.acme = { security.acme.certs.${domain}.extraDomainNames = [
acceptTerms = true; vaultDomain
defaults.email = "admin@${domain}"; ];
};
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.${vaultDomain} = { virtualHosts.${vaultDomain} = {
forceSSL = true; forceSSL = true;
enableACME = true; useACMEHost = config.kekleo.domain;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}"; proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
proxyWebsockets = true; proxyWebsockets = true;