Skip to content

Commit 2dc7477

Browse files
committed
feat: add initial nixiso
1 parent 52f798b commit 2dc7477

File tree

2 files changed

+73
-100
lines changed

2 files changed

+73
-100
lines changed

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@
9999
modules = [ self.nixosModules.deck ];
100100
};
101101
# iso for usb stick
102-
nixiso = nixpkgs.lib.nixosSystem {
102+
nixiso = nixpkgs.lib.nixosSystem rec {
103103
system = "x86_64-linux";
104-
specialArgs = { inherit self; };
105-
modules = [ self.nixosModules.nixiso ];
104+
specialArgs = { inherit inputs self system; };
105+
modules = [ ./hosts/nixiso/default.nix ];
106106
};
107107
};
108108
};

hosts/nixiso/default.nix

Lines changed: 70 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,20 @@
1-
{ self, config, lib, pkgs, ... }:
1+
{ self, config, lib, pkgs, system, inputs, ... }:
22

3-
let
4-
host = "voyager";
5-
dependencies = [
6-
self.nixosConfigurations.${host}.config.system.build.toplevel
7-
self.nixosConfigurations.${host}.config.system.build.diskoScript
8-
self.nixosConfigurations.${host}.config.system.build.diskoScript.drvPath
9-
self.nixosConfigurations.${host}.pkgs.stdenv.drvPath
10-
(self.nixosConfigurations.${host}.pkgs.closureInfo {
11-
rootPaths = [ ];
12-
}).drvPath
13-
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
14-
15-
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
16-
17-
inherit (self.inputs) nixpkgs;
3+
let inherit (self.inputs) nixpkgs;
184
in {
195
imports = [
20-
./filesystem.nix
6+
# ./filesystem.nix
7+
# self.inputs.disko.nixosModules.disko
218

22-
self.inputs.disko.nixosModules.disko
239
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
2410
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
2511
];
2612

2713
config = {
2814
# disko stuff
2915
system.stateVersion = config.system.nixos.version;
30-
disko.devices.disk.main.imageSize = "10G";
31-
boot.loader.systemd-boot.enable = true;
16+
# disko.devices.disk.main.imageSize = "10G";
17+
# boot.loader.systemd-boot.enable = true;
3218

3319
networking.hostName = "nixiso";
3420

@@ -38,93 +24,80 @@ in {
3824
};
3925

4026
nix = {
41-
extraOptions = "experimental-features = nix-command flakes";
4227
settings = {
43-
experimental-features = [ "nix-command" "flakes" ];
44-
# substituters = [
45-
# "https://cache.nixos.org"
46-
# "https://nix-community.cachix.org"
47-
# "https://cache.garnix.io"
48-
# "https://devenv.cachix.org"
49-
# "https://gabedunn.cachix.org"
50-
# "https://hyprland.cachix.org"
51-
# ];
52-
# trusted-public-keys = [
53-
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
54-
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
55-
# "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
56-
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
57-
# "gabedunn.cachix.org-1:wLWTKadNjpr2Op3rBnDZMUmUEPPIoKG87oY4PmBP8qU="
58-
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
59-
# ];
28+
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
29+
substituters = [
30+
"https://cache.nixos.org"
31+
"https://nix-community.cachix.org"
32+
"https://devenv.cachix.org"
33+
"https://gabedunn.cachix.org"
34+
"https://hyprland.cachix.org"
35+
];
36+
trusted-public-keys = [
37+
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
38+
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
39+
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
40+
"gabedunn.cachix.org-1:wLWTKadNjpr2Op3rBnDZMUmUEPPIoKG87oY4PmBP8qU="
41+
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
42+
];
6043
};
6144
};
6245

6346
# ensure latest kernel & filesystem pkgs are installed
6447
boot = {
65-
kernelPackages = pkgs.linuxPackages_latest;
48+
kernelPackages = pkgs.linuxPackages_zen;
6649
supportedFilesystems =
67-
lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
50+
[ "btrfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" "ext4" ];
6851
};
6952

70-
# set the install closure path for offline installation
71-
environment.etc."install-closure".source = "${closureInfo}/store-paths";
72-
73-
environment.systemPackages = let
74-
inherit (self.inputs.tu.packages.${pkgs.system}) tu;
75-
76-
install-unattended =
77-
pkgs.writeShellScriptBin "install-nixos-unattended" ''
78-
set -eux
79-
80-
main () {
81-
if [ "$#" -ne 1 ]; then
82-
echo "Usage: $0 <disk-id>"
83-
exit 1
84-
fi
85-
86-
exec ${pkgs.disko}/bin/disko-install --flake "${self}#${host}" --disk main "$1"
87-
}
53+
networking.networkmanager.enable = true;
54+
hardware.bluetooth.enable = true; # enables support for Bluetooth
8855

89-
main "$@"
90-
'';
91-
in with pkgs; [
92-
# cli tools to have on the iso
93-
atool
94-
bat
95-
btop
96-
curl
97-
dua
98-
eza
99-
fd
100-
file
101-
fzf
102-
git
103-
htop
104-
jq
105-
lsb-release
106-
neovim
107-
procps
108-
ps_mem
109-
ripgrep
110-
rsync
111-
tealdeer
112-
tmux
113-
tu
114-
wget
115-
zoxide
116-
117-
# gui apps
118-
firefox-bin
119-
gparted
120-
121-
# system
122-
btrfs-progs
123-
124-
install-unattended
125-
];
126-
127-
environment.sessionVariables.FLAKE_PATH = "${self}";
56+
# set the install closure path for offline installation
57+
# environment.etc."install-closure".source = "${closureInfo}/store-paths";
58+
59+
environment.systemPackages =
60+
let inherit (self.inputs.tu.packages.${pkgs.system}) tu;
61+
in with pkgs; [
62+
# cli tools to have on the iso
63+
atool
64+
bat
65+
btop
66+
curl
67+
dua
68+
eza
69+
fd
70+
file
71+
fzf
72+
git
73+
htop
74+
jq
75+
lsb-release
76+
neovim
77+
parted
78+
procps
79+
ps_mem
80+
ripgrep
81+
rsync
82+
tealdeer
83+
tmux
84+
tu
85+
wget
86+
zoxide
87+
88+
# gui apps
89+
firefox-bin
90+
gparted
91+
google-chrome
92+
93+
# system
94+
btrfs-progs
95+
];
96+
97+
environment.sessionVariables = {
98+
FLAKE_PATH = "${self}";
99+
NIXPKGS_ALLOW_UNFREE = "1";
100+
};
128101

129102
environment.shellAliases = {
130103
ls = "eza --group-directories-first";

0 commit comments

Comments
 (0)