diff --git a/dotfiles/hypr/config/autostart.conf b/dotfiles/hypr/config/autostart.conf index 24a5182..4bcd323 100644 --- a/dotfiles/hypr/config/autostart.conf +++ b/dotfiles/hypr/config/autostart.conf @@ -7,7 +7,7 @@ source = ~/.config/hypr/config/defaults.conf # Autostart wiki https://wiki.hyprland.org/0.45.0/Configuring/Keywords/#executing # exec-once = tailscale-systray & exec-once = slack & -exec-once = swaybg -o \* -i /usr/share/wallpapers/cachyos-wallpapers/Skyscraper.png -m fill +exec-once = swaybg -o \* -i ~/.wallpaper.jpg -m fill exec-once = waybar & exec-once = fcitx5 -d & exec-once = mako & diff --git a/dotfiles/hypr/config/defaults.conf b/dotfiles/hypr/config/defaults.conf index 4cc346c..01e81a5 100644 --- a/dotfiles/hypr/config/defaults.conf +++ b/dotfiles/hypr/config/defaults.conf @@ -4,7 +4,7 @@ $filemanager = thunar $applauncher = rofi -show combi -modi window,run,combi -combi-modi window,run -$terminal = /usr/bin/kitty +$terminal = kitty $idlehandler = swayidle -w timeout 300 'swaylock -f -c 000000' before-sleep 'swaylock -f -c 000000' $capturing = grim -g "$(slurp)" - | swappy -f - diff --git a/dotfiles/hypr/config/keybinds.conf b/dotfiles/hypr/config/keybinds.conf index b7d44bc..07530c4 100644 --- a/dotfiles/hypr/config/keybinds.conf +++ b/dotfiles/hypr/config/keybinds.conf @@ -66,7 +66,7 @@ bindd = $mainMod, down, Move focus downwards, movefocus, d ## Resizing windows # Activate keyboard window resize mode # https://wiki.hyprland.org/Configuring/Binds/#submaps -bindd = $mainMod, R, Activates window resizing mode, submap, resize +bindd = $mainMod SHIFT, R, Activates window resizing mode, submap, resize submap = resize bindd = , right, Resize to the right (resizing mode), resizeactive, 15 0 bindd = , left, Resize to the left (resizing mode), resizeactive, -15 0 diff --git a/dotfiles/hypr/config/variables.conf b/dotfiles/hypr/config/variables.conf index 4be5726..a93aeab 100644 --- a/dotfiles/hypr/config/variables.conf +++ b/dotfiles/hypr/config/variables.conf @@ -59,6 +59,7 @@ misc { swallow_regex = ^(cachy-browser|firefox|nautilus|nemo|thunar|btrfs-assistant.)$ focus_on_activate = true vrr = 2 + enable_anr_dialog = false } # https://wiki.hyprland.org/0.45.0/Configuring/Variables/#render diff --git a/dotfiles/nvim/lazy-lock.json b/dotfiles/nvim/lazy-lock.json deleted file mode 100644 index 8527358..0000000 --- a/dotfiles/nvim/lazy-lock.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "LazyVim": { "branch": "main", "commit": "25abbf546d564dc484cf903804661ba12de45507" }, - "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "catppuccin": { "branch": "main", "commit": "a0c769bc7cd04bbbf258b3d5f01e2bdce744108d" }, - "conform.nvim": { "branch": "master", "commit": "0e93e0d12d2f7ebdea9e3e444dfaff0050cefbe6" }, - "crates.nvim": { "branch": "main", "commit": "5d8b1bef686db0fabe5f1bb593744b617e8f1405" }, - "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" }, - "grug-far.nvim": { "branch": "main", "commit": "c36f5f9b53f12a60aa53d42282e8ae78aef72178" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, - "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.ai": { "branch": "main", "commit": "5225f16eacf4dce2cb7204ca345123ef54e209d6" }, - "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, - "mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" }, - "neoconf.nvim": { "branch": "main", "commit": "27ad122b711ad1ab7fe1cd8d352ded0c454ec05e" }, - "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, - "nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" }, - "nvim-lint": { "branch": "master", "commit": "cc26ae6a620298bb3f33b0e0681f99a10ae57781" }, - "nvim-lspconfig": { "branch": "master", "commit": "036885e8e5456d3907626b634693234f628afef6" }, - "nvim-metals": { "branch": "main", "commit": "5ab889232ccb6e749094294e7979fda4a71fdecb" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" }, - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "render-markdown.nvim": { "branch": "main", "commit": "6f5a4c36d9383b2a916facaa63dcd573afa11ee8" }, - "rustaceanvim": { "branch": "master", "commit": "a0c8e9698ef90bcfdf42806a38bf55b612b65b18" }, - "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, - "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, - "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, - "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" }, - "vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, - "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, - "vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" }, - "vimwiki": { "branch": "dev", "commit": "72792615e739d0eb54a9c8f7e0a46a6e2407c9e8" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, - "yazi.nvim": { "branch": "main", "commit": "e2ddbaa88ec61d0b96e3d53ba851b0e7a0b36f14" } -} diff --git a/flake.lock b/flake.lock index cec7ea9..93a8dde 100644 --- a/flake.lock +++ b/flake.lock @@ -5,15 +5,15 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1745452037, - "narHash": "sha256-EAYWV+kXbwsH+8G/8UtmcunDeKwLwSOyfcmzZUkWE/c=", - "owner": "awwpotato", + "lastModified": 1746562888, + "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", + "owner": "SenchoPens", "repo": "base16.nix", - "rev": "985d704b4ff9f75627f279ef091b2899f8456690", + "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", "type": "github" }, "original": { - "owner": "awwpotato", + "owner": "SenchoPens", "repo": "base16.nix", "type": "github" } @@ -37,11 +37,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1736852337, - "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", + "lastModified": 1748408240, + "narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", + "rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e", "type": "github" }, "original": { @@ -80,12 +80,12 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1748911895, - "narHash": "sha256-xXeDMMKuv8A/wlHgq6+4E6fcYJm/Munr764E0wyFEOs=", - "rev": "0bfc40897a765936318cad1076c915308bf33855", - "revCount": 246, + "lastModified": 1752331782, + "narHash": "sha256-eRDO93C2dXNVoLbnNECWwGcMErDKVAXNWWy6hFMPoE8=", + "rev": "33ffc091037908049e9897dc8258efae81709cfd", + "revCount": 259, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.6.2/01973348-6edf-7091-8b18-54f942b2bf2f/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.8.2/0197ff1f-7dee-7ce8-803b-dee90b5d283c/source.tar.gz" }, "original": { "type": "tarball", @@ -95,37 +95,37 @@ "determinate-nixd-aarch64-darwin": { "flake": false, "locked": { - "narHash": "sha256-qh0zj1z3zc6wd3vuQIZkfisxDIIQE/oC1l3zpEWoWx0=", + "narHash": "sha256-T/kTCi8rrh1r5XMGQBymB4Hnk/KNNGkgtgma6bXXKy0=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.6.2/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.8.2/macOS" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.6.2/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.8.2/macOS" } }, "determinate-nixd-aarch64-linux": { "flake": false, "locked": { - "narHash": "sha256-PVdj96Pxn9pDP0WrYVlJWsymCXNDBAjzyk/b0qMtRRs=", + "narHash": "sha256-C+KvOykOIoXCWSsPBM2Hzy1skk2lgiKXQyb9fJdwSdQ=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.6.2/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.8.2/aarch64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.6.2/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.8.2/aarch64-linux" } }, "determinate-nixd-x86_64-linux": { "flake": false, "locked": { - "narHash": "sha256-X3gcLv4dHU3bkDgNN5GaY0sfsWrSqIHoKjVNP8+uHHQ=", + "narHash": "sha256-cENobOVn0+FtON9bmr/QoUEpNGEyxW4YpFXkLyBTYDs=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.6.2/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.8.2/x86_64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.6.2/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.8.2/x86_64-linux" } }, "disko": { @@ -135,11 +135,11 @@ ] }, "locked": { - "lastModified": 1745502102, - "narHash": "sha256-LqhRwzvIVPEjH0TaPgwzqpyhW6DtCrvz7FnUJDoUZh8=", + "lastModified": 1752718651, + "narHash": "sha256-PkaR0qmyP9q/MDN3uYa+RLeBA0PjvEQiM0rTDDBXkL8=", "owner": "nix-community", "repo": "disko", - "rev": "ca27b88c88948d96feeee9ed814cbd34f53d0d70", + "rev": "d5ad4485e6f2edcc06751df65c5e16572877db88", "type": "github" }, "original": { @@ -151,11 +151,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1744642301, - "narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=", + "lastModified": 1748383148, + "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "59e3de00f01e5adb851d824cf7911bd90c31083a", + "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf", "type": "github" }, "original": { @@ -167,26 +167,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -204,33 +189,31 @@ ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" + "lastModified": 1748821116, + "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=", + "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1", + "revCount": 377, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/hercules-ci/flake-parts/0.1.377%2Brev-49f0870db23e8c1ca0b5259734a02cd9e1e371a1/01972f28-554a-73f8-91f4-d488cc502f08/source.tar.gz" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/hercules-ci/flake-parts/0.1" } }, "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "stylix", - "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -257,27 +240,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": [ - "stylix", - "systems" - ] - }, - "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" - } - }, "fromYaml": { "flake": false, "locked": { @@ -294,32 +256,6 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "git-hooks-nix": { "inputs": { "flake-compat": "flake-compat", @@ -331,62 +267,34 @@ "determinate", "nix", "nixpkgs" - ], - "nixpkgs-stable": [ - "determinate", - "nix", - "nixpkgs" ] }, "locked": { - "lastModified": 1734279981, - "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", - "type": "github" + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "revCount": 1026, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/cachix/git-hooks.nix/0.1.1026%2Brev-80479b6ec16fefd9c1db3ea13aeb038c60530f46/0196d79a-1b35-7b8e-a021-c894fb62163d/source.tar.gz" }, "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941" } }, "gnome-shell": { "flake": false, "locked": { - "lastModified": 1732369855, - "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", "type": "github" }, "original": { "owner": "GNOME", - "ref": "47.2", + "ref": "48.2", "repo": "gnome-shell", "type": "github" } @@ -398,32 +306,11 @@ ] }, "locked": { - "lastModified": 1745494811, - "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "lastModified": 1752603129, + "narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=", "owner": "nix-community", "repo": "home-manager", - "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1745439012, - "narHash": "sha256-TwbdiH28QK7Da2JQTqFHdb+UCJq6QbF2mtf+RxHVzEA=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "d31710fb2cd536b1966fee2af74e99a0816a61a8", + "rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b", "type": "github" }, "original": { @@ -441,12 +328,12 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1748909153, - "narHash": "sha256-A/yjYc+vdkjvw3xI7qgfYRI+jzyiW9Ay6JPhGu1gFyo=", - "rev": "a18fd9b131eb713eba11a746beb3d79628016936", - "revCount": 20936, + "lastModified": 1752329813, + "narHash": "sha256-+PLMYzOLXmYtGUcUxIbJZpadAV/gO73EAhISc1kgvJM=", + "rev": "04045d5add7915ea9209a09833fae1aa3a3a9be1", + "revCount": 21488, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.6.2/01973342-bafd-782a-bbcf-6606879c0df6/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.8.2/0197ff19-42da-7beb-b8cf-902b39687ccf/source.tar.gz" }, "original": { "type": "tarball", @@ -457,16 +344,14 @@ "locked": { "lastModified": 1747179050, "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", - "owner": "NixOS", - "repo": "nixpkgs", "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", - "type": "github" + "revCount": 799423, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.799423%2Brev-adaa24fbf46737f3f1b5497bf64bae750f82942e/0196d1c3-1974-7bf1-bcf6-06620ac40c8c/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%3D0.1.799423" } }, "nixpkgs-23-11": { @@ -503,12 +388,12 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1748217807, - "narHash": "sha256-P3u2PXxMlo49PutQLnk2PhI/imC69hFl1yY4aT5Nax8=", - "rev": "3108eaa516ae22c2360928589731a4f1581526ef", - "revCount": 806109, + "lastModified": 1751852175, + "narHash": "sha256-+MLlfTCCOvz4K6AcSPbaPiFM9MYi7fA2Wr1ibmRwIlM=", + "rev": "2defa37146df235ef62f566cde69930a86f14df1", + "revCount": 826355, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.806109%2Brev-3108eaa516ae22c2360928589731a4f1581526ef/01971040-062f-7e68-83d1-5cd2af08d87e/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.826355%2Brev-2defa37146df235ef62f566cde69930a86f14df1/0197e88b-d442-748b-8d6d-36a43b63b168/source.tar.gz" }, "original": { "type": "tarball", @@ -517,11 +402,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1745391562, - "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", + "lastModified": 1752480373, + "narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", + "rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08", "type": "github" }, "original": { @@ -533,19 +418,21 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": [ + "stylix", + "flake-parts" + ], "nixpkgs": [ "stylix", "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1745459908, - "narHash": "sha256-bWqgohVf/py9EW3bLS/dYbenD2p9N2/Qsw1+CJk1S04=", + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", "owner": "nix-community", "repo": "NUR", - "rev": "dbc4ba3233b2bf951521177bf0ee0a7679959035", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", "type": "github" }, "original": { @@ -571,11 +458,8 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", - "git-hooks": "git-hooks", + "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ], @@ -588,11 +472,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1745511266, - "narHash": "sha256-W68rSRTGhRF22nDzJgq2ffQwI/4k+4jMs84Mpj38aOI=", + "lastModified": 1752750082, + "narHash": "sha256-NoVAqy+Wj4tgkvrYB8zWncl8Z6Hb80aX3t/TYGdsfaM=", "owner": "danth", "repo": "stylix", - "rev": "3194470d07d2885da178a6baca10a91ea1068e1b", + "rev": "03699ed214f6e8195bc7199d6ae3aeccf9732b08", "type": "github" }, "original": { @@ -651,28 +535,27 @@ "tinted-kitty": { "flake": false, "locked": { - "lastModified": 1716423189, - "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" } }, "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1744974599, - "narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -684,11 +567,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1745111349, - "narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "e009f18a01182b63559fb28f1c786eb027c3dee9", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -700,11 +583,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -712,28 +595,6 @@ "repo": "base16-zed", "type": "github" } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "stylix", - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c818c90..22978d5 100644 --- a/flake.nix +++ b/flake.nix @@ -20,78 +20,17 @@ }; outputs = - { - self, - nixpkgs, - determinate, - disko, - stylix, - flake-utils, - ... - }@inputs: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { - system = system; - config.allowUnfree = true; - }; - in - { + inputs: with (import ./myLib inputs); { nixosConfigurations = { - arcueid = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs; - }; - modules = [ - ./modules/nixos/cli-environment.nix - ./modules/nixos/desktop-apps.nix - ./modules/nixos/dev-environment.nix - ./modules/nixos/fonts.nix - ./modules/nixos/gaming.nix - ./modules/nixos/window-manager.nix - ./hosts/home/configuration.nix - stylix.nixosModules.stylix - inputs.home-manager.nixosModules.default - ]; - }; - work-laptop = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs system; }; - modules = [ - ./modules/nixos/cli-environment.nix - ./modules/nixos/dev-environment.nix - ./modules/nixos/fonts.nix - ./modules/nixos/window-manager.nix - disko.nixosModules.disko - stylix.nixosModules.stylix - inputs.home-manager.nixosModules.default - ./hosts/work/configuration.nix - ./hosts/work/hardware-configuration.nix - ]; - }; - iso-installer = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs system; }; - modules = [ - ./hosts/iso/configuration.nix - ]; - }; + arcueid = mkSystem ./hosts/home/configuration.nix; + work-laptop = mkSystem ./hosts/work/configuration.nix; }; homeConfigurations = { - "xmorel@work-laptop" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = pkgs; - extraSpecialArgs = { inherit inputs; }; - modules = [ - ./hosts/work/home.nix - ]; - }; - "xmorel@MacLaptop.local" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages."aarch64-darwin"; - extraSpecialArgs = { inherit inputs; }; - modules = [ - ./hosts/mac-laptop/home.nix - ]; - }; + "yoru@arcueid" = mkHome "x86_64-linux" ./hosts/home/home.nix; + "xmorel@work-laptop" = mkHome "x86_64-linux" ./hosts/work/home.nix; + "xmorel@MacLaptop.local" = mkHome "aarch64-darwin" ./hosts/mac-laptop/home.nix; }; - # homeManagerModules.default = ./modules/home-manager; - # nixosModules.default = ./modules/nixos; + homeManagerModules.default = import ./modules/home-manager; + nixosModules.default = import ./modules/nixos; }; } diff --git a/hosts/home/configuration.nix b/hosts/home/configuration.nix index 9dc0ceb..e081c46 100644 --- a/hosts/home/configuration.nix +++ b/hosts/home/configuration.nix @@ -9,7 +9,7 @@ { imports = [ ./hardware-configuration.nix - inputs.home-manager.nixosModules.default + # inputs.home-manager.nixosModules.default ]; # Bootloader. diff --git a/hosts/work/configuration.nix b/hosts/work/configuration.nix index 064315a..48c4403 100644 --- a/hosts/work/configuration.nix +++ b/hosts/work/configuration.nix @@ -1,5 +1,7 @@ { inputs, + outputs, + myLib, modulesPath, lib, pkgs, @@ -7,134 +9,55 @@ }: { imports = [ + inputs.disko.nixosModules.disko (modulesPath + "/installer/scan/not-detected.nix") ./disk-config.nix + ./hardware-configuration.nix ]; - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; + + myNixOS = { + home-users = { + "xmorel" = { + userConfig = ./home.nix; + }; + }; + archetype.general.enable = true; }; - services.openssh.enable = true; - environment.sessionVariables = { - FLAKE = "/etc/nixos"; + + boot = { + loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + }; + kernelModules = [ + "coretemp" + "cpuid" + ]; + kernelParams = [ + "quiet" + "amd_pstate=guided" + "processor.max_cstate=1" + ]; + initrd.kernelModules = [ "amdgpu" ]; + plymouth.enable = true; }; - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.gitMinimal - # pkgs.slack - # pkgs.teams-for-linux - pkgs.openvpn + + hardware = { + sane.enable = true; + }; + networking.hostName = "work-laptop"; + nix.settings.trusted-users = [ + "root" + "xmorel" ]; - networking = { - hostName = "work-laptop"; - networkmanager.enable = true; - }; - time.timeZone = "Europe/Paris"; - i18n.defaultLocale = "fr_FR.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "fr_FR.UTF-8"; - LC_IDENTIFICATION = "fr_FR.UTF-8"; - LC_MEASUREMENT = "fr_FR.UTF-8"; - LC_MONETARY = "fr_FR.UTF-8"; - LC_NAME = "fr_FR.UTF-8"; - LC_NUMERIC = "fr_FR.UTF-8"; - LC_PAPER = "fr_FR.UTF-8"; - LC_TELEPHONE = "fr_FR.UTF-8"; - LC_TIME = "fr_FR.UTF-8"; - }; - - virtualisation.docker = { + powerManagement = { enable = true; + cpuFreqGovernor = "schedutil"; }; + services.auto-cpufreq.enable = true; + security.sudo.wheelNeedsPassword = false; + services.xserver.videoDrivers = [ "amdgpu" ]; + virtualisation.docker.enable = true; # feature virtualisation - security.rtkit.enable = true; - nix = { - settings = { - auto-optimise-store = true; - experimental-features = [ - "nix-command" - "flakes" - ]; - }; - # gc = { - # automatic = true; - # dates = "weekly"; - # option = "--delete-older-than 10d"; - # }; - }; - services = { - xserver.enable = true; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - cli-environment.enable = true; - # desktop-apps.enable = true; - dev-environment.enable = true; - fonts.enable = true; - window-manager.enable = true; - }; - users.users = { - xmorel = { - shell = pkgs.fish; - isNormalUser = true; - extraGroups = [ - "networkmanager" - "wheel" - "docker" - ]; - initialPassword = "toto"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBd3US4tUcbWZQgcVOtZIcbHF5mHwzJzygrQuE/pGde6" - ]; - }; - root = { - initialPassword = "toto"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBd3US4tUcbWZQgcVOtZIcbHF5mHwzJzygrQuE/pGde6" - ]; - }; - }; - home-manager = { - extraSpecialArgs = { inherit inputs; }; - users = { - "xmorel" = import ./home.nix; - }; - }; - - stylix = { - enable = true; - image = ../../wall.jpg; - polarity = "dark"; - opacity.terminal = 0.9; - cursor.package = pkgs.bibata-cursors; - cursor.name = "Bibata-Modern-Ice"; - cursor.size = 24; - fonts = { - monospace = { - package = pkgs.nerd-fonts.jetbrains-mono; - name = "JetBrainsMono Nerd Font Mono"; - }; - sansSerif = { - package = pkgs.montserrat; - name = "Montserrat"; - }; - serif = { - package = pkgs.montserrat; - name = "Montserrat"; - }; - sizes = { - applications = 12; - terminal = 12; - desktop = 11; - popups = 12; - }; - }; - }; - - nixpkgs.config.allowUnfree = true; system.stateVersion = "24.05"; } diff --git a/hosts/work/home.nix b/hosts/work/home.nix index 9040485..fa30e9c 100644 --- a/hosts/work/home.nix +++ b/hosts/work/home.nix @@ -1,112 +1,24 @@ { - pkgs, ... }: - { - imports = [ - ../../modules/home-manager/kitty.nix - ]; myHome = { - kitty.enable = true; + services.nix.enable = true; + bundle.work-apps.enable = true; + bundle.myhypr.enable = true; + bundle.desktop-apps.enable = true; + bundle.shell.enable = true; }; + home = { username = "xmorel"; homeDirectory = "/home/xmorel"; - sessionVariables = { - FLAKE = "/home/xmorel/nixos/"; - }; - packages = with pkgs; [ - devenv - lazyjj - # slack - tailscale-systray - tree - ungoogled-chromium - xfce.thunar - xfce.thunar-archive-plugin - xfce.thunar-volman - yt-dlp - vial - ]; - file.".config/nvim" = { - source = ../../dotfiles/nvim; - recursive = true; - }; - file.".config/hypr" = { - source = ../../dotfiles/hypr; - recursive = true; - }; shell.enableFishIntegration = true; + stateVersion = "23.11"; }; - - nix = { - # package = pkgs.nix; - settings = { - auto-optimise-store = true; - experimental-features = [ - "nix-command" - "flakes" - ]; - trusted-users = [ - "root" - "xmorel" - ]; - }; - gc = { - automatic = true; - }; - extraOptions = '' - extra-substituters = https://devenv.cachix.org - extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= - ''; + programs.git = { + userName = "Xavier Morel"; + userEmail = "morelx42@gmail.com"; }; - - programs = { - awscli.enable = true; - bat = { - enable = true; - extraPackages = with pkgs.bat-extras; [ batman ]; - }; - btop = { - enable = true; - settings.vim_keys = true; - }; - direnv.enable = true; - eza = { - enable = true; - extraOptions = [ "--group-directories-first" ]; - git = true; - icons = "auto"; - }; - fish = { - enable = true; - shellAliases = { - ls = "eza"; - cat = "bat"; - ll = "eza -lh"; - l = "eza -lh"; - la = "eza -lah"; - man = "batman"; - }; - interactiveShellInit = '' - source /usr/share/cachyos-fish-config/cachyos-config.fish - fish_vi_key_bindings - ''; - }; - fzf.enable = true; - gh.enable = true; - gpg.enable = true; - home-manager.enable = true; - jujutsu.enable = true; - lazygit.enable = true; - nh.enable = true; - nix-your-shell.enable = true; - rbw.enable = true; - ripgrep.enable = true; - starship.enable = true; - yazi.enable = true; - }; - - home.stateVersion = "23.11"; + programs.home-manager.enable = true; } diff --git a/modules/home-manager/bundles/default.nix b/modules/home-manager/bundles/default.nix new file mode 100644 index 0000000..bfd4d9c --- /dev/null +++ b/modules/home-manager/bundles/default.nix @@ -0,0 +1,11 @@ +{ + ... +}: +{ + imports = [ + ./desktop-apps.nix + ./myhypr.nix + ./shell.nix + ./work-apps.nix + ]; +} diff --git a/modules/home-manager/bundles/desktop-apps.nix b/modules/home-manager/bundles/desktop-apps.nix new file mode 100644 index 0000000..12fe1d9 --- /dev/null +++ b/modules/home-manager/bundles/desktop-apps.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + options.myHome.bundle.desktop-apps.enable = lib.mkEnableOption "enable desktop-apps bundle"; + config = lib.mkIf config.myHome.bundle.desktop-apps.enable { + myHome.programs.kitty.enable = true; + home.packages = map lib.lowPrio [ + pkgs.bottles + pkgs.ungoogled-chromium + pkgs.xfce.thunar + pkgs.xfce.thunar-archive-plugin + pkgs.xfce.thunar-volman + pkgs.vial + ]; + }; +} diff --git a/modules/home-manager/bundles/myhypr.nix b/modules/home-manager/bundles/myhypr.nix new file mode 100644 index 0000000..9e26436 --- /dev/null +++ b/modules/home-manager/bundles/myhypr.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + options.myHome.bundle.myhypr.enable = lib.mkEnableOption "enable hypr bundle"; + config = lib.mkIf config.myHome.bundle.myhypr.enable { + myHome.services.hyprland.enable = true; + myHome.services.waybar.enable = true; + home.packages = map lib.lowPrio [ + pkgs.mako + pkgs.swayidle + pkgs.swaylock + pkgs.swaybg + ]; + }; +} diff --git a/modules/home-manager/bundles/shell.nix b/modules/home-manager/bundles/shell.nix new file mode 100644 index 0000000..f9b8dc5 --- /dev/null +++ b/modules/home-manager/bundles/shell.nix @@ -0,0 +1,79 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.myHome.bundle.shell.enable = lib.mkEnableOption "enable shell bundle"; + + config = lib.mkIf config.myHome.bundle.shell.enable { + home.packages = with pkgs; [ + commitizen + pre-commit + curl + devenv + git + just + killall + lazyjj + neofetch + p7zip + ripgrep + tree + typst + unrar + unzip + wget + yt-dlp + ]; + programs = { + awscli.enable = true; + bat = { + enable = true; + extraPackages = [ pkgs.bat-extras.batman ]; + }; + btop = { + enable = true; + settings.vim_keys = true; + }; + direnv.enable = true; + eza = { + enable = true; + extraOptions = [ "--group-directories-first" ]; + git = true; + icons = "auto"; + }; + nix-your-shell = { + enable = true; + enableFishIntegration = true; + }; + fish = { + enable = true; + shellAliases = { + ls = "eza"; + cat = "bat"; + l = "eza -lh"; + ll = "eza -lh"; + la = "eza -lah"; + man = "batman"; + ".." = "cd .."; + }; + interactiveShellInit = '' + fish_vi_key_bindings + ''; + }; + starship = { + enable = true; + enableFishIntegration = true; + }; + fzf.enable = true; + gh.enable = true; + gpg.enable = true; + jujutsu.enable = true; + lazygit.enable = true; + ripgrep.enable = true; + yazi.enable = true; + }; + }; +} diff --git a/modules/home-manager/bundles/work-apps.nix b/modules/home-manager/bundles/work-apps.nix new file mode 100644 index 0000000..c17ae8c --- /dev/null +++ b/modules/home-manager/bundles/work-apps.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + options.myHome.bundle.work-apps.enable = lib.mkEnableOption "enable work-apps bundle"; + config = lib.mkIf config.myHome.bundle.work-apps.enable { + home.packages = map lib.lowPrio [ + pkgs.tailscale-systray + pkgs.slack + pkgs.openvpn + ]; + }; +} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..6c79e62 --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,15 @@ +{ + ... +}: +{ + imports = [ + ./bundles + ./programs + ./services + + # ./dotfiles.nix + # ./helix.nix + # ./kitty.nix + # ./shell.nix + ]; +} diff --git a/modules/home-manager/programs/default.nix b/modules/home-manager/programs/default.nix new file mode 100644 index 0000000..7f45393 --- /dev/null +++ b/modules/home-manager/programs/default.nix @@ -0,0 +1,10 @@ +{ + ... +}: +{ + imports = [ + ./helix.nix + ./kitty.nix + ./nvim.nix + ]; +} diff --git a/modules/home-manager/programs/fish.nix b/modules/home-manager/programs/fish.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/home-manager/helix.nix b/modules/home-manager/programs/helix.nix similarity index 83% rename from modules/home-manager/helix.nix rename to modules/home-manager/programs/helix.nix index c23e862..11c3dfb 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/programs/helix.nix @@ -3,15 +3,9 @@ config, ... }: -let - cfg = config.myHome.helix; -in { - options = { - myHome.helix.enable = lib.mkEnableOption "enables helix"; - }; - - config = lib.mkIf cfg.enable { + options.myHome.programs.helix.enable = lib.mkEnableOption "enables helix"; + config = lib.mkIf config.myHome.programs.helix.enable { programs.helix = { enable = true; defaultEditor = true; diff --git a/modules/home-manager/kitty.nix b/modules/home-manager/programs/kitty.nix similarity index 81% rename from modules/home-manager/kitty.nix rename to modules/home-manager/programs/kitty.nix index 38708a7..4dd17ca 100644 --- a/modules/home-manager/kitty.nix +++ b/modules/home-manager/programs/kitty.nix @@ -3,15 +3,10 @@ config, ... }: -let - cfg = config.myHome.kitty; -in { - options = { - myHome.kitty.enable = lib.mkEnableOption "enables kitty"; - }; + options.myHome.programs.kitty.enable = lib.mkEnableOption "enables kitty"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.myHome.programs.kitty.enable { programs.kitty = lib.mkForce { enable = true; keybindings = { diff --git a/modules/home-manager/programs/nvim.nix b/modules/home-manager/programs/nvim.nix new file mode 100644 index 0000000..bc7ec45 --- /dev/null +++ b/modules/home-manager/programs/nvim.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + pkgs, + ... +}: +{ + options.myHome.programs.nvim.enable = lib.mkEnableOption "enables neovim"; + + config = lib.mkIf config.myHome.programs.nvim.enable { + home.packages = with pkgs; [ + lua + lua52Packages.luarocks + ghostscript + tectonic + mermaid-cli + lazygit + ]; + programs.neovim = { + enable = true; + vimAlias = true; + viAlias = true; + }; + home.file.".config/nvim" = { + source = ../../../dotfiles/nvim; + recursive = true; + }; + }; +} diff --git a/modules/home-manager/services/default.nix b/modules/home-manager/services/default.nix new file mode 100644 index 0000000..0a37e82 --- /dev/null +++ b/modules/home-manager/services/default.nix @@ -0,0 +1,10 @@ +{ + ... +}: +{ + imports = [ + ./hyprland.nix + ./nix.nix + ./waybar.nix + ]; +} diff --git a/modules/home-manager/services/hyprland.nix b/modules/home-manager/services/hyprland.nix new file mode 100644 index 0000000..a4583dd --- /dev/null +++ b/modules/home-manager/services/hyprland.nix @@ -0,0 +1,51 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.myNixOS.feature.hyprland.enable = lib.mkEnableOption "enables hyprland"; + + config = lib.mkIf config.myNixOS.feature.hyprland.enable { + home.file.".config/hypr" = { + source = ../../../dotfiles/hypr; + recursive = true; + }; + programs = { + dconf.enable = true; + hyprland.enable = true; + }; + + environment.systemPackages = with pkgs; [ + libnotify + xclip + wl-clipboard + hyprpaper + libnotify + hyprpicker + slurp + grim + rofi + ]; + + services = { + picom.enable = true; + xserver.enable = true; + }; + + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal + ]; + configPackages = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal + ]; + }; + }; +} diff --git a/modules/home-manager/services/nix.nix b/modules/home-manager/services/nix.nix new file mode 100644 index 0000000..7bfe402 --- /dev/null +++ b/modules/home-manager/services/nix.nix @@ -0,0 +1,42 @@ +{ + inputs, + config, + lib, + pkgs, + ... +}: +{ + options.myHome.services.nix.enable = lib.mkEnableOption "enable nix configuration"; + config = lib.mkIf config.myHome.services.nix.enable { + home.sessionVariables = { + FLAKE = "${config.home.homeDirectory}/nixos/"; + NH_FLAKE = "${config.home.homeDirectory}/nixos/"; + }; + systemPackages = map lib.lowPrio [ + pkgs.nh + pkgs.nil + pkgs.nixfmt-rfc-style + ]; + nix = { + settings = { + auto-optimise-store = true; + experimental-features = [ + "nix-command" + "flakes" + ]; + trusted-users = [ + "root" + ]; + }; + gc = { + automatic = true; + # dates = "weekly"; + }; + nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + extraOptions = '' + extra-substituters = https://devenv.cachix.org + extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= + ''; + }; + }; +} diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/services/waybar.nix similarity index 97% rename from modules/home-manager/waybar.nix rename to modules/home-manager/services/waybar.nix index 2b93177..240b5f2 100644 --- a/modules/home-manager/waybar.nix +++ b/modules/home-manager/services/waybar.nix @@ -8,11 +8,9 @@ let betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; in { - options = { - myHome.waybar.enable = lib.mkEnableOption "enables waybar"; - }; + options.myHome.services.waybar.enable = lib.mkEnableOption "enables waybar"; - config = lib.mkIf config.myHome.waybar.enable { + config = lib.mkIf config.myHome.services.waybar.enable { services.swaync = { enable = true; package = pkgs.swaynotificationcenter; @@ -30,10 +28,6 @@ in programs.waybar = { enable = true; package = pkgs.waybar; - # systemd = { - # enable = false; - # target = "graphical-session.target"; - # }; settings = [ { layer = "top"; diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix deleted file mode 100644 index e7e77e0..0000000 --- a/modules/home-manager/shell.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -{ - options = { - myHome.shell.enable = lib.mkEnableOption "enables shell stuff"; - }; - - config = lib.mkIf config.myHome.shell.enable { - home.packages = with pkgs; [ - aoc-cli - just - neofetch - typst - ]; - programs.direnv = { - enable = true; - }; - programs.nix-your-shell = { - enable = true; - enableFishIntegration = true; - }; - programs.starship = { - enable = true; - enableFishIntegration = true; - }; - programs.fish = { - enable = true; - shellAliases = { - ls = "eza --icons"; - cat = "bat"; - ll = "eza -lh --icons --grid --group-directories-first"; - la = "eza -lah --icons --grid --group-directories-first"; - ".." = "cd .."; - }; - }; - }; -} diff --git a/modules/nixos/archetypes/default.nix b/modules/nixos/archetypes/default.nix new file mode 100644 index 0000000..122a62d --- /dev/null +++ b/modules/nixos/archetypes/default.nix @@ -0,0 +1,9 @@ +{ + inputs, + ... +}: +{ + imports = [ + ./general.nix + ]; +} diff --git a/modules/nixos/archetypes/general.nix b/modules/nixos/archetypes/general.nix new file mode 100644 index 0000000..028a208 --- /dev/null +++ b/modules/nixos/archetypes/general.nix @@ -0,0 +1,63 @@ +{ + pkgs, + lib, + config, + inputs, + ... +}: +{ + options.myNixOS.archetype.general.enable = lib.mkEnableOption "enable general archetype"; + config = lib.mkIf config.myNixOS.archetype.general.enable { + myNixOS.features.stylix.enable = true; + + environment.systemPackages = [ + pkgs.openssl + pkgs.coreutils + ]; + hardware = { + graphics.enable = true; + bluetooth.enable = true; + bluetooth.powerOnBoot = true; + }; + + i18n = { + defaultLocale = "fr_FR.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "fr_FR.UTF-8"; + LC_IDENTIFICATION = "fr_FR.UTF-8"; + LC_MEASUREMENT = "fr_FR.UTF-8"; + LC_MONETARY = "fr_FR.UTF-8"; + LC_NAME = "fr_FR.UTF-8"; + LC_NUMERIC = "fr_FR.UTF-8"; + LC_PAPER = "fr_FR.UTF-8"; + LC_TELEPHONE = "fr_FR.UTF-8"; + LC_TIME = "fr_FR.UTF-8"; + }; + }; + networking.networkmanager.enable = true; + security.rtkit.enable = true; + + services = { + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + blueman.enable = true; + openssh.enable = true; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + printing.enable = true; + udev.packages = with pkgs; [ + vial + ]; + xserver.enable = true; + }; + + time.timeZone = "Europe/Paris"; + }; +} diff --git a/modules/nixos/cli-environment.nix b/modules/nixos/cli-environment.nix index 3c155e8..6d5c3a7 100644 --- a/modules/nixos/cli-environment.nix +++ b/modules/nixos/cli-environment.nix @@ -17,28 +17,10 @@ in config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ - vim - wget - killall - htop - p7zip - unzip - unrar - helix - direnv - git - bat - tree - imv - eza - fzf - appimage-run - nh openssl nixfmt-rfc-style nil ripgrep - coreutils fd clang ]; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..f71c1a5 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,27 @@ +{ + inputs, + ... +}: +{ + imports = [ + inputs.stylix.nixosModules.stylix + inputs.home-manager.nixosModules.home-manager + inputs.determinate.nixosModules.default + + ./archetypes + ./features + ./home-manager.nix + + # ./desktop-apps.nix + # ./fonts.nix + # ./gaming.nix + ]; + + config = { + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + nixpkgs.config.allowUnfree = true; + }; +} diff --git a/modules/nixos/dev-environment.nix b/modules/nixos/dev-environment.nix deleted file mode 100644 index 2588ec2..0000000 --- a/modules/nixos/dev-environment.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; -let - cfg = config.services.dev-environment; -in -{ - imports = [ ]; - - options.services.dev-environment = { - enable = mkEnableOption "enable dev-environment"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - # docker - # docker-compose - git - gh - jujutsu - lazyjj # jjui - commitizen - pre-commit - devenv - # cargo - # rustup - python312 - lua - lua52Packages.luarocks - ghostscript - tectonic - mermaid-cli - lazygit - ]; - programs = { - neovim = { - enable = true; - vimAlias = true; - viAlias = true; - }; - }; - }; -} diff --git a/modules/nixos/features/default.nix b/modules/nixos/features/default.nix new file mode 100644 index 0000000..e669d23 --- /dev/null +++ b/modules/nixos/features/default.nix @@ -0,0 +1,9 @@ +{ + inputs, + ... +}: +{ + imports = [ + ./stylix.nix + ]; +} diff --git a/modules/nixos/features/gaming.nix b/modules/nixos/features/gaming.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/nixos/features/stylix.nix b/modules/nixos/features/stylix.nix new file mode 100644 index 0000000..3240898 --- /dev/null +++ b/modules/nixos/features/stylix.nix @@ -0,0 +1,46 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.myNixOS.features.stylix.enable = lib.mkEnableOption "enable Stylix"; + config = lib.mkIf config.myNixOS.features.stylix.enable { + stylix = { + enable = true; + image = ../../../wall.jpg; + polarity = "dark"; + opacity.terminal = 0.9; + cursor.package = pkgs.bibata-cursors; + cursor.name = "Bibata-Modern-Ice"; + cursor.size = 24; + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font Mono"; + }; + sansSerif = { + package = pkgs.montserrat; + name = "Montserrat"; + }; + serif = { + package = pkgs.montserrat; + name = "Montserrat"; + }; + sizes = { + applications = 12; + terminal = 12; + desktop = 11; + popups = 12; + }; + }; + targets = { + chromium.enable = true; + grub.enable = true; + grub.useImage = true; + plymouth.enable = true; + }; + }; + }; +} diff --git a/modules/nixos/features/virtualisation.nix b/modules/nixos/features/virtualisation.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/nixos/home-manager.nix b/modules/nixos/home-manager.nix new file mode 100644 index 0000000..85733c4 --- /dev/null +++ b/modules/nixos/home-manager.nix @@ -0,0 +1,67 @@ +{ + lib, + config, + inputs, + outputs, + myLib, + pkgs, + ... +}: +let + cfg = config.myNixOS; +in +{ + options.myNixOS.home-users = lib.mkOption { + type = lib.types.attrsOf ( + lib.types.submodule { + options = { + userConfig = lib.mkOption { + default = ./../../hosts/home/home.nix; + }; + userNixosSettings = lib.mkOption { + default = { }; + }; + }; + } + ); + default = { }; + }; + config = { + programs.fish.enable = true; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { + inherit inputs; + inherit myLib; + outputs = inputs.self.outputs; + }; + users = builtins.mapAttrs ( + name: user: + { ... }: + { + imports = [ + (import user.userConfig) + outputs.homeManagerModules.default + ]; + } + ) (config.myNixOS.home-users); + }; + users.users = builtins.mapAttrs ( + name: user: + { + isNormalUser = true; + initialPassword = "toto"; + description = ""; + shell = pkgs.fish; + extraGroups = [ + "networkmanager" + "wheel" + "docker" + "lp" + ]; + } + // user.userNixosSettings + ) (config.myNixOS.home-users); + }; +} diff --git a/modules/nixos/window-manager.nix b/modules/nixos/window-manager.nix deleted file mode 100644 index 48a2b13..0000000 --- a/modules/nixos/window-manager.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; -let - cfg = config.services.window-manager; -in -{ - imports = [ ]; - - options.services.window-manager = { - enable = mkEnableOption "enable window-manager"; - }; - - config = mkIf cfg.enable { - # services.displayManager.defaultSession = "none+i3"; - services.xserver = { - enable = true; - windowManager.i3 = { - enable = true; - extraPackages = with pkgs; [ - # dmenu - i3lock - i3status - ]; - }; - }; - services.picom.enable = true; - programs.dconf.enable = true; - - programs.hyprland.enable = true; - programs.hyprlock.enable = true; - security.pam.services.hyprlock = { }; - environment.systemPackages = with pkgs; [ - # wofi - kdePackages.dolphin - waybar - pavucontrol - libnotify - xclip - wl-clipboard - hyprpaper - libnotify - hyprpicker - slurp - grim - swappy - swww - file-roller - rofi - ]; - - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - pkgs.xdg-desktop-portal - ]; - configPackages = [ - pkgs.xdg-desktop-portal-gtk - pkgs.xdg-desktop-portal-hyprland - pkgs.xdg-desktop-portal - ]; - }; - }; -} diff --git a/myLib/default.nix b/myLib/default.nix new file mode 100644 index 0000000..7bc1100 --- /dev/null +++ b/myLib/default.nix @@ -0,0 +1,31 @@ +inputs: +let + myLib = (import ./default.nix) { inherit inputs; }; + outputs = inputs.self.outputs; + nixpkgs = inputs.nixpkgs; +in +rec { + pkgsFor = system: import nixpkgs { inherit system; }; + + mkSystem = + config: + nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs myLib; }; + modules = [ + config + outputs.nixosModules.default + ]; + }; + + mkHome = + sys: config: + inputs.home-manager.lib.homeManagerConfiguration { + pkgs = pkgsFor sys; + extraSpecialArgs = { inherit inputs outputs myLib; }; + modules = [ + inputs.stylix.homeManagerModules.stylix + config + outputs.homeManagerModules.default + ]; + }; +}