Compare commits
No commits in common. "308206d1cc981bbdb25d5bbd5fd080a02f4a14cc" and "41138ab34a7293b879b09849e227af80a4ecf1ae" have entirely different histories.
308206d1cc
...
41138ab34a
@ -103,7 +103,7 @@
|
||||
};
|
||||
|
||||
# Automatic garbage collection
|
||||
nix.gc = lib.mkIf (!config.me.buildingIso) {
|
||||
nix.gc = {
|
||||
# Runs nix-collect-garbage --delete-older-than 5d
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
@ -136,6 +136,9 @@
|
||||
file
|
||||
usbutils # for lsusb
|
||||
pciutils # for lspci
|
||||
mesa-demos # for glxgears TODO move to better role
|
||||
vulkan-tools # for vkcube TODO move to better role
|
||||
xorg.xeyes # to test which windows are using x11 TODO move to better role
|
||||
ripgrep
|
||||
strace
|
||||
ltrace
|
||||
@ -172,6 +175,7 @@
|
||||
"/var/lib/nixos" # Contains user information (uids/gids)
|
||||
"/var/lib/systemd" # Systemd state directory for random seed, persistent timers, core dumps, persist hardware state like backlight and rfkill
|
||||
"/var/log/journal" # Logs, alternatively set `services.journald.storage = "volatile";` to write to /run/log/journal
|
||||
"/etc/zfs/zpool.cache" # Which zpools to import, the root zpool is already imported and does not need this cache file but this captures additional pools. TODO consider setting cachefile=none on main pool.
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id" # Systemd unique machine id "otherwise, the system journal may fail to list earlier boots, etc"
|
||||
|
@ -87,8 +87,7 @@
|
||||
// {
|
||||
modules = base_x86_64_linux.modules ++ [
|
||||
(nixpkgs + "/nixos/modules/installer/cd-dvd/iso-image.nix")
|
||||
# TODO: Figure out how to do image based appliances
|
||||
# (nixpkgs + "/nixos/modules/profiles/image-based-appliance.nix")
|
||||
# TODO: maybe? imports = [ "${modulesPath}/profiles/image-based-appliance.nix" ];
|
||||
{
|
||||
isoImage.makeEfiBootable = true;
|
||||
isoImage.makeUsbBootable = true;
|
||||
|
@ -6,7 +6,6 @@
|
||||
./optimized_build.nix
|
||||
./power_management.nix
|
||||
./screen_brightness.nix
|
||||
./wifi.nix
|
||||
];
|
||||
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
config = {
|
||||
environment.loginShellInit = lib.mkIf (!config.me.buildingIso) ''
|
||||
doas iw dev wlan0 set power_save off
|
||||
'';
|
||||
};
|
||||
}
|
@ -8,36 +8,5 @@
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me.graphicsCardType = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"amd"
|
||||
"intel"
|
||||
"nvidia"
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
example = "amd";
|
||||
description = "What graphics card type is in the computer.";
|
||||
};
|
||||
|
||||
options.me.graphical = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install graphical programs.";
|
||||
};
|
||||
|
||||
config = (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me.graphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
mesa-demos # for glxgears
|
||||
vulkan-tools # for vkcube
|
||||
xorg.xeyes # to test which windows are using x11
|
||||
];
|
||||
hardware.graphics.enable = true;
|
||||
})
|
||||
]
|
||||
);
|
||||
hardware.graphics.enable = true;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
|
||||
];
|
||||
|
||||
# TODO: Switch sway to using seatd instead of polkit
|
||||
systemd = {
|
||||
user.services.lxqt-policykit-agent = {
|
||||
description = "lxqt-policykit-agent";
|
||||
|
@ -21,6 +21,26 @@ in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me.graphicsCardType = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"amd"
|
||||
"intel"
|
||||
"nvidia"
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
example = "amd";
|
||||
description = "What graphics card type is in the computer.";
|
||||
};
|
||||
|
||||
options.me.graphical = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install graphical programs.";
|
||||
};
|
||||
|
||||
config = (
|
||||
lib.mkMerge [
|
||||
{
|
||||
|
@ -258,7 +258,6 @@ in
|
||||
{
|
||||
imports = [
|
||||
./graphical_session_target.nix
|
||||
./iso.nix
|
||||
];
|
||||
|
||||
options.me.swayIncludes = lib.mkOption {
|
||||
@ -384,8 +383,9 @@ in
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# Auto-launch sway
|
||||
# Run sway as the absolute last command in the login shell init. mkBefore = 500, plain = 1000, mkAfter = 1500
|
||||
environment.loginShellInit = lib.mkOrder 2000 ''
|
||||
environment.loginShellInit = ''
|
||||
# TODO: This shouldn't be shoe-horned into the sway config
|
||||
doas iw dev wlan0 set power_save off
|
||||
[ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] && [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.systemd}/bin/systemd-cat --identifier=sway sway
|
||||
'';
|
||||
};
|
||||
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
launch_terminal = pkgs.writeTextFile {
|
||||
name = "launch_terminal.conf";
|
||||
text = ''
|
||||
exec ${pkgs.alacritty}/bin/alacritty
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
config = lib.mkIf (config.me.buildingIso) {
|
||||
# Launch a terminal at boot in the live ISO for when hotkeys don't work.
|
||||
me.swayIncludes = [
|
||||
launch_terminal
|
||||
];
|
||||
};
|
||||
}
|
@ -44,11 +44,4 @@ in
|
||||
zfs_clone_recv
|
||||
zfs_clone_resume
|
||||
];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/etc/zfs/zpool.cache" # Which zpools to import, the root zpool is already imported and does not need this cache file but this captures additional pools.
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user