move config to better places

This commit is contained in:
Vinzenz Schroeter 2023-09-24 13:04:45 +02:00
parent ddb7df4a4e
commit 9b60bc1988
4 changed files with 53 additions and 51 deletions

View file

@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
cfg = config.my.desktop; isEnabled = config.my.desktop.enable;
in { in {
imports = [ imports = [
./gnome.nix ./gnome.nix
@ -14,10 +14,7 @@ in {
options.my.desktop.enable = lib.mkEnableOption "desktop"; options.my.desktop.enable = lib.mkEnableOption "desktop";
config = lib.mkIf cfg.enable { config = lib.mkIf isEnabled {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
services = { services = {
# Enable the X11 windowing system / wayland depending on DE # Enable the X11 windowing system / wayland depending on DE
xserver.enable = true; xserver.enable = true;
@ -49,11 +46,6 @@ in {
programs = { programs = {
git.package = pkgs.gitFull; git.package = pkgs.gitFull;
steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
}; };
# unblock kde connect / gsconnect # unblock kde connect / gsconnect
@ -89,8 +81,6 @@ in {
}; };
environment = { environment = {
pathsToLink = ["/share/zsh"];
systemPackages = with pkgs; [ systemPackages = with pkgs; [
lm_sensors lm_sensors
]; ];

View file

@ -17,7 +17,6 @@ in {
wineWowPackages.stagingFull wineWowPackages.stagingFull
wineWowPackages.fonts wineWowPackages.fonts
winetricks winetricks
steam
(lutris.override { (lutris.override {
extraPkgs = pkgs: [ extraPkgs = pkgs: [
@ -28,5 +27,13 @@ in {
]; ];
}) })
]; ];
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
};
}; };
} }

View file

@ -23,47 +23,51 @@ in {
]; ];
config = lib.mkIf enableHomeManager { config = lib.mkIf enableHomeManager {
home-manager.sharedModules = [ home-manager = {
# set stateVersion useUserPackages = true;
{home.stateVersion = "22.11";} useGlobalPkgs = true;
# make nano the default editor sharedModules = [
{ # set stateVersion
home = { {home.stateVersion = "22.11";}
sessionVariables.EDITOR = "nano"; # make nano the default editor
file.".nanorc".text = lib.mkDefault '' {
set linenumbers home = {
set mouse sessionVariables.EDITOR = "nano";
''; file.".nanorc".text = lib.mkDefault ''
}; set linenumbers
} set mouse
# command line niceness '';
{ };
programs = { }
command-not-found.enable = true; # command line niceness
dircolors.enable = true; {
programs = {
command-not-found.enable = true;
dircolors.enable = true;
zsh = { zsh = {
enable = true; enable = true;
enableSyntaxHighlighting = true; enableSyntaxHighlighting = true;
enableAutosuggestions = true; enableAutosuggestions = true;
enableVteIntegration = true; enableVteIntegration = true;
}; };
};
}
# common git config
{
programs = {
git = {
enable = true;
extraConfig.init.defaultBranch = "main";
}; };
}
# common git config
{
programs = {
git = {
enable = true;
extraConfig.init.defaultBranch = "main";
};
gh = { gh = {
enable = true; enable = true;
enableGitCredentialHelper = true; enableGitCredentialHelper = true;
};
}; };
}; }
} ];
]; };
}; };
} }

View file

@ -70,6 +70,7 @@
aliases = { aliases = {
prettylog = "log --pretty=oneline --graph"; prettylog = "log --pretty=oneline --graph";
spring-clean = "!git branch --merged | xargs -n 1 -r git branch -d";
}; };
extraConfig = { extraConfig = {