Compare commits

...

6 Commits

9 changed files with 63 additions and 7 deletions

View File

@ -144,6 +144,8 @@
nixosModules = (import ./modules/nixos) moduleInputs;
homeManagerModules = (import ./modules/home-manager) moduleInputs;
packages = eachSystem (system: import ./pkgs { inherit nixpkgs system; });
apps = eachSystem (system: import ./pkgs/apps.nix
{ inherit (self.outputs) packages; inherit system; });
nixosConfigurations = {
slab = mkSystem {

View File

@ -1,4 +1,4 @@
{ lib, pkgs, osConfig, ... }@args:
{ lib, pkgs, osConfig, outputs, ... }@args:
let
mkd = lib.mkDefault;
terminal = "${pkgs.kitty}/bin/kitty";
@ -18,11 +18,15 @@ let
in
if hasAttr key keyNames then keyNames."${key}" else key;
wm-helpers = import ./wm-helpers.nix {inherit lib pkgs;};
inherit (wm-helpers) keysetting;
inherit (outputs.packages.${pkgs.system}) wm-helpers;
keysetting = "${wm-helpers}/bin/keysetting";
in
{
# FIXME this is temporary just to get it working, need to make wm-common an
# option first
imports = [
./wm-common.nix
];
home.packages = with pkgs; [
kitty
dolphin

14
home/wm-common.nix Normal file
View File

@ -0,0 +1,14 @@
{ pkgs, lib, config, osConfig, options, ...}:
let
inherit (lib) mkDefault;
in
{
# Common options for standalone window managers; many of these (or
# alternatives thereof) are pulled in by desktop environments.
services = {
udiskie = {
enable = mkDefault true;
automount = mkDefault false;
};
};
}

9
pkgs/apps.nix Normal file
View File

@ -0,0 +1,9 @@
{ packages, system, ... }:
let _packages = packages; in
let
packages = _packages.${system};
mkApp = program: { type = "app"; inherit program; };
in
{
keysetting = mkApp "${packages.wm-helpers}/bin/keysetting";
}

View File

@ -5,4 +5,5 @@ let
in
{
google-fonts = callPackage ./google-fonts { };
wm-helpers = callPackage ./wm-helpers { };
}

View File

@ -1,7 +1,6 @@
# TODO make this into a package
{ pkgs, ...}:
{
keysetting = pkgs.writeShellScript "keysetting" ''
let
keysetting = pkgs.writeShellScriptBin "keysetting" ''
wpctl=${pkgs.wireplumber}/bin/wpctl
notify_send=${pkgs.libnotify}/bin/notify-send
brightnessctl=${pkgs.brightnessctl}/bin/brightnessctl
@ -35,4 +34,8 @@
mondown) setbright 5%-;;
esac
'';
in
pkgs.symlinkJoin {
name = "wm-helpers";
paths = keysetting;
}

View File

@ -11,6 +11,10 @@
# Enable flakes
nix.settings.experimental-features = ["nix-command" "flakes" ];
# fallback to building locally if binary cache fails (home-manager should be
# able to handle simple rebuilds offline)
nix.settings.fallback = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@ -31,6 +35,7 @@
zsh
ntfs3g
openssh
sshfs
file
fd
@ -58,6 +63,7 @@
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ] ++ options.nix.nixPath.default;
programs.ssh.enableAskPassword = false;
programs.fuse.userAllowOther = true;
programs.gnupg.agent = {
enable = lib.mkDefault true;

View File

@ -2,6 +2,8 @@
{
imports = [
./desktop-common.nix
# FIXME make this into an option
./wm-common.nix
];
services.xserver.displayManager.sddm.enable = true;

15
system/wm-common.nix Normal file
View File

@ -0,0 +1,15 @@
{ pkgs, lib, config, options, ...}:
let
inherit (lib) mkDefault;
in
{
# Common options for standalone window managers; many of these (or
# alternatives thereof) are pulled in by desktop environments.
services = {
power-profiles-daemon.enable = mkDefault true;
blueman.enable = mkDefault config.hardware.bluetooth.enable;
};
programs = {
nm-applet.enable = mkDefault config.networking.networkmanager.enable;
};
}