migrate to xsession.nix

This commit is contained in:
♥ Minnie ♥ 2023-04-25 08:04:54 +08:00
parent 74bb9b8946
commit 12b4ed0ddf

View file

@ -11,14 +11,12 @@
# inputs.nix-colors.homeManagerModules.default # inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here: # You can also split up your configuration and import pieces of it here:
# Programs ./xsession.nix
./programs/discocss.nix ./programs/discocss.nix
./programs/git.nix ./programs/git.nix
./programs/mangohud.nix ./programs/mangohud.nix
./programs/nvim.nix ./programs/nvim.nix
./programs/zsh.nix ./programs/zsh.nix
# Services
# ./services/picom.nix
]; ];
nixpkgs = { nixpkgs = {
@ -39,7 +37,6 @@
# }); # });
# }) # })
(final: prev: { (final: prev: {
awesome = inputs.nixpkgs-f2k.packages.${pkgs.system}.awesome-git;
wezterm = inputs.nixpkgs-f2k.packages.${pkgs.system}.wezterm-git; wezterm = inputs.nixpkgs-f2k.packages.${pkgs.system}.wezterm-git;
}) })
]; ];
@ -56,43 +53,24 @@
programs.home-manager.enable = true; programs.home-manager.enable = true;
home = { home = {
# Setup our user environment
username = "sajenim"; username = "sajenim";
homeDirectory = "/home/sajenim"; homeDirectory = "/home/sajenim";
sessionVariables = { sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
}; };
# Install some packages
packages = with pkgs; [ packages = with pkgs; [
discord discord
hilbish
spotify spotify
# nixpkgs-f2k
wezterm
# pkgs.unstable # pkgs.unstable
unstable.prismlauncher unstable.prismlauncher
]; ];
}; };
xsession = { # Copy user configuration
enable = true; xdg.configFile = { };
scriptPath = ".xsession-hm";
# Git version provided by nixpkgs-f2k
windowManager.awesome = {
enable = true;
luaModules = with pkgs.luaPackages; [
luarocks # it the package manager for Lua modules
luadbi-mysql # Database abstraction layer
];
};
};
# Setup user configuration
xdg.configFile = {
awesome = { source = ../config/awesome; recursive = true; };
hilbish = { source = ../config/hilbish; recursive = true; };
wezterm = { source = ../config/wezterm; recursive = true; };
};
# Nicely reload system units when changing configs # Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";