diff --git a/flake.nix b/flake.nix index 9e7359b..d607578 100644 --- a/flake.nix +++ b/flake.nix @@ -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 }: diff --git a/hosts/aarch64-linux/flame/default.nix b/hosts/aarch64-linux/flame/default.nix index 5b4abe1..1a6ed35 100644 --- a/hosts/aarch64-linux/flame/default.nix +++ b/hosts/aarch64-linux/flame/default.nix @@ -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; diff --git a/overlays/unstable.nix b/overlays/unstable.nix new file mode 100644 index 0000000..f112c7c --- /dev/null +++ b/overlays/unstable.nix @@ -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 + ]; + }; +} diff --git a/platforms/nixos/modules/services/betterlockscreen.nix b/platforms/nixos/modules/services/betterlockscreen.nix index 0ca4af2..63652b5 100644 --- a/platforms/nixos/modules/services/betterlockscreen.nix +++ b/platforms/nixos/modules/services/betterlockscreen.nix @@ -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"