Compare commits

..

No commits in common. 'ab16a76ff7b39e7963e4e14cb3d0fc0c89db8395' and 'b88ad9b5df8f71d6f596ad2ef35600f2ee9fa8ac' have entirely different histories.

  1. 17
      flake.lock
  2. 4
      flake.nix
  3. 4
      hardware-configuration.nix
  4. 10
      home.nix
  5. 1098
      my-luksroot.nix
  6. 38
      pbkdf2-sha512.c

@ -21,22 +21,6 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1712909959,
"narHash": "sha256-7/5ubuwdEbQ7Z+Vqd4u0mM5L2VMNDsBh54visp27CtQ=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "f58b25254be441cd2a9b4b444ed83f1e51244f1f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1713145326,
@ -72,7 +56,6 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}

@ -4,14 +4,13 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, ... }@inputs:
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
let
username = "chrigi";
lib = nixpkgs.lib;
@ -26,7 +25,6 @@
nixosConfigurations.nix-fw16 = lib.nixosSystem {
modules = [
./configuration.nix
nixos-hardware.nixosModules.framework-13-7040-amd
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

@ -4,11 +4,8 @@
{ config, lib, pkgs, modulesPath, ... }:
{
disabledModules = ["system/boot/luksroot.nix"];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
./my-luksroot.nix
];
boot.initrd = {
@ -26,7 +23,6 @@
gracePeriod = 30;
keyLength = 64;
saltLength = 16;
replaceKey = false;
storage = {
device = "/dev/disk/by-partlabel/disk-main-ESP";

@ -10,18 +10,8 @@
eza
pkgs-unstable.obsidian
jq
pkgs-unstable._1password
pkgs-unstable._1password-gui
];
programs.ssh = {
enable = true;
extraConfig = ''
Host *
IdentityAgent "~/.1password/agent.sock"
'';
};
# 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

File diff suppressed because it is too large Load Diff

@ -1,38 +0,0 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <openssl/evp.h>
void hextorb(uint8_t* hex, uint8_t* rb)
{
while(sscanf(hex, "%2x", rb) == 1)
{
hex += 2;
rb += 1;
}
*rb = '\0';
}
int main(int argc, char** argv)
{
uint8_t k_user[2048];
uint8_t salt[2048];
uint8_t key[4096];
uint32_t key_length = atoi(argv[1]);
uint32_t iteration_count = atoi(argv[2]);
hextorb(argv[3], salt);
uint32_t salt_length = strlen(argv[3]) / 2;
fgets(k_user, 2048, stdin);
uint32_t k_user_length = strlen(k_user);
if(k_user[k_user_length - 1] == '\n') {
k_user[k_user_length - 1] = '\0';
}
PKCS5_PBKDF2_HMAC(k_user, k_user_length, salt, salt_length, iteration_count, EVP_sha512(), key_length, key);
fwrite(key, 1, key_length, stdout);
return 0;
}
Loading…
Cancel
Save

Powered by TurnKey Linux.