new: emacs / doomemacs dotfiles

fix: discord / black screen on wayland
new: vscodium
This commit is contained in:
L-Nafaryus 2023-06-07 16:30:32 +05:00
parent 860fce5230
commit 82045cb546
9 changed files with 109 additions and 57 deletions

24
flake.lock generated
View File

@ -29,11 +29,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1686075314,
"narHash": "sha256-5Gl3AfspuIfWW00jsV9woCYH+znNHOru6W0zpX/P5L0=",
"lastModified": 1686109285,
"narHash": "sha256-VeKVr7TQdJMEQLTPCA0hfusG3N6JMOTZZUYfMx0B8Ho=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "30c400a67df95ad5012119bff4c8a9386d21e5c4",
"rev": "fe83f47d0a8240ec1d81928705f6b02dc722fbbd",
"type": "github"
},
"original": {
@ -239,11 +239,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1685865905,
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
"lastModified": 1685952468,
"narHash": "sha256-YCOr9kttCqoa9IZMjHxX6SlwenTg7FsSmG9TaT76mSE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e7603eba51f2c7820c0a182c6bbb351181caa8e7",
"rev": "70f7275b32f49bc67ae3532b758b80cb6c27f98a",
"type": "github"
},
"original": {
@ -255,11 +255,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1685938391,
"narHash": "sha256-96Jw6TbWDLSopt5jqCW8w1Fc1cjQyZlhfBnJ3OZGpME=",
"lastModified": 1686025136,
"narHash": "sha256-yd/Lr6RjjeyF7PpA+TpFT4E5LZeDyiMLVJUXIWxB4Rs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "31cd1b4afbaf0b1e81272ee9c31d1ab606503aed",
"rev": "22467e240f390f029d6c745ce031f0ffbdc40916",
"type": "github"
},
"original": {
@ -301,11 +301,11 @@
},
"nur": {
"locked": {
"lastModified": 1686073525,
"narHash": "sha256-CasBCbPGC/qieXIYMOsb27qTJa5f2dqxl1up2LEenso=",
"lastModified": 1686112478,
"narHash": "sha256-WUhnIru2MooIDkYBTl/L2O5x0j8o5PP96yfjVYpS5g4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "f7b89777c77c063e0b366073d83693a66a81270f",
"rev": "9fa0698ec12a7b685b9978691d3b5ed505611f72",
"type": "github"
},
"original": {

View File

@ -7,47 +7,57 @@
## Modules
modules = {
desktop = {
gnome.enable = true;
audio.enable = true;
browsers = {
default = "firefox";
firefox.enable = true;
};
gaming = {
steam.enable = true;
};
graphics.enable = true;
media = {
recording.enable = true;
};
term = {
default = "kgx";
};
vm = {
qemu.enable = true;
};
};
dev = {
cc.enable = true;
rust.enable = true;
python.enable = true;
};
editors = {
default = "nvim";
emacs.enable = true;
vim.enable = true;
};
shell = {
direnv.enable = true;
git.enable = true;
gnupg.enable = true;
tmux.enable = true;
zsh.enable = true;
};
services = {
ssh.enable = true;
};
desktop = {
gnome.enable = true;
audio.enable = true;
browsers = {
default = "firefox";
firefox.enable = true;
};
communication = {
discord.enable = true;
};
editors = {
vscodium.enable = true;
};
gaming = {
steam.enable = true;
lutris.enable = true;
};
graphics.enable = true;
media = {
recording.enable = true;
};
term = {
default = "kgx";
};
vm = {
qemu.enable = true;
};
};
dev = {
cc.enable = true;
rust.enable = true;
python.enable = true;
};
editors = {
default = "nvim";
emacs = {
enable = true;
doom.enable = true;
};
vim.enable = true;
};
shell = {
direnv.enable = true;
git.enable = true;
gnupg.enable = true;
tmux.enable = true;
zsh.enable = true;
};
services = {
ssh.enable = true;
};
};
networking = {

View File

@ -0,0 +1,24 @@
{ config, options, lib, pkgs, ... }:
with lib;
with lib.custom;
let
cfg = config.modules.desktop.communication.discord;
in {
options.modules.desktop.communication.discord = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
discord
(makeDesktopItem {
name = "discord-x11";
desktopName = "Discord";
genericName = "Discord via xwayland";
icon = "discord";
exec = "${discord}/bin/discord --use-gl=desktop";
categories = [ "Network" ];
})
];
};
}

View File

@ -0,0 +1,16 @@
{ config, options, lib, pkgs, ... }:
with lib;
with lib.custom;
let
cfg = config.modules.desktop.editors.vscodium;
in {
options.modules.desktop.editors.vscodium = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
vscodium-fhs
];
};
}

View File

@ -9,9 +9,7 @@ in {
enable = mkBoolOpt false;
doom = rec {
enable = mkBoolOpt false;
forgeUrl = mkOpt types.str "https://github.com";
repoUrl = mkOpt types.str "${forgeUrl}/doomemacs/doomemacs";
configRepoUrl = mkOpt types.str "${forgeUrl}/hlissner/doom-emacs-private";
repoUrl = mkOpt types.str "https://github.com/doomemacs/doomemacs";
};
};
@ -56,9 +54,12 @@ in {
installDoomEmacs = ''
if [ ! -d "$XDG_CONFIG_HOME/emacs" ]; then
git clone --depth=1 --single-branch "${cfg.doom.repoUrl}" "$XDG_CONFIG_HOME/emacs"
git clone "${cfg.doom.configRepoUrl}" "$XDG_CONFIG_HOME/doom"
fi
'';
};
home.configFile = {
"doom" = { source = "${configDir}/emacs/doom"; recursive = true; };
};
};
}

View File

@ -40,6 +40,7 @@ in {
zsh
nix-zsh-completions
bat
nnn
exa
fasd
fd