making a mess of it, but getting to auto loading multi user setups!
This commit is contained in:
parent
20a2450683
commit
b139021f8e
13 changed files with 139 additions and 216 deletions
|
@ -1,19 +1,67 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
|
||||
cfg = config.modules.desktop.editors.zed;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.modules.desktop.editors.zed = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "zed"; };
|
||||
in {enable = mkEnableOption "zed";};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) zed-editor;
|
||||
};
|
||||
|
||||
hm.programs.zed-editor = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [ nixd nil alejandra ];
|
||||
extensions = ["nix" "toml" "html"];
|
||||
|
||||
userSettings = {
|
||||
assistant.enabled = false;
|
||||
|
||||
vim_mode = false;
|
||||
load_direnv = "shell_hook";
|
||||
base_keymap = "JetBrains";
|
||||
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
project_panel.auto_reveal_entries = false;
|
||||
|
||||
hour_format = "hour24";
|
||||
auto_update = false;
|
||||
|
||||
lsp = {
|
||||
nixd = {};
|
||||
nil = {
|
||||
initialization_options = {
|
||||
formatting = {
|
||||
command = ["alejandra" "--quiet" "--"];
|
||||
};
|
||||
};
|
||||
binary = {
|
||||
path_lookup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
"Nix" = {
|
||||
language_servers = ["nixd" "nil"];
|
||||
format_on_save = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -45,55 +45,7 @@ in {
|
|||
args = ["-l" "-c" "tmux new || tmux"];
|
||||
};
|
||||
}
|
||||
|
||||
# (mkIf (active != null) {
|
||||
# import = ["~/.config/alacritty/config/${active}.toml"];
|
||||
# })
|
||||
];
|
||||
};
|
||||
|
||||
# create.configFile = mkIf (active != null) {
|
||||
# alacritty-conf = {
|
||||
# target = "alacritty/config/${active}.toml";
|
||||
# source = let
|
||||
# inherit (config.modules.themes.font) mono sans;
|
||||
# tomlFormat = pkgs.formats.toml {};
|
||||
# in tomlFormat.generate "alacritty-theme" {
|
||||
# font = {
|
||||
# builtin_box_drawing = true;
|
||||
# size = mono.size;
|
||||
#
|
||||
# normal = {
|
||||
# family = "${mono.family}";
|
||||
# style = "${sans.weight}";
|
||||
# };
|
||||
#
|
||||
# italic = {
|
||||
# family = "${mono.family}";
|
||||
# style = "${sans.weight} Italic";
|
||||
# };
|
||||
#
|
||||
# bold = {
|
||||
# family = "${mono.family}";
|
||||
# style = "${mono.weight}";
|
||||
# };
|
||||
#
|
||||
# bold_italic = {
|
||||
# family = "${mono.family}";
|
||||
# style = "${mono.weight} Italic";
|
||||
# };
|
||||
#
|
||||
# offset = {
|
||||
# x = 0;
|
||||
# y = 0;
|
||||
# };
|
||||
# glyph_offset = {
|
||||
# x = 0;
|
||||
# y = 0;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ let
|
|||
in
|
||||
{
|
||||
options = let
|
||||
inherit (lib.types) attrs path str;
|
||||
inherit (lib.types) attrs path;
|
||||
inherit (lib.my) mkOpt;
|
||||
in
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ in
|
|||
|
||||
sneeuwvlok = {
|
||||
dir = mkOpt path (findFirst pathExists (toString ../.) [
|
||||
"${config.user.home}/Github/.files"
|
||||
"${config.user.home}/Github/sneeuwvlok"
|
||||
]);
|
||||
hostDir = mkOpt path "${config.sneeuwvlok.dir}/hosts/${config.networking.hostName}";
|
||||
configDir = mkOpt path "${config.sneeuwvlok.dir}/config";
|
||||
|
@ -24,10 +24,6 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = [
|
||||
pkgs.sops
|
||||
];
|
||||
|
||||
user = {
|
||||
name = "chris";
|
||||
description = "Chris Kruining";
|
||||
|
@ -38,27 +34,16 @@ in
|
|||
uid = 1000;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
sharedModules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
};
|
||||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
||||
|
||||
home = {
|
||||
stateVersion = config.system.stateVersion;
|
||||
sessionPath = [ "$SNEEUWVLOK_BIN" "$XDG_BIN_HOME" "$PATH" ];
|
||||
};
|
||||
nix.settings = let
|
||||
inherit (lib) attrNames filterAttrs;
|
||||
|
||||
users.users = {
|
||||
${config.user.name} = mkAliasDefinitions options.user;
|
||||
};
|
||||
|
||||
nix.settings = let users = [ "root" config.user.name ]; in
|
||||
{
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
};
|
||||
users = (attrNames (filterAttrs ({ is_trusted ? false }: is_trusted) config.users)) ++ [ "root" ];
|
||||
in
|
||||
{
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -89,56 +89,5 @@ in
|
|||
log_level = "DEBUG";
|
||||
};
|
||||
};
|
||||
|
||||
# create.configFile.btop-theme = let
|
||||
# inherit (config.modules.themes) active;
|
||||
# in
|
||||
# mkIf (active != null) {
|
||||
# target = "btop/themes/${active}.theme";
|
||||
# text = ''
|
||||
# theme[main_bg]="bg"
|
||||
# theme[main_fg]="fg"
|
||||
# theme[title]="fg"
|
||||
# theme[hi_fg]="highlight"
|
||||
# theme[selected_bg]="border"
|
||||
# theme[selected_fg]="bg"
|
||||
# theme[inactive_fg]="brightBlack"
|
||||
# theme[graph_text]="brightYellow"
|
||||
# theme[meter_bg]="brightblack"
|
||||
# theme[proc_misc]="brightYellow"
|
||||
# theme[cpu_box]="brightCyan"
|
||||
# theme[mem_box]="brightGreen"
|
||||
# theme[net_box]="brightMagenta"
|
||||
# theme[proc_box]="brightYellow"
|
||||
# theme[div_line]="brightblack"
|
||||
# theme[temp_start]="brightYellow"
|
||||
# theme[temp_mid]="panelbg"
|
||||
# theme[temp_end]="brightRed"
|
||||
# theme[cpu_start]="brightCyan"
|
||||
# theme[cpu_mid]="border"
|
||||
# theme[cpu_end]="brightGreen"
|
||||
# theme[free_start]="brightGreen"
|
||||
# theme[free_mid]="brightGreen"
|
||||
# theme[free_end]="brightGreen"
|
||||
# theme[cached_start]="brightYellow"
|
||||
# theme[cached_mid]="brightYellow"
|
||||
# theme[cached_end]="brightMagenta"
|
||||
# theme[available_start]="brightYellow"
|
||||
# theme[available_mid]="brightYellow"
|
||||
# theme[available_end]="brightYellow"
|
||||
# theme[used_start]="panelbg"
|
||||
# theme[used_mid]="panelbg"
|
||||
# theme[used_end]="brightRed"
|
||||
# theme[download_start]="brightBlue"
|
||||
# theme[download_mid]="brightBlue"
|
||||
# theme[download_end]="brightMagenta"
|
||||
# theme[upload_start]="brightBlue"
|
||||
# theme[upload_mid]="brightBlue"
|
||||
# theme[upload_end]="brightMagenta"
|
||||
# theme[process_start]="brightCyan"
|
||||
# theme[process_mid]="border"
|
||||
# theme[process_end]="brightGreen"
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ in
|
|||
# };
|
||||
};
|
||||
|
||||
create.configFile.zsh-abbreviations = {
|
||||
hm.xdg.configFile."zsh-abbreviations" = {
|
||||
target = "zsh/abbreviations";
|
||||
text = let
|
||||
abbrevs = import "${config.sneeuwvlok.configDir}/shell-abbr";
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.kwallet-pam
|
||||
bitwarden
|
||||
sops
|
||||
];
|
||||
|
||||
security = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue