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 *.swp
result

View file

@ -65,3 +65,6 @@ sda
### vm ### vm
Barebones configuration that can be easily deployed to virtual machines. 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": { "locked": {
"lastModified": 1682906023, "lastModified": 1682951948,
"narHash": "sha256-u0ngImxdfv2oSxFsjcfoQx6G2haZociXB5jHovEO1w8=", "narHash": "sha256-w+auHu4yyZrt93zI/xyrgYrpXlDPmVfKL3Fs9DoF4fQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "11b7ce14f87448417ce39cb667df6c6b9a591804", "rev": "45b1e6dc5ee42b01a377bd875181bc621c72f914",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,6 +1,5 @@
{ {
description = "My nix setup"; description = "My nix setup"; inputs = {
inputs = {
nixpkgs = { nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable"; url = "github:nixos/nixpkgs/nixos-unstable";
}; };
@ -64,7 +63,8 @@
}; };
outputs = outputs =
{ nixpkgs { self
, nixpkgs
, home-manager , home-manager
, nix-index-database , nix-index-database
, impermanence , impermanence
@ -76,6 +76,7 @@
, trucksimulatorbot-images , trucksimulatorbot-images
, ... , ...
}@attrs: { }@attrs: {
packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
nixosConfigurations = { nixosConfigurations = {
thinkpad = nixpkgs.lib.nixosSystem { thinkpad = nixpkgs.lib.nixosSystem {
@ -135,6 +136,15 @@
sops-nix.nixosModules.sops 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 = { 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; auto-optimise-store = true;
}; };

View file

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

View file

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