diff --git a/.gitignore b/.gitignore index dabbdbc..6108db7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,4 @@ -/* +/secrets.nix -!/.gitignore -!/*.example.nix - -!/notes - -!/programs -!/scripts - -!/system -!/home - -!/wallpapers -/wallpapers/* -!/wallpapers/*.png -!/wallpapers/build.sh +/wallpapers/*.jpg diff --git a/home/home.nix b/home/home.nix index 1e4a18b..6754ae0 100644 --- a/home/home.nix +++ b/home/home.nix @@ -17,7 +17,7 @@ in model = "pc105"; layout = "us,ru"; variant = "dvorak,"; - options = ["grp:win_space_toggle"]; + options = [ "grp:win_space_toggle" ]; }; home.packages = with pkgs; [ @@ -25,25 +25,25 @@ in docker-compose libreoffice - asciinema # record the terminal - neofetch # command-line system information + asciinema # record the terminal + neofetch # command-line system information alacritty # tools - xh # friendly and fast tool for sending HTTP requests - fd # a simple, fast and user-friendly alternative to find - bat # a cat clone with syntax highlighting and git integration + xh # friendly and fast tool for sending HTTP requests + fd # a simple, fast and user-friendly alternative to find + bat # a cat clone with syntax highlighting and git integration # haskell stylish-haskell # formatter # browser - librewolf # a fork of firefox, focused on privacy, security and freedom + librewolf # a fork of firefox, focused on privacy, security and freedom # for work google-cloud-sdk kubectl - postgresql_12 # 🤷 I need only psql + postgresql_12 # 🤷 I need only psql ]; # user interface diff --git a/home/progs/alacritty/config.nix b/home/progs/alacritty/config.nix index 7873324..3ec1a01 100644 --- a/home/progs/alacritty/config.nix +++ b/home/progs/alacritty/config.nix @@ -18,10 +18,11 @@ multiplier = 3; }; - font = + font = let family = "Fira Code"; - in { + in + { normal = { inherit family; style = "Regular"; @@ -40,5 +41,5 @@ }; size = 11.0; - }; + }; } diff --git a/home/progs/alacritty/default.nix b/home/progs/alacritty/default.nix index 541b7e3..a0a3342 100644 --- a/home/progs/alacritty/default.nix +++ b/home/progs/alacritty/default.nix @@ -15,7 +15,7 @@ in description = "Enable alacritty, GPU-accelerated terminal emulator"; }; }; - + config = mkIf cfg.enable { programs.alacritty = { enable = true; diff --git a/home/progs/exa.nix b/home/progs/exa.nix index 8a499eb..12d64a0 100644 --- a/home/progs/exa.nix +++ b/home/progs/exa.nix @@ -14,7 +14,7 @@ in description = "Add and configure exa, a modern replacement for ls"; }; }; - + config = mkIf cfg.enable { programs.exa.enable = true; diff --git a/home/progs/git.nix b/home/progs/git.nix index d0153c7..076d279 100644 --- a/home/progs/git.nix +++ b/home/progs/git.nix @@ -12,7 +12,7 @@ in default = false; description = "Add git with my personal settings"; }; - + userName = mkOption { type = types.str; description = "Set your global name"; @@ -29,7 +29,7 @@ in description = "The default GnuPG signing key fingerprint"; }; }; - + config = mkIf cfg.enable { programs.git = { enable = true; diff --git a/home/progs/himalaya.nix b/home/progs/himalaya.nix index 8e18f12..f3ea8b4 100644 --- a/home/progs/himalaya.nix +++ b/home/progs/himalaya.nix @@ -23,7 +23,7 @@ in description = "Add himalaya with my personal configuration"; }; }; - + config = mkIf cfg.enable { programs.himalaya = { enable = true; diff --git a/home/progs/hledger.nix b/home/progs/hledger.nix index a2ecbe4..9d88e19 100644 --- a/home/progs/hledger.nix +++ b/home/progs/hledger.nix @@ -21,7 +21,7 @@ in description = "Add and configure hledger tool to manage finance"; }; }; - + config = mkIf cfg.enable { home.packages = with pkgs; [ hledger diff --git a/home/progs/nvim/coc_settings.nix b/home/progs/nvim/coc_settings.nix index d9b2226..a2e5082 100644 --- a/home/progs/nvim/coc_settings.nix +++ b/home/progs/nvim/coc_settings.nix @@ -11,12 +11,12 @@ languageserver = { nix = { command = "rnix-lsp"; - filetypes = ["nix"]; + filetypes = [ "nix" ]; }; haskell = { command = "haskell-language-server-wrapper"; - args = ["--lsp"]; + args = [ "--lsp" ]; rootPatterns = [ "stack.yaml" ".cabal" diff --git a/home/progs/nvim/default.nix b/home/progs/nvim/default.nix index ac38e40..1fd7c32 100644 --- a/home/progs/nvim/default.nix +++ b/home/progs/nvim/default.nix @@ -12,31 +12,30 @@ let plugins = pkgs.vimPlugins // customPlugins; myVimPlugins = with plugins; [ - coc-tsserver # typescript LSP - coc-eslint # eslint LSP - coc-rust-analyzer # rust LSP + coc-tsserver # typescript LSP + coc-eslint # eslint LSP + coc-rust-analyzer # rust LSP - editorconfig-vim # use project .editorconfig to configure editor - lightline-vim # configurable status line - material-vim # modern theme with true colors support - vim-nix # nix support - vim-easymotion # highlights keys to move quickly - vim-gitgutter # shows git diff markers in the sign column - nerdtree # tree explorer - nerdtree-git-plugin # shows files git status on the NerdTree - neoformat # formating code - nvim-treesitter # treesitter configurations and abstraction layer - fzf-vim # fuzzy finder - blamer-nvim # A git blame plugin + editorconfig-vim # use project .editorconfig to configure editor + lightline-vim # configurable status line + material-vim # modern theme with true colors support + vim-nix # nix support + vim-easymotion # highlights keys to move quickly + vim-gitgutter # shows git diff markers in the sign column + nerdtree # tree explorer + nerdtree-git-plugin # shows files git status on the NerdTree + neoformat # formating code + nvim-treesitter # treesitter configurations and abstraction layer + fzf-vim # fuzzy finder + blamer-nvim # A git blame plugin ]; # Additional language servers that we should install mannually lspPackages = with pkgs; [ rnix-lsp ]; # Additional tools - toolsPackages = with pkgs; [ - fzf ripgrep # required for `fzf-vim` plugin - ]; - additionalPackages = lspPackages ++ toolsPackages; + fzfToolsPackages = with pkgs; [ fzf ripgrep ]; + + additionalPackages = lspPackages ++ fzfToolsPackages; vimConfig = builtins.readFile ./config.vim; in @@ -54,10 +53,10 @@ in description = "Set neovim as default editor"; }; }; - + config = mkIf cfg.enable { home.packages = additionalPackages; - + programs.neovim = { enable = true; extraConfig = vimConfig; @@ -79,4 +78,3 @@ in }; }; } - diff --git a/home/progs/nvim/lua/basic.lua b/home/progs/nvim/lua/basic.lua index 113e16c..c348629 100644 --- a/home/progs/nvim/lua/basic.lua +++ b/home/progs/nvim/lua/basic.lua @@ -3,15 +3,15 @@ -- Basic Settings -- -vim.cmd 'filetype off' +vim.cmd("filetype off") -- Leaders -vim.g.mapleader = ',' -vim.g.maplocalleader = '-' +vim.g.mapleader = "," +vim.g.maplocalleader = "-" -- Better Unix support -vim.opt.viewoptions = {'folds', 'options', 'cursor', 'unix', 'slash'} -vim.opt.encoding = 'utf-8' +vim.opt.viewoptions = { "folds", "options", "cursor", "unix", "slash" } +vim.opt.encoding = "utf-8" -- True color support vim.opt.termguicolors = true @@ -20,13 +20,13 @@ vim.opt.termguicolors = true -- Available styles: default, planight, ocean, lighter -- darker, default-community, palenight-community, ocean-community, -- lighter-community, darker-community -vim.g.material_theme_style = 'default' -vim.g.lightline = { colorscheme = 'material_vim' } -vim.cmd 'colorscheme material' +vim.g.material_theme_style = "default" +vim.g.lightline = { colorscheme = "material_vim" } +vim.cmd("colorscheme material") -- Other options -vim.cmd 'syntax on' -vim.opt.backspace = {'indent', 'eol', 'start'} +vim.cmd("syntax on") +vim.opt.backspace = { "indent", "eol", "start" } vim.opt.laststatus = 2 vim.opt.showmode = false @@ -37,13 +37,13 @@ vim.opt.softtabstop = 2 vim.opt.shiftwidth = 2 -- Fixes broken cursor on Linux -vim.opt.guicursor = '' +vim.opt.guicursor = "" -- Disable mouse / touchpad -vim.opt.mouse = '' +vim.opt.mouse = "" -- Incremental substitutin -vim.opt.inccommand = 'split' +vim.opt.inccommand = "split" ------------------------------------------------------------------------------- -- @@ -67,17 +67,17 @@ vim.opt.showmatch = true -- Time during which the matching parenthesis is shown. vim.opt.matchtime = 2 -- Sensible default line auto cutting and formatting. -vim.opt.formatoptions = 'jtcrq' +vim.opt.formatoptions = "jtcrq" -- Copy/Past to/from clipboard. -vim.opt.clipboard = 'unnamedplus' +vim.opt.clipboard = "unnamedplus" -- Highlight line cursor is currently on. vim.opt.cursorline = true -- Invisible characters representation when :set list vim.opt.listchars = { - tab = '→ ', - trail = '~', - nbsp = '␣', - eol = '¬', + tab = "→ ", + trail = "~", + nbsp = "␣", + eol = "¬", } -- Search @@ -89,7 +89,7 @@ vim.opt.ignorecase = true vim.opt.smartcase = true -- Spell -vim.opt.spelllang = 'en,ru' +vim.opt.spelllang = "en,ru" -- Fold level vim.opt.foldlevel = 99 @@ -101,105 +101,110 @@ vim.opt.foldnestmax = 5 -- -- File type specified -- -local bufReadFile = {'BufNewFile', 'BufRead'} +local bufReadFile = { "BufNewFile", "BufRead" } -- Set up a line limiter for each lang -local line_limiter_augroup = vim.api.nvim_create_augroup('line_limiter', {}) +local line_limiter_augroup = vim.api.nvim_create_augroup("line_limiter", {}) local function set_line_limiter(limit, patterns) - vim.api.nvim_create_autocmd(bufReadFile, { - pattern = patterns, - group = line_limiter_augroup, - callback = function () vim.wo.colorcolumn = tostring(limit) end, - }) + vim.api.nvim_create_autocmd(bufReadFile, { + pattern = patterns, + group = line_limiter_augroup, + callback = function() + vim.wo.colorcolumn = tostring(limit) + end, + }) end set_line_limiter(101, { - '*.nix', - '*.vim', - '*.lua', - '*.ts', - '*.tsx', - '*.js', - '*.jsx', - '*.rs', + "*.nix", + "*.vim", + "*.lua", + "*.ts", + "*.tsx", + "*.js", + "*.jsx", + "*.rs", }) set_line_limiter(81, { - '*.json', - '*.yml', - '*.yaml', - '*.md', - '*.html', - '*.css', + "*.json", + "*.yml", + "*.yaml", + "*.md", + "*.html", + "*.css", }) -- Spell check for markdown files -local spell_check_augroup = vim.api.nvim_create_augroup('spell_check', {}) +local spell_check_augroup = vim.api.nvim_create_augroup("spell_check", {}) vim.api.nvim_create_autocmd(bufReadFile, { - pattern = { '*.md' }, - group = spell_check_augroup, - callback = function () vim.wo.spell = true end, + pattern = { "*.md" }, + group = spell_check_augroup, + callback = function() + vim.wo.spell = true + end, }) -- Set up fold method for each lang -local folding_augroup = vim.api.nvim_create_augroup('folding', {}) +local folding_augroup = vim.api.nvim_create_augroup("folding", {}) vim.api.nvim_create_autocmd(bufReadFile, { - group = folding_augroup, - pattern = { - '*.js', - '*.jsx', - '*.ts', - '*.tsx', - }, - callback = function () - vim.cmd 'syntax on' - vim.wo.foldmethod = 'syntax' - end, + group = folding_augroup, + pattern = { + "*.js", + "*.jsx", + "*.ts", + "*.tsx", + }, + callback = function() + vim.cmd("syntax on") + vim.wo.foldmethod = "syntax" + end, }) - ------------------------------------------------------------------------------- -- -- Bindings -- -local function clear_search_hl() vim.opt.hlsearch = false end -vim.keymap.set('n', '', clear_search_hl, { desc = 'Clear search highlighting' }) +local function clear_search_hl() + vim.opt.hlsearch = false +end +vim.keymap.set("n", "", clear_search_hl, { desc = "Clear search highlighting" }) -- Enable fast navigation between windows -vim.keymap.set('n', '', 'h') -vim.keymap.set('n', '', 'l') -vim.keymap.set('n', '', 'j') -vim.keymap.set('n', '', 'k') +vim.keymap.set("n", "", "h") +vim.keymap.set("n", "", "l") +vim.keymap.set("n", "", "j") +vim.keymap.set("n", "", "k") -- Disable the annoying and useless ex-mode -vim.keymap.set('n', 'Q', '') -vim.keymap.set('n', 'gQ', '') +vim.keymap.set("n", "Q", "") +vim.keymap.set("n", "gQ", "") -- Disable arrow keys -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') -vim.keymap.set('v', '', '') -vim.keymap.set('v', '', '') -vim.keymap.set('v', '', '') -vim.keymap.set('v', '', '') +vim.keymap.set("n", "", "") +vim.keymap.set("n", "", "") +vim.keymap.set("n", "", "") +vim.keymap.set("n", "", "") +vim.keymap.set("v", "", "") +vim.keymap.set("v", "", "") +vim.keymap.set("v", "", "") +vim.keymap.set("v", "", "") -- ... instead of insert mode for rus lang -vim.keymap.set('i', '', '') -vim.keymap.set('i', '', '') -vim.keymap.set('i', '', '') -vim.keymap.set('i', '', '') +vim.keymap.set("i", "", "") +vim.keymap.set("i", "", "") +vim.keymap.set("i", "", "") +vim.keymap.set("i", "", "") -- Disable page up / down -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') -vim.keymap.set('v', '', '') -vim.keymap.set('v', '', '') -vim.keymap.set('i', '', '') -vim.keymap.set('i', '', '') +vim.keymap.set("n", "", "") +vim.keymap.set("n", "", "") +vim.keymap.set("v", "", "") +vim.keymap.set("v", "", "") +vim.keymap.set("i", "", "") +vim.keymap.set("i", "", "") ------------------------------------------------------------------------------- -- -- Abbreviatures -- -vim.cmd 'cabbrev bsp belowright split' -vim.cmd 'cabbrev rvsp belowright vsplit' +vim.cmd("cabbrev bsp belowright split") +vim.cmd("cabbrev rvsp belowright vsplit") diff --git a/home/progs/nvim/lua/coc.lua b/home/progs/nvim/lua/coc.lua index e497bfa..23368b1 100644 --- a/home/progs/nvim/lua/coc.lua +++ b/home/progs/nvim/lua/coc.lua @@ -4,10 +4,10 @@ vim.opt.updatetime = 300 -- Coc don't use completeopt vim.opt.completeopt = {} -- don't give |ins-completion-menu| messages. -vim.opt.shortmess:append('c') +vim.opt.shortmess:append("c") -- always show signcolumns -vim.opt.signcolumn = 'yes' +vim.opt.signcolumn = "yes" -- Some server have issues with backup files, see coc#649 vim.opt.backup = false @@ -17,42 +17,42 @@ vim.opt.writebackup = false vim.opt.cmdheight = 2 -- Use for trigger completion. -vim.keymap.set('i', '', vim.fn['coc#refresh'], { - silent = true, - expr = true +vim.keymap.set("i", "", vim.fn["coc#refresh"], { + silent = true, + expr = true, }) -- Use for confirm completion, `u` means break undo chain at current -- position. Coc only does snippet and additional edit on confirm. local function confirm_coc_completion() - if vim.call'coc#pum#visible' == 1 then - vim.call'coc#pum#confirm' - return "" - else - return "" - end + if vim.call("coc#pum#visible") == 1 then + vim.call("coc#pum#confirm") + return "" + else + return "" + end end -vim.keymap.set('i', '', confirm_coc_completion, { expr = true, silent = true }) +vim.keymap.set("i", "", confirm_coc_completion, { expr = true, silent = true }) local sr_opts = { silent = true, remap = true } -- Use `[c` and `]c` for navigate diagnostics -vim.keymap.set('n', '[c', '(coc-diagnostic-prev)', sr_opts) -vim.keymap.set('n', ']c', '(coc-diagnostic-next)', sr_opts) +vim.keymap.set("n", "[c", "(coc-diagnostic-prev)", sr_opts) +vim.keymap.set("n", "]c", "(coc-diagnostic-next)", sr_opts) -- Remap keys for gotos -vim.keymap.set('n', 'gd', '(coc-definition)', sr_opts) -vim.keymap.set('n', 'gy', '(coc-type-definition)', sr_opts) -vim.keymap.set('n', 'gi', '(coc-implementation)', sr_opts) -vim.keymap.set('n', 'gr', '(coc-references)', sr_opts) +vim.keymap.set("n", "gd", "(coc-definition)", sr_opts) +vim.keymap.set("n", "gy", "(coc-type-definition)", sr_opts) +vim.keymap.set("n", "gi", "(coc-implementation)", sr_opts) +vim.keymap.set("n", "gr", "(coc-references)", sr_opts) -- Remap for do code action of current line -vim.keymap.set('n', 'a', '(coc-codeaction)') +vim.keymap.set("n", "a", "(coc-codeaction)") -- Remap for rename current word -vim.keymap.set('n', 'n', '(coc-rename)') +vim.keymap.set("n", "n", "(coc-rename)") -- Mapping for CocList -vim.keymap.set('n', 'cl', ':CocList') -vim.keymap.set('n', 'cd', ':CocList diagnostics') -vim.keymap.set('n', 'cc', ':CocList commands') -vim.keymap.set('n', 'co', ':CocList outline') -vim.keymap.set('n', 'cs', ':CocList symbols') +vim.keymap.set("n", "cl", ":CocList") +vim.keymap.set("n", "cd", ":CocList diagnostics") +vim.keymap.set("n", "cc", ":CocList commands") +vim.keymap.set("n", "co", ":CocList outline") +vim.keymap.set("n", "cs", ":CocList symbols") diff --git a/home/progs/nvim/lua/plugins.lua b/home/progs/nvim/lua/plugins.lua index 3362405..690b3f0 100644 --- a/home/progs/nvim/lua/plugins.lua +++ b/home/progs/nvim/lua/plugins.lua @@ -3,27 +3,27 @@ -- NerdTree -- -vim.g.NERDTreeDirArrowExpandable = '▸' -vim.g.NERDTreeDirArrowCollapsible = '▾' +vim.g.NERDTreeDirArrowExpandable = "▸" +vim.g.NERDTreeDirArrowCollapsible = "▾" vim.g.NERDTreeMiniamlUI = 1 vim.g.NERDTreeDirArrows = 1 -- Nerdtree git plugin symbols vim.g.NERDTreeGitStatusIndicatorMapCustom = { - Modified = 'ᵐ', - Staged = 'ˢ', - Untracked = 'ᵘ', - Renamed = 'ʳ', - Unmerged = 'ᶴ', - Deleted = 'ˣ', - Dirty = '˜', - Clean = 'ᵅ', - Unknown = '?', + Modified = "ᵐ", + Staged = "ˢ", + Untracked = "ᵘ", + Renamed = "ʳ", + Unmerged = "ᶴ", + Deleted = "ˣ", + Dirty = "˜", + Clean = "ᵅ", + Unknown = "?", } -vim.keymap.set('n', 'nt', ':NERDTreeToggle') -vim.keymap.set('n', 'nf', ':NERDTreeFind') +vim.keymap.set("n", "nt", ":NERDTreeToggle") +vim.keymap.set("n", "nf", ":NERDTreeFind") ------------------------------------------------------------------------------- -- @@ -31,14 +31,14 @@ vim.keymap.set('n', 'nf', ':NERDTreeFind') -- vim.g.neoformat_try_node_exe = 1 vim.g.neoformat_only_msg_on_error = 1 -vim.g.neoformat_enabled_markdown = {"denofmt"} +vim.g.neoformat_enabled_markdown = { "denofmt" } -vim.cmd [[ +vim.cmd([[ aug fmt au! au BufWritePre * try | undojoin | Neoformat | catch /E790/ | Neoformat | endtry aug END -]] +]]) --[[ TODO: need to investigate how implement it in lua local format_augroup = vim.api.nvim_create_augroup('format', {}) vim.api.nvim_create_autocmd('BufWritePre', { @@ -53,7 +53,8 @@ vim.api.nvim_create_autocmd('BufWritePre', { if not ok then vim.cmd'NeoFormat' end end }) -]]-- +]] +-- ------------------------------------------------------------------------------- -- @@ -63,30 +64,29 @@ vim.g.gitgutter_sign_priority = 1 vim.g.gitgutter_set_sign_backgrounds = 0 vim.g.gitgutter_map_keys = 0 -vim.keymap.set('n', 'ghp', ':GitGutterPreviewHunk') - +vim.keymap.set("n", "ghp", ":GitGutterPreviewHunk") ------------------------------------------------------------------------------- -- -- TreeSitter -- -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" - ensure_installed = { - "typescript", - "tsx", - "rust", - "haskell", - }, +require("nvim-treesitter.configs").setup({ + -- A list of parser names, or "all" + ensure_installed = { + "typescript", + "tsx", + "rust", + "haskell", + }, - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, - highlight = { - enable = true, - }, + highlight = { + enable = true, + }, - indent = { - enable = true, - }, -} + indent = { + enable = true, + }, +}) diff --git a/home/progs/nvim/nvim_nightly.nix b/home/progs/nvim/nvim_nightly.nix index 1c3ec6d..d41ee69 100644 --- a/home/progs/nvim/nvim_nightly.nix +++ b/home/progs/nvim/nvim_nightly.nix @@ -2,13 +2,13 @@ pkgs.neovim-unwrapped.overrideAttrs ( old: { - name = "neovim-nightly"; + name = "neovim-nightly"; version = "nightly"; src = pkgs.fetchFromGitHub { - owner = "neovim"; - repo = "neovim"; - rev = "f17d88c47a6a647f2230a61e7cd952926abc4473"; + owner = "neovim"; + repo = "neovim"; + rev = "f17d88c47a6a647f2230a61e7cd952926abc4473"; sha256 = "0lgbf90sbachdag1zm9pmnlbn35964l3khs27qy4462qzpqyi9fi"; }; diff --git a/home/progs/pass.nix b/home/progs/pass.nix index 9b98a28..9fc5889 100644 --- a/home/progs/pass.nix +++ b/home/progs/pass.nix @@ -14,9 +14,9 @@ in description = "Add and configure pass tool to manager your passwords"; }; }; - + config = mkIf cfg.enable { - home.packages = [pkgs.pass]; + home.packages = [ pkgs.pass ]; home.sessionVariables = { PASSWORD_STORE_DIR = "${pass_data_dir}/store"; diff --git a/home/progs/vifm/default.nix b/home/progs/vifm/default.nix index 1cf1a7d..14c2ef3 100644 --- a/home/progs/vifm/default.nix +++ b/home/progs/vifm/default.nix @@ -13,13 +13,13 @@ in description = "Add and configure vifm, a vi-like file manager"; }; }; - + config = mkIf cfg.enable { home.packages = with pkgs; [ - vifm # a vi-like file manager + vifm # a vi-like file manager ]; - - + + xdg.configFile = { "vifm/vifmrc".source = ./vifmrc; }; diff --git a/home/progs/zoxide.nix b/home/progs/zoxide.nix index 50fe219..046bed9 100644 --- a/home/progs/zoxide.nix +++ b/home/progs/zoxide.nix @@ -13,7 +13,7 @@ in description = "Add zoxide, a modern replacement for cd"; }; }; - + config = mkIf cfg.enable { programs.zoxide = { enable = true; diff --git a/home/shell/prompt/starship/default.nix b/home/shell/prompt/starship/default.nix index 32afcb3..d05bd7c 100644 --- a/home/shell/prompt/starship/default.nix +++ b/home/shell/prompt/starship/default.nix @@ -17,7 +17,7 @@ in description = "Enable starship cross-shell prompt"; }; }; - + config = mkIf cfg.enable { programs.starship = { enable = true; diff --git a/home/shell/zsh.nix b/home/shell/zsh.nix index a27e111..90f23ac 100644 --- a/home/shell/zsh.nix +++ b/home/shell/zsh.nix @@ -13,7 +13,7 @@ in description = "Add z shell"; }; }; - + config = mkIf cfg.enable { # fish and zsh support fo nix-shell home.packages = with pkgs; [ any-nix-shell ]; diff --git a/home/ui/betterlockscreen.nix b/home/ui/betterlockscreen.nix index 5e488d0..58488ac 100644 --- a/home/ui/betterlockscreen.nix +++ b/home/ui/betterlockscreen.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ...}: +{ lib, config, pkgs, ... }: with lib; @@ -16,7 +16,7 @@ in }; }; - + config = mkIf cfg.enable { services.betterlockscreen = { enable = true; @@ -35,7 +35,7 @@ in OnBootSec = "10s"; }; - Install = { + Install = { WantedBy = [ "graphical-session.target" "timers.target" ]; }; }; @@ -52,7 +52,7 @@ in ExecStart = "${package}/bin/betterlockscreen --update ${config.home.homeDirectory}/pictures/wallpapers"; }; - Install = { + Install = { WantedBy = [ "graphical-session.target" ]; }; }; diff --git a/home/ui/polybar/default.nix b/home/ui/polybar/default.nix index cad76ea..25f81f8 100644 --- a/home/ui/polybar/default.nix +++ b/home/ui/polybar/default.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ...}: +{ lib, config, pkgs, ... }: with lib; diff --git a/home/ui/xmonad/default.nix b/home/ui/xmonad/default.nix index 3472cb9..b24c925 100644 --- a/home/ui/xmonad/default.nix +++ b/home/ui/xmonad/default.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ...}: +{ lib, config, pkgs, ... }: with lib; @@ -17,10 +17,10 @@ in config = mkIf cfg.enable { home.packages = with pkgs; [ - xclip # access x clipboard from a console - dmenu # menu for x window system - flameshot # powerful yet simple to use screenshot software - nitrogen # wallpaper manager + xclip # access x clipboard from a console + dmenu # menu for x window system + flameshot # powerful yet simple to use screenshot software + nitrogen # wallpaper manager ]; xsession = { diff --git a/secrets.example.nix b/secrets.example.nix index cc73963..02e3606 100644 --- a/secrets.example.nix +++ b/secrets.example.nix @@ -13,13 +13,13 @@ userEmail = "bross@example.com"; # gpg --list-secret-keys gpgSigningKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" - }; + }; - emailAccounts = { - "personal" = { - flavor = "yandex.com"; - address = "bross@yandex.ru"; - passwordCommand = "pass show emails/bross@yandex.ru"; + emailAccounts = { + "personal" = { + flavor = "yandex.com"; + address = "bross@yandex.ru"; + passwordCommand = "pass show emails/bross@yandex.ru"; + }; }; - }; -} + } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9d94f72 --- /dev/null +++ b/shell.nix @@ -0,0 +1,8 @@ +{ pkgs ? import { } }: + +pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + nixpkgs-fmt + stylua + ]; +} diff --git a/system/configuration.nix b/system/configuration.nix index e0a325f..6af4467 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -44,7 +44,7 @@ in dbus = { enable = true; packages = [ pkgs.dconf ]; - }; + }; xserver = { enable = true; @@ -84,7 +84,7 @@ in "wheel" # Enable ‘sudo’ for the user. "networkmanager" "docker" - ]; + ]; shell = pkgs.zsh; }; diff --git a/system/machine/home/default.nix b/system/machine/home/default.nix index 5c3582d..13c06c3 100644 --- a/system/machine/home/default.nix +++ b/system/machine/home/default.nix @@ -5,7 +5,8 @@ let in { imports = - [ # Include the results of the hardware scan. + [ + # Include the results of the hardware scan. ./hardware-configuration.nix ]; diff --git a/system/machine/home/hardware-configuration.nix b/system/machine/home/hardware-configuration.nix index 9fd317e..2d6229f 100644 --- a/system/machine/home/hardware-configuration.nix +++ b/system/machine/home/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ]; @@ -14,18 +15,19 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/969c5f68-631d-4429-b81b-0d81e050449b"; + { + device = "/dev/disk/by-uuid/969c5f68-631d-4429-b81b-0d81e050449b"; fsType = "ext4"; }; fileSystems."/home" = - { device = "/dev/disk/by-uuid/e17fb0c0-9482-436d-83e8-3760772fe9b8"; + { + device = "/dev/disk/by-uuid/e17fb0c0-9482-436d-83e8-3760772fe9b8"; fsType = "ext4"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/1be15503-cd51-4c57-bb91-04f45a964202"; } - ]; + [{ device = "/dev/disk/by-uuid/1be15503-cd51-4c57-bb91-04f45a964202"; }]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's