finalized setup
This commit is contained in:
parent
4b9437df85
commit
31dd6510f8
13 changed files with 71 additions and 285 deletions
|
@ -17,7 +17,7 @@ in
|
|||
++ (mapModulesRec' (toString ./modules) import);
|
||||
|
||||
environment.variables = {
|
||||
KAAS = config.kaas.dir;
|
||||
KAAS = config.sneeuwvlok.dir;
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
};
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
nixosModules =
|
||||
{
|
||||
kaas = import ./.;
|
||||
sneeuwvlok = import ./.;
|
||||
}
|
||||
// mapModulesRec ./modules import;
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{ home, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
gnupg
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".gnupg/gpg-agent.conf".text = ''
|
||||
default-cache-ttl 34560000
|
||||
max-cache-ttl 34560000
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
".gnupg/gpg.conf".text = ''
|
||||
pinentry-mode loopback
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,148 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = [
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
];
|
||||
|
||||
home.sessionVariables._ZO_ECHO = "1";
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
push = { autoSetupRemote = true; };
|
||||
credential.helper = "${ pkgs.git.override { withLibsecret = true; } }/bin/git-credential-libsecret";
|
||||
};
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "docker-compose" "zoxide"];
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-autosuggestion";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "0.34.0";
|
||||
sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.0";
|
||||
sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
bat.enable = true;
|
||||
zoxide.enable = true;
|
||||
fzf.enable = true;
|
||||
eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = "$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character";
|
||||
|
||||
username = {
|
||||
style_user = "blue bold";
|
||||
style_root = "red bold";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
ssh_symbol = "🌐 ";
|
||||
format = "on [$hostname](bold red) ";
|
||||
trim_at = ".local";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
symbol = " ";
|
||||
format = "[$symbol$name]($style) ";
|
||||
style = "bright-purple bold";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
only_attached = true;
|
||||
format = "[$symbol$branch]($style) ";
|
||||
symbol = "שׂ";
|
||||
style = "bright-yellow bold";
|
||||
};
|
||||
|
||||
git_commit = {
|
||||
only_detached = true;
|
||||
format = "[ﰖ$hash]($style) ";
|
||||
style = "bright-yellow bold";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
style = "bright-purple bold";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "bright-green bold";
|
||||
};
|
||||
|
||||
directory = {
|
||||
read_only = " ";
|
||||
truncation_length = 0;
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
format = "[$duration]($style) ";
|
||||
style = "bright-blue";
|
||||
};
|
||||
|
||||
jobs = {
|
||||
style = "bright-green bold";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[\\$](bright-green bold)";
|
||||
error_symbol = "[\\$](bright-red bold)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.programs.communication = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Discord and Teamspeak";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
webcord
|
||||
teamspeak_client
|
||||
];
|
||||
}
|
|
@ -67,8 +67,6 @@ in
|
|||
};
|
||||
|
||||
systemd.services.qbittorrent = {
|
||||
# based on the plex.nix service module and
|
||||
# https://github.com/qbittorrent/qBittorrent/blob/master/dist/unix/systemd/qbittorrent-nox%40.service.in
|
||||
description = "qBittorrent-nox service";
|
||||
documentation = [ "man:qbittorrent-nox(1)" ];
|
||||
after = [ "network.target" ];
|
||||
|
@ -79,8 +77,6 @@ in
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
|
||||
# Run the pre-start script with full permissions (the "!" prefix) so it
|
||||
# can create the data directory if necessary.
|
||||
ExecStartPre = let
|
||||
preStartScript = pkgs.writeScript "qbittorrent-run-prestart" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
@ -94,18 +90,12 @@ in
|
|||
in
|
||||
"!${preStartScript}";
|
||||
|
||||
#ExecStart = "${pkgs.qbittorrent-nox}/bin/qbittorrent-nox";
|
||||
ExecStart = "${cfg.package}/bin/qbittorrent-nox";
|
||||
# To prevent "Quit & shutdown daemon" from working; we want systemd to
|
||||
# manage it!
|
||||
#Restart = "on-success";
|
||||
#UMask = "0002";
|
||||
#LimitNOFILE = cfg.openFilesLimit;
|
||||
};
|
||||
|
||||
environment = {
|
||||
QBT_PROFILE=cfg.dataDir;
|
||||
QBT_WEBUI_PORT=toString cfg.port;
|
||||
QBT_PROFILE = cfg.dataDir;
|
||||
QBT_WEBUI_PORT = toString cfg.port;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
25
modules/desktop/applications/communication.nix
Normal file
25
modules/desktop/applications/communication.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce mkMerge;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.desktop.applications.office;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.applications.office = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "Enable office suite (only-office)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) webcord teamspeak_client;
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
corefonts
|
||||
];
|
||||
};
|
||||
}
|
|
@ -15,14 +15,14 @@ in
|
|||
{
|
||||
user = mkOpt attrs {};
|
||||
|
||||
kaas = {
|
||||
sneeuwvlok = {
|
||||
dir = mkOpt path (findFirst pathExists (toString ../.) [
|
||||
"${config.user.home}/Github/.files"
|
||||
]);
|
||||
hostDir = mkOpt path "${config.kaas.dir}/hosts/${config.networking.hostName}";
|
||||
configDir = mkOpt path "${config.kaas.dir}/config";
|
||||
modulesDir = mkOpt path "${config.kaas.dir}/modules";
|
||||
themesDir = mkOpt path "${config.kaas.modulesDir}/themes";
|
||||
hostDir = mkOpt path "${config.sneeuwvlok.dir}/hosts/${config.networking.hostName}";
|
||||
configDir = mkOpt path "${config.sneeuwvlok.dir}/config";
|
||||
modulesDir = mkOpt path "${config.sneeuwvlok.dir}/modules";
|
||||
themesDir = mkOpt path "${config.sneeuwvlok.modulesDir}/themes";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -43,6 +43,13 @@ in
|
|||
|
||||
rgFull = pkgs.ripgrep.override {withPCRE2 = true;};
|
||||
};
|
||||
|
||||
programs = {
|
||||
bat.enable = true;
|
||||
eza.enable = true;
|
||||
fzf.enable = true;
|
||||
zoxide.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ in
|
|||
tag.gpgSign = true;
|
||||
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
default = "current";
|
||||
gpgSign = "if-asked";
|
||||
autoSquash = true;
|
||||
|
|
|
@ -55,6 +55,34 @@ in
|
|||
pkg = zsh-nix-shell;
|
||||
file = "nix-shell.plugin.zsh";
|
||||
})
|
||||
|
||||
{
|
||||
name = "zsh-autosuggestion";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "0.34.0";
|
||||
sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.0";
|
||||
sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
syntaxHighlighting = let
|
||||
|
@ -135,7 +163,7 @@ in
|
|||
create.configFile.zsh-abbreviations = {
|
||||
target = "zsh/abbreviations";
|
||||
text = let
|
||||
abbrevs = import "${config.kaas.configDir}/shell-abbr";
|
||||
abbrevs = import "${config.sneeuwvlok.configDir}/shell-abbr";
|
||||
in ''
|
||||
${concatStrings (mapAttrsToList
|
||||
(k: v: "abbr ${k}=${escapeNixString v}")
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
username = "chris";
|
||||
homeDirectory = "/home/chris";
|
||||
stateVersion = "23.11"; # DO NOT CHANGE
|
||||
|
||||
packages = [
|
||||
];
|
||||
|
||||
file = {
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
../modules/home-manager/gpg.nix
|
||||
../modules/home-manager/desktop.nix
|
||||
../modules/home-manager/terminals/default.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Chris Kruining";
|
||||
userEmail = "chris@kruining.eu";
|
||||
|
||||
ignores = [ "*~" "*.swp" ];
|
||||
aliases = {
|
||||
ci = "commit";
|
||||
};
|
||||
extraConfig = {};
|
||||
};
|
||||
|
||||
lazygit.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
username = "root";
|
||||
homeDirectory = "/home/root";
|
||||
stateVersion = "23.11"; # DO NOT CHANGE
|
||||
|
||||
packages = [
|
||||
];
|
||||
|
||||
file = {
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
../modules/home-manager/gpg.nix
|
||||
../modules/home-manager/desktop.nix
|
||||
../modules/home-manager/terminals/default.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Chris Kruining";
|
||||
userEmail = "chris@kruining.eu";
|
||||
|
||||
ignores = [ "*~" "*.swp" ];
|
||||
aliases = {
|
||||
ci = "commit";
|
||||
};
|
||||
extraConfig = {};
|
||||
};
|
||||
|
||||
lazygit.enable = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue