cosmic config
This commit is contained in:
parent
e5ade464b9
commit
85813eadcd
11 changed files with 77 additions and 39 deletions
55
modules/de/cosmic/cosmic.nix
Normal file
55
modules/de/cosmic/cosmic.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "de_cosmic";
|
||||
cfg = config.mods.${name};
|
||||
|
||||
cosmicConfigDir = ./config;
|
||||
cosmicFiles = builtins.attrNames (builtins.readDir cosmicConfigDir);
|
||||
cosmicConfigFiles = map (fileName: {
|
||||
name = "cosmic/${fileName}";
|
||||
value = {
|
||||
source = "${cosmicConfigDir}/${fileName}";
|
||||
# enable = true;
|
||||
};
|
||||
}) cosmicFiles;
|
||||
cosmicConfigFilesAttrs = builtins.listToAttrs cosmicConfigFiles;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
mods.${name} = {
|
||||
enable = mkEnableOption (lib.mdDoc "Enable COSMIC desktop environment");
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Use cosmic binary cache
|
||||
nix.settings = {
|
||||
substituters = [ "https://cosmic.cachix.org/" ];
|
||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
||||
};
|
||||
|
||||
# Enable cosmic
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
environment.cosmic.excludePackages = with pkgs; [
|
||||
cosmic-edit
|
||||
cosmic-term
|
||||
cosmic-store
|
||||
];
|
||||
|
||||
# Config
|
||||
home-manager.backupFileExtension = "bak";
|
||||
home-manager.users.${settings.user.username} = {
|
||||
xdg.configFile = cosmicConfigFilesAttrs;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue