Merge branch 'main' of github.com:bloxx12/nichts

This commit is contained in:
LarsZauberer 2024-04-12 15:53:09 +02:00
commit 0bbc8242d3
12 changed files with 39 additions and 40 deletions

View file

@ -4,11 +4,11 @@ let
inherit (self) lib; inherit (self) lib;
in { in {
# Vali # Vali
vali = lib.nixosSystem { mars = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit lib inputs self; }; specialArgs = { inherit lib inputs self; };
modules = [ modules = [
./vali ./vali/mars
../modules ../modules
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default

View file

@ -9,8 +9,9 @@
myOptions = { myOptions = {
other = { other = {
system = { system = {
hostname = "nixos"; hostname = "mars";
username = "vali"; username = "vali";
gitPath = "/home/vali/Git/nichts";
}; };
home-manager = { home-manager = {
enable = true; enable = true;

View file

@ -7,7 +7,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.xserver = { services.xserver = {
enable = true; enable = true;
layout = "de"; xkb.layout = "de";
windowManager = { windowManager = {
bspwm.enable = true; bspwm.enable = true;
i3.enable = true; i3.enable = true;

View file

@ -0,0 +1,11 @@
_: {
imports = [
../../../options/boot/grub-boot.nix
../../../options/desktop/fonts.nix
../../../options/common/networking.nix
../../../options/common/gpu/nvidia.nix
# ../../options/common/pin-registry.nix
# ../../options/common/preserve-system.nix
#../../options/
];
}

View file

@ -1,11 +0,0 @@
_: {
imports = [
../../options/boot/grub-boot.nix
../../options/desktop/fonts.nix
../../options/common/networking.nix
../../options/common/gpu/nvidia.nix
# ../../options/common/pin-registry.nix
# ../../options/common/preserve-system.nix
#../../options/
];
}

View file

@ -16,19 +16,19 @@ in {
description = "enable zsh profiling"; description = "enable zsh profiling";
default = false; default = false;
}; };
oh-my-zsh = { ohmyzsh = {
enable = mkEnableOption "oh-my-zsh"; enable = mkEnableOption "ohmyzsh";
theme = mkOption { theme = mkOption {
type = types.str; type = types.str;
description = "oh-my-zsh theme"; description = "oh-my-zsh theme";
default = "alanpeabody"; default = "alanpeabody";
}; };
plugins = mkOption { plugins = mkOption {
type = types.listOf(types.str); type = types.listOf(types.str);
description = "oh-my-zsh plugins (like git)"; description = "oh-my-zsh plugins (like git)";
default = ["git"]; default = [ git ];
}; };
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -55,7 +55,7 @@ in {
cd = "z"; cd = "z";
nv = "nvim"; nv = "nvim";
#TODO fix hardcoding of git repo path and profile name #TODO fix hardcoding of git repo path and profile name
update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"${gitPath}#${config.myOptions.other.system.hostname}\" --log-format internal-json |& nom --json"; update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"${gitPath}#mars\" --log-format internal-json |& nom --json";
} // cfg.extraAliases; } // cfg.extraAliases;
initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof"; initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof";
@ -83,11 +83,11 @@ in {
}; };
} }
]; ];
oh-my-zsh = mkIf cfg.oh-my-zsh.enable { oh-my-zsh = mkIf cfg.ohmyzsh.enable {
enable = cfg.oh-my-zsh.enable; programs.oh-my-zsh.enable = true;
theme = cfg.oh-my-zsh.theme; theme = cfg.ohmyzsh.theme;
plugins = cfg.oh-my-zsh.plugins; plugins = cfg.ohmyzsh.plugins;
}; };
}; };
}; };
}; };

View file

@ -2,6 +2,6 @@ _: {
imports = [ imports = [
./home-manager.nix ./home-manager.nix
./system.nix ./system.nix
# ./xdg.nix ./xdg.nix
]; ];
} }

View file

@ -14,7 +14,7 @@
text_editor = "nvim.desktop"; text_editor = "nvim.desktop";
in { in {
environment.sessionVariables = { /* environment.sessionVariables = {
CARGO_HOME = "${hmCfg.xdg.dataHome}/cargo"; CARGO_HOME = "${hmCfg.xdg.dataHome}/cargo";
GOPATH = "${hmCfg.xdg.dataHome}/go"; GOPATH = "${hmCfg.xdg.dataHome}/go";
GNUPGHOME = "${hmCfg.xdg.dataHome}/gnupg"; GNUPGHOME = "${hmCfg.xdg.dataHome}/gnupg";
@ -30,14 +30,13 @@ in {
WINEPREFIX = "${hmCfg.xdg.dataHome}/wine"; WINEPREFIX = "${hmCfg.xdg.dataHome}/wine";
XAUTHORITY = "\$XDG_RUNTIME_DIR/Xauthority"; XAUTHORITY = "\$XDG_RUNTIME_DIR/Xauthority";
}; };
*/
myOptions.programs.zsh.extraAliases = { myOptions.programs.zsh.extraAliases = {
gdb = "gdb -n -x ${hmCfg.xdg.configHome}/gdb/init"; gdb = "gdb -n -x ${hmCfg.xdg.configHome}/gdb/init";
pidgin = "pidgin --config=${hmCfg.xdg.dataHome}/purple"; pidgin = "pidgin --config=${hmCfg.xdg.dataHome}/purple";
svn = "svn --config-dir ${hmCfg.xdg.configHome}/subversion"; svn = "svn --config-dir ${hmCfg.xdg.configHome}/subversion";
wget = "wget --hsts-file=\"${hmCfg.xdg.dataHome}/wget-hsts\""; wget = "wget --hsts-file=\"${hmCfg.xdg.dataHome}/wget-hsts\"";
}; };
home-manager.users.${username} = { home-manager.users.${username} = {
xdg.configFile."npm/npmrc".text = '' xdg.configFile."npm/npmrc".text = ''
prefix=${hmCfg.xdg.dataHome}/npm prefix=${hmCfg.xdg.dataHome}/npm

View file

@ -1,2 +1 @@
## Used Stuff # Used Stuff
I think it'd be nice to use flake-parts, they make our config more sane.