feat: Added live iso for nix

This commit is contained in:
Uttarayan Mondal
2024-05-14 03:00:39 +05:30
parent 188e6d93a0
commit ca5e72ddc0
5 changed files with 34 additions and 25 deletions

View File

@@ -5,7 +5,7 @@
if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then
tmux detach-client tmux detach-client
else else
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch" tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux new -A -s scratch"
fi fi
''; '';
in { in {

2
flake.lock generated
View File

@@ -1498,7 +1498,7 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-JVbSYTJfcy9GUhEuD9PSXvgnHc5QwQIFQkf/xu9r0vI=", "narHash": "sha256-seTVgA8Df4rzadXlItYv3+HWqjeKatFvGSQZI1FViB0=",
"path": "./neovim", "path": "./neovim",
"type": "path" "type": "path"
}, },

View File

@@ -102,6 +102,7 @@
user = "fs0c131y"; user = "fs0c131y";
hasGui = false; # Don't wan't to run GUI apps on a headless server hasGui = false; # Don't wan't to run GUI apps on a headless server
isServer = true; isServer = true;
live = true;
} }
{ {
name = "ryu"; name = "ryu";
@@ -157,6 +158,10 @@
if (builtins.hasAttr "monitors" device) if (builtins.hasAttr "monitors" device)
then device.monitors then device.monitors
else null; else null;
live =
if (builtins.hasAttr "live" device)
then device.live
else false;
system = device.system; system = device.system;
name = device.name; name = device.name;
user = device.user; user = device.user;

View File

@@ -450,7 +450,7 @@ in rec {
height = 0.99, height = 0.99,
width = 0.95, width = 0.95,
}, },
cmd = "sh -c 'tmux attach -t scratch || tmux new -s scratch'", cmd = "sh -c 'tmux new -As scratch'",
blend = 10, blend = 10,
}) })
@@ -516,9 +516,8 @@ in rec {
tmux_show_only_in_active_window = true, tmux_show_only_in_active_window = true,
} }
} }
require("pets").setup({ -- require("pets").setup({
-- your options here -- })
})
else else
vim.o.guifont = "Hasklug Nerd Font Mono:h13" vim.o.guifont = "Hasklug Nerd Font Mono:h13"
vim.g.neovide_cursor_vfx_mode = "railgun" vim.g.neovide_cursor_vfx_mode = "railgun"
@@ -676,7 +675,7 @@ in rec {
image-nvim image-nvim
ChatGPT-nvim ChatGPT-nvim
# gp-nvim # gp-nvim
pets-nvim # pets-nvim
# UI and UX # UI and UX
vim-abolish vim-abolish

View File

@@ -3,6 +3,7 @@
devices, devices,
inputs, inputs,
overlays, overlays,
lib,
home-manager, home-manager,
nur, nur,
... ...
@@ -15,7 +16,8 @@ builtins.listToAttrs (builtins.map (device: {
inherit device; inherit device;
lanzaboote = inputs.lanzaboote; lanzaboote = inputs.lanzaboote;
}; };
modules = [ modules =
[
nur.nixosModules.nur nur.nixosModules.nur
{nixpkgs.overlays = overlays;} {nixpkgs.overlays = overlays;}
./configuration.nix ./configuration.nix
@@ -33,6 +35,9 @@ builtins.listToAttrs (builtins.map (device: {
users.${device.user}.imports = [../common/home.nix]; users.${device.user}.imports = [../common/home.nix];
}; };
} }
]
++ lib.optionals device.live [
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
]; ];
}; };
}) })