more tweaks to overlays

This commit is contained in:
Noah Masur 2025-02-15 13:59:17 -05:00
parent 798bac75e8
commit 2425c76a84
No known key found for this signature in database
4 changed files with 21 additions and 26 deletions

View File

@ -259,7 +259,6 @@
(import ./overlays/tree-sitter.nix inputs)
(import ./overlays/mpv-scripts.nix inputs)
(import ./overlays/nextcloud-apps.nix inputs)
(import ./overlays/betterlockscreen.nix)
];
# System types to support.
@ -275,8 +274,7 @@
# { system -> pkgs }
pkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
hosts = import ./hosts;
# stablePkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
buildHome =
{ pkgs, modules }:

View File

@ -1,8 +1,6 @@
# The Flame
# System configuration for an Oracle free server
# See [readme](../README.md) to explain how this file works.
# How to install:
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
# These days, probably use nixos-anywhere instead.
@ -21,25 +19,10 @@ inputs.nixpkgs.lib.nixosSystem rec {
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = [
globals
inputs.home-manager.nixosModules.home-manager
../../modules/common
../../modules/nixos
{
nixpkgs.overlays = overlays;
# Hardware
server = true;
networking.hostName = "flame";
# Not sure what's necessary but too afraid to remove anything
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"virtio_pci"
"usbhid"
];
# File systems must be declared in order to boot
# This is the root filesystem containing NixOS
@ -57,9 +40,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
# Theming
# Server doesn't require GUI
gui.enable = false;
# Still require colors for programs like Neovim, K9S
theme = {
colors = (import ../../colorscheme/gruvbox-dark).dark;

12
overlays/unstable.nix Normal file
View File

@ -0,0 +1,12 @@
# Include unstable packages
# Adapted from https://github.com/PsychoLlama/dotfiles/blob/dd41f8c60fdc85868dbd7d88cf933348b497dcf0/lib/overlays/latest-packages.nix
inputs: _final: prev: {
# Provides `pkgs.unstable`.
unstable = import inputs.nixpkgs {
inherit (prev) system config;
overlays = [
# inputs.self.overlays.vim-plugins
];
};
}

View File

@ -7,11 +7,16 @@
let
cfg = config.services.betterlockscreen;
# Disable Dunst so that it's not attempting to reach a non-existent dunst service
betterlockscreen = pkgs.betterlockscreen.override { withDunst = cfg.dunst.enable; };
in
{
options.services.betterlockscreen.enable = lib.mkEnableOption "Betterlockscreen X server display lock";
options.services.betterlockscreen = {
enable = lib.mkEnableOption "Betterlockscreen X server display lock";
dunst.enable = lib.mkEnableOption "Dunst integration";
};
config = lib.mkIf cfg.enable {
@ -28,8 +33,8 @@ in
Type = "simple";
Environment = "DISPLAY=:0";
TimeoutSec = "infinity";
ExecStart = "${lib.getExe pkgs.betterlockscreen} --lock --display 1 --blur 0.5 --span";
ExecStartPost = "${pkgs.coreutils-full}/bin/sleep 1";
ExecStart = "${lib.getExe betterlockscreen} --lock --display 1 --blur 0.5 --span";
ExecStartPost = "${lib.getExe' pkgs.coreutils-full "sleep"} 1";
};
wantedBy = [
"sleep.target"