A lot of iso changes
This commit is contained in:
parent
2b2e74a75d
commit
b95a4e55c2
|
@ -151,7 +151,7 @@
|
|||
imports = lib.lists.optionals (builtins.pathExists ./home/${hostname}.nix) [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.pilot = import ./home/${hostname}.nix;
|
||||
home-manager.users.pilot = ./home/${hostname}.nix;
|
||||
home-manager.extraSpecialArgs = specialArgs system // {
|
||||
inherit hostname;
|
||||
};
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
{
|
||||
name = "eDP-1";
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
height = 1200;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -10,14 +10,14 @@ let
|
|||
# Toggles for including tooling related to a given language
|
||||
packedTargets = {
|
||||
elm = false;
|
||||
latex = !config.satellite.toggles.neovim-minimal.enable;
|
||||
lua = !config.satellite.toggles.neovim-minimal.enable;
|
||||
latex = true;
|
||||
lua = true;
|
||||
nix = true;
|
||||
purescript = false;
|
||||
python = false;
|
||||
rust = false;
|
||||
typst = !config.satellite.toggles.neovim-minimal.enable;
|
||||
web = !config.satellite.toggles.neovim-minimal.enable;
|
||||
typst = true;
|
||||
web = true;
|
||||
csharp = false;
|
||||
};
|
||||
|
||||
|
@ -1699,7 +1699,6 @@ in
|
|||
# {{{ Basic config
|
||||
# We want other modules to know that we are using neovim!
|
||||
satellite.toggles.neovim.enable = true;
|
||||
satellite.toggles.neovim-minimal.enable = lib.mkDefault false;
|
||||
|
||||
# Link files in the appropriate places
|
||||
xdg.configFile.nvim.source = config.satellite.dev.path "home/features/neovim/config";
|
||||
|
@ -1710,7 +1709,8 @@ in
|
|||
home.packages = [
|
||||
neovim
|
||||
pkgs.vimclip
|
||||
] ++ lib.lists.optional (!config.satellite.toggles.neovim-minimal.enable) neovide;
|
||||
neovide
|
||||
];
|
||||
# }}}
|
||||
# {{{ Persistence
|
||||
satellite.persistence.at.state.apps.neovim.directories = [
|
||||
|
|
26
home/iso.nix
26
home/iso.nix
|
@ -1,22 +1,30 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# {{{ Imports
|
||||
imports = [
|
||||
./global.nix
|
||||
|
||||
./features/desktop/foot.nix
|
||||
./features/desktop/firefox
|
||||
./features/cli/lazygit.nix
|
||||
./features/desktop/foot.nix
|
||||
./features/wayland/hyprland
|
||||
./features/neovim
|
||||
];
|
||||
# }}}
|
||||
# {{{ Arbitrary extra packages
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Arbitrary extra packages
|
||||
home.packages = with pkgs; [
|
||||
home.packages =
|
||||
let
|
||||
cloneConfig = pkgs.writeShellScriptBin "liftoff" ''
|
||||
git clone git@github.com:prescientmoon/everything-nix.git
|
||||
cd everything-nix
|
||||
'';
|
||||
in
|
||||
with pkgs;
|
||||
[
|
||||
sops # Secret editing
|
||||
neovim # Text editor
|
||||
cloneConfig # Clones my nixos config from github
|
||||
];
|
||||
# }}}
|
||||
|
||||
home.username = "moon";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
satellite.toggles.neovim-minimal.enable = true;
|
||||
}
|
||||
|
|
|
@ -32,8 +32,9 @@
|
|||
after = [ "systemd-cryptsetup@enc.service" ];
|
||||
before = [ "sysroot.mount" ];
|
||||
script = ''
|
||||
btrfs subvolume delete /root
|
||||
btrfs subvolume snapshot /blank /root
|
||||
ls /
|
||||
btrfs subvolume delete /
|
||||
btrfs subvolume create /
|
||||
'';
|
||||
};
|
||||
# }}}
|
||||
|
|
|
@ -34,11 +34,8 @@
|
|||
extraArgs = [ "-f" ];
|
||||
|
||||
subvolumes = {
|
||||
# {{{ /blank
|
||||
"/blank" = { };
|
||||
# }}}
|
||||
# {{{ /root
|
||||
"/root" = {
|
||||
# {{{ /
|
||||
"root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
|
@ -47,13 +44,13 @@
|
|||
};
|
||||
# }}}
|
||||
# {{{ /swap
|
||||
"/swap" = {
|
||||
"swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
swap.swapfile.size = "20G";
|
||||
};
|
||||
# }}}
|
||||
# {{{ /root/persist/data
|
||||
"/root/persist/data" = {
|
||||
# {{{ /persist/data
|
||||
"persist-data" = {
|
||||
mountpoint = "/persist/data";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
|
@ -61,8 +58,8 @@
|
|||
];
|
||||
};
|
||||
# }}}
|
||||
# {{{ /root/persist/state
|
||||
"/root/persist/state" = {
|
||||
# {{{ /persist/state
|
||||
"persist-state" = {
|
||||
mountpoint = "/persist/state";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
|
@ -70,8 +67,8 @@
|
|||
];
|
||||
};
|
||||
# }}}
|
||||
# {{{ /root/local/nix
|
||||
"/root/local/nix" = {
|
||||
# {{{ /local/nix
|
||||
"local-nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
|
@ -79,8 +76,8 @@
|
|||
];
|
||||
};
|
||||
# }}}
|
||||
# {{{ /root/local/cache
|
||||
"/root/local/cache" = {
|
||||
# {{{ /local/nix
|
||||
"local-cache" = {
|
||||
mountpoint = "/persist/local/cache";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
# Why is this not part of the nixos module...
|
||||
systemd.tmpfiles.rules = lib.mapAttrsToList (
|
||||
_: c: "Q ${c.SUBVOLUME}/.snapshots"
|
||||
) config.services.snapper.configs;
|
||||
|
||||
services.snapper = {
|
||||
snapshotInterval = "hourly";
|
||||
cleanupInterval = "1d";
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
# See the wiki for more details https://wiki.nixos.org/wiki/Creating_a_NixOS_live_CD
|
||||
#
|
||||
# Can be built with
|
||||
# nix build .#nixosConfigurations.iso.config.system.build.isoImage
|
||||
{ modulesPath, lib, ... }:
|
||||
{
|
||||
# {{{ Imports
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
|
||||
../common/global
|
||||
../common/users/pilot.nix
|
||||
../common/optional/desktop
|
||||
../common/optional/wayland/hyprland.nix
|
||||
../common/optional/services/kanata.nix
|
||||
];
|
||||
|
||||
# Tell sops-nix to use the hermes keys for decrypting secrets
|
||||
sops.age.sshKeyPaths = [ "/hermes/secrets/hermes/ssh_host_ed25519_key" ];
|
||||
|
||||
# Override tailscale service enabled by the `global/default.nix` file
|
||||
services.tailscale.enable = lib.mkForce false;
|
||||
|
||||
# }}}
|
||||
# {{{ Automount hermes
|
||||
fileSystems."/hermes" = {
|
||||
device = "/dev/disk/by-uuid/7FE7-CA68";
|
||||
|
@ -23,4 +25,16 @@
|
|||
];
|
||||
};
|
||||
# }}}
|
||||
|
||||
# Tell sops-nix to use the hermes keys for decrypting secrets
|
||||
sops.age.sshKeyPaths = [ "/hermes/secrets/hermes/ssh_host_ed25519_key" ];
|
||||
|
||||
# Override tailscale service enabled by the `global/default.nix` file
|
||||
services.tailscale.enable = lib.mkForce false;
|
||||
|
||||
# Fast but bad compression
|
||||
# isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||
|
||||
# Set username
|
||||
satellite.pilot.name = "moon";
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.satellite.monitors = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.submodule {
|
||||
default = [ ];
|
||||
type = lib.types.listOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
@ -40,6 +42,7 @@
|
|||
default = null;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
2
scripts/build-iso.sh
Executable file
2
scripts/build-iso.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
nix build .#nixosConfigurations.iso.config.system.build.isoImage
|
|
@ -47,7 +47,7 @@ if [ "$action" = "install" ]; then
|
|||
> ./hosts/nixos/$host/hardware/generated.nix
|
||||
git add .
|
||||
|
||||
echo "❄️ Installing nixos"
|
||||
echo "❄️ nstalling nixos"
|
||||
nixos-install --flake ".#$host"
|
||||
|
||||
echo "🔑 Copying user ssh keys"
|
||||
|
|
Loading…
Reference in a new issue