Skip to content

Commit

Permalink
home: configure ags via its own module
Browse files Browse the repository at this point in the history
  • Loading branch information
noib3 committed Sep 23, 2024
1 parent 176d913 commit f4e9f86
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 19 deletions.
17 changes: 0 additions & 17 deletions configs/ags/default.nix

This file was deleted.

1 change: 0 additions & 1 deletion configs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
}:

{
ags = import ./ags { inherit pkgs; };
alacritty = import ./alacritty {
inherit
config
Expand Down
5 changes: 4 additions & 1 deletion home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ in
username = userName;
};

imports = [
./modules/home/all.nix
];

nix = {
package = pkgs.nixVersions.latest;
settings = {
Expand All @@ -172,7 +176,6 @@ in

programs = {
inherit (configs)
ags
alacritty
bat
direnv
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions modules/home/ags/config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ pkgs }:

{
configDir = ./.;
enable = pkgs.stdenv.isLinux;
}
30 changes: 30 additions & 0 deletions modules/home/ags/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
config,
lib,
pkgs,
...
}:

with lib;
let
cfg = config.modules.ags;
in
{
options.modules.ags = {
enable = mkEnableOption "ags";
};

config = mkIf cfg.enable ({
home.packages = [
(pkgs.hiPrio (
pkgs.writeShellApplication {
name = "ags";
runtimeInputs = [ pkgs.bun ];
text = "${pkgs.ags}/bin/ags";
}
))
];

programs.ags = import ./config.nix { inherit pkgs; };
});
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions modules/home/all.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ ... }:

{
imports = [
./ags
];

modules = {
ags.enable = true;
};
}

0 comments on commit f4e9f86

Please sign in to comment.