organize modules
This commit is contained in:
parent
1965db3417
commit
3b1ed7e281
55 changed files with 13 additions and 13 deletions
11
modules/DEFAULT/COMMON/autoupdate.nix
Normal file
11
modules/DEFAULT/COMMON/autoupdate.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "04:00";
|
||||
flake = "git+ssh://gitea@git.huwe.mooo.com/willifan/nix-config";
|
||||
persistent = true;
|
||||
randomizedDelaySec = "5min";
|
||||
fixedRandomDelay = true;
|
||||
};
|
||||
}
|
28
modules/DEFAULT/COMMON/default.nix
Normal file
28
modules/DEFAULT/COMMON/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ hostname, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nixvim
|
||||
|
||||
./autoupdate.nix
|
||||
./envvar.nix
|
||||
./garbage-collect.nix
|
||||
./keyd.nix
|
||||
./locales.nix
|
||||
./mimetype.nix
|
||||
./optimise.nix
|
||||
./packages.nix
|
||||
./sops.nix
|
||||
./stylix.nix
|
||||
./syncthing.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName = "${hostname}";
|
||||
};
|
||||
console.keyMap = "de";
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "23.11";
|
||||
}
|
16
modules/DEFAULT/COMMON/envvar.nix
Normal file
16
modules/DEFAULT/COMMON/envvar.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_STATE_HOME = "$HOME/.local/state";
|
||||
|
||||
# Not officially in the specification
|
||||
#XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
#PATH = [
|
||||
# "${XDG_BIN_HOME}"
|
||||
#];
|
||||
};
|
||||
}
|
9
modules/DEFAULT/COMMON/garbage-collect.nix
Normal file
9
modules/DEFAULT/COMMON/garbage-collect.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "04:30";
|
||||
persistent = true;
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
}
|
23
modules/DEFAULT/COMMON/keyd.nix
Normal file
23
modules/DEFAULT/COMMON/keyd.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = [ "*" ];
|
||||
settings = {
|
||||
main = {
|
||||
rightalt = "overload(altgr, rightalt)";
|
||||
capslock = "overload(control, esc)";
|
||||
};
|
||||
altgr = {
|
||||
a = ''macro(compose a ")'';
|
||||
o = ''macro(compose o ")'';
|
||||
u = ''macro(compose u ")'';
|
||||
s = ''macro(compose s s)'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
16
modules/DEFAULT/COMMON/locales.nix
Normal file
16
modules/DEFAULT/COMMON/locales.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
}
|
15
modules/DEFAULT/COMMON/mimetype.nix
Normal file
15
modules/DEFAULT/COMMON/mimetype.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"application/pdf" = "zen.desktop";
|
||||
"text/html" = "zen.desktop";
|
||||
"x-scheme-handler/http" = "zen.desktop";
|
||||
"x-scheme-handler/https" = "zen.desktop";
|
||||
"x-scheme-handler/about" = "zen.desktop";
|
||||
"x-scheme-handler/unknown" = "zen.desktop";
|
||||
};
|
||||
|
||||
environment.sessionVariables.DEFAULT_BROWSER = "zen";
|
||||
|
||||
}
|
12
modules/DEFAULT/COMMON/nixvim/TODO.md
Normal file
12
modules/DEFAULT/COMMON/nixvim/TODO.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Plugins
|
||||
add cmp
|
||||
try out nvimtree
|
||||
add lualine
|
||||
add autopairs
|
||||
indent blankline??
|
||||
todo comments
|
||||
undo tree
|
||||
bufferline?
|
||||
startup?
|
||||
KEYBINDS
|
||||
|
9
modules/DEFAULT/COMMON/nixvim/autopairs.nix
Normal file
9
modules/DEFAULT/COMMON/nixvim/autopairs.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
settings = {
|
||||
disable_filetype = ["TelescopePrompt" "vim"];
|
||||
};
|
||||
};
|
||||
}
|
49
modules/DEFAULT/COMMON/nixvim/cmp.nix
Normal file
49
modules/DEFAULT/COMMON/nixvim/cmp.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
experimental = {ghost_text = false;};
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetchingTimeout = 200;
|
||||
maxViewEntries = 30;
|
||||
};
|
||||
snippet = {expand = "luasnip";};
|
||||
formatting = {fields = ["kind" "abbr" "menu"];};
|
||||
sources = [
|
||||
{name = "git";}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "emoji";}
|
||||
{
|
||||
name = "buffer"; # text within current buffer
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "path"; # file system paths
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "luasnip"; # snippets
|
||||
keywordLength = 3;
|
||||
}
|
||||
];
|
||||
|
||||
window = {
|
||||
completion = {border = "solid";};
|
||||
documentation = {border = "solid";};
|
||||
};
|
||||
};
|
||||
};
|
||||
cmp-nvim-lsp = {enable = true;}; # lsp
|
||||
cmp-buffer = {enable = true;};
|
||||
cmp-path = {enable = true;}; # file system paths
|
||||
cmp_luasnip = {enable = true;}; # snippets
|
||||
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
||||
};
|
||||
|
||||
}
|
24
modules/DEFAULT/COMMON/nixvim/default.nix
Normal file
24
modules/DEFAULT/COMMON/nixvim/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./autopairs.nix
|
||||
./cmp.nix
|
||||
./filetype.nix
|
||||
./gitsigns.nix
|
||||
./illuminate.nix
|
||||
./lsp.nix
|
||||
./navic.nix
|
||||
./neotree.nix
|
||||
./settings.nix
|
||||
./treesitter.nix
|
||||
./whichkey.nix
|
||||
./yazi.nix
|
||||
];
|
||||
|
||||
}
|
14
modules/DEFAULT/COMMON/nixvim/filetype.nix
Normal file
14
modules/DEFAULT/COMMON/nixvim/filetype.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim.files = {
|
||||
"ftplugin/nix.lua" = {
|
||||
opts = {
|
||||
expandtab = true;
|
||||
shiftwidth = 2;
|
||||
tabstop = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
28
modules/DEFAULT/COMMON/nixvim/gitsigns.nix
Normal file
28
modules/DEFAULT/COMMON/nixvim/gitsigns.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
signs = {
|
||||
add = {
|
||||
text = " ";
|
||||
};
|
||||
change = {
|
||||
text = " ";
|
||||
};
|
||||
delete = {
|
||||
text = " ";
|
||||
};
|
||||
untracked = {
|
||||
text = "";
|
||||
};
|
||||
topdelete = {
|
||||
text = " ";
|
||||
};
|
||||
changedelete = {
|
||||
text = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
modules/DEFAULT/COMMON/nixvim/illuminate.nix
Normal file
18
modules/DEFAULT/COMMON/nixvim/illuminate.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
illuminate = {
|
||||
enable = true;
|
||||
underCursor = false;
|
||||
filetypesDenylist = [
|
||||
"Outline"
|
||||
"TelescopePrompt"
|
||||
"alpha"
|
||||
"harpoon"
|
||||
"reason"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
80
modules/DEFAULT/COMMON/nixvim/lsp.nix
Normal file
80
modules/DEFAULT/COMMON/nixvim/lsp.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp-lines = {enable = true;};
|
||||
lsp-format = {enable = true;};
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
clangd = {enable = true;};
|
||||
html = {enable = true;};
|
||||
lua_ls = {enable = true;};
|
||||
nixd = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
gopls = {enable = true;};
|
||||
jsonls = {enable = true;};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
yamlls = {enable = true;};
|
||||
};
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
K = {
|
||||
action = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
};
|
||||
diagnostic = {
|
||||
"<leader>cd" = {
|
||||
action = "open_float";
|
||||
desc = "Line Diagnostics";
|
||||
};
|
||||
"[d" = {
|
||||
action = "goto_next";
|
||||
desc = "Next Diagnostic";
|
||||
};
|
||||
"]d" = {
|
||||
action = "goto_prev";
|
||||
desc = "Previous Diagnostic";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
42
modules/DEFAULT/COMMON/nixvim/navic.nix
Normal file
42
modules/DEFAULT/COMMON/nixvim/navic.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
navic = {
|
||||
enable = true;
|
||||
settings = {
|
||||
separator = " ";
|
||||
highlight = true;
|
||||
lsp = {
|
||||
autoAttach = true;
|
||||
};
|
||||
icons = {
|
||||
Array = " ";
|
||||
Boolean = " ";
|
||||
Class = " ";
|
||||
Constant = " ";
|
||||
Constructor = " ";
|
||||
Enum = " ";
|
||||
EnumMember = " ";
|
||||
Event = " ";
|
||||
Field = " ";
|
||||
File = " ";
|
||||
Function = " ";
|
||||
Interface = " ";
|
||||
Key = " ";
|
||||
Method = " ";
|
||||
Module = " ";
|
||||
Namespace = " ";
|
||||
Null = " ";
|
||||
Number = " ";
|
||||
Object = " ";
|
||||
Operator = " ";
|
||||
Package = " ";
|
||||
String = " ";
|
||||
Struct = " ";
|
||||
TypeParameter = " ";
|
||||
Variable = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
42
modules/DEFAULT/COMMON/nixvim/neotree.nix
Normal file
42
modules/DEFAULT/COMMON/nixvim/neotree.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
sources = ["filesystem" "buffers" "git_status" "document_symbols"];
|
||||
addBlankLineAtTop = false;
|
||||
|
||||
filesystem = {
|
||||
bindToCwd = false;
|
||||
followCurrentFile = {
|
||||
enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
defaultComponentConfigs = {
|
||||
indent = {
|
||||
withExpanders = true;
|
||||
expanderCollapsed = "";
|
||||
expanderExpanded = "";
|
||||
expanderHighlight = "NeoTreeExpander";
|
||||
};
|
||||
|
||||
gitStatus = {
|
||||
symbols = {
|
||||
added = " ";
|
||||
conflict = " ";
|
||||
deleted = "";
|
||||
ignored = " ";
|
||||
modified = " ";
|
||||
renamed = "";
|
||||
staged = "";
|
||||
unstaged = "";
|
||||
untracked = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
101
modules/DEFAULT/COMMON/nixvim/settings.nix
Normal file
101
modules/DEFAULT/COMMON/nixvim/settings.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim = {
|
||||
config = {
|
||||
extraConfigLuaPre =
|
||||
# lua
|
||||
''
|
||||
vim.fn.sign_define("diagnosticsignerror", { text = " ", texthl = "diagnosticerror", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("diagnosticsignwarn", { text = " ", texthl = "diagnosticwarn", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("diagnosticsignhint", { text = "", texthl = "diagnostichint", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("diagnosticsigninfo", { text = " ", texthl = "diagnosticinfo", linehl = "", numhl = "" })
|
||||
'';
|
||||
|
||||
clipboard = {
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
|
||||
opts = {
|
||||
# Show line numbers
|
||||
number = true;
|
||||
|
||||
# Show relative line numbers
|
||||
relativenumber = true;
|
||||
|
||||
# Use the system clipboard
|
||||
clipboard = "unnamedplus";
|
||||
|
||||
# Number of spaces that represent a <TAB>
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
|
||||
# Show tabline always
|
||||
showtabline = 2;
|
||||
|
||||
# Use spaces instead of tabs
|
||||
expandtab = true;
|
||||
|
||||
# Enable smart indentation
|
||||
smartindent = true;
|
||||
|
||||
# Number of spaces to use for each step of (auto)indent
|
||||
shiftwidth = 2;
|
||||
|
||||
# Enable break indent
|
||||
breakindent = true;
|
||||
|
||||
# Highlight the screen line of the cursor
|
||||
cursorline = true;
|
||||
|
||||
# Minimum number of screen lines to keep above and below the cursor
|
||||
scrolloff = 8;
|
||||
|
||||
# Enable mouse support
|
||||
mouse = "a";
|
||||
|
||||
# Set folding method to manual
|
||||
foldmethod = "manual";
|
||||
|
||||
# Disable folding by default
|
||||
foldenable = false;
|
||||
|
||||
# Wrap long lines at a character in 'breakat'
|
||||
linebreak = true;
|
||||
|
||||
# Disable spell checking
|
||||
spell = false;
|
||||
|
||||
# Disable swap file creation
|
||||
swapfile = false;
|
||||
|
||||
# Time in milliseconds to wait for a mapped sequence to complete
|
||||
timeoutlen = 300;
|
||||
|
||||
# Enable 24-bit RGB color in the TUI
|
||||
termguicolors = true;
|
||||
|
||||
# Don't show mode in the command line
|
||||
showmode = false;
|
||||
|
||||
# Open new split below the current window
|
||||
splitbelow = true;
|
||||
|
||||
# Keep the screen when splitting
|
||||
splitkeep = "screen";
|
||||
|
||||
# Open new split to the right of the current window
|
||||
splitright = true;
|
||||
|
||||
# Hide command line unless needed
|
||||
cmdheight = 0;
|
||||
|
||||
# Remove EOB
|
||||
fillchars = {
|
||||
eob = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
13
modules/DEFAULT/COMMON/nixvim/treesitter.nix
Normal file
13
modules/DEFAULT/COMMON/nixvim/treesitter.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
indent.enable = true;
|
||||
highlight.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
10
modules/DEFAULT/COMMON/nixvim/whichkey.nix
Normal file
10
modules/DEFAULT/COMMON/nixvim/whichkey.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
which-key = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
10
modules/DEFAULT/COMMON/nixvim/yazi.nix
Normal file
10
modules/DEFAULT/COMMON/nixvim/yazi.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
yazi = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
7
modules/DEFAULT/COMMON/optimise.nix
Normal file
7
modules/DEFAULT/COMMON/optimise.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
nix.optimise = {
|
||||
automatic = true;
|
||||
dates = [ "05:00" ];
|
||||
};
|
||||
}
|
8
modules/DEFAULT/COMMON/packages.nix
Normal file
8
modules/DEFAULT/COMMON/packages.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ...}:
|
||||
{
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
tealdeer
|
||||
];
|
||||
|
||||
}
|
21
modules/DEFAULT/COMMON/sops.nix
Normal file
21
modules/DEFAULT/COMMON/sops.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
|
||||
sops.defaultSopsFile = ../../../secrets/secrets.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
|
||||
sops.age.keyFile = "/home/willifan/.config/sops/age/keys.txt";
|
||||
|
||||
sops.secrets."ssh/root/private" = {
|
||||
owner = "root";
|
||||
};
|
||||
|
||||
sops.secrets."syncthing/password" = {
|
||||
mode = "440";
|
||||
group = "syncthing";
|
||||
};
|
||||
|
||||
users.groups.syncthing = { };
|
||||
|
||||
}
|
33
modules/DEFAULT/COMMON/stylix.nix
Normal file
33
modules/DEFAULT/COMMON/stylix.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://files.huwe.mooo.com/Oneshot.png";
|
||||
hash = "sha256-LaIzLCW86sbldE9lk7psbYKaTCjwaPLcoD3il6FalTw=";
|
||||
};
|
||||
plymouth_logo = pkgs.fetchurl {
|
||||
url = "https://files.huwe.mooo.com/outlinenobackground.png";
|
||||
hash = "sha256-HdErySgSwNSPEHyBywLyZCAss4vUhsY8BvCPe5hST6Q=";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
|
||||
autoEnable = true;
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/pasque.yaml";
|
||||
override = {
|
||||
base0D = "F3196E";
|
||||
base0F = "CFAACF";
|
||||
};
|
||||
|
||||
image = wallpaper;
|
||||
|
||||
polarity = "dark";
|
||||
|
||||
targets.plymouth.logo = plymouth_logo;
|
||||
|
||||
};
|
||||
|
||||
}
|
65
modules/DEFAULT/COMMON/syncthing.nix
Normal file
65
modules/DEFAULT/COMMON/syncthing.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
deviceList = builtins.attrNames config.common.syncthing.devices;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
common.syncthing = {
|
||||
|
||||
enable = lib.mkEnableOption "enable syncthing";
|
||||
|
||||
devices = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
|
||||
options.id = lib.mkOption { type = lib.types.str; };
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config.home-manager.users.willifan.services.syncthing = lib.mkIf config.common.syncthing.enable {
|
||||
enable = lib.mkDefault true;
|
||||
overrideDevices = lib.mkDefault true;
|
||||
overrideFolders = lib.mkDefault true;
|
||||
passwordFile = config.sops.secrets."syncthing/password".path;
|
||||
settings = {
|
||||
gui.user = "willifan";
|
||||
devices = config.common.syncthing.devices;
|
||||
folders = lib.mkDefault {
|
||||
"Documents" = {
|
||||
id = "jtl6g-qjmwo";
|
||||
path = "/mnt/data/Documents";
|
||||
devices = deviceList;
|
||||
};
|
||||
"Enpass" = lib.mkDefault {
|
||||
id = "ciksm-xsw4m";
|
||||
path = "/mnt/data/Enpass";
|
||||
devices = deviceList;
|
||||
};
|
||||
"Pictures" = lib.mkDefault {
|
||||
id = "po4qj-q9t0t";
|
||||
path = "/mnt/data/Pictures";
|
||||
devices = deviceList;
|
||||
};
|
||||
"Videos" = lib.mkDefault {
|
||||
id = "4wqf5-xasng";
|
||||
path = "/mnt/data/Videos";
|
||||
devices = deviceList;
|
||||
};
|
||||
"Notes" = lib.mkDefault {
|
||||
id = "oc61n-iewgj";
|
||||
path = "/mnt/data/Notes";
|
||||
devices = deviceList;
|
||||
};
|
||||
"Music" = lib.mkDefault {
|
||||
id = "xxh8a-3y2tq";
|
||||
path = "/mnt/data/Music";
|
||||
devices = deviceList;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
10
modules/DEFAULT/COMMON/users.nix
Normal file
10
modules/DEFAULT/COMMON/users.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.willifan = {
|
||||
isNormalUser = true;
|
||||
description = "willifan";
|
||||
extraGroups = [ "networkmanager" "wheel" "syncthing" ];
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue