added own iso

This commit is contained in:
Rouven Seifert 2023-05-01 19:59:25 +02:00
parent 2a06e7523e
commit b7ecc2984d
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
9 changed files with 73 additions and 7 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
*.swp
result

View file

@ -65,3 +65,6 @@ sda
### vm
Barebones configuration that can be easily deployed to virtual machines.
### iso
My custom installer and rescue image containing some personal tweaks.

View file

@ -46,11 +46,11 @@
]
},
"locked": {
"lastModified": 1682906023,
"narHash": "sha256-u0ngImxdfv2oSxFsjcfoQx6G2haZociXB5jHovEO1w8=",
"lastModified": 1682951948,
"narHash": "sha256-w+auHu4yyZrt93zI/xyrgYrpXlDPmVfKL3Fs9DoF4fQ=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "11b7ce14f87448417ce39cb667df6c6b9a591804",
"rev": "45b1e6dc5ee42b01a377bd875181bc621c72f914",
"type": "github"
},
"original": {

View file

@ -1,6 +1,5 @@
{
description = "My nix setup";
inputs = {
description = "My nix setup"; inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
@ -64,7 +63,8 @@
};
outputs =
{ nixpkgs
{ self
, nixpkgs
, home-manager
, nix-index-database
, impermanence
@ -76,6 +76,7 @@
, trucksimulatorbot-images
, ...
}@attrs: {
packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
nixosConfigurations = {
thinkpad = nixpkgs.lib.nixosSystem {
@ -135,6 +136,15 @@
sops-nix.nixosModules.sops
];
};
iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs.inputs = attrs;
modules = [
./hosts/iso
./shared/caches.nix
./shared/vim.nix
];
};
};
};
}

18
hosts/iso/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, modulesPath, ... }:
{
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
./zsh.nix
];
console = {
font = "Lat2-Terminus16";
keyMap = "dvorak";
};
programs.git.enable = true;
# in case we need to rescue a zfs machine
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
}

30
hosts/iso/zsh.nix Normal file
View file

@ -0,0 +1,30 @@
{ pkgs, ... }:
{
programs.command-not-found.enable = false;
environment.systemPackages = with pkgs; [
fzf
];
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
autosuggestions = {
enable = true;
highlightStyle = "fg=#00bbbb,bold";
};
shellInit =
''
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
zsh-newuser-install () {}
'';
# Hacky way to bind Ctrl+R to fzf. Otherwise it will be overridden
promptInit =
''
source ${pkgs.fzf}/share/fzf/completion.zsh
source ${pkgs.fzf}/share/fzf/key-bindings.zsh
'';
};
}

View file

@ -20,7 +20,7 @@
};
nix.settings = {
cores = 6; # don't clutter the whole system when compiling stuff
# cores = 6; # don't clutter the whole system when compiling stuff
auto-optimise-store = true;
};

View file

@ -53,6 +53,9 @@
then
cat ${../images/cat.sixel}
fi
zsh-newuser-install () {}
'';
# Hacky way to bind Ctrl+R to fzf. Otherwise it will be overridden

View file

@ -54,6 +54,7 @@
ventoy
xsane # scanning
jetbrains.idea-community
nix-output-monitor
ripgrep # better grep
duf # better df