feat: full bootstrapping

This commit is contained in:
Swarsel 2024-12-17 01:10:04 +01:00
parent 2cdbae7747
commit 67884944a3
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
16 changed files with 677 additions and 51 deletions

View file

@ -21,6 +21,8 @@
ts2t
vershell
bootstrap
(pkgs.writeScriptBin "project" ''
#! ${pkgs.bash}/bin/bash
if [ "$1" == "rust" ]; then

View file

@ -1,5 +1,9 @@
{ self, pkgs, ... }:
{ self, config, pkgs, ... }:
{
# needed for elfeed
sops.secrets.fever = { path = "${config.home.homeDirectory}/.emacs.d/.fever"; };
# enable emacs overlay for bleeding edge features
# also read init.el file and install use-package packages
programs.emacs = {

View file

@ -1,4 +1,4 @@
{ self, lib, config, pkgs, ... }:
{ lib, config, pkgs, ... }:
{
nix = {
package = lib.mkDefault pkgs.nix;
@ -20,7 +20,7 @@
stateVersion = lib.mkDefault "23.05";
keyboard.layout = "us";
sessionVariables = {
FLAKE = "${self}";
FLAKE = "${config.home.homeDirectory}/.dotfiles";
};
};
}

View file

@ -7,7 +7,7 @@ let
in
{
sops = {
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" "${config.home.homeDirectory}/.ssh/ssh_host_ed25519_key" ];
defaultSopsFile = mkIfElse config.swarselsystems.isBtrfs "/persist/.dotfiles/secrets/general/secrets.yaml" "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
validateSopsFiles = false;
@ -17,7 +17,6 @@ in
leon = { path = "/run/user/1000/secrets/leon"; };
swarselmail = { path = "/run/user/1000/secrets/swarselmail"; };
github_notif = { path = "/run/user/1000/secrets/github_notif"; };
fever = { path = "${config.home.homeDirectory}/.emacs.d/.fever"; };
};
};
}

View file

@ -8,7 +8,7 @@ in
{
sops = {
age.sshKeyPaths = mkIfElse config.swarselsystems.isBtrfs [ "/persist/.ssh/sops" ] [ "${config.users.users.swarsel.home}/.ssh/sops" ];
age.sshKeyPaths = mkIfElse config.swarselsystems.isBtrfs [ "/persist/.ssh/sops" ] [ "${config.users.users.swarsel.home}/.ssh/sops" "/etc/ssh/ssh_host_ed25519_key" ];
defaultSopsFile = mkIfElse config.swarselsystems.isBtrfs "/persist/.dotfiles/secrets/general/secrets.yaml" "${config.users.users.swarsel.home}/.dotfiles/secrets/general/secrets.yaml";
validateSopsFiles = false;

View file

@ -7,6 +7,7 @@
users.swarsel = {
isNormalUser = true;
description = "Leon S";
password = lib.mkIf config.swarselsystems.initialSetup "setup";
hashedPasswordFile = lib.mkIf (!config.swarselsystems.initialSetup) config.sops.secrets.swarseluser.path;
extraGroups = [ "networkmanager" "syncthing" "docker" "wheel" "lp" "audio" "video" "vboxusers" "libvirtd" "scanner" ];
packages = with pkgs; [ ];