made usbstick work again

This commit is contained in:
Ingolf Wagner 2024-08-09 02:44:54 +02:00
parent 569d891a7e
commit 848eccb959
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
5 changed files with 73 additions and 34 deletions

View file

@ -507,8 +507,10 @@
usbstick = clanSetup {
name = "usbstick";
host = "usbstick.bear";
#host = "usbstick.bear";
host = "127.0.0.1";
modules = [
zerotierModules
homeManagerModules
stylixModules
{

View file

@ -2,43 +2,20 @@
imports = [
./hardware-configuration.nix
./hardware-configuration
#./tinc.nix
#./syncthing.nix
];
#security.wrappers = {
# pmount = {
# source = "${pkgs.pmount}/bin/pmount";
# setuid = true;
# owner = "root";
# group = "root";
# };
# pumount = {
# source = "${pkgs.pmount}/bin/pumount";
# setuid = true;
# owner = "root";
# group = "root";
# };
#};
components.gui.enable = false;
components.gui.enable = true;
components.mainUser.enable = true;
components.network.enable = true;
components.monitor.enable = false;
configuration.desktop = {
width = 1366;
height = 768;
};
#networking.networkmanager.enable = true;
# grub configuraton
# -----------------
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.efiInstallAsRemovable = true;
boot.tmpOnTmpfs = true;
networking.networkmanager.enable = true;
networking.hostName = "usbstick";
# Set your time zone.
@ -58,9 +35,6 @@
EDITOR=vim
'';
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "2ed43034";
services.openssh.enable = true;
#users.users.root.openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6uza62+Go9sBFs3XZE2OkugBv9PJ7Yv8ebCskE5WYPcahMZIKkQw+zkGI8EGzOPJhQEv2xk+XBf2VOzj0Fto4nh8X5+Llb1nM+YxQPk1SVlwbNAlhh24L1w2vKtBtMy277MF4EP+caGceYP6gki5+DzlPUSdFSAEFFWgN1WPkiyUii15Xi3QuCMR8F18dbwVUYbT11vwNhdiAXWphrQG+yPguALBGR+21JM6fffOln3BhoDUp2poVc5Qe2EBuUbRUV3/fOU4HwWVKZ7KCFvLZBSVFutXCj5HuNWJ5T3RuuxJSmY5lYuFZx9gD+n+DAEJt30iXWcaJlmUqQB5awcB1S2d9pJ141V4vjiCMKUJHIdspFrI23rFNYD9k2ZXDA8VOnQE33BzmgF9xOVh6qr4G0oEpsNqJoKybVTUeSyl4+ifzdQANouvySgLJV/pcqaxX1srSDIUlcM2vDMWAs3ryCa0aAlmAVZIHgRhh6wa+IXW8gIYt+5biPWUuihJ4zGBEwkyVXXf2xsecMWCAGPWPDL0/fBfY9krNfC5M2sqxey2ShFIq+R/wMdaI7yVjUCF2QIUNiIdFbJL6bDrDyHnEXJJN+rAo23jUoTZZRv7Jq3DB/A5H7a73VCcblZyUmwMSlpg3wos7pdw5Ctta3zQPoxoAKGS1uZ+yTeZbPMmdbw== contact@ingolf-wagner.de" ];

View file

@ -0,0 +1,19 @@
{
imports = [
./hardware-configuration.nix
#./disko-config.nix # todo: not used yet (use a simple installer usb stick for that)
];
# grub configuraton
# -----------------
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.efiInstallAsRemovable = true;
boot.tmpOnTmpfs = true;
# zfs
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "2ed43034";
}

View file

@ -0,0 +1,44 @@
# Example to create a bios compatible gpt partition
{ lib, ... }:
{
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "luks";
name = "root";
settings.allowDiscards = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

View file

@ -27,7 +27,7 @@
fileSystems."/boot" =
{
#device = "/dev/disk/by-uuid/EBCE-D756";
device = "/dev/disk/by-uuid/sda2";
device = "/dev/sda2";
fsType = "vfat";
};