From 0e4408a3fd598ca0d29c5a17f55968bea167f0b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 13:30:20 +0100 Subject: [PATCH 01/18] fix: Update keymap for todo-comments and enable markdown plugins --- modules/programs/nvim/new_plugins/other.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/programs/nvim/new_plugins/other.nix b/modules/programs/nvim/new_plugins/other.nix index 3107253..26433f6 100644 --- a/modules/programs/nvim/new_plugins/other.nix +++ b/modules/programs/nvim/new_plugins/other.nix @@ -19,7 +19,7 @@ in { plugins.todo-comments = { enable = true; - keymaps.todoTelescope.key = "fc"; + keymaps.todoTelescope.key = "ft"; }; } @@ -61,6 +61,7 @@ in { plugins.obsidian.enable = true; plugins.obsidian.settings = { + ui.enable = false; dir = "~/Documents/Nextcloud/Notes/zettelkasten/"; note_id_func.__raw = '' function(title) @@ -86,6 +87,13 @@ in }; performance.combinePlugins.standalonePlugins = [ "mini.nvim" ]; } + { plugins.markdown-preview.enable = true; } + { + plugins.render-markdown = { + enable = true; + settings.latex.enable = false; + }; + } ]; }; } From 8cde6f4ea7cd793297853fcb9390f4da6307b9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 14:43:47 +0100 Subject: [PATCH 02/18] feat: Add new Nvim plugins configuration files --- modules/programs/nvim/new_plugins/comment.nix | 0 modules/programs/nvim/new_plugins/crates-nvim.nix | 0 modules/programs/nvim/new_plugins/direnv.nix | 0 modules/programs/nvim/new_plugins/friendly-snippets.nix | 0 modules/programs/nvim/new_plugins/fugitive.nix | 0 modules/programs/nvim/new_plugins/gitsigns.nix | 0 modules/programs/nvim/new_plugins/helpview.nix | 0 modules/programs/nvim/new_plugins/hmts.nix | 0 modules/programs/nvim/new_plugins/keymaps.nix | 0 modules/programs/nvim/new_plugins/lastplace.nix | 0 modules/programs/nvim/new_plugins/markdown-preview.nix | 0 modules/programs/nvim/new_plugins/marks.nix | 0 modules/programs/nvim/new_plugins/mini.nix | 0 modules/programs/nvim/new_plugins/nvim-autopairs.nix | 0 modules/programs/nvim/new_plugins/obsidian.nix | 0 modules/programs/nvim/new_plugins/oil.nix | 0 modules/programs/nvim/new_plugins/render-markdown.nix | 0 modules/programs/nvim/new_plugins/todo-comments.nix | 0 modules/programs/nvim/new_plugins/ts-context-commentstring.nix | 0 modules/programs/nvim/new_plugins/vim-surround.nix | 0 modules/programs/nvim/new_plugins/vimtex.nix | 0 modules/programs/nvim/new_plugins/which-key.nix | 0 22 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 modules/programs/nvim/new_plugins/comment.nix create mode 100644 modules/programs/nvim/new_plugins/crates-nvim.nix create mode 100644 modules/programs/nvim/new_plugins/direnv.nix create mode 100644 modules/programs/nvim/new_plugins/friendly-snippets.nix create mode 100644 modules/programs/nvim/new_plugins/fugitive.nix create mode 100644 modules/programs/nvim/new_plugins/gitsigns.nix create mode 100644 modules/programs/nvim/new_plugins/helpview.nix create mode 100644 modules/programs/nvim/new_plugins/hmts.nix create mode 100644 modules/programs/nvim/new_plugins/keymaps.nix create mode 100644 modules/programs/nvim/new_plugins/lastplace.nix create mode 100644 modules/programs/nvim/new_plugins/markdown-preview.nix create mode 100644 modules/programs/nvim/new_plugins/marks.nix create mode 100644 modules/programs/nvim/new_plugins/mini.nix create mode 100644 modules/programs/nvim/new_plugins/nvim-autopairs.nix create mode 100644 modules/programs/nvim/new_plugins/obsidian.nix create mode 100644 modules/programs/nvim/new_plugins/oil.nix create mode 100644 modules/programs/nvim/new_plugins/render-markdown.nix create mode 100644 modules/programs/nvim/new_plugins/todo-comments.nix create mode 100644 modules/programs/nvim/new_plugins/ts-context-commentstring.nix create mode 100644 modules/programs/nvim/new_plugins/vim-surround.nix create mode 100644 modules/programs/nvim/new_plugins/vimtex.nix create mode 100644 modules/programs/nvim/new_plugins/which-key.nix diff --git a/modules/programs/nvim/new_plugins/comment.nix b/modules/programs/nvim/new_plugins/comment.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/crates-nvim.nix b/modules/programs/nvim/new_plugins/crates-nvim.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/direnv.nix b/modules/programs/nvim/new_plugins/direnv.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/friendly-snippets.nix b/modules/programs/nvim/new_plugins/friendly-snippets.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/fugitive.nix b/modules/programs/nvim/new_plugins/fugitive.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/gitsigns.nix b/modules/programs/nvim/new_plugins/gitsigns.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/helpview.nix b/modules/programs/nvim/new_plugins/helpview.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/hmts.nix b/modules/programs/nvim/new_plugins/hmts.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/keymaps.nix b/modules/programs/nvim/new_plugins/keymaps.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/lastplace.nix b/modules/programs/nvim/new_plugins/lastplace.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/markdown-preview.nix b/modules/programs/nvim/new_plugins/markdown-preview.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/marks.nix b/modules/programs/nvim/new_plugins/marks.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/mini.nix b/modules/programs/nvim/new_plugins/mini.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/nvim-autopairs.nix b/modules/programs/nvim/new_plugins/nvim-autopairs.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/obsidian.nix b/modules/programs/nvim/new_plugins/obsidian.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/oil.nix b/modules/programs/nvim/new_plugins/oil.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/render-markdown.nix b/modules/programs/nvim/new_plugins/render-markdown.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/todo-comments.nix b/modules/programs/nvim/new_plugins/todo-comments.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/ts-context-commentstring.nix b/modules/programs/nvim/new_plugins/ts-context-commentstring.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/vim-surround.nix b/modules/programs/nvim/new_plugins/vim-surround.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/vimtex.nix b/modules/programs/nvim/new_plugins/vimtex.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/programs/nvim/new_plugins/which-key.nix b/modules/programs/nvim/new_plugins/which-key.nix new file mode 100644 index 0000000..e69de29 From d3ce1b22c4f37c3549fd4668a4856519baf09827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme=22=20=28aider=29?= Date: Fri, 22 Nov 2024 14:43:50 +0100 Subject: [PATCH 03/18] refactor: Split plugin configurations from other.nix into separate files --- modules/programs/nvim/new_plugins/comment.nix | 10 ++ .../programs/nvim/new_plugins/crates-nvim.nix | 10 ++ modules/programs/nvim/new_plugins/direnv.nix | 10 ++ .../nvim/new_plugins/friendly-snippets.nix | 10 ++ .../programs/nvim/new_plugins/fugitive.nix | 10 ++ .../programs/nvim/new_plugins/gitsigns.nix | 10 ++ .../programs/nvim/new_plugins/helpview.nix | 11 +++ modules/programs/nvim/new_plugins/hmts.nix | 11 +++ modules/programs/nvim/new_plugins/keymaps.nix | 15 +++ .../programs/nvim/new_plugins/lastplace.nix | 10 ++ .../nvim/new_plugins/markdown-preview.nix | 10 ++ modules/programs/nvim/new_plugins/marks.nix | 13 +++ modules/programs/nvim/new_plugins/mini.nix | 16 +++ .../nvim/new_plugins/nvim-autopairs.nix | 10 ++ .../programs/nvim/new_plugins/obsidian.nix | 29 ++++++ modules/programs/nvim/new_plugins/oil.nix | 10 ++ modules/programs/nvim/new_plugins/other.nix | 99 ------------------- .../nvim/new_plugins/render-markdown.nix | 13 +++ .../nvim/new_plugins/todo-comments.nix | 13 +++ .../new_plugins/ts-context-commentstring.nix | 10 ++ .../nvim/new_plugins/vim-surround.nix | 10 ++ modules/programs/nvim/new_plugins/vimtex.nix | 13 +++ .../programs/nvim/new_plugins/which-key.nix | 10 ++ 23 files changed, 264 insertions(+), 99 deletions(-) delete mode 100644 modules/programs/nvim/new_plugins/other.nix diff --git a/modules/programs/nvim/new_plugins/comment.nix b/modules/programs/nvim/new_plugins/comment.nix index e69de29..7dd0ae1 100644 --- a/modules/programs/nvim/new_plugins/comment.nix +++ b/modules/programs/nvim/new_plugins/comment.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.comment.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/crates-nvim.nix b/modules/programs/nvim/new_plugins/crates-nvim.nix index e69de29..dd50bfd 100644 --- a/modules/programs/nvim/new_plugins/crates-nvim.nix +++ b/modules/programs/nvim/new_plugins/crates-nvim.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.crates-nvim.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/direnv.nix b/modules/programs/nvim/new_plugins/direnv.nix index e69de29..3f6922a 100644 --- a/modules/programs/nvim/new_plugins/direnv.nix +++ b/modules/programs/nvim/new_plugins/direnv.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.direnv.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/friendly-snippets.nix b/modules/programs/nvim/new_plugins/friendly-snippets.nix index e69de29..9c64552 100644 --- a/modules/programs/nvim/new_plugins/friendly-snippets.nix +++ b/modules/programs/nvim/new_plugins/friendly-snippets.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.friendly-snippets.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/fugitive.nix b/modules/programs/nvim/new_plugins/fugitive.nix index e69de29..97d5d11 100644 --- a/modules/programs/nvim/new_plugins/fugitive.nix +++ b/modules/programs/nvim/new_plugins/fugitive.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.fugitive.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/gitsigns.nix b/modules/programs/nvim/new_plugins/gitsigns.nix index e69de29..2e1db6e 100644 --- a/modules/programs/nvim/new_plugins/gitsigns.nix +++ b/modules/programs/nvim/new_plugins/gitsigns.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.gitsigns.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/helpview.nix b/modules/programs/nvim/new_plugins/helpview.nix index e69de29..6b00df4 100644 --- a/modules/programs/nvim/new_plugins/helpview.nix +++ b/modules/programs/nvim/new_plugins/helpview.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.helpview.enable = true; + performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ]; + }; +} diff --git a/modules/programs/nvim/new_plugins/hmts.nix b/modules/programs/nvim/new_plugins/hmts.nix index e69de29..041793f 100644 --- a/modules/programs/nvim/new_plugins/hmts.nix +++ b/modules/programs/nvim/new_plugins/hmts.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.hmts.enable = true; + performance.combinePlugins.standalonePlugins = [ "hmts.nvim" ]; + }; +} diff --git a/modules/programs/nvim/new_plugins/keymaps.nix b/modules/programs/nvim/new_plugins/keymaps.nix index e69de29..7c14693 100644 --- a/modules/programs/nvim/new_plugins/keymaps.nix +++ b/modules/programs/nvim/new_plugins/keymaps.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + keymaps = [ + { key = ""; action = "noh"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; } + { key = "<"; action = " Date: Fri, 22 Nov 2024 15:59:59 +0100 Subject: [PATCH 04/18] feat: add more obsidian keybinds --- modules/programs/nvim/new_plugins/obsidian.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/programs/nvim/new_plugins/obsidian.nix b/modules/programs/nvim/new_plugins/obsidian.nix index 70d9f8b..cac1f45 100644 --- a/modules/programs/nvim/new_plugins/obsidian.nix +++ b/modules/programs/nvim/new_plugins/obsidian.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, inputs, ... }: +_: -let - inherit (lib) mkEnableOption mkIf readFile; -in { home-manager.users.moritz.programs.nixvim = { plugins.obsidian = { @@ -23,6 +20,16 @@ in end end ''; + mappings = { + "n" = { action.__raw = ''function() return vim.cmd("ObsidianNew") end''; opts.desc = "New Note"; opts.buffer = true; }; + "q" = { action.__raw = ''function() return vim.cmd("ObsidianQuickSwitch") end''; opts.desc = "Quick Switch"; opts.buffer = true; }; + "b" = { action.__raw = ''function() return vim.cmd("ObsidianBacklinks") end''; opts.desc = "Backlinks"; opts.buffer = true; }; + "l" = { action.__raw = ''function() return vim.cmd("ObsidianLink") end''; opts.desc = "Link"; opts.buffer = true; }; + "e" = { action.__raw = ''function() return vim.cmd("ObsidianExtractNote") end''; opts.desc = "Extract Note"; opts.buffer = true; }; + "r" = { action.__raw = ''function() return vim.cmd("ObsidianRename") end''; opts.desc = "Rename"; opts.buffer = true; }; + "" = { action.__raw = ''function() return require("obsidian").util.smart_action() end''; opts.buffer = true; opts.expr = true; }; + "gf" = { action.__raw = ''function() return require("obsidian").util.gf_passthrough() end''; opts = { noremap = false; expr = true; buffer = true; }; }; + }; }; }; }; From bf7928d3cceb428ed944e11542b73f394086ee58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 16:00:28 +0100 Subject: [PATCH 05/18] feat(nvim): add command search keybind --- modules/programs/nvim/new_plugins/telescope.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/programs/nvim/new_plugins/telescope.nix b/modules/programs/nvim/new_plugins/telescope.nix index a0f6b4b..539ce73 100644 --- a/modules/programs/nvim/new_plugins/telescope.nix +++ b/modules/programs/nvim/new_plugins/telescope.nix @@ -31,6 +31,10 @@ _: action = "oldfiles"; options.desc = "Recent files"; }; + "fc" = { + action = "commands"; + options.desc = "Commands"; + }; }; }; web-devicons.enable = true; From 021a7dae5b27d1c609a2e021cf813dc00eda0e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 16:00:54 +0100 Subject: [PATCH 06/18] feat(nvim): simplify keybinds --- modules/programs/nvim/new_plugins/conform.nix | 2 +- modules/programs/nvim/new_plugins/lspsaga.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/programs/nvim/new_plugins/conform.nix b/modules/programs/nvim/new_plugins/conform.nix index a8b94f3..7e3ca5b 100644 --- a/modules/programs/nvim/new_plugins/conform.nix +++ b/modules/programs/nvim/new_plugins/conform.nix @@ -66,7 +66,7 @@ in "conform.nvim" ]; keymaps = [ - { key = "cf"; action.__raw = ''function() require("conform").format() end''; options.desc = "Format current file"; } + { key = "="; action.__raw = ''function() require("conform").format() end''; options.desc = "Format current file"; } ]; }; diff --git a/modules/programs/nvim/new_plugins/lspsaga.nix b/modules/programs/nvim/new_plugins/lspsaga.nix index 6b60349..b47f969 100644 --- a/modules/programs/nvim/new_plugins/lspsaga.nix +++ b/modules/programs/nvim/new_plugins/lspsaga.nix @@ -16,9 +16,9 @@ in keymapsOnEvents = { LspAttach = [ { - key = "cc"; + key = "q"; action = "Lspsaga code_action"; - options.desc = "Code Action"; + options.desc = "Quickfix"; options.buffer = true; } { @@ -28,7 +28,7 @@ in options.buffer = true; } { - key = "cr"; + key = "r"; action = "Lspsaga rename"; options.desc = "Rename"; options.buffer = true; From 39a5189c0d029b9ccc8afca1acc1a0b9c897f82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 16:01:22 +0100 Subject: [PATCH 07/18] chore: ignore aider files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7dcd526..d6230a0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ tmp/ .direnv/ .pre-commit-config.yaml +.aider* +.env From 1008e6035f7df2e0d7cb4c3f5a64c38440a9f3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:31:12 +0100 Subject: [PATCH 08/18] fix(base): remove redundant nvd script --- modules/profiles/base.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 6d301d6..2513511 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -311,10 +311,4 @@ in }; xdg.userDirs.enable = true; }; - - system.activationScripts.diff = '' - if [ -e /run/current-system ]; then - ${pkgs.nvd}/bin/nvd --nix-bin-dir ${pkgs.nix}/bin diff /run/current-system/ "$systemConfig" - fi - ''; } From 4f0d0de4d6668165c343e957a199ffcfecd81e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:31:47 +0100 Subject: [PATCH 09/18] chore: clean up inputs --- flake.lock | 208 +++++++---------------------------------------------- flake.nix | 54 ++++++-------- 2 files changed, 46 insertions(+), 216 deletions(-) diff --git a/flake.lock b/flake.lock index 2dcff6d..85637e2 100644 --- a/flake.lock +++ b/flake.lock @@ -196,22 +196,6 @@ } }, "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_5": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -225,7 +209,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_6": { + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1696426674, @@ -301,27 +285,6 @@ "type": "indirect" } }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "nix-super", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -423,37 +386,6 @@ "type": "github" } }, - "git-hooks-nix": { - "inputs": { - "flake-compat": [ - "nix-super" - ], - "gitignore": [ - "nix-super" - ], - "nixpkgs": [ - "nix-super", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nix-super", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721042469, - "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "git-hooks_2": { "inputs": { "flake-compat": [ @@ -857,23 +789,6 @@ "type": "github" } }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1715853528, - "narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96", - "type": "github" - }, - "original": { - "owner": "libgit2", - "ref": "v1.8.1", - "repo": "libgit2", - "type": "github" - } - }, "master": { "locked": { "lastModified": 1729839280, @@ -1011,30 +926,6 @@ "type": "github" } }, - "nix-super": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-parts": "flake-parts_4", - "git-hooks-nix": "git-hooks-nix", - "libgit2": "libgit2", - "nixpkgs": "nixpkgs_6", - "nixpkgs-23-11": "nixpkgs-23-11", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1723852416, - "narHash": "sha256-iEwS5PbPBk433xZ5/Ll5hzOU9K2MAE6iqYh8EYoaIgk=", - "owner": "privatevoid-net", - "repo": "nix-super", - "rev": "7bf3b90d4d67b18d4cbfe28fd5d786aab17d009b", - "type": "github" - }, - "original": { - "owner": "privatevoid-net", - "repo": "nix-super", - "type": "github" - } - }, "nixos-facter-modules": { "locked": { "lastModified": 1728725827, @@ -1066,22 +957,6 @@ "type": "github" } }, - "nixpkgs-23-11": { - "locked": { - "lastModified": 1717159533, - "narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - } - }, "nixpkgs-lib": { "locked": { "lastModified": 1727825735, @@ -1094,22 +969,6 @@ "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" } }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1726062281, @@ -1174,22 +1033,6 @@ "type": "github" } }, - "nixpkgs_10": { - "locked": { - "lastModified": 1692934111, - "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1725194671, @@ -1255,22 +1098,6 @@ } }, "nixpkgs_6": { - "locked": { - "lastModified": 1723688146, - "narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c3d4ac725177c030b1e289015989da2ad9d56af0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { "locked": { "lastModified": 1729788628, "narHash": "sha256-3suayUinicnvE/4shMZwp9FHT5izUM8gMpdEO/NHBTo=", @@ -1286,7 +1113,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { "lastModified": 1729665710, "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", @@ -1302,7 +1129,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { "lastModified": 1719082008, "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", @@ -1318,12 +1145,28 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1692934111, + "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": [ "devshell" ], - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_4", "flake-parts": [ "flake-parts" ], @@ -1332,7 +1175,7 @@ "home-manager" ], "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_7", "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, @@ -1414,9 +1257,9 @@ }, "pre-commit-hooks_2": { "inputs": { - "flake-compat": "flake-compat_6", + "flake-compat": "flake-compat_5", "gitignore": "gitignore_4", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { @@ -1469,9 +1312,8 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", "nix-monitored": "nix-monitored", - "nix-super": "nix-super", "nixos-facter-modules": "nixos-facter-modules", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "nixvim": "nixvim", "nur": "nur", "pre-commit-hooks": "pre-commit-hooks_2", @@ -1589,7 +1431,7 @@ "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_9", "utils": "utils" }, "locked": { diff --git a/flake.nix b/flake.nix index bebb754..72baa12 100644 --- a/flake.nix +++ b/flake.nix @@ -5,25 +5,36 @@ # Nix agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.url = "github:ryantm/agenix"; + devshell.url = "github:numtide/devshell"; + disko.url = "github:nix-community/disko"; + flake-parts.url = "github:hercules-ci/flake-parts"; flake-utils.url = "github:numtide/flake-utils"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; + impermanence.url = "github:nix-community/impermanence"; + master.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; stable.url = "github:nixos/nixpkgs/nixos-24.05"; + + pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + nur.url = "github:nix-community/NUR"; + nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; - # Programs - nix-super.url = "github:privatevoid-net/nix-super"; + nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; + nix-monitored.url = "github:ners/nix-monitored"; nix-monitored.inputs.nixpkgs.follows = "nixpkgs"; + + # Programs timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git"; # Neovim @@ -55,9 +66,6 @@ arkenfox-userjs.flake = false; ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty"; - # ghostty.url = "/home/moritz/Documents/ghostty"; - - nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; }; outputs = inputs@{ self, flake-parts, ... }: @@ -80,29 +88,6 @@ sudo EDITOR="${pkgs.lib.getExe pkgs.vim}" ${pkgs.lib.getExe' inputs'.agenix.packages.default "agenix"} --identity /etc/ssh/ssh_host_ed25519_key "$@" ''; } - { - name = "build"; - help = "use nom to build system"; - command = - '' - nom build --no-link ".#nixosConfigurations.$(hostname).config.system.build.toplevel" $@ - ''; - } - { - name = "apply"; - help = "wrapper for nixos-rebuild switch"; - command = "sudo nixos-rebuild switch --flake . $@"; - } - { - name = "test"; - help = "wrapper for nixos-rebuild switch"; - command = "sudo nixos-rebuild test --flake . $@"; - } - { - name = "boot"; - help = "wrapper for nixos-rebuild switch"; - command = "sudo nixos-rebuild boot --flake . $@"; - } { name = "vim-startuptime"; help = "test vim startup time"; @@ -113,6 +98,7 @@ stylua sumneko-lua-language-server nixpkgs-fmt + nh ]; }; @@ -181,16 +167,18 @@ nixConfig = { extra-substituters = [ - "https://hyprland.cachix.org" + # "https://hyprland.cachix.org" "https://nix-community.cachix.org" "https://pre-commit-hooks.cachix.org" - "https://ghostty.cachix.org" + # "https://ghostty.cachix.org" + "https://cache.lix.systems" ]; extra-trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + # "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" - "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + # "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" ]; }; } From 5077fd6a2bfa362def5850da5cf00746b74cd942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:32:25 +0100 Subject: [PATCH 10/18] feat(laptop): enable ai features --- hosts/nixos-laptop/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 48f97f7..00c29a2 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -12,6 +12,7 @@ facter.reportPath = ./facter.json; my = { + ai.enable = true; virtualisation.libvirtd.enable = true; yubikey.luksSupport.enable = false; profiles = { From e05684c279f06d9f91f559461b9cb5d267178c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:32:47 +0100 Subject: [PATCH 11/18] fix(laptop): kanshi settings --- hosts/nixos-laptop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 00c29a2..b9e84ba 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -38,14 +38,14 @@ ]; } { - profile.name = "docked"; + profile.name = "docked-scads"; profile.outputs = [ { criteria = "eDP-1"; position = "640,1800"; # NOTE: 2160 / 1.2 = 1800 } { - criteria = "DP-3"; + criteria = "Dell Inc. DELL S2721QS DWTC513"; scale = 1.2; position = "0,0"; } From baa7a7eabb7a457d40c3b2ea4c6d5f44d82ade32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:33:26 +0100 Subject: [PATCH 12/18] feat(river): add passthrough mode --- modules/programs/river/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/programs/river/default.nix b/modules/programs/river/default.nix index 7b3692c..48c6f72 100644 --- a/modules/programs/river/default.nix +++ b/modules/programs/river/default.nix @@ -66,6 +66,9 @@ in open = "spawn 'wlr-randr --output eDP-1 --on'"; }; map = { + passthrough = { + "Super F11" = "enter-mode normal"; + }; normal = { "Super Q" = "close"; "Super Return" = "spawn '${config.my.terminal.package}'"; @@ -103,6 +106,8 @@ in "None XF86AudioNext" = "spawn 'playerctl -p spotifyd,firefox next'"; "None XF86AudioPlay" = "spawn 'playerctl -p spotifyd,firefox play-pause'"; "None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'"; + + "Super F11" = "enter-mode passthrough"; } // # tags ( From c6968d57dcb325f33c5047ec2a95492e732ac48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:34:16 +0100 Subject: [PATCH 13/18] chore(river): remove unused alsa 32bit support --- modules/programs/river/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/river/default.nix b/modules/programs/river/default.nix index 48c6f72..a1e5033 100644 --- a/modules/programs/river/default.nix +++ b/modules/programs/river/default.nix @@ -262,7 +262,6 @@ in pipewire = { enable = true; alsa.enable = true; - alsa.support32Bit = true; pulse.enable = true; }; displayManager = { From 707cbcca9ed648a45b1e043e1aed979eea3908ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 18 Nov 2024 09:34:34 +0100 Subject: [PATCH 14/18] feat(laptop): add wl-clipboard --- hosts/nixos-laptop/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index b9e84ba..ddb2858 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -26,7 +26,10 @@ services.mullvad.enable = true; }; - users.users.moritz.packages = [ pkgs.poetry ]; + users.users.moritz.packages = with pkgs; [ + poetry + wl-clipboard + ]; home-manager.users.moritz.services.kanshi.settings = [ { From 04407a5726d081cad236cb1d969b6b842a762d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 22 Nov 2024 19:47:22 +0100 Subject: [PATCH 15/18] feat: add offline search --- flake.lock | 108 +++++++++++++++++++++++++++-- flake.nix | 25 ++++++- hosts/nixos-laptop/default.nix | 1 - modules/config/terminal.nix | 1 + modules/programs/python.nix | 2 +- modules/programs/river/default.nix | 4 +- 6 files changed, 130 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 85637e2..b8cda3e 100644 --- a/flake.lock +++ b/flake.lock @@ -339,6 +339,24 @@ "type": "github" } }, + "flake-utils_4": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "ghostty": { "inputs": { "nixpkgs-stable": "nixpkgs-stable", @@ -789,6 +807,32 @@ "type": "github" } }, + "ixx_2": { + "inputs": { + "flake-utils": [ + "search", + "flake-utils" + ], + "nixpkgs": [ + "search", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.6", + "repo": "ixx", + "type": "github" + } + }, "master": { "locked": { "lastModified": 1729839280, @@ -1033,6 +1077,22 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1692934111, + "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1725194671, @@ -1147,16 +1207,16 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1692934111, - "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1318,10 +1378,31 @@ "nur": "nur", "pre-commit-hooks": "pre-commit-hooks_2", "river": "river", + "search": "search", "stable": "stable", "timers": "timers" } }, + "search": { + "inputs": { + "flake-utils": "flake-utils_4", + "ixx": "ixx_2", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1731874326, + "narHash": "sha256-FVodEap6GQT/1DSG5KOcpsrKXfG9gMNObQxW+HNJnW8=", + "owner": "NuschtOS", + "repo": "search", + "rev": "64832c4cf885350ad0e63a27fd7055bcfc7955f6", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "stable": { "locked": { "lastModified": 1729691686, @@ -1428,10 +1509,25 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_10", "utils": "utils" }, "locked": { @@ -1471,7 +1567,7 @@ }, "utils": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1692799911, diff --git a/flake.nix b/flake.nix index 72baa12..2b1d3bc 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,8 @@ arkenfox-userjs.url = "github:arkenfox/user.js"; arkenfox-userjs.flake = false; + search.url = "github:NuschtOS/search"; + ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty"; }; @@ -115,7 +117,28 @@ }; legacyPackages = pkgs; - + packages = + let + modules = [ + { name = "My stuff"; } + ]; + mkName = name: "${name} Search"; + mkSearch = name: value: inputs'.search.packages.mkSearch { + urlPrefix = "file://${self}/flake.nix"; + title = mkName name; + optionsJSON = "${(pkgs.nixosOptionsDoc { inherit (value) options; warningsAreErrors = false; }).optionsJSON}/share/doc/nixos/options.json"; + }; + serveSearch = name: value: + pkgs.writeShellApplication { + name = mkName name; + text = '' + xdg-open http://127.0.0.1:8080 + static-web-server -p 8080 -d ${mkSearch name value} + ''; + runtimeInputs = with pkgs; [ static-web-server xdg-utils ]; + }; + in + pkgs.lib.mapAttrs serveSearch self.nixosConfigurations; }; flake = { diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index ddb2858..072bab7 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -21,7 +21,6 @@ webis.enable = true; impermanence.enable = true; }; - terminal.package = pkgs.kitty; programs.exercism.enable = true; services.mullvad.enable = true; }; diff --git a/modules/config/terminal.nix b/modules/config/terminal.nix index dbae99b..871e9bd 100644 --- a/modules/config/terminal.nix +++ b/modules/config/terminal.nix @@ -6,6 +6,7 @@ with lib; { options.my.terminal = { package = mkOption { + description = "Terminal emulator package to use. Gets converted to path of bin automatically."; type = types.package; apply = lib.getExe; }; diff --git a/modules/programs/python.nix b/modules/programs/python.nix index 41c4959..9fbfb26 100644 --- a/modules/programs/python.nix +++ b/modules/programs/python.nix @@ -10,7 +10,7 @@ let cfg = config.my.programs.python; - pythonVersions = map (version: "3${toString version}") (range 8 13); + pythonVersions = map (version: "3${toString version}") (range 9 13); enabledVersions = filterAttrs (_: value: value.enable) cfg.versions; pythonPackages = version: attrNames pkgs."python${version}Packages"; diff --git a/modules/programs/river/default.nix b/modules/programs/river/default.nix index a1e5033..5436ea1 100644 --- a/modules/programs/river/default.nix +++ b/modules/programs/river/default.nix @@ -15,10 +15,10 @@ in enable = mkEnableOption "river"; keyboardLayouts = mkOption { type = types.listOf types.str; - description = "list of keyboard layouts"; + description = "List of keyboard layouts."; default = [ "us" "de" ]; }; - nvidiaSupport = mkEnableOption "nvidiaSupport"; + nvidiaSupport = mkEnableOption "nvidia gpu support"; }; config = mkIf cfg.enable { From 7835fa3af083c6afc033f954c07ff142b1ba7ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 10 Dec 2024 09:22:04 +0100 Subject: [PATCH 16/18] feat: enable spotify --- modules/profiles/work.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/profiles/work.nix b/modules/profiles/work.nix index a45d067..ae07ce5 100644 --- a/modules/profiles/work.nix +++ b/modules/profiles/work.nix @@ -15,7 +15,7 @@ in config = mkIf cfg.enable { my = { programs = { - spotify-player.enable = false; + spotify-player.enable = true; ssh.enable = mkForce false; git.identity.email = mkDefault "moritz.boehme@l.de"; miracast.enable = mkDefault true; From 1c0ed95ad885484a5a63a499df2798791cb3628d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 10 Dec 2024 09:22:18 +0100 Subject: [PATCH 17/18] fix: podman stuff --- modules/profiles/work.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/profiles/work.nix b/modules/profiles/work.nix index ae07ce5..7267598 100644 --- a/modules/profiles/work.nix +++ b/modules/profiles/work.nix @@ -44,10 +44,10 @@ in gnumake pavucontrol poetry + podman-compose ]; networking.networkmanager.enableStrongSwan = true; - virtualisation.podman.dockerSocket.enable = true; systemd.user.tmpfiles.rules = [ "L /run/user/1000/docker.sock - - - - /run/user/1000/podman/podman.sock" ]; }; } From 9770d0fe9542ada6daf969f6eda1e7fd3509be70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 10 Dec 2024 15:12:39 +0100 Subject: [PATCH 18/18] feat: add niri module --- flake.lock | 547 ++++++++++++++++++++--------- flake.nix | 5 + modules/config/theming/default.nix | 4 +- modules/profiles/base.nix | 4 +- modules/programs/niri.nix | 258 ++++++++++++++ 5 files changed, 654 insertions(+), 164 deletions(-) create mode 100644 modules/programs/niri.nix diff --git a/flake.lock b/flake.lock index b8cda3e..ade90e2 100644 --- a/flake.lock +++ b/flake.lock @@ -43,11 +43,11 @@ ] }, "locked": { - "lastModified": 1729527199, - "narHash": "sha256-D5/YksfRga8Akd04ZtIkuYSIOjXVrAzQIQBSeplokzU=", + "lastModified": 1731959031, + "narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "8d732fa8aff8b12ef2b1e2f00fc8153e41312b72", + "rev": "4468981c1c50999f315baa1508f0e53c4ee70c52", "type": "github" }, "original": { @@ -59,11 +59,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1724661688, - "narHash": "sha256-XLswsa2u2qsUPsLYRYn6lwis7VwSjAW6BRNdI4brbSM=", + "lastModified": 1731156949, + "narHash": "sha256-0qwqVc3hrpbQMMJOhbelSrR8cZOqLLWs4T+qyeHfiAc=", "owner": "arkenfox", "repo": "user.js", - "rev": "f906f7f3b41fe3f6aaa744980431f4fdcd086379", + "rev": "eae5762d29f18115fbffd73d89bd9e2510b25427", "type": "github" }, "original": { @@ -134,11 +134,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1729712798, - "narHash": "sha256-a+Aakkb+amHw4biOZ0iMo8xYl37uUL48YEXIC5PYJ/8=", + "lastModified": 1733168902, + "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=", "owner": "nix-community", "repo": "disko", - "rev": "09a776702b004fdf9c41a024e1299d575ee18a7d", + "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5", "type": "github" }, "original": { @@ -166,11 +166,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "type": "github" }, "original": { @@ -230,11 +230,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -251,11 +251,11 @@ ] }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -273,11 +273,11 @@ ] }, "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -285,16 +285,37 @@ "type": "indirect" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -326,11 +347,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -364,11 +385,11 @@ "zig": "zig" }, "locked": { - "lastModified": 1729829295, - "narHash": "sha256-r9bRVnLdsLPsuFb+iqUiKzxgSHWAOCt9BYxNWKwHy9Y=", + "lastModified": 1733783261, + "narHash": "sha256-SnLO3H9RKzqwEqpsjGIm4XWaiznK8H6kJBxFprgTyeY=", "ref": "refs/heads/main", - "rev": "582b8d039a9e36a370c9a60d702e27e06dc2e19d", - "revCount": 7809, + "rev": "5dcca19038f57519e91dbd6d5510978bb8553909", + "revCount": 8194, "type": "git", "url": "ssh://git@github.com/ghostty-org/ghostty" }, @@ -391,11 +412,11 @@ ] }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1733665616, + "narHash": "sha256-+XTFXYlFJBxohhMGLDpYdEnhUNdxN8dyTA8WAd+lh2A=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "d8c02f0ffef0ef39f6063731fc539d8c71eb463a", "type": "github" }, "original": { @@ -421,11 +442,11 @@ ] }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1733318908, + "narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "6f4e2a2112050951a314d2733a994fbab94864c6", "type": "github" }, "original": { @@ -530,11 +551,11 @@ ] }, "locked": { - "lastModified": 1724947644, - "narHash": "sha256-MHHrHasTngp7EYQOObHJ1a/IsRF+wodHqOckhH6uZbk=", + "lastModified": 1733333617, + "narHash": "sha256-nMMQXREGvLOLvUa0ByhYFdaL0Jov0t1wzLbKjr05P2w=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "dba4367b9a9d9615456c430a6d6af716f6e84cef", + "rev": "56f8ea8d502c87cf62444bec4ee04512e8ea24ea", "type": "github" }, "original": { @@ -571,11 +592,11 @@ ] }, "locked": { - "lastModified": 1729716953, - "narHash": "sha256-FbRKGRRd0amsk/WS/UV9ukJ8jT1dZ2pJBISxkX+uq6A=", + "lastModified": 1733769654, + "narHash": "sha256-aVvYDt8eitZVF6fdOrSoIzYRkQ5Gh6kfRvqkiaDRLL0=", "owner": "nix-community", "repo": "home-manager", - "rev": "a4353cc43d1b4dd6bdeacea90eb92a8b7b78a9d7", + "rev": "e952e94955dcc6fa2120c1430789fc41363f5237", "type": "github" }, "original": { @@ -589,11 +610,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1729224425, - "narHash": "sha256-w9dNUedNe2qnhHuhcRf7A1l29+/6DxdMfwN6g4U3c/w=", + "lastModified": 1733056338, + "narHash": "sha256-sp14z0mrqrtmouz1+bU4Jh8/0xi+xwQHF2l7mhGSSVU=", "owner": "hyprwm", "repo": "contrib", - "rev": "d72bc8b1cd30d448bd438e8328f8eeb4c0f2ddb6", + "rev": "d7c55140f1785b8d9fef351f1cd2a4c9e1eaa466", "type": "github" }, "original": { @@ -631,11 +652,42 @@ "type": "github" } }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1733248371, + "narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, "hyprland": { "inputs": { "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", "hyprland-protocols": "hyprland-protocols", + "hyprland-qtutils": "hyprland-qtutils", "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", @@ -645,11 +697,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1729781453, - "narHash": "sha256-vSZSNXXNEPN5JJcUobCBl6FaDvXjmLHhAJWoX3ZmHUQ=", + "lastModified": 1733794835, + "narHash": "sha256-QuWCtRJS/CwejkdAnkn3+O2jx/jVJeL5TyM+8nup+Jg=", "ref": "refs/heads/main", - "rev": "3cec45d82113051d35e846e5d80719d8ea0f7002", - "revCount": 5372, + "rev": "bb5c3f27023e0702642b72d1869427b9b0ff72e0", + "revCount": 5526, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -685,6 +737,35 @@ "type": "github" } }, + "hyprland-qtutils": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1733472316, + "narHash": "sha256-PvXiFLIExJEJj+goLbIuXLTN5CSDSAUsAfiYSdbbWg0=", + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "rev": "969427419276c7ee170301ef1ebe0f68eb6eb2e2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "type": "github" + } + }, "hyprlang": { "inputs": { "hyprutils": [ @@ -726,11 +807,11 @@ ] }, "locked": { - "lastModified": 1728941256, - "narHash": "sha256-WRypmcZ2Bw94lLmcmxYokVOHPJSZ7T06V49QZ4tkZeQ=", + "lastModified": 1732288281, + "narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "fd4be8b9ca932f7384e454bcd923c5451ef2aa85", + "rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c", "type": "github" }, "original": { @@ -766,11 +847,11 @@ }, "impermanence": { "locked": { - "lastModified": 1729068498, - "narHash": "sha256-C2sGRJl1EmBq0nO98TNd4cbUy20ABSgnHWXLIJQWRFA=", + "lastModified": 1731242966, + "narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=", "owner": "nix-community", "repo": "impermanence", - "rev": "e337457502571b23e449bf42153d7faa10c0a562", + "rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a", "type": "github" }, "original": { @@ -793,16 +874,16 @@ ] }, "locked": { - "lastModified": 1729544999, - "narHash": "sha256-YcyJLvTmN6uLEBGCvYoMLwsinblXMkoYkNLEO4WnKus=", + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", "owner": "NuschtOS", "repo": "ixx", - "rev": "65c207c92befec93e22086da9456d3906a4e999c", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", "type": "github" }, "original": { "owner": "NuschtOS", - "ref": "v0.0.5", + "ref": "v0.0.6", "repo": "ixx", "type": "github" } @@ -835,11 +916,11 @@ }, "master": { "locked": { - "lastModified": 1729839280, - "narHash": "sha256-1sU4rzJow2Fphk3G5IGjudBtI3y9sgNM9a4BN2Us/Qs=", + "lastModified": 1733838917, + "narHash": "sha256-Bf7aGqER5qTMF3Ldl0Fs1i3EGznbczrc46LYoHFM3a8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e9eca9b6e9828be9ccddf1007f6f30feb9a40e24", + "rev": "a68d6ce6f58cad982057c26791f42046184a0c18", "type": "github" }, "original": { @@ -880,11 +961,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1729147490, - "narHash": "sha256-F0/iQVbbIFctMPwK4JEd4fxVzNwaq7NnD5oen59S24s=", + "lastModified": 1733812790, + "narHash": "sha256-PxxXxmwGeAkJ/FQ3iEqaphwnK/b1zazGyczJJVyq6dU=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "e2047498667aeb24e8493ff430a20cff713915f4", + "rev": "34c8b396834adaa253131d65c9250f073f721175", "type": "github" }, "original": { @@ -896,11 +977,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1729121305, - "narHash": "sha256-c94xkA/RuszC4PfmB+MWqOo2vbO66GTO6XKer0mbltA=", + "lastModified": 1733731191, + "narHash": "sha256-Xtd0YLx6RKJMDu2GfE9geO48Dw3KnpVkfZjUqA51xDw=", "owner": "neovim", "repo": "neovim", - "rev": "852954ff6d96adce0158f74ca494fdcef3aa1921", + "rev": "3bb2d027597107a3d7f84ef61507104fd4dc050a", "type": "github" }, "original": { @@ -909,6 +990,64 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_3", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1733826408, + "narHash": "sha256-9OOlIYIQA9mO8ZCiGYV0elyh9NwI1iHvSlZDYNQx3V0=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "2f95cc0bda721e25816a114d9d8619f0b95af256", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1731483594, + "narHash": "sha256-Qjf7alRbPPERfiZsM9EMKX+HwjESky1tieh5PJIkLwE=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "75c79116a7e40cbc0e110ce0cdd500e896458679", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v0.1.10.1", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1733739952, + "narHash": "sha256-LU4gFrPdB29qzZKJaEoIj87m7N+XaOoFu7POuiiIKhg=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "40fa82275cc092d313a9a60d01a2b4e3e8e3f7d3", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -917,11 +1056,11 @@ ] }, "locked": { - "lastModified": 1729757100, - "narHash": "sha256-x+8uGaX66V5+fUBHY23Q/OQyibQ38nISzxgj7A7Jqds=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "04193f188e4144d7047f83ad1de81d6034d175cd", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -937,11 +1076,11 @@ ] }, "locked": { - "lastModified": 1729394935, - "narHash": "sha256-2ntUG+NJKdfhlrh/tF+jOU0fOesO7lm5ZZVSYitsvH8=", + "lastModified": 1733629314, + "narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "04f8a11f247ba00263b060fbcdc95484fd046104", + "rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "type": "github" }, "original": { @@ -957,11 +1096,11 @@ ] }, "locked": { - "lastModified": 1715016928, - "narHash": "sha256-JZx+enK1RlsMSJGmX/KTpADtxrCPDztQRKpO22LKZZM=", + "lastModified": 1733253839, + "narHash": "sha256-bx/mrhuiyPVUVtfWG8dG4WvgLWUK0zbb+OI7123Xne0=", "owner": "ners", "repo": "nix-monitored", - "rev": "776e497a13b8b403065d59c45a3fdc07b76a0db1", + "rev": "42716246502d3aef15f598f9af27479665df13d7", "type": "github" }, "original": { @@ -972,11 +1111,11 @@ }, "nixos-facter-modules": { "locked": { - "lastModified": 1728725827, - "narHash": "sha256-io1UeGaV2HcmK1zCZPnawJu3CxKHhiZ83NBJ+qshWIo=", + "lastModified": 1732288619, + "narHash": "sha256-zSQ2cR+NRJfHUVfkv+O6Wi53wXfzX8KHiO8fRfnvc0M=", "owner": "numtide", "repo": "nixos-facter-modules", - "rev": "9f2a45b372830d28412160413d1d83f5ee11cc2f", + "rev": "862648589993a96480c2255197a28feea712f68f", "type": "github" }, "original": { @@ -1003,39 +1142,39 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1727825735, - "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "lastModified": 1733096140, + "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1726062281, - "narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=", + "lastModified": 1733423277, + "narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8", + "rev": "e36963a147267afc055f7cf65225958633e536bf", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { @@ -1047,11 +1186,27 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "lastModified": 1733730953, + "narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "rev": "7109b680d161993918b0a126f38bc39763e5a709", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_4": { + "locked": { + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { @@ -1063,11 +1218,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1719082008, - "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", + "lastModified": 1733229606, + "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9693852a2070b398ee123a329e68f0dab5526681", + "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550", "type": "github" }, "original": { @@ -1078,6 +1233,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1733212471, + "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1692934111, "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", @@ -1095,11 +1266,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1725194671, - "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", "type": "github" }, "original": { @@ -1127,11 +1298,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1729413321, - "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", + "lastModified": 1733392399, + "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26", + "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", "type": "github" }, "original": { @@ -1143,11 +1314,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1728863046, - "narHash": "sha256-DZBO2465PL5V89e8hFSJewyH4QbCPpW3ssws7ckT/0A=", + "lastModified": 1733656523, + "narHash": "sha256-w0FXPfpGhOihoJDiwMsyN1EzpsXi2F8VQ+NVZQSMtys=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d4f247e89f6e10120f911e2e2d2254a050d0f732", + "rev": "93dc9803a1ee435e590b02cde9589038d5cc3a4e", "type": "github" }, "original": { @@ -1159,11 +1330,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1729788628, - "narHash": "sha256-3suayUinicnvE/4shMZwp9FHT5izUM8gMpdEO/NHBTo=", + "lastModified": 1733686850, + "narHash": "sha256-NQEO/nZWWGTGlkBWtCs/1iF1yl2lmQ1oY/8YZrumn3I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "63487b2f26fa065cfeeaa47dddb08e2856ba53e8", + "rev": "dd51f52372a20a93c219e8216fe528a648ffcbf4", "type": "github" }, "original": { @@ -1175,11 +1346,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1729665710, - "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", + "lastModified": 1733392399, + "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", + "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", "type": "github" }, "original": { @@ -1191,32 +1362,32 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1719082008, - "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", - "owner": "NixOS", + "lastModified": 1733759999, + "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "9693852a2070b398ee123a329e68f0dab5526681", + "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", + "owner": "nixos", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_9": { "locked": { - "lastModified": 1731676054, - "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", + "lastModified": 1730768919, + "narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", + "rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -1240,11 +1411,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1729791159, - "narHash": "sha256-i5TKYCs9tJ2qaYTsjQh3WwExmj4O0EU+L1jq6ZBVMfM=", + "lastModified": 1733820424, + "narHash": "sha256-ci29NFN3iwO2v62uSjegjnOq/JLdjhc/HfMXNKBHPgE=", "owner": "nix-community", "repo": "nixvim", - "rev": "4726334e4413ff55f1db3768c8d08722abbf09cf", + "rev": "8dfa5fa8a204f0dc14654c07619bb3df132099e0", "type": "github" }, "original": { @@ -1254,12 +1425,17 @@ } }, "nur": { + "inputs": { + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_8", + "treefmt-nix": "treefmt-nix_2" + }, "locked": { - "lastModified": 1729839538, - "narHash": "sha256-uS2m5oW/Jhi3UxMfCChj64NndOsE2+4Px+jYDXmpcjM=", + "lastModified": 1733838654, + "narHash": "sha256-EfWbtK0v+avWV6NlX4uXCTy/MUvWQfPpLfC5UPLgdsM=", "owner": "nix-community", "repo": "NUR", - "rev": "6f557f568d3a16cda792132ad82e9f0c14ba5ef0", + "rev": "7a6f816d46e34b05efb80e2e12378b6199882da5", "type": "github" }, "original": { @@ -1278,11 +1454,11 @@ ] }, "locked": { - "lastModified": 1729763753, - "narHash": "sha256-M8WAUgKFBU5TvFt92g/dHBtGJmBP33LHird+solHt0g=", + "lastModified": 1733411491, + "narHash": "sha256-315rJ7O9cOllPDaFscnJhcMleORHbxon0Kq9LAKJ5p4=", "owner": "NuschtOS", "repo": "search", - "rev": "bedc2f2ada220815a98a896e10f5e61bfc329bfc", + "rev": "68e9fad70d95d08156cf10a030bd39487bed8ffe", "type": "github" }, "original": { @@ -1302,11 +1478,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1733318908, + "narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "6f4e2a2112050951a314d2733a994fbab94864c6", "type": "github" }, "original": { @@ -1319,15 +1495,15 @@ "inputs": { "flake-compat": "flake-compat_5", "gitignore": "gitignore_4", - "nixpkgs": "nixpkgs_8", - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs": "nixpkgs_9", + "nixpkgs-stable": "nixpkgs-stable_4" }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1733665616, + "narHash": "sha256-+XTFXYlFJBxohhMGLDpYdEnhUNdxN8dyTA8WAd+lh2A=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "d8c02f0ffef0ef39f6063731fc539d8c71eb463a", "type": "github" }, "original": { @@ -1339,11 +1515,11 @@ "river": { "flake": false, "locked": { - "lastModified": 1729764469, - "narHash": "sha256-uhgvV+GTxeTJNxZ4lUpqPlaonnon7MD/qFi3a6OU5t0=", + "lastModified": 1732457502, + "narHash": "sha256-M2omvAtaXKCIvgpGeZktxAw6ngUGJ1ONQk/peI+p97g=", "ref": "refs/heads/master", - "rev": "1b5dd21ee610b30d13c9165dfde23989c5e97e8d", - "revCount": 1299, + "rev": "5ca829bd5acea4c68abcf16332ccfe6202da4aeb", + "revCount": 1301, "submodules": true, "type": "git", "url": "https://github.com/riverwm/river" @@ -1370,6 +1546,7 @@ "impermanence": "impermanence", "master": "master", "neovim-nightly-overlay": "neovim-nightly-overlay", + "niri": "niri", "nix-index-database": "nix-index-database", "nix-monitored": "nix-monitored", "nixos-facter-modules": "nixos-facter-modules", @@ -1387,14 +1564,14 @@ "inputs": { "flake-utils": "flake-utils_4", "ixx": "ixx_2", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { - "lastModified": 1731874326, - "narHash": "sha256-FVodEap6GQT/1DSG5KOcpsrKXfG9gMNObQxW+HNJnW8=", + "lastModified": 1733773348, + "narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", "owner": "NuschtOS", "repo": "search", - "rev": "64832c4cf885350ad0e63a27fd7055bcfc7955f6", + "rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", "type": "github" }, "original": { @@ -1405,11 +1582,11 @@ }, "stable": { "locked": { - "lastModified": 1729691686, - "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", + "lastModified": 1733730953, + "narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", + "rev": "7109b680d161993918b0a126f38bc39763e5a709", "type": "github" }, "original": { @@ -1527,7 +1704,7 @@ "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_11", "utils": "utils" }, "locked": { @@ -1552,11 +1729,32 @@ ] }, "locked": { - "lastModified": 1729613947, - "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", + "lastModified": 1733440889, + "narHash": "sha256-qKL3vjO+IXFQ0nTinFDqNq/sbbnnS5bMI1y0xX215fU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", + "rev": "50862ba6a8a0255b87377b9d2d4565e96f29b410", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", "type": "github" }, "original": { @@ -1611,11 +1809,11 @@ ] }, "locked": { - "lastModified": 1728166987, - "narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=", + "lastModified": 1733157064, + "narHash": "sha256-NetqJHAN4bbZDQADvpep+wXk2AbMZ2bN6tINz8Kpz6M=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787", + "rev": "fd85ef39369f95eed67fdf3f025e86916edeea2f", "type": "github" }, "original": { @@ -1624,6 +1822,39 @@ "type": "github" } }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1730166465, + "narHash": "sha256-nq7bouXQXaaPPo/E+Jbq+wNHnatD4dY8OxSrRqzvy6s=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "a713cf46cb7db84a0d1b57c3a397c610cad3cf98", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.5", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1732233710, + "narHash": "sha256-gWf9dX6DVx0ssK2G3yrFG9yMT9UU0mDwyD51z/Q6FTA=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "02f30546264ff8407cbb39528b3a3cc3045e53c1", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, "zig": { "inputs": { "flake-compat": [ diff --git a/flake.nix b/flake.nix index 2b1d3bc..29cbbed 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,10 @@ submodules = true; }; + # Niri + niri.url = "github:sodiboo/niri-flake"; + niri.inputs.nixpkgs.follows = "nixpkgs"; + # Laptop asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout"; asus-touchpad-numpad-driver.flake = false; @@ -170,6 +174,7 @@ inputs.impermanence.nixosModules.impermanence inputs.nix-index-database.nixosModules.nix-index inputs.nixos-facter-modules.nixosModules.facter + inputs.niri.nixosModules.niri path ]; }) diff --git a/modules/config/theming/default.nix b/modules/config/theming/default.nix index 9704874..6764501 100644 --- a/modules/config/theming/default.nix +++ b/modules/config/theming/default.nix @@ -35,9 +35,7 @@ in font-size = "20"; font = let - fontBasePath = pkgs.nerdfonts.override { - fonts = [ "FiraCode" ]; - }; + fontBasePath = pkgs.nerd-fonts.fira-code; in "${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf"; height = "360"; diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 2513511..bf8994f 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -255,9 +255,7 @@ in fonts = { enableDefaultPackages = true; packages = [ - (pkgs.nerdfonts.override { - fonts = [ "FiraCode" ]; - }) + pkgs.nerd-fonts.fira-code pkgs.master.intel-one-mono ]; }; diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix new file mode 100644 index 0000000..763d3ae --- /dev/null +++ b/modules/programs/niri.nix @@ -0,0 +1,258 @@ +{ config +, lib +, pkgs +, ... +}: + +with lib; +let + cfg = config.my.programs.niri; + inherit (config.home-manager.users.moritz.lib.niri) actions; +in +{ + options.my.programs.niri.enable = mkEnableOption "niri"; + + config = mkIf cfg.enable { + users.users.moritz.packages = with pkgs; [ + brightnessctl # control brightness + grimblast # screenshot tool + pamixer # pulse audio cli + playerctl # control media playback + slurp # region select for wayland (for screensharing) + wdisplays # manage monitors + wl-clipboard # clipboard tool for wayland + ]; + + # adds pam module for swaylock + security.pam.services.swaylock = { }; + + programs.niri.enable = true; + + my = { + programs = { + wallpaper.enable = true; + kitty.enable = true; + tofi.enable = true; + }; + wallpapers.enable = true; + services = { + dunst.enable = true; + wallpaper = { + enable = true; + target = "niri-session.target"; + }; + spotify-player.target = "niri-session.target"; + }; + }; + home-manager.users.moritz = { + programs.waybar = { + enable = true; + + # start using systemd service + systemd = { + enable = true; + target = "river-session.target"; + }; + + settings = { + mainBar = { + start_hidden = true; + layer = "top"; + position = "top"; + height = 20; + modules-left = [ "niri/workspaces" ]; + modules-center = [ "niri/window" ]; + modules-right = [ "network" "memory" "cpu" "battery" "clock" ]; + }; + }; + }; + + # lock screen after timeout + programs.swaylock = { + enable = true; + settings = { + color = "000000"; + }; + }; + services.swayidle = { + enable = true; + events = [ + { + event = "before-sleep"; + command = "${lib.getExe pkgs.swaylock} -fF"; + } + { + event = "lock"; + command = "${lib.getExe pkgs.swaylock} -fF"; + } + ]; + timeouts = + let + lockTimeout = 10; + in + [ + { + timeout = lockTimeout * 60 - 10; + command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'"; + } + { + timeout = lockTimeout * 60 + 10; + command = "${pkgs.systemd}/bin/loginctl lock-session"; + } + ]; + systemdTarget = "river-session.target"; + }; + home.packages = with pkgs; [ + wlr-randr + jq + ]; + services.kanshi = { + enable = true; + systemdTarget = "niri-session.target"; + }; + programs.niri = { + settings = { + environment = { + "NIXOS_OZONE_WL" = "1"; + "QT_QPA_PLATFORM" = "wayland"; + }; + binds = { + # spawn different programs + "Mod+Return".action.spawn = config.my.terminal.package; + "Mod+Shift+escape".action.spawn = [ "loginctl" "lock-session" ]; + "Mod+D".action.spawn = "tofi"; + + # keyboard layout + "Mod+Space".action = actions.switch-layout "next"; + + "Mod+I".action = actions.show-hotkey-overlay; + "Mod+Q".action = actions.close-window; + "Mod+Shift+Q".action = actions.quit; + "Mod+Shift+C".action = actions.screenshot; + + # resizing / swapping / switching + "Mod+F".action = actions.fullscreen-window; + + "Mod+Shift+H".action.set-column-width = "-5%"; + "Mod+Shift+L".action.set-column-width = "+5%"; + + "Mod+J".action = actions.focus-window-down-or-column-right; + "Mod+K".action = actions.focus-window-up-or-column-left; + + "Mod+H".action = actions.move-column-left-or-to-monitor-left; + "Mod+L".action = actions.move-column-right-or-to-monitor-right; + + "Mod+W".action.spawn = [ "pkill" "-USR1" "waybar" ]; + + # "Mod+comma".action = actions.consume-window-into-column; + # "Mod+period".action = actions.expel-window-from-column; + + "Mod+comma".action = actions.focus-monitor-up; + "Mod+period".action = actions.focus-monitor-down; + + "Mod+Shift+comma".action = actions.move-workspace-to-monitor-up; + "Mod+Shift+period".action = actions.move-workspace-to-monitor-down; + "Mod+T".action = actions.switch-preset-column-width; + + "Mod+Shift+1".action.move-window-to-workspace = 1; + "Mod+Shift+2".action.move-window-to-workspace = 2; + "Mod+Shift+3".action.move-window-to-workspace = 3; + "Mod+Shift+4".action.move-window-to-workspace = 4; + "Mod+Shift+5".action.move-window-to-workspace = 5; + "Mod+Shift+6".action.move-window-to-workspace = 6; + "Mod+Shift+7".action.move-window-to-workspace = 7; + "Mod+Shift+8".action.move-window-to-workspace = 8; + "Mod+Shift+9".action.move-window-to-workspace = 9; + "Mod+Shift+0".action.move-window-to-workspace = 10; + + "Mod+1".action.focus-workspace = 1; + "Mod+2".action.focus-workspace = 2; + "Mod+3".action.focus-workspace = 3; + "Mod+4".action.focus-workspace = 4; + "Mod+5".action.focus-workspace = 5; + "Mod+6".action.focus-workspace = 6; + "Mod+7".action.focus-workspace = 7; + "Mod+8".action.focus-workspace = 8; + "Mod+9".action.focus-workspace = 9; + "Mod+0".action.focus-workspace = 10; + + # audio + "XF86_AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; + "XF86AudioRaiseVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+" "-l" "1.0" ]; + "XF86AudioLowerVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ]; + # TODO(mangoiv): mic mute toggle + }; + + layout = { + border.enable = false; + focus-ring.enable = false; + default-column-width.proportion = 2.0 / 3.0; + preset-column-widths = [ + { proportion = 1.0 / 3.0; } + { proportion = 2.0 / 3.0; } + ]; + gaps = 3; + }; + animations = { + enable = true; + slowdown = 0.5; + }; + prefer-no-csd = true; + hotkey-overlay.skip-at-startup = true; + window-rules = [ + { + matches = [ + { title = "^.*1Password.*$"; } + { title = "^.*Bitwarden.*$"; } + { title = "^.*Keepass.*$"; } + ]; + block-out-from = "screen-capture"; + } + { + clip-to-geometry = true; + geometry-corner-radius = { + bottom-left = 5.0; + bottom-right = 5.0; + top-left = 5.0; + top-right = 5.0; + }; + } + ]; + switch-events = { + lid-close.action.spawn = [ "loginctl" "lock-session" ]; + }; + input = { + touchpad.natural-scroll = false; + focus-follows-mouse.enable = true; + warp-mouse-to-focus = true; + keyboard = { + xkb.layout = "us, de"; + }; + }; + }; + }; + }; + + services = { + dbus.enable = true; + # use pipewire (needed for screensharing) + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + displayManager = { + autoLogin = { + enable = true; + user = "moritz"; + }; + defaultSession = "niri"; + }; + xserver = { + enable = true; + displayManager.lightdm.enable = true; + }; + }; + security.rtkit.enable = true; + }; +}