modules/editors: add jetbrains-idea container
This commit is contained in:
parent
d5be2c18f9
commit
c0c761e740
3 changed files with 54 additions and 0 deletions
|
@ -5,5 +5,6 @@
|
|||
./pass.nix
|
||||
./browsers
|
||||
./communication
|
||||
./editors
|
||||
];
|
||||
}
|
||||
|
|
5
modules/nixos/programs/editors/default.nix
Normal file
5
modules/nixos/programs/editors/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./jetbrains-idea.nix ];
|
||||
}
|
48
modules/nixos/programs/editors/jetbrains-idea.nix
Normal file
48
modules/nixos/programs/editors/jetbrains-idea.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
|
||||
let
|
||||
cfg = config.local.programs.editors.jetbrains-idea;
|
||||
in
|
||||
{
|
||||
options.local.programs.editors.jetbrains-idea = with lib; {
|
||||
enable = mkEnableOption "jetbrains idea-community";
|
||||
package = mkPackageOption pkgs.jetbrains "idea-community" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
containers.jetbrains-idea = {
|
||||
autoStart = true;
|
||||
ephemeral = true;
|
||||
|
||||
bindMounts = {
|
||||
"/tmp/.X11-unix" = { };
|
||||
"/home/john/projects" = {
|
||||
isReadOnly = false;
|
||||
hostPath = "/home/jan/containers/jetbrains-idea/projects";
|
||||
};
|
||||
};
|
||||
|
||||
config = { pkgs, ... }: {
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
fonts = {
|
||||
inherit (config.fonts) enableDefaultPackages packages;
|
||||
fontconfig = { inherit (config.fonts.fontconfig) defaultFonts; };
|
||||
};
|
||||
|
||||
users.users.john = {
|
||||
isNormalUser = true;
|
||||
home = "/home/john";
|
||||
password = "hello";
|
||||
extraGroups = [ "pulse-access" ];
|
||||
packages = [ cfg.package ];
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue