diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b2be92b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/default.nix b/default.nix index b0e12b04..2efa7179 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,11 @@ -{ config, inputs, pkgs, lib, home-manager, ...}: +{ config, inputs, outputs, pkgs, lib, home-manager, ...}: { imports = [ # home manager inputs.home-manager.nixosModules.default # modules #i dont think this is right - ./modules + outputs.nixosModules.desktop ]; nix.settings.experimental-features = [ "nix-command" "flakes"]; diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 0d94367f..5483567a 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -19,6 +19,12 @@ layout = "us"; }; + modules = { + desktop = { + kitty.enable = true; + }; + }; + # Nvidia Drivers hardware.opengl = { enable = true; @@ -150,6 +156,7 @@ options = "--delete-older-than 7d"; }; + home-manager.useUserPackages = true; home-manager.users.sako = { pkgs, ...}: { # CHANGE THIS WHEN THE SYSTEM VERSION CHANGES TOO!!! @@ -178,9 +185,6 @@ sxhkd = { source = ../../config/sxhkd; }; - kitty = { - source = ../../config/kitty; - }; "qutebrowser/config.py" = { source = ../../config/qutebrowser/config.py; }; diff --git a/modules/default.nix b/modules/default.nix index 0967ef42..3cfd0142 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1 +1,3 @@ -{} +{ + desktop = import ./desktop; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix new file mode 100644 index 00000000..5c8c2514 --- /dev/null +++ b/modules/desktop/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./kitty + ]; +} diff --git a/modules/desktop/kitty/default.nix b/modules/desktop/kitty/default.nix new file mode 100644 index 00000000..ea63f81a --- /dev/null +++ b/modules/desktop/kitty/default.nix @@ -0,0 +1,24 @@ +{ options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.kitty; +in +{ + options.modules.desktop.kitty = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + kitty + ]; + + home-manager.users.sako = { pkgs , ...}: { + xdg.configFile = { + kitty = { + source = ../../../config/kitty; + }; + }; + }; + }; +}