Working checkpoint towards unified modules
This commit is contained in:
21
modules/app/alacritty.nix
Normal file
21
modules/app/alacritty.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.modules.app.alacritty;
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.app.alacritty = {
|
||||
enable = mkEnableOption "alacritty";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
(nerdfonts.override { fonts = [ "Iosevka" ]; })
|
||||
];
|
||||
|
||||
home.configFile."alacritty".source = ../../config/.config/alacritty;
|
||||
};
|
||||
}
|
||||
@@ -7,7 +7,8 @@ with lib.my;
|
||||
user = mkOpt attrs {};
|
||||
|
||||
home = {
|
||||
file = mkOpt' attrs {} "Files to place directly in $HOME";
|
||||
packages = mkOpt' (listOf package) [] "Packages to be installed at user level";
|
||||
file = mkOpt' attrs {} "Files to place directly in $HOME" ;
|
||||
configFile = mkOpt' attrs {} "Files to place in $XDG_CONFIG_HOME";
|
||||
dataFile = mkOpt' attrs {} "Files to place in $XDG_DATA_HOME";
|
||||
};
|
||||
@@ -26,12 +27,11 @@ with lib.my;
|
||||
};
|
||||
|
||||
config = {
|
||||
user = let name = "marc"; in {
|
||||
inherit name;
|
||||
user = {
|
||||
description = "The primary user account";
|
||||
extraGroups = [ "wheel" ];
|
||||
isNormalUser = true;
|
||||
home = "/home/${name}";
|
||||
home = "/home/${config.user.name}";
|
||||
group = "users";
|
||||
uid = 1000;
|
||||
};
|
||||
@@ -44,6 +44,7 @@ with lib.my;
|
||||
users.${config.user.name} = {
|
||||
home = {
|
||||
file = mkAliasDefinitions options.home.file;
|
||||
packages = mkAliasDefinitions options.home.packages;
|
||||
# Necessary for home-manager to work with flakes, otherwise it will
|
||||
# look for a nixpkgs channel.
|
||||
stateVersion = config.system.stateVersion;
|
||||
|
||||
Reference in New Issue
Block a user