Compare commits

...

5 commits

8 changed files with 50 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ config, profile-path, ... }:
{ config, profile-path, pkgs, ... }:
let
user = config.profile.user;
stateVersion = config.profile.system.stateVersion;
@ -9,6 +9,7 @@ in
./programs
./modules
./games
./direnv.nix
./config/ideavim
@ -19,6 +20,9 @@ in
username = user.name;
homeDirectory = "/home/${user.name}";
stateVersion = stateVersion;
packages = with pkgs; [
gopls
];
};
programs.home-manager.enable = true;
systemd.user.sessionVariables = {

6
home/games/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
imports = [
./minecraft.nix
];
}

12
home/games/minecraft.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profile.games.minecraft;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
prismlauncher
];
};
}

View file

@ -6,6 +6,7 @@
./docker.nix
./podman.nix
./services.nix
./games.nix
];
options.profile = {

9
options/games.nix Normal file
View file

@ -0,0 +1,9 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption types;
in
{
options.profile.games = {
minecraft.enable = mkEnableOption "Minecraft";
};
}

View file

@ -73,5 +73,7 @@
home.programs.foot.enable = true;
home.programs.zellij.enable = true;
games.minecraft.enable = true;
};
}

View file

@ -48,6 +48,8 @@
home.programs.zellij = {
enable = true;
autoAttach = true;
mod = "Ctrl b";
zjstatus.theme = ../home/programs/zellij/themes/zjstatus/gruvbox-dark.nix;
};
services = {

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, pkgs, ... }:
{
networking.networkmanager.enable = true;
networking.extraHosts = ''
@ -16,4 +16,16 @@
allowedTCPPorts = cfg.allowedTCPPorts;
allowedUDPPorts = [ 53 ];
};
services.resolved = {
enable = true;
};
environment.etc."systemd/resolved.conf.d/10-bareksa.conf".source = (pkgs.formats.ini { }).generate "10-bareksa.conf" {
Resolve = {
# This dns server is only available when VPN is connected.
DNS = "192.168.3.215";
Domains = "~bareksa.local";
};
};
}