From 08a5db8508fa48ea2842785a88913dc3a6cf1d32 Mon Sep 17 00:00:00 2001 From: tomoron Date: Mon, 15 Jun 2026 02:21:03 +0200 Subject: [PATCH] refactor some things, might have broken everything --- Makefile | 2 +- flake.nix | 17 +- homeConfigs/{utils => assets}/lock_screen.jpg | Bin homeConfigs/{utils => assets}/wallpaper.png | Bin homeConfigs/global/alacritty.nix | 11 + homeConfigs/global/appearance.nix | 7 +- homeConfigs/global/firefox.nix | 13 + homeConfigs/global/game.nix | 11 + homeConfigs/global/git.nix | 25 ++ .../global/{ => minimal}/fileManager.nix | 0 homeConfigs/global/minimal/other.nix | 6 + homeConfigs/global/minimal/packages.nix | 30 ++ homeConfigs/global/{ => minimal}/shell.nix | 15 +- homeConfigs/global/minimal/vim.nix | 213 ++++++++++++++ homeConfigs/{ => global}/packages.nix | 20 +- homeConfigs/global/rofi.nix | 2 +- homeConfigs/global/vim.nix | 58 ++++ homeConfigs/global/wayland/hypridle.nix | 27 ++ homeConfigs/global/wayland/hyprland.nix | 180 ++++++++++++ homeConfigs/global/wayland/hyprlock.nix | 32 ++ homeConfigs/global/wayland/packages.nix | 10 + homeConfigs/global/wayland/waybar.nix | 161 ++++++++++ homeConfigs/home.nix | 11 +- homeConfigs/hosts/default.nix | 5 - homeConfigs/hosts/desktop.nix | 3 - homeConfigs/hosts/iso.nix | 1 - homeConfigs/hosts/laptop.nix | 8 - homeConfigs/hosts/server.nix | 8 - homeConfigs/modules/alacritty.nix | 21 -- homeConfigs/modules/bash.nix | 24 -- homeConfigs/modules/firefox.nix | 22 -- homeConfigs/modules/game.nix | 20 -- homeConfigs/modules/git.nix | 34 --- homeConfigs/modules/nonChromium.nix | 16 - homeConfigs/modules/sync.nix | 25 +- homeConfigs/modules/vim.nix | 275 ------------------ homeConfigs/modules/wayland/hypridle.nix | 33 --- homeConfigs/modules/wayland/hyprland.nix | 194 ------------ homeConfigs/modules/wayland/hyprlock.nix | 32 -- homeConfigs/modules/wayland/packages.nix | 12 - homeConfigs/modules/wayland/waybar.nix | 163 ----------- osConfigs/global/boot.nix | 26 +- osConfigs/global/displayManager.nix | 13 + osConfigs/global/games.nix | 6 + osConfigs/global/minimal/boot.nix | 31 ++ osConfigs/global/{ => minimal}/nix.nix | 0 osConfigs/global/minimal/other.nix | 23 ++ osConfigs/global/minimal/packages.nix | 20 ++ osConfigs/global/{ => minimal}/sops.nix | 4 +- .../game.nix => global/minimal/user.nix} | 26 +- osConfigs/global/other.nix | 12 +- osConfigs/global/packages.nix | 10 +- osConfigs/global/user.nix | 7 +- osConfigs/hosts/desktop.nix | 30 +- osConfigs/hosts/iso.nix | 6 +- osConfigs/hosts/laptop.nix | 42 +-- osConfigs/hosts/server.nix | 39 +-- osConfigs/modules/displayManager.nix | 36 --- osConfigs/modules/virtualHost.nix | 10 +- osConfigs/modules/zfs.nix | 13 + osConfigs/os.nix | 15 +- 61 files changed, 1013 insertions(+), 1103 deletions(-) rename homeConfigs/{utils => assets}/lock_screen.jpg (100%) rename homeConfigs/{utils => assets}/wallpaper.png (100%) create mode 100644 homeConfigs/global/alacritty.nix create mode 100644 homeConfigs/global/firefox.nix create mode 100644 homeConfigs/global/game.nix create mode 100644 homeConfigs/global/git.nix rename homeConfigs/global/{ => minimal}/fileManager.nix (100%) create mode 100644 homeConfigs/global/minimal/other.nix create mode 100644 homeConfigs/global/minimal/packages.nix rename homeConfigs/global/{ => minimal}/shell.nix (66%) create mode 100644 homeConfigs/global/minimal/vim.nix rename homeConfigs/{ => global}/packages.nix (85%) create mode 100644 homeConfigs/global/vim.nix create mode 100644 homeConfigs/global/wayland/hypridle.nix create mode 100644 homeConfigs/global/wayland/hyprland.nix create mode 100644 homeConfigs/global/wayland/hyprlock.nix create mode 100644 homeConfigs/global/wayland/packages.nix create mode 100644 homeConfigs/global/wayland/waybar.nix delete mode 100644 homeConfigs/modules/alacritty.nix delete mode 100644 homeConfigs/modules/bash.nix delete mode 100644 homeConfigs/modules/firefox.nix delete mode 100644 homeConfigs/modules/game.nix delete mode 100644 homeConfigs/modules/git.nix delete mode 100644 homeConfigs/modules/nonChromium.nix delete mode 100644 homeConfigs/modules/vim.nix delete mode 100644 homeConfigs/modules/wayland/hypridle.nix delete mode 100644 homeConfigs/modules/wayland/hyprland.nix delete mode 100644 homeConfigs/modules/wayland/hyprlock.nix delete mode 100644 homeConfigs/modules/wayland/packages.nix delete mode 100644 homeConfigs/modules/wayland/waybar.nix create mode 100644 osConfigs/global/displayManager.nix create mode 100644 osConfigs/global/games.nix create mode 100644 osConfigs/global/minimal/boot.nix rename osConfigs/global/{ => minimal}/nix.nix (100%) create mode 100644 osConfigs/global/minimal/other.nix create mode 100644 osConfigs/global/minimal/packages.nix rename osConfigs/global/{ => minimal}/sops.nix (55%) rename osConfigs/{modules/game.nix => global/minimal/user.nix} (57%) delete mode 100644 osConfigs/modules/displayManager.nix create mode 100644 osConfigs/modules/zfs.nix diff --git a/Makefile b/Makefile index 21da412..8188898 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ vm: hoem : home home : - home-manager switch $(FLAGS) --flake $(FLAKE)#$(HOST) + home-manager build $(FLAGS) --flake $(FLAKE)#$(HOST) iso : nix build ".#nixosConfigurations.iso.config.system.build.isoImage" $(FLAGS) diff --git a/flake.nix b/flake.nix index 47ff007..2a3e785 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/17 18:15:24 by tomoron #+# #+# # -# Updated: 2026/06/10 21:17:12 by tomoron ### ########.fr # +# Updated: 2026/06/15 02:17:44 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -44,12 +44,12 @@ #}; }; - outputs = { nixpkgs, catppuccin, home-manager, nixos-hardware, dockermcmgr, ... }@inputs: + outputs = { nixpkgs, catppuccin, home-manager, nixos-hardware, ... }@inputs: let pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; - osConfig = {flakeName, extraModules ? []}: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; flakeName = flakeName; }; + osConfig = {flakeName, minimal ? false, extraModules ? []}: nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; flakeName = flakeName; minimal = minimal; }; modules = nixpkgs.lib.concatLists [ [ ./osConfigs/os.nix @@ -61,9 +61,9 @@ ]; }; - homeConfig = {flakeName, sops ? true, extraModules ? [], username ? "tom", homeDir ? "/home/tom"}: home-manager.lib.homeManagerConfiguration { + homeConfig = {flakeName, sops ? true, extraModules ? [], username ? "tom", homeDir ? "/home/tom", minimal ? false}: home-manager.lib.homeManagerConfiguration { inherit pkgs; - extraSpecialArgs = { inherit inputs; username = username; homeDir = homeDir; isOs = false; configSops = sops; }; + extraSpecialArgs = { inherit inputs; username = username; homeDir = homeDir; isOs = false; configSops = sops; minimal = minimal; }; modules = nixpkgs.lib.concatLists [ [ ./homeConfigs/home.nix @@ -76,9 +76,8 @@ }; in { - nixosConfigurations = { - server = osConfig {flakeName = "server";}; + server = osConfig {flakeName = "server"; minimal = true;}; vbox = osConfig {flakeName = "vbox";}; laptop = osConfig {flakeName = "laptop"; extraModules = [ nixos-hardware.nixosModules.asus-zephyrus-ga401 ];}; desktop = osConfig {flakeName = "desktop";}; @@ -99,7 +98,7 @@ ft = homeConfig { flakeName = "ft"; username = "tomoron"; homeDir = "/home/tomoron"; sops = false;}; laptop = homeConfig { flakeName = "laptop"; }; desktop = homeConfig { flakeName = "desktop"; }; - server = homeConfig { flakeName = "server"; }; + server = homeConfig { flakeName = "server"; minimal = true; }; }; }; diff --git a/homeConfigs/utils/lock_screen.jpg b/homeConfigs/assets/lock_screen.jpg similarity index 100% rename from homeConfigs/utils/lock_screen.jpg rename to homeConfigs/assets/lock_screen.jpg diff --git a/homeConfigs/utils/wallpaper.png b/homeConfigs/assets/wallpaper.png similarity index 100% rename from homeConfigs/utils/wallpaper.png rename to homeConfigs/assets/wallpaper.png diff --git a/homeConfigs/global/alacritty.nix b/homeConfigs/global/alacritty.nix new file mode 100644 index 0000000..1cdd9b5 --- /dev/null +++ b/homeConfigs/global/alacritty.nix @@ -0,0 +1,11 @@ +{ ... }: +{ + catppuccin.alacritty.enable = true; + programs.alacritty = { + enable = true; + settings = { + env.XTERM = "xterm-256color"; + font.size = 9; + }; + }; +} diff --git a/homeConfigs/global/appearance.nix b/homeConfigs/global/appearance.nix index 9bcee08..e70144f 100644 --- a/homeConfigs/global/appearance.nix +++ b/homeConfigs/global/appearance.nix @@ -2,7 +2,8 @@ { catppuccin = { enable = true; - autoEnable = true; + autoEnable = false; + flavor = "mocha"; dunst.enable = true; @@ -29,7 +30,7 @@ }; home.file = { - ".config/wallpaper.png".source = lib.mkDefault ../utils/wallpaper.png; - ".config/lock_screen.jpg".source = lib.mkDefault ../utils/lock_screen.jpg; + ".config/wallpaper.png".source = lib.mkDefault ../assets/wallpaper.png; + ".config/lock_screen.jpg".source = lib.mkDefault ../assets/lock_screen.jpg; }; } diff --git a/homeConfigs/global/firefox.nix b/homeConfigs/global/firefox.nix new file mode 100644 index 0000000..312e781 --- /dev/null +++ b/homeConfigs/global/firefox.nix @@ -0,0 +1,13 @@ +{ inputs, config, ... }: +{ + catppuccin.firefox.enable = true; + programs.firefox.configPath = "${config.xdg.configHome}/mozilla/firefox"; + programs.firefox = { + enable = true; + profiles.default = { + extensions.packages = with inputs.firefox-addons.packages."x86_64-linux"; + [vimium ublock-origin]; + extensions.force = true; + }; + }; +} diff --git a/homeConfigs/global/game.nix b/homeConfigs/global/game.nix new file mode 100644 index 0000000..f0a29c5 --- /dev/null +++ b/homeConfigs/global/game.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs;[ + lutris + mangohud + moonlight-qt + prismlauncher + + r2modman + ]; +} diff --git a/homeConfigs/global/git.nix b/homeConfigs/global/git.nix new file mode 100644 index 0000000..9155fc3 --- /dev/null +++ b/homeConfigs/global/git.nix @@ -0,0 +1,25 @@ +{ ... }: +{ + programs.git = { + enable = true; + lfs.enable = true; + signing.format = "openpgp"; + settings = { + user.email = "tomoron@student.42angouleme.fr"; + user.name = "tomoron"; + init.defaultBranch="master"; + pull.rebase = true; + push.autoSetupRemote = true; + rerere.enabled = true; + help.autocorrect = 1; + + user.signingkey = "251B4BD73683A8DF13D760A868BFAFE31DF313AD"; + commit.gpgsign = true; + + alias = { + fuck = "!f() { git reset --hard \"@{upstream}\" && git restore . && git clean -f .; };f"; + back = "reset HEAD~"; + }; + }; + }; +} diff --git a/homeConfigs/global/fileManager.nix b/homeConfigs/global/minimal/fileManager.nix similarity index 100% rename from homeConfigs/global/fileManager.nix rename to homeConfigs/global/minimal/fileManager.nix diff --git a/homeConfigs/global/minimal/other.nix b/homeConfigs/global/minimal/other.nix new file mode 100644 index 0000000..4e2d17c --- /dev/null +++ b/homeConfigs/global/minimal/other.nix @@ -0,0 +1,6 @@ +{ lib, ... }: + +{ + catppuccin.enable = lib.mkDefault false; + catppuccin.autoEnable = lib.mkDefault false; +} diff --git a/homeConfigs/global/minimal/packages.nix b/homeConfigs/global/minimal/packages.nix new file mode 100644 index 0000000..85f0b0f --- /dev/null +++ b/homeConfigs/global/minimal/packages.nix @@ -0,0 +1,30 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# packages.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2025/02/09 22:01:56 by tomoron #+# #+# # +# Updated: 2026/06/14 19:11:25 by tomoron ### ########.fr # +# # +# **************************************************************************** # + +{ pkgs, ...}: + +{ + home.packages = with pkgs;[ + lrzip + git + lm_sensors + wget + curl + man-pages + ffmpeg-full + nix-index + sops + screen + btop + htop + ]; +} diff --git a/homeConfigs/global/shell.nix b/homeConfigs/global/minimal/shell.nix similarity index 66% rename from homeConfigs/global/shell.nix rename to homeConfigs/global/minimal/shell.nix index 245561b..6bd00f0 100644 --- a/homeConfigs/global/shell.nix +++ b/homeConfigs/global/minimal/shell.nix @@ -1,4 +1,5 @@ { homeDir, ... }: + { home.shell.enableBashIntegration = true; home.shellAliases = { @@ -6,7 +7,6 @@ grep = "grep --color=auto"; vim = "nvim"; vi = "nvim"; - hl = "Hyprland"; clr = "clear"; noidle = "systemctl --user stop hypridle"; }; @@ -24,4 +24,17 @@ historyIgnore = [ "ls" "cd" "exit" ]; shellOptions = [ "cdspell" "autocd"]; }; + + programs.bash.bashrcExtra = '' + cd() { + builtin cd "$@" + echo -n "$PWD" > ~/.last_directory + } + + + if [ -f ~/.last_directory ] && [ -n "$PS1" ];then + echo "going to $(cat ~/.last_directory)" + builtin cd "$(cat ~/.last_directory)" + fi + ''; } diff --git a/homeConfigs/global/minimal/vim.nix b/homeConfigs/global/minimal/vim.nix new file mode 100644 index 0000000..6b54731 --- /dev/null +++ b/homeConfigs/global/minimal/vim.nix @@ -0,0 +1,213 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# vim.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2026/06/14 19:22:40 by tomoron #+# #+# # +# Updated: 2026/06/14 19:32:07 by tomoron ### ########.fr # +# # +# **************************************************************************** # + +{pkgs, ...}: + +{ + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + + withPython3 = false; + withRuby = false; + }; + + home.packages = with pkgs; [ + ripgrep + ]; + + programs.neovim.initLua= '' + local cmp = require'cmp' + + cmp.setup({ + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + end, + }, + + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'vsnip' }, + }, { + { name = 'buffer' }, + }) + }) + + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }), + matching = { disallow_symbol_nonprefix_matching = false } + }) + + local capabilities = require('cmp_nvim_lsp').default_capabilities() + + local _99 = require("99") + + local cwd = vim.uv.cwd() + local basename = vim.fs.basename(cwd) + _99.setup({ + provider = _99.Providers.OpenCodeProvider, + model = "ollama/gemma4:26b", + logger = { + level = _99.DEBUG, + path = "/home/tom/99logs/" .. basename .. ".99.debug", + print_on_error = true, + }, + tmp_dir = "./tmp", + + --- Completions: #rules and @files in the prompt buffer + completion = { + --- Configure @file completion (all fields optional, sensible defaults) + files = { + -- enabled = true, + -- max_file_size = 102400, -- bytes, skip files larger than this + -- max_files = 5000, -- cap on total discovered files + -- exclude = { ".env", ".env.*", "node_modules", ".git", ... }, + }, + --- File Discovery: + + source = "cmp", -- "native" (default), "cmp", or "blink" + }, + + md_files = { + -- "AGENT.md", + }, + }) + + vim.keymap.set("v", "9v", function() + _99.visual() + end) + + vim.keymap.set("n", "9x", function() + _99.stop_all_requests() + end) + + vim.keymap.set("n", "9s", function() + _99.search() + end) + + vim.keymap.set("n", "9m", function() + require("99.extensions.telescope").select_model() + end) + ''; + + programs.neovim.extraConfig = '' + set number + set ai + autocmd BufWinLeave *.* mkview + autocmd BufWinEnter *.* silent! loadview + set tabstop=4 + set scrolloff=10 + set smartindent + set shiftwidth=4 + map :bnext + map :bprevious + nmap :wincmd k + nmap :wincmd j + nmap :wincmd h + nmap :wincmd l + set hidden + set path +=** + set wildmenu + set wildignore+=**/node_modules/** + + let mapleader=";" + + autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) + \| PlugInstall --sync + \| endif + + call plug#begin('~/.config/nvim/plugged') + Plug 'bling/vim-bufferline' + Plug 'nvim-lua/plenary.nvim' + Plug 'nvim-telescope/telescope.nvim' + Plug 'andweeb/presence.nvim' + Plug 'neovim/nvim-lspconfig' + Plug 'bluz71/vim-nightfly-colors' + Plug 'catppuccin/nvim', { 'as': 'catppuccin' } + Plug 'tikhomirov/vim-glsl' + Plug 'lambdalisue/nerdfont.vim' + Plug 'lambdalisue/glyph-palette.vim' + Plug 'lambdalisue/fern-renderer-nerdfont.vim' + Plug 'lambdalisue/fern-git-status.vim' + Plug 'lambdalisue/fern.vim' + Plug 'hrsh7th/nvim-cmp' + Plug 'ThePrimeagen/99' + Plug 'hrsh7th/cmp-nvim-lsp' + Plug 'hrsh7th/cmp-buffer' + Plug 'hrsh7th/cmp-path' + Plug 'hrsh7th/cmp-cmdline' + Plug 'hrsh7th/nvim-cmp' + + Plug 'hrsh7th/cmp-vsnip' + Plug 'hrsh7th/vim-vsnip' + call plug#end() + + colorscheme catppuccin-mocha + + set signcolumn=auto + + nnoremap ff Telescope find_files + nnoremap fg Telescope live_grep + nnoremap fb Telescope buffers + nnoremap fh Telescope help_tags + nnoremap fi Fern %:h + + let g:user42 = 'tomoron' + let g:mail42 = 'tomoron@student.42angouleme.fr' + let g:fern#renderer = "nerdfont" + ''; + + home.file = { + #install plug.vim + ".local/share/nvim/site/autoload/plug.vim".source = "${fetchGit { + url = "https://github.com/junegunn/vim-plug"; + rev = "d80f495fabff8446972b8695ba251ca636a047b0"; + ref = "master"; + }}/plug.vim"; + + #install stdheader 42 + ".config/nvim/plugin/stdheader.vim".source = "${fetchGit { + url = "https://github.com/42Paris/42header"; + rev = "e6e6b191871545e0d43f1aad817070bc806b8fa7"; + ref = "master"; + }}/plugin/stdheader.vim"; + + }; +} diff --git a/homeConfigs/packages.nix b/homeConfigs/global/packages.nix similarity index 85% rename from homeConfigs/packages.nix rename to homeConfigs/global/packages.nix index 2b0c610..2108a2c 100644 --- a/homeConfigs/packages.nix +++ b/homeConfigs/global/packages.nix @@ -6,36 +6,28 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/02/09 22:01:56 by tomoron #+# #+# # -# Updated: 2026/06/11 16:36:57 by tomoron ### ########.fr # +# Updated: 2026/06/15 01:56:12 by tomoron ### ########.fr # # # # **************************************************************************** # -{ pkgs, inputs, ...}: +{ pkgs, ...}: { home.packages = with pkgs;[ - lrzip pigz - htop gnumake - git fastfetch clang ninja gdb valgrind - wget cmake - man-pages stress - ffmpeg-full - ripgrep + activate-linux - unison brightnessctl playerctl vlc - nix-index yubikey-manager bibata-cursors libcaca @@ -43,9 +35,13 @@ nerd-fonts.iosevka compiledb yubikey-personalization - sops libreoffice doxygen qimgv + acpi + + discord + google-chrome + localsend ]; } diff --git a/homeConfigs/global/rofi.nix b/homeConfigs/global/rofi.nix index e1d9630..696de21 100644 --- a/homeConfigs/global/rofi.nix +++ b/homeConfigs/global/rofi.nix @@ -5,7 +5,7 @@ theme = "rounded-nord-dark"; }; - home.file.".local/share/rofi/themes".source = "${builtins.fetchGit { + home.file.".local/share/rofi/themes".source = "${fetchGit { url = "https://github.com/newmanls/rofi-themes-collection"; rev = "c8239a45edced3502894e1716a8b661fdea8f1c9"; ref = "master"; diff --git a/homeConfigs/global/vim.nix b/homeConfigs/global/vim.nix new file mode 100644 index 0000000..74bfa92 --- /dev/null +++ b/homeConfigs/global/vim.nix @@ -0,0 +1,58 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + clang-tools + nixd + nodejs_24 + glsl_analyzer + opencode + (pkgs.python3.withPackages (ps: with ps; [ + python-lsp-server + pylsp-mypy + python-lsp-ruff + pycodestyle + ])) + ]; + + programs.neovim.initLua= '' + vim.lsp.enable('clangd') + vim.lsp.config('clangd', { + capabilities = capabilities + }) + + vim.lsp.enable('nixd') + vim.lsp.config('nixd', { + capabilities = capabilities + }) + + vim.lsp.enable('glsl_analyzer') + vim.lsp.config('glsl_analyzer', { + capabilities = capabilities + }) + + vim.lsp.enable('pylsp') + vim.lsp.config('pylsp', { + capabilities = capabilities + }) + + vim.lsp.enable('rust_analyzer') + vim.lsp.config('rust_analyzer', { + capabilities = capabilities, + settings = { + ["rust-analyzer"] = { + cargo = { + features = "all" + }, + }, + }, + }) + + vim.diagnostic.config({ + virtual_lines = { + current_line = true + } + }) + ''; + +} diff --git a/homeConfigs/global/wayland/hypridle.nix b/homeConfigs/global/wayland/hypridle.nix new file mode 100644 index 0000000..8ff7953 --- /dev/null +++ b/homeConfigs/global/wayland/hypridle.nix @@ -0,0 +1,27 @@ +{ ... }: + +{ + home.shellAliases.noidle = "systemctl --user stop hypridle"; + services.hypridle = { + enable = true; + settings = { + general.lock_cmd = "hyprlock"; + general.before_sleep_cmd = "loginctl lock-session"; + listener = [ + { + timeout = 300; + on-timeout = "brightnessctl -s set 0"; + on-resume = "brightnessctl -r"; + } + { + timeout = 300; + on-timeout = "loginctl lock-session"; + } + { + timeout = 1800; + on-timeout = "systemctl suspend"; + } + ]; + }; + }; +} diff --git a/homeConfigs/global/wayland/hyprland.nix b/homeConfigs/global/wayland/hyprland.nix new file mode 100644 index 0000000..a50e333 --- /dev/null +++ b/homeConfigs/global/wayland/hyprland.nix @@ -0,0 +1,180 @@ +{ ... }: + +{ + wayland.windowManager.hyprland.systemd.variables = [ "--all" ]; + + programs.hyprshot.enable = true; + catppuccin.hyprland.enable = false; + + home.shellAliases.hl = "Hyprland"; + + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.configType = "hyprlang"; + wayland.windowManager.hyprland.settings = { + "$mainMod" = "SUPER"; + bind = [ + " , Print, exec, hyprshot -m region -o ~/screenshots -f $(date +%Y-%m-%d_%H-%M-%S).png" + " SHIFT, Print, exec, hyprshot -m output -m active -o ~/screenshots -f $(date +%Y-%m-%d_%H-%M-%S).png" + "$mainMod, Return, exec, alacritty" + "CTRL_ALT, Q, killactive," + "CTRL_ALT_SHIFT, Q, forcekillactive," + "SUPER_ALT, Q, exit," + "$mainMod, S, togglefloating," + "$mainMod, I, pin," + "$mainMod, D, exec, rofi -show drun -show-icons" + "$mainMod SHIFT, D, exec, rofi -show run -show-icons" + "$mainMod, M, fullscreen, 1" + "$mainMod, F, fullscreen, 0" + + # Move focus + "$mainMod, h, movefocus, l" + "$mainMod, l, movefocus, r" + "$mainMod, k, movefocus, u" + "$mainMod, j, movefocus, d" + + #swap windows + "$mainMod SHIFT, h, swapwindow, l" + "$mainMod SHIFT, l, swapwindow, r" + "$mainMod SHIFT, k, swapwindow, u" + "$mainMod SHIFT, j, swapwindow, d" + + # Switch workspaces with mainMod + [0-9] + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "$mainMod SHIFT, 1, movetoworkspacesilent, 1" + "$mainMod SHIFT, 2, movetoworkspacesilent, 2" + "$mainMod SHIFT, 3, movetoworkspacesilent, 3" + "$mainMod SHIFT, 4, movetoworkspacesilent, 4" + "$mainMod SHIFT, 5, movetoworkspacesilent, 5" + "$mainMod SHIFT, 6, movetoworkspacesilent, 6" + "$mainMod SHIFT, 7, movetoworkspacesilent, 7" + "$mainMod SHIFT, 8, movetoworkspacesilent, 8" + "$mainMod SHIFT, 9, movetoworkspacesilent, 9" + "$mainMod SHIFT, 0, movetoworkspacesilent, 10" + + # Scroll through existing workspaces with mainMod + scroll + "$mainMod, mouse_down, workspace, e+1" + "$mainMod, mouse_up, workspace, e-1" + ]; + + bindm = [ #bind mouse + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + + bindel = [ #repeat and locked + " ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + " ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + " ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + " ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + " ,XF86MonBrightnessUp, exec, brightnessctl s 10%+" + " ,XF86MonBrightnessDown, exec, brightnessctl s 10%-" + " ,XF86KbdBrightnessUp, exec, asusctl -n" + " ,XF86KbdBrightnessDown, exec, asusctl -p" + ]; + + bindl = [ #repeat + " , XF86AudioNext, exec, playerctl next" + " , XF86AudioPrev, exec, playerctl previous" + " , XF86AudioPause, exec, playerctl play-pause" + " , XF86AudioPlay, exec, playerctl play-pause" + "$mainMod, n, exec, playerctl next" + "$mainMod, p, exec, playerctl previous" + "$mainMod, o, exec, playerctl play-pause" + ]; + + windowrulev2 = [ + #ignore maximize requests + "suppressevent maximize, class:.*" + #fix dragging issues with xwayland + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" + ]; + + input = { + kb_layout = "fr"; + kb_variant = "us"; + follow_mouse = 2; + kb_options = "caps:none"; + touchpad.natural_scroll = false; + }; + + misc = { + force_default_wallpaper = 1; + disable_hyprland_logo = true; + mouse_move_focuses_monitor = false; + }; + + dwindle = { + force_split = 2; + }; + + animations = { + enabled = true; + + bezier = [ + "easeInOut, 0.77, 0, 0.175, 1" + "easeOut, 0.24, 0.66, 0.04, 1" + ]; + + animation = [ + "windows, 1, 2, easeInOut" + "windowsIn, 1, 2, easeInOut, slide" + "windowsOut, 1, 2, easeInOut, slide" + "fade, 1, 2, easeInOut" + "workspaces, 1, 2, easeOut" + ]; + }; + + decoration = { + rounding = 10; + + shadow = { + enabled = true; + range = 4; + render_power = 3; + color = "rgba(1a1a1aee)"; + }; + }; + + general = { + gaps_in = 2; + gaps_out = 5; + border_size = 1; + "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + resize_on_border = false; + allow_tearing = false; + layout = "dwindle"; + }; + + layerrule = { + name = "no_anim_for_selection"; + no_anim = "on"; + "match:namespace" = "selection"; + }; + + cursor.no_warps = true; + + env = [ + "HYPRCURSOR_SIZE,17" + "HYPRCURSOR_THEME,bibata-modern-classic" + ]; + + exec-once = [ + "swaybg -i ~/.config/wallpaper.png&" + "(sleep 2;activate-linux)&" + "waybar&" + "alacritty&" + ]; + }; +} diff --git a/homeConfigs/global/wayland/hyprlock.nix b/homeConfigs/global/wayland/hyprlock.nix new file mode 100644 index 0000000..b55c79f --- /dev/null +++ b/homeConfigs/global/wayland/hyprlock.nix @@ -0,0 +1,32 @@ +{ ... }: + +{ + programs.hyprlock.enable = true; + + catppuccin.hyprlock.enable = false; + + programs.hyprlock.settings = { + general = { + no_fade_out = true; + ignore_empty_input = false; + }; + + background = { + monitor = ""; + path = "~/.config/lock_screen.jpg"; + }; + + input-field = { + monitor = ""; + size = "300, 50"; + dot_size = "0.2"; + dots_fade_time = 100; + inner_color = "rgb(139,89,100)"; + outer_color = "rgb(139,89,100)"; + outline_thickness = 1; + + fail_transition = "300"; + fail_text = "learn to write, idiot"; + }; + }; +} diff --git a/homeConfigs/global/wayland/packages.nix b/homeConfigs/global/wayland/packages.nix new file mode 100644 index 0000000..562fbd5 --- /dev/null +++ b/homeConfigs/global/wayland/packages.nix @@ -0,0 +1,10 @@ +{ pkgs, lib, config, ... }: + +{ + home.packages = with pkgs; [ + grim + slurp + wl-clipboard + swaybg + ]; +} diff --git a/homeConfigs/global/wayland/waybar.nix b/homeConfigs/global/wayland/waybar.nix new file mode 100644 index 0000000..874e685 --- /dev/null +++ b/homeConfigs/global/wayland/waybar.nix @@ -0,0 +1,161 @@ +{ ... }: + +{ + programs.waybar.enable = true; + programs.waybar.style = '' + * { + border: none; + border-radius: 0; + font-family: "Iosevka Nerd Font"; + font-size: 15px; + min-height: 0; + } + + window#waybar { + background: transparent; + color: white; + } + + #window { + font-weight: bold; + } + + #workspaces button { + padding: 0 5px; + background: transparent; + color: white; + border-top: 2px solid transparent; + } + + #workspaces button.focused { + color: #c9545d; + border-top: 2px solid #c9545d; + } + + #workspaces button.active { + color : #88ff88; + background-color : rgba(220,255, 220, 0.3) + } + + #mode { + background: #64727D; + border-bottom: 3px solid white; + } + + #network.disconnected { + color: #f53c3c; + font-weight:bold; + } + + #temperature.critical { + color: #ff2222; + } + + #battery.critical { + color: #ff2222; + } + #cpu.high { + color: #ff2222; + } + #disk.high { + color: #ff2222; + } + ''; + + programs.waybar.settings.mainBar = { + layer = "top"; + position ="top"; + height = 24; + margin-left = 5; + margin-right = 5; + modules-left = ["hyprland/workspaces" "custom/music"]; + modules-center = ["hyprland/window"]; + modules-right = ["disk" "pulseaudio" "network" "custom/pipe" "cpu" "custom/pipe" "temperature" "custom/pipe" "memory" "battery" "clock"]; + + "hyprland/workspaces" = { + disable-scroll = true; + all-outputs = false; + format = "{id}"; + }; + + clock = { + interval = 1; + format-alt = " {:%Y-%m-%d}"; + format = " {:%H:%M:%S}"; + }; + + cpu = { + format = "  {usage}% "; + states.high = 80; + interval = 5; + }; + + memory = { + format = "  {}% |"; + interval = 5; + }; + + battery = { + bat = "BAT0"; + full-at = 79; + states = { + good = 20; + critical = 15; + }; + format-time = " {H}:{m}"; + format-discharging = " {icon} {capacity}%{time} |"; + format-charging = "  {capacity}%{time} |"; + format-plugged = ""; + format-icons = [" " " " " " " " " "]; + interval = 10; + }; + + network = { + format-wifi = " {icon} {essid} "; + format-ethernet = "  {ifname}: {ipaddr}/{cidr} "; + format-disconnected = " ⚠ Disconnected "; + format-icons =["󰤟 " "󰤢 " "󰤥 " "󰤨 "]; + }; + + pulseaudio = { + format = " {icon}{volume}% |"; + format-bluetooth = "  {icon} {volume}% |"; + format-muted = ""; + format-icons = { + headphones = " "; + handsfree = "󰋎 "; + headset = "󰋎 "; + phone = " "; + portable = " "; + car = " "; + default = [" " " " " "]; + }; + on-click = "pavucontrol"; + }; + + temperature = { + thermal-zone = 0; + critical-threshold = 80; + interval = 5; + format =" {icon} {temperatureC}°C "; + format-icons = ["" "" "" "" ""]; + }; + + disk = { + format =" 󰋊 {percentage_used}% |"; + states.high = "5"; + }; + + "custom/pipe" = { + format = "|"; + }; + + "custom/music" = { + exec-if = "playerctl metadata 2>&1 >/dev/null"; + exec = "playerctl metadata --format ' {{ artist }} - {{title}}'"; + interval = 1; + interval-if = 5; + }; + + }; +} diff --git a/homeConfigs/home.nix b/homeConfigs/home.nix index db60414..e5e42c5 100644 --- a/homeConfigs/home.nix +++ b/homeConfigs/home.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/17 18:15:38 by tomoron #+# #+# # -# Updated: 2026/05/18 13:22:43 by tomoron ### ########.fr # +# Updated: 2026/06/15 01:53:27 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -16,15 +16,14 @@ username ? "tom", homeDir ? "/home/tom", isOs ? false, configSops ? true, +minimal, ... }: { - imports = lib.concatLists [ - [ ./packages.nix ] - (lib.fileset.toList ./modules) - (lib.fileset.toList ./global) - ]; + imports = (lib.fileset.toList ./modules) + ++ (lib.lists.optionals minimal (lib.fileset.toList ./global/minimal)) + ++ (lib.lists.optionals (!minimal) (lib.fileset.toList ./global)); home.username = lib.mkIf (!isOs) "${username}"; home.homeDirectory = lib.mkIf (!isOs) "${homeDir}"; diff --git a/homeConfigs/hosts/default.nix b/homeConfigs/hosts/default.nix index c4c0eea..d901bd1 100644 --- a/homeConfigs/hosts/default.nix +++ b/homeConfigs/hosts/default.nix @@ -1,11 +1,6 @@ { ... }: { - mods.game.enable = false; - mods.hyprland.enable = false; - mods.x11.enable = true; - programs.firefox.enable = false; - services.picom = { backend = "xrender"; settings = { diff --git a/homeConfigs/hosts/desktop.nix b/homeConfigs/hosts/desktop.nix index 00721c0..b159a91 100644 --- a/homeConfigs/hosts/desktop.nix +++ b/homeConfigs/hosts/desktop.nix @@ -1,7 +1,6 @@ { ... }: { - mods.x11.enable = true; wayland.windowManager.hyprland.settings = { monitor = [ "DP-2, 1920x1080@60Hz, -1920x0, auto" @@ -23,6 +22,4 @@ cursor.no_hardware_cursors = true; misc.vrr = 1; }; - - mods.hyprland.autoSuspend = false; } diff --git a/homeConfigs/hosts/iso.nix b/homeConfigs/hosts/iso.nix index f055981..b6d41ba 100644 --- a/homeConfigs/hosts/iso.nix +++ b/homeConfigs/hosts/iso.nix @@ -1,5 +1,4 @@ { lib, pkgs, ... }: { - mods.nonChromium.enable = false; } diff --git a/homeConfigs/hosts/laptop.nix b/homeConfigs/hosts/laptop.nix index cc589e1..619e0a4 100644 --- a/homeConfigs/hosts/laptop.nix +++ b/homeConfigs/hosts/laptop.nix @@ -27,13 +27,7 @@ ", XF86Launch1, exec, hyprlock" ", XF86Launch4, exec, pkill activate-linux" ]; - bindl = [ -# ",switch:off:Lid Switch,exec,hyprctl keyword monitor \"eDP-1, 1920x1080@120, 0x0, 1\"" -# ",switch:on:Lid Switch,exec,hyprctl keyword monitor \"eDP-1, disable\"" - - ]; monitor= [ -# "eDP-1, modeline 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync, 0x0, 1" "eDP-1, 1920x1080@120, 0x0, 1" "HDMI-A-1, 1920x1080@60, auto, auto" ]; @@ -43,8 +37,6 @@ home.packages = with pkgs; [ blender wireshark - localsend - impala ]; services.mpris-proxy.enable = true; diff --git a/homeConfigs/hosts/server.nix b/homeConfigs/hosts/server.nix index 8353edd..a8a721d 100644 --- a/homeConfigs/hosts/server.nix +++ b/homeConfigs/hosts/server.nix @@ -1,12 +1,4 @@ { config, lib, pkgs, ... }: { - mods.bash.goback = false; - wayland.windowManager.hyprland.settings = { - monitor= [ - "virt-1, 1920x1080@60, 0x0, 1.0" - ]; - - env = ["WLR_BACKENDS,headless"]; - }; } diff --git a/homeConfigs/modules/alacritty.nix b/homeConfigs/modules/alacritty.nix deleted file mode 100644 index 8b3b503..0000000 --- a/homeConfigs/modules/alacritty.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, config, ... }: - -{ - options.mods.alacritty.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "install and config alacritty"; - }; - - config = lib.mkIf config.mods.alacritty.enable { - catppuccin.alacritty.enable = true; - programs.alacritty = { - enable = true; - settings = { -# window.opacity = 0.95; - env.XTERM = "xterm-256color"; - font.size = 9; - }; - }; - }; -} diff --git a/homeConfigs/modules/bash.nix b/homeConfigs/modules/bash.nix deleted file mode 100644 index 17573b1..0000000 --- a/homeConfigs/modules/bash.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, config, ...}: - -{ - options.mods.bash.goback = lib.mkOption{ - type = lib.types.bool; - default = true; - description = "go back to last cd when starting bash"; - }; - - config.programs.bash.bashrcExtra = lib.mkIf config.mods.bash.goback '' - cd() { - builtin cd "$@" - echo -n "$PWD" > ~/.last_directory - } - [ -z "\$${PS1:-}" ] && return - - if [ -f ~/.last_directory ];then - echo -n going to - cat ~/.last_directory - echo - builtin cd "$(cat ~/.last_directory)" - fi - ''; -} diff --git a/homeConfigs/modules/firefox.nix b/homeConfigs/modules/firefox.nix deleted file mode 100644 index 154a3f6..0000000 --- a/homeConfigs/modules/firefox.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, inputs, ... }: - -{ - options.mods.firefox.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "install and configure firefox"; - }; - - config = lib.mkIf config.mods.firefox.enable { - catppuccin.firefox.enable = true; - programs.firefox.configPath = "${config.xdg.configHome}/mozilla/firefox"; - programs.firefox = { - enable = lib.mkDefault true; - profiles.default = { - extensions.packages = with inputs.firefox-addons.packages."x86_64-linux"; - [vimium ublock-origin]; - extensions.force = true; - }; - }; - }; -} diff --git a/homeConfigs/modules/game.nix b/homeConfigs/modules/game.nix deleted file mode 100644 index 3459a4d..0000000 --- a/homeConfigs/modules/game.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.mods.game.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "install packages for games (except steam , it's installed systemwide)"; - }; - - config = lib.mkIf config.mods.game.enable { - home.packages = with pkgs;[ - lutris - mangohud - moonlight-qt - prismlauncher - - r2modman - ]; - }; -} diff --git a/homeConfigs/modules/git.nix b/homeConfigs/modules/git.nix deleted file mode 100644 index 28e8922..0000000 --- a/homeConfigs/modules/git.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, ... }: - -{ - options.mods.git.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "git configuration"; - }; - - config = lib.mkIf config.mods.git.enable { - programs.git = { - enable = true; - lfs.enable = true; - signing.format = "openpgp"; - settings = { - user.email = "tomoron@student.42angouleme.fr"; - user.name = "tomoron"; - init.defaultBranch="master"; - pull.rebase = true; - push.autoSetupRemote = true; - rerere.enabled = true; - help.autocorrect = 1; - - user.signingkey = "251B4BD73683A8DF13D760A868BFAFE31DF313AD"; - commit.gpgsign = true; - - alias = { - fuck = "!f() { git reset --hard \"@{upstream}\" && git restore . && git clean -f .; };f"; - back = "reset HEAD~"; - }; - }; - }; - }; -} diff --git a/homeConfigs/modules/nonChromium.nix b/homeConfigs/modules/nonChromium.nix deleted file mode 100644 index bd83476..0000000 --- a/homeConfigs/modules/nonChromium.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.mods.nonChromium.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "all chromium/electron based application can't be built by act-runner, so they can't be in the iso"; - }; - - config = lib.mkIf config.mods.nonChromium.enable { - home.packages = with pkgs;[ - discord - google-chrome - ]; - }; -} diff --git a/homeConfigs/modules/sync.nix b/homeConfigs/modules/sync.nix index 812b2d0..4bff5b3 100644 --- a/homeConfigs/modules/sync.nix +++ b/homeConfigs/modules/sync.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: +{ lib, config, pkgs, ... }: let defPathLst = ["desktop" "42_desktop" "Downloads"]; @@ -41,15 +41,18 @@ in description = "hostname used by unison"; }; }; - - config.home.file.".unison/default.prf" = lib.mkIf config.mods.sync.enable { - text = (lib.strings.concatStrings ['' - auto=true - root=${config.mods.sync.homeFolder} - root=ssh://tom@d.tmoron.fr:1880/${config.mods.sync.destFolder} - '' - (lib.strings.concatMapStrings (x: "\npath=" + x) (( if config.mods.sync.defaultSynced then defPathLst else [] ) ++ config.mods.sync.syncedAdditions )) - (if !(isNull config.mods.sync.customHostName) then "\nclientHostName=${config.mods.sync.customHostName}" else "") - ]); + config = lib.mkIf config.mods.sync.enable { + + home.packages = with pkgs;[ unison ]; + home.file.".unison/default.prf" = { + text = (lib.strings.concatStrings ['' + auto=true + root=${config.mods.sync.homeFolder} + root=ssh://tom@d.tmoron.fr:1880/${config.mods.sync.destFolder} + '' + (lib.strings.concatMapStrings (x: "\npath=" + x) (( if config.mods.sync.defaultSynced then defPathLst else [] ) ++ config.mods.sync.syncedAdditions )) + (if !(isNull config.mods.sync.customHostName) then "\nclientHostName=${config.mods.sync.customHostName}" else "") + ]); + }; }; } diff --git a/homeConfigs/modules/vim.nix b/homeConfigs/modules/vim.nix deleted file mode 100644 index fe8f67f..0000000 --- a/homeConfigs/modules/vim.nix +++ /dev/null @@ -1,275 +0,0 @@ -{config, lib, pkgs, ...}: - -{ - options.mods.vim.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "install and configure vim"; - }; - - config = lib.mkIf config.mods.vim.enable { - programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - - withPython3 = false; - withRuby = false; - }; - - home.packages = with pkgs; [ - clang-tools - nixd - nodejs_24 - glsl_analyzer - opencode - (pkgs.python3.withPackages (ps: with ps; [ - python-lsp-server - pylsp-mypy - python-lsp-ruff - pycodestyle - ])) - ]; - -# programs.neovim.extraLuaConfig = '' -# vim.lsp.config('pylsp', {}) -# ''; - - - programs.neovim.initLua= '' - local cmp = require'cmp' - cmp.setup({ - snippet = { - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. - end, - }, - - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - }), - - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'vsnip' }, - }, { - { name = 'buffer' }, - }) - }) - - -- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below - -- Set configuration for specific filetype. - --[[ cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'git' }, - }, { - { name = 'buffer' }, - }) - }) - require("cmp_git").setup() ]]-- - - -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } - }) - - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }), - matching = { disallow_symbol_nonprefix_matching = false } - }) - - local capabilities = require('cmp_nvim_lsp').default_capabilities() - - vim.lsp.enable('clangd') - vim.lsp.config('clangd', { - capabilities = capabilities - }) - - vim.lsp.enable('nixd') - vim.lsp.config('nixd', { - capabilities = capabilities - }) - - vim.lsp.enable('glsl_analyzer') - vim.lsp.config('glsl_analyzer', { - capabilities = capabilities - }) - - vim.lsp.enable('pylsp') - vim.lsp.config('pylsp', { - capabilities = capabilities - }) - - vim.lsp.enable('rust_analyzer') - vim.lsp.config('rust_analyzer', { - capabilities = capabilities, - settings = { - ["rust-analyzer"] = { - cargo = { - features = "all" - }, - }, - }, - }) - - vim.diagnostic.config({ - virtual_lines = { - current_line = true - } - }) - - - local _99 = require("99") - - local cwd = vim.uv.cwd() - local basename = vim.fs.basename(cwd) - _99.setup({ - provider = _99.Providers.OpenCodeProvider, - model = "ollama/gemma4:26b", - logger = { - level = _99.DEBUG, - path = "/home/tom/99logs/" .. basename .. ".99.debug", - print_on_error = true, - }, - tmp_dir = "./tmp", - - --- Completions: #rules and @files in the prompt buffer - completion = { - --- Configure @file completion (all fields optional, sensible defaults) - files = { - -- enabled = true, - -- max_file_size = 102400, -- bytes, skip files larger than this - -- max_files = 5000, -- cap on total discovered files - -- exclude = { ".env", ".env.*", "node_modules", ".git", ... }, - }, - --- File Discovery: - - source = "cmp", -- "native" (default), "cmp", or "blink" - }, - - md_files = { - -- "AGENT.md", - }, - }) - - vim.keymap.set("v", "9v", function() - _99.visual() - end) - - vim.keymap.set("n", "9x", function() - _99.stop_all_requests() - end) - - vim.keymap.set("n", "9s", function() - _99.search() - end) - - vim.keymap.set("n", "9m", function() - require("99.extensions.telescope").select_model() - end) - ''; - - programs.neovim.extraConfig = '' - set number - set ai - autocmd BufWinLeave *.* mkview - autocmd BufWinEnter *.* silent! loadview - set tabstop=4 - set scrolloff=10 - set smartindent - set shiftwidth=4 - map :bnext - map :bprevious - nmap :wincmd k - nmap :wincmd j - nmap :wincmd h - nmap :wincmd l - set hidden - set path +=** - set wildmenu - set wildignore+=**/node_modules/** - - let mapleader=";" - - autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) - \| PlugInstall --sync - \| endif - - call plug#begin('~/.config/nvim/plugged') - Plug 'bling/vim-bufferline' - Plug 'nvim-lua/plenary.nvim' - Plug 'nvim-telescope/telescope.nvim' - Plug 'andweeb/presence.nvim' - Plug 'neovim/nvim-lspconfig' - Plug 'bluz71/vim-nightfly-colors' - Plug 'catppuccin/nvim', { 'as': 'catppuccin' } - Plug 'tikhomirov/vim-glsl' - Plug 'lambdalisue/nerdfont.vim' - Plug 'lambdalisue/glyph-palette.vim' - Plug 'lambdalisue/fern-renderer-nerdfont.vim' - Plug 'lambdalisue/fern-git-status.vim' - Plug 'lambdalisue/fern.vim' - Plug 'hrsh7th/nvim-cmp' - Plug 'ThePrimeagen/99' - Plug 'hrsh7th/cmp-nvim-lsp' - Plug 'hrsh7th/cmp-buffer' - Plug 'hrsh7th/cmp-path' - Plug 'hrsh7th/cmp-cmdline' - Plug 'hrsh7th/nvim-cmp' - - Plug 'hrsh7th/cmp-vsnip' - Plug 'hrsh7th/vim-vsnip' - call plug#end() - - colorscheme catppuccin-mocha - - set signcolumn=auto - - nnoremap ff Telescope find_files - nnoremap fg Telescope live_grep - nnoremap fb Telescope buffers - nnoremap fh Telescope help_tags - nnoremap fi Fern %:h - - let g:user42 = 'tomoron' - let g:mail42 = 'tomoron@student.42angouleme.fr' - let g:fern#renderer = "nerdfont" - - ''; - - home.file = { - #install plug.vim - ".local/share/nvim/site/autoload/plug.vim".source = "${fetchGit { - url = "https://github.com/junegunn/vim-plug"; - rev = "d80f495fabff8446972b8695ba251ca636a047b0"; - ref = "master"; - }}/plug.vim"; - - #install stdheader 42 - ".config/nvim/plugin/stdheader.vim".source = "${fetchGit { - url = "https://github.com/42Paris/42header"; - rev = "e6e6b191871545e0d43f1aad817070bc806b8fa7"; - ref = "master"; - }}/plugin/stdheader.vim"; - - }; - }; -} diff --git a/homeConfigs/modules/wayland/hypridle.nix b/homeConfigs/modules/wayland/hypridle.nix deleted file mode 100644 index 6859cd0..0000000 --- a/homeConfigs/modules/wayland/hypridle.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, config, ... }: - -{ - options.mods.hyprland.autoSuspend = lib.mkOption { - type = lib.types.bool; - default = true; - description = "enable hypridle suspend after 10min"; - }; - - config = lib.mkIf config.mods.hyprland.enable { - services.hypridle = { - enable = true; - settings = { - general.lock_cmd = "hyprlock"; - general.before_sleep_cmd = "loginctl lock-session"; - listener = [ - { - timeout = 300; - on-timeout = "brightnessctl -s set 0"; - on-resume = "brightnessctl -r"; - } - { - timeout = 300; - on-timeout = "loginctl lock-session"; - } - ] ++ lib.lists.optional config.mods.hyprland.autoSuspend { - timeout = 600; - on-timeout = "systemctl suspend"; - }; - }; - }; - }; -} diff --git a/homeConfigs/modules/wayland/hyprland.nix b/homeConfigs/modules/wayland/hyprland.nix deleted file mode 100644 index a083d5d..0000000 --- a/homeConfigs/modules/wayland/hyprland.nix +++ /dev/null @@ -1,194 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.mods.hyprland.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "install and configure hyprland and others"; - }; - - config = lib.mkIf config.mods.hyprland.enable { - wayland.windowManager.hyprland.systemd.variables = [ "--all" ]; - - programs.hyprshot.enable = true; - catppuccin.hyprland.enable = false; - - - wayland.windowManager.hyprland.enable = true; - wayland.windowManager.hyprland.configType = "hyprlang"; - wayland.windowManager.hyprland.settings = { - "$mainMod" = "SUPER"; - bind = [ - " , Print, exec, hyprshot -m region -o ~/screenshots -f $(date +%Y-%m-%d_%H-%M-%S).png" - " SHIFT, Print, exec, hyprshot -m output -m active -o ~/screenshots -f $(date +%Y-%m-%d_%H-%M-%S).png" - "$mainMod, Return, exec, alacritty" - "CTRL_ALT, Q, killactive," - "CTRL_ALT_SHIFT, Q, forcekillactive," - "SUPER_ALT, Q, exit," - "$mainMod, S, togglefloating," - "$mainMod, I, pin," - "$mainMod, D, exec, rofi -show drun -show-icons" - "$mainMod SHIFT, D, exec, rofi -show run -show-icons" - "$mainMod, M, fullscreen, 1" - "$mainMod, F, fullscreen, 0" - - # Move focus - "$mainMod, h, movefocus, l" - "$mainMod, l, movefocus, r" - "$mainMod, k, movefocus, u" - "$mainMod, j, movefocus, d" - - #swap windows - "$mainMod SHIFT, h, swapwindow, l" - "$mainMod SHIFT, l, swapwindow, r" - "$mainMod SHIFT, k, swapwindow, u" - "$mainMod SHIFT, j, swapwindow, d" - - # Switch workspaces with mainMod + [0-9] - "$mainMod, 1, workspace, 1" - "$mainMod, 2, workspace, 2" - "$mainMod, 3, workspace, 3" - "$mainMod, 4, workspace, 4" - "$mainMod, 5, workspace, 5" - "$mainMod, 6, workspace, 6" - "$mainMod, 7, workspace, 7" - "$mainMod, 8, workspace, 8" - "$mainMod, 9, workspace, 9" - "$mainMod, 0, workspace, 10" - - # Move active window to a workspace with mainMod + SHIFT + [0-9] - "$mainMod SHIFT, 1, movetoworkspacesilent, 1" - "$mainMod SHIFT, 2, movetoworkspacesilent, 2" - "$mainMod SHIFT, 3, movetoworkspacesilent, 3" - "$mainMod SHIFT, 4, movetoworkspacesilent, 4" - "$mainMod SHIFT, 5, movetoworkspacesilent, 5" - "$mainMod SHIFT, 6, movetoworkspacesilent, 6" - "$mainMod SHIFT, 7, movetoworkspacesilent, 7" - "$mainMod SHIFT, 8, movetoworkspacesilent, 8" - "$mainMod SHIFT, 9, movetoworkspacesilent, 9" - "$mainMod SHIFT, 0, movetoworkspacesilent, 10" - - # Scroll through existing workspaces with mainMod + scroll - "$mainMod, mouse_down, workspace, e+1" - "$mainMod, mouse_up, workspace, e-1" - ]; - - bindm = [ #bind mouse - "$mainMod, mouse:272, movewindow" - "$mainMod, mouse:273, resizewindow" - ]; - - bindel = [ #repeat and locked - " ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" - " ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - " ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - " ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - " ,XF86MonBrightnessUp, exec, brightnessctl s 10%+" - " ,XF86MonBrightnessDown, exec, brightnessctl s 10%-" - " ,XF86KbdBrightnessUp, exec, asusctl -n" - " ,XF86KbdBrightnessDown, exec, asusctl -p" - ]; - - bindl = [ #repeat - " , XF86AudioNext, exec, playerctl next" - " , XF86AudioPrev, exec, playerctl previous" - " , XF86AudioPause, exec, playerctl play-pause" - " , XF86AudioPlay, exec, playerctl play-pause" - "$mainMod, n, exec, playerctl next" - "$mainMod, p, exec, playerctl previous" - "$mainMod, o, exec, playerctl play-pause" - ]; - -# windowrulev2 = [ -# #ignore maximize requests -# "suppressevent maximize, class:.*" -# #fix dragging issues with xwayland -# "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" -# ]; - - input = { - kb_layout = "fr"; - kb_variant = "us"; - follow_mouse = 2; - kb_options = "caps:none"; - touchpad.natural_scroll = false; - }; - - misc = { - force_default_wallpaper = 1; - disable_hyprland_logo = true; - mouse_move_focuses_monitor = false; - }; - - dwindle = { - force_split = 2; - }; - - animations = { - enabled = true; - - bezier = [ - "easeInOut, 0.77, 0, 0.175, 1" - "easeOut, 0.24, 0.66, 0.04, 1" - ]; - - animation = [ - "windows, 1, 2, easeInOut" - "windowsIn, 1, 2, easeInOut, slide" - "windowsOut, 1, 2, easeInOut, slide" - "fade, 1, 2, easeInOut" - "workspaces, 1, 2, easeOut" - ]; - }; - - decoration = { - rounding = 10; - - shadow = { - enabled = true; - range = 4; - render_power = 3; - color = "rgba(1a1a1aee)"; - }; - - #blur = { - # enabled = true; - # size = 3; - # passes = 1; - # vibrancy = 0.1696; - #}; - }; - - general = { - gaps_in = 2; - gaps_out = 5; - border_size = 1; - "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; - "col.inactive_border" = "rgba(595959aa)"; - resize_on_border = false; - allow_tearing = false; - layout = "dwindle"; - }; - - layerrule = { - name = "no_anim_for_selection"; - no_anim = "on"; - "match:namespace" = "selection"; - }; - - cursor.no_warps = true; - - env = [ - "HYPRCURSOR_SIZE,17" - "HYPRCURSOR_THEME,bibata-modern-classic" - ]; - - exec-once = [ - "swaybg -i ~/.config/wallpaper.png&" - "(sleep 2;activate-linux)&" - "waybar&" - "alacritty&" - ]; - }; - }; -} diff --git a/homeConfigs/modules/wayland/hyprlock.nix b/homeConfigs/modules/wayland/hyprlock.nix deleted file mode 100644 index 04aac50..0000000 --- a/homeConfigs/modules/wayland/hyprlock.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, config, ... }: - -{ - config = lib.mkIf config.mods.hyprland.enable { - programs.hyprlock.enable = true; - programs.hyprlock.settings = { - general = { - no_fade_out = true; - ignore_empty_input = false; - }; - - background = { - monitor = ""; - path = "~/.config/pc.jpg"; -# blur_passes = 1; - }; - - input-field = { - monitor = ""; - size = "300, 50"; - dot_size = "0.2"; - dots_fade_time = 100; - inner_color = "rgb(139,89,100)"; - outer_color = "rgb(139,89,100)"; - outline_thickness = 1; - - fail_transition = "300"; - fail_text = "learn to write, idiot"; - }; - }; - }; -} diff --git a/homeConfigs/modules/wayland/packages.nix b/homeConfigs/modules/wayland/packages.nix deleted file mode 100644 index 7faffdd..0000000 --- a/homeConfigs/modules/wayland/packages.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, lib, config, ... }: - -{ - config = lib.mkIf config.mods.hyprland.enable { - home.packages = with pkgs; [ - grim - slurp - wl-clipboard - swaybg - ]; - }; -} diff --git a/homeConfigs/modules/wayland/waybar.nix b/homeConfigs/modules/wayland/waybar.nix deleted file mode 100644 index e7b4613..0000000 --- a/homeConfigs/modules/wayland/waybar.nix +++ /dev/null @@ -1,163 +0,0 @@ -{ config, lib, ... }: - -{ - config = lib.mkIf config.mods.hyprland.enable { - programs.waybar.enable = true; - programs.waybar.style = '' - * { - border: none; - border-radius: 0; - font-family: "Iosevka Nerd Font"; - font-size: 15px; - min-height: 0; - } - - window#waybar { - background: transparent; - color: white; - } - - #window { - font-weight: bold; - } - - #workspaces button { - padding: 0 5px; - background: transparent; - color: white; - border-top: 2px solid transparent; - } - - #workspaces button.focused { - color: #c9545d; - border-top: 2px solid #c9545d; - } - - #workspaces button.active { - color : #88ff88; - background-color : rgba(220,255, 220, 0.3) - } - - #mode { - background: #64727D; - border-bottom: 3px solid white; - } - - #network.disconnected { - color: #f53c3c; - font-weight:bold; - } - - #temperature.critical { - color: #ff2222; - } - - #battery.critical { - color: #ff2222; - } - #cpu.high { - color: #ff2222; - } - #disk.high { - color: #ff2222; - } - ''; - - programs.waybar.settings.mainBar = { - layer = "top"; - position ="top"; - height = 24; - margin-left = 5; - margin-right = 5; - modules-left = ["hyprland/workspaces" "custom/music"]; - modules-center = ["hyprland/window"]; - modules-right = ["disk" "pulseaudio" "network" "custom/pipe" "cpu" "custom/pipe" "temperature" "custom/pipe" "memory" "battery" "clock"]; - - "hyprland/workspaces" = { - disable-scroll = true; - all-outputs = false; - format = "{id}"; - }; - - clock = { - interval = 1; - format-alt = " {:%Y-%m-%d}"; - format = " {:%H:%M:%S}"; - }; - - cpu = { - format = "  {usage}% "; - states.high = 80; - interval = 5; - }; - - memory = { - format = "  {}% |"; - interval = 5; - }; - - battery = { - bat = "BAT0"; - full-at = 79; - states = { - good = 20; - critical = 15; - }; - format-time = " {H}:{m}"; - format-discharging = " {icon} {capacity}%{time} |"; - format-charging = "  {capacity}%{time} |"; - format-plugged = ""; - format-icons = [" " " " " " " " " "]; - interval = 10; - }; - - network = { - format-wifi = " {icon} {essid} "; - format-ethernet = "  {ifname}: {ipaddr}/{cidr} "; - format-disconnected = " ⚠ Disconnected "; - format-icons =["󰤟 " "󰤢 " "󰤥 " "󰤨 "]; - }; - - pulseaudio = { - format = " {icon}{volume}% |"; - format-bluetooth = "  {icon} {volume}% |"; - format-muted = ""; - format-icons = { - headphones = " "; - handsfree = "󰋎 "; - headset = "󰋎 "; - phone = " "; - portable = " "; - car = " "; - default = [" " " " " "]; - }; - on-click = "pavucontrol"; - }; - - temperature = { - thermal-zone = 0; - critical-threshold = 80; - interval = 5; - format =" {icon} {temperatureC}°C "; - format-icons = ["" "" "" "" ""]; - }; - - disk = { - format =" 󰋊 {percentage_used}% |"; - states.high = "5"; - }; - - "custom/pipe" = { - format = "|"; - }; - - "custom/music" = { - exec-if = "playerctl metadata 2>&1 >/dev/null"; - exec = "playerctl metadata --format ' {{ artist }} - {{title}}'"; - interval = 1; - interval-if = 5; - }; - - }; - }; -} diff --git a/osConfigs/global/boot.nix b/osConfigs/global/boot.nix index 2ae576a..a9ed0d0 100644 --- a/osConfigs/global/boot.nix +++ b/osConfigs/global/boot.nix @@ -6,23 +6,13 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/05 23:37:58 by tomoron #+# #+# # -# Updated: 2026/05/07 17:41:52 by tomoron ### ########.fr # +# Updated: 2026/06/14 17:50:09 by tomoron ### ########.fr # # # # **************************************************************************** # -{lib, pkgs, ... } : +{pkgs, ... } : { - boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - - boot.loader = { - systemd-boot.enable = true; - systemd-boot.memtest86.enable = true; - efi.canTouchEfiVariables = true; - timeout = 1; - }; - - boot.tmp.cleanOnBoot = true; boot.consoleLogLevel = 3; boot.initrd.verbose = false; boot.kernelParams = [ @@ -36,16 +26,6 @@ boot.plymouth = { enable = true; theme = "nixos-bgrt"; - themePackages = with pkgs; [ #(adi1090x-plymouth-themes.override { -# selected_themes = [ "black_hud" "circle_hud" "square_hud" "spinner_alt" ]; -# }) -# catppuccin-plymouth - nixos-bgrt-plymouth - ]; + themePackages = with pkgs; [ nixos-bgrt-plymouth ]; }; - - services.journald.extraConfig = '' - SystemMaxUse=100M - SystemMaxFileSize=50M - ''; } diff --git a/osConfigs/global/displayManager.nix b/osConfigs/global/displayManager.nix new file mode 100644 index 0000000..e71a954 --- /dev/null +++ b/osConfigs/global/displayManager.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + services.displayManager.enable = true; + services.displayManager.ly.enable = true; + services.displayManager.ly.settings = { + animation = "gameoflife"; + min_refresh_delta = 50; + bigclock = "en"; + sleep_cmd = "systemctl sleep"; + asterisk = "A"; + auth_fails= 3; + }; +} diff --git a/osConfigs/global/games.nix b/osConfigs/global/games.nix new file mode 100644 index 0000000..b304c66 --- /dev/null +++ b/osConfigs/global/games.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + programs.steam.enable = true; + programs.steam.protontricks.enable = true; + programs.gamescope.enable = true; +} diff --git a/osConfigs/global/minimal/boot.nix b/osConfigs/global/minimal/boot.nix new file mode 100644 index 0000000..cc3b544 --- /dev/null +++ b/osConfigs/global/minimal/boot.nix @@ -0,0 +1,31 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# boot.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2026/06/14 17:49:47 by tomoron #+# #+# # +# Updated: 2026/06/14 17:50:06 by tomoron ### ########.fr # +# # +# **************************************************************************** # + +{ lib, pkgs, ... }: + +{ + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + + boot.loader = { + systemd-boot.enable = true; + systemd-boot.memtest86.enable = true; + efi.canTouchEfiVariables = true; + timeout = 1; + }; + + boot.tmp.cleanOnBoot = true; + + services.journald.extraConfig = '' + SystemMaxUse=100M + SystemMaxFileSize=50M + ''; +} diff --git a/osConfigs/global/nix.nix b/osConfigs/global/minimal/nix.nix similarity index 100% rename from osConfigs/global/nix.nix rename to osConfigs/global/minimal/nix.nix diff --git a/osConfigs/global/minimal/other.nix b/osConfigs/global/minimal/other.nix new file mode 100644 index 0000000..bb686fa --- /dev/null +++ b/osConfigs/global/minimal/other.nix @@ -0,0 +1,23 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# other.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2026/06/14 18:02:15 by tomoron #+# #+# # +# Updated: 2026/06/15 02:06:17 by tomoron ### ########.fr # +# # +# **************************************************************************** # + +{ lib, ... }: +{ + networking.hostName = lib.mkDefault "unnamed-nixos"; + networking.networkmanager.enable = lib.mkDefault true; + + time.timeZone = "Europe/Paris"; + + services.fstrim.enable = true; # trims all the ssds on the machine every week + catppuccin.enable = lib.mkDefault false; + catppuccin.autoEnable = false; +} diff --git a/osConfigs/global/minimal/packages.nix b/osConfigs/global/minimal/packages.nix new file mode 100644 index 0000000..93ce2c3 --- /dev/null +++ b/osConfigs/global/minimal/packages.nix @@ -0,0 +1,20 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# packages.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2026/06/14 18:03:28 by tomoron #+# #+# # +# Updated: 2026/06/14 18:06:25 by tomoron ### ########.fr # +# # +# **************************************************************************** # + +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + neovim + pciutils + ]; +} diff --git a/osConfigs/global/sops.nix b/osConfigs/global/minimal/sops.nix similarity index 55% rename from osConfigs/global/sops.nix rename to osConfigs/global/minimal/sops.nix index ab7b941..6dea158 100644 --- a/osConfigs/global/sops.nix +++ b/osConfigs/global/minimal/sops.nix @@ -1,8 +1,8 @@ -{lib, ...}: +{ ... }: { sops = { - defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFile = ../../../secrets/secrets.yaml; age.keyFile = "/home/tom/.config/sops/age/keys.txt"; }; } diff --git a/osConfigs/modules/game.nix b/osConfigs/global/minimal/user.nix similarity index 57% rename from osConfigs/modules/game.nix rename to osConfigs/global/minimal/user.nix index 772f9fc..5dd513a 100644 --- a/osConfigs/modules/game.nix +++ b/osConfigs/global/minimal/user.nix @@ -1,27 +1,25 @@ # **************************************************************************** # # # # ::: :::::::: # -# game.nix :+: :+: :+: # +# user.nix :+: :+: :+: # # +:+ +:+ +:+ # # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # -# Created: 2025/09/05 23:47:09 by tomoron #+# #+# # -# Updated: 2025/10/27 00:50:29 by tomoron ### ########.fr # +# Created: 2025/09/05 23:42:18 by tomoron #+# #+# # +# Updated: 2026/06/14 18:07:45 by tomoron ### ########.fr # # # # **************************************************************************** # -{config, lib, ... }: +{ ... }: { - options.mods.gayming.enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "enable steam and other"; - }; + users.users.tom = { + isNormalUser = true; + extraGroups = [ + "wheel" # can sudo + "docker" # can use docker + ]; - config = lib.mkIf config.mods.gayming.enable { - programs.steam.enable = true; - programs.steam.protontricks.enable = true; - programs.gamescope.enable = true; - }; + initialPassword = "password"; + }; } diff --git a/osConfigs/global/other.nix b/osConfigs/global/other.nix index c9013ac..2053d73 100644 --- a/osConfigs/global/other.nix +++ b/osConfigs/global/other.nix @@ -6,20 +6,15 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/02/09 01:43:46 by tomoron #+# #+# # -# Updated: 2026/04/03 22:08:01 by tomoron ### ########.fr # +# Updated: 2026/06/15 02:06:30 by tomoron ### ########.fr # # # # **************************************************************************** # { lib, ... }: { - networking.hostName = lib.mkDefault "unnamed-nixos"; - networking.networkmanager.enable = lib.mkDefault true; - programs.fuse.enable = true; - time.timeZone = "Europe/Paris"; - services.xserver.enable = lib.mkDefault true; services.xserver.displayManager.startx.enable = true; @@ -33,5 +28,8 @@ hardware.logitech.wireless.enable = true; hardware.logitech.wireless.enableGraphical = true; - services.fstrim.enable = true; # trims all the ssds on the machine every week + programs.noisetorch.enable = true; + programs.droidcam.enable = true; + + catppuccin.enable = true; } diff --git a/osConfigs/global/packages.nix b/osConfigs/global/packages.nix index bdf7d46..902742b 100644 --- a/osConfigs/global/packages.nix +++ b/osConfigs/global/packages.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:57:21 by tomoron #+# #+# # -# Updated: 2025/12/30 18:12:05 by tomoron ### ########.fr # +# Updated: 2026/06/15 01:57:44 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -15,13 +15,13 @@ { environment.systemPackages = with pkgs; [ home-manager - vim - pciutils + cryptsetup usbutils ntfs3g - cryptsetup acpi - nss + unison + +# nss //is this supposed to be here ? ]; } diff --git a/osConfigs/global/user.nix b/osConfigs/global/user.nix index 266dcd6..62d2796 100644 --- a/osConfigs/global/user.nix +++ b/osConfigs/global/user.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/05 23:42:18 by tomoron #+# #+# # -# Updated: 2026/01/13 16:32:42 by tomoron ### ########.fr # +# Updated: 2026/06/14 18:07:55 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -14,15 +14,10 @@ { users.users.tom = { - isNormalUser = true; extraGroups = [ - "wheel" # can sudo - "docker" # can use docker "libvirtd" # can use libvirtd "dialout" # can use serial devices "wireshark" # can use wireshask ]; - - initialPassword = "password"; }; } diff --git a/osConfigs/hosts/desktop.nix b/osConfigs/hosts/desktop.nix index ef0289c..90f4c8f 100644 --- a/osConfigs/hosts/desktop.nix +++ b/osConfigs/hosts/desktop.nix @@ -6,49 +6,31 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:57:04 by tomoron #+# #+# # -# Updated: 2026/05/21 00:20:51 by tomoron ### ########.fr # +# Updated: 2026/06/15 02:03:18 by tomoron ### ########.fr # # # # **************************************************************************** # -{ config, lib, inputs, pkgs, ... }: +{ pkgs, ... }: { boot.kernelParams = [ "nvidia-drm-modset=1" ]; - environment.systemPackages = with pkgs; [ - lm_sensors # can be user (and global) - ]; networking.hostName = "nixos-fixe"; hardware.cpu.intel.updateMicrocode = true; + mods.yubikey.pam.enable = true; + mods.nvidia.enable = true; boot.kernelModules = [ "kvm-intel" "nvidia" ]; - mods.displayManager.enable = true; - - mods.nvidia.enable = true; - mods.gayming.enable = true; - - programs.noisetorch.enable = true; - -# hardware.nvidia = { -# open = true; -# -# prime.nvidiaBusId = "PCI:1:0:0"; -# prime.intelBusId = "PCI:0:2:0"; -# prime.sync.enable = true; -# -# modesetting.enable = true; -# }; services.openssh.enable = true; - programs.droidcam.enable = true; - boot.kernelPackages = pkgs.linuxPackages; - boot.supportedFilesystems = [ "zfs" ]; networking.hostId = "98e475dd"; + mods.zfs.enable = true; + mods.docker = { enable = true; boot = false; diff --git a/osConfigs/hosts/iso.nix b/osConfigs/hosts/iso.nix index f6fd741..b585ed9 100644 --- a/osConfigs/hosts/iso.nix +++ b/osConfigs/hosts/iso.nix @@ -6,17 +6,13 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:57:02 by tomoron #+# #+# # -# Updated: 2025/09/06 00:57:03 by tomoron ### ########.fr # +# Updated: 2026/06/14 18:25:39 by tomoron ### ########.fr # # # # **************************************************************************** # {lib, ... }: { - imports = [ - ../global/packages.nix - ]; - users.users.tom = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "video" ]; diff --git a/osConfigs/hosts/laptop.nix b/osConfigs/hosts/laptop.nix index 2f1f193..58443f5 100644 --- a/osConfigs/hosts/laptop.nix +++ b/osConfigs/hosts/laptop.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:56:57 by tomoron #+# #+# # -# Updated: 2026/06/13 23:20:55 by tomoron ### ########.fr # +# Updated: 2026/06/15 02:11:29 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -35,22 +35,23 @@ }; - boot.blacklistedKernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" ]; #speeds up startup - programs.droidcam.enable = true; + boot.blacklistedKernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" ]; #speeds up startup, loaded automatically when gpu is started + - mods.displayManager.enable = true; - mods.yubikey.pam.enable = true; networking.firewall.enable = false; networking.hostName = "patate-douce"; -# networking.wireless.enable = true; networking.networkmanager.wifi.backend = "iwd"; networking.wireless.iwd.enable = true; networking.wireless.allowAuxiliaryImperativeNetworks = true; networking.networkmanager.enable = false; + networking.dhcpcd.enable = false; + systemd.network.enable = true; + networking.useNetworkd = true; specialisation.vfio_ready.configuration = { + #vfio ready configuration sets up kvmfr0 kernel module, disables xbox controller on host os, enables libvirtd and installs looking-glass mods.virtualHost.enable = true; boot.extraModulePackages = with config.boot.kernelPackages; [ kvmfr ]; @@ -73,30 +74,13 @@ environment.systemPackages = with pkgs; [ looking-glass-client ]; }; - services.udev.extraRules = '' - SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", TAG+="uaccess" - SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" - ''; - - networking.dhcpcd.enable = false; - systemd.network.enable = true; - networking.useNetworkd = true; - - programs.noisetorch.enable = true; - - services.postgresql.enable = true; - - hardware.bluetooth.enable = true; environment.systemPackages = with pkgs; [ - acpi # can be user (global) + impala openvr ]; -# programs.alvr.enable = true; - - mods.touchpad.enable = true; mods.powerSave = { @@ -113,10 +97,8 @@ }; - services.asusd = { enable = true; -# enableUserService = true; }; services.supergfxd.enable = true; @@ -133,14 +115,13 @@ programs.wireshark.enable = true; programs.wireshark.usbmon.enable = true; + mods.yubikey.pam.enable = true; mods.docker.enable = true; - mods.gayming.enable = true; mods.nvidia.enable = true; mods.nvidia.prime = true; - services.usbmuxd.enable = true; #sometimes hangs when shutting down - + services.usbmuxd.enable = true; #iphone usb service sometimes hangs when shutting down services.avahi.enable = true; services.pipewire = { @@ -160,6 +141,8 @@ "bluez5.enable-hw-volume" = true; }; }; + + hardware.bluetooth.enable = true; hardware.bluetooth.settings = { General = { Enable = "Source,Sink,Media,Socket"; @@ -167,5 +150,4 @@ }; programs.corectrl.enable = true; - } diff --git a/osConfigs/hosts/server.nix b/osConfigs/hosts/server.nix index 8842185..2e26d9a 100644 --- a/osConfigs/hosts/server.nix +++ b/osConfigs/hosts/server.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:57:09 by tomoron #+# #+# # -# Updated: 2026/06/13 23:40:36 by tomoron ### ########.fr # +# Updated: 2026/06/15 02:04:54 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -27,7 +27,6 @@ let ]; in { - boot.kernelPackages = pkgs.linuxPackages; boot.extraModulePackages = [ config.boot.kernelPackages.gasket #driver for google coral edge tpu ]; @@ -65,7 +64,7 @@ in # create dummy display to be able to start x11 ''; - boot.supportedFilesystems = [ "zfs" ]; + mods.zfs.enable = true; boot.zfs.forceImportRoot = false; boot.zfs.extraPools = [ "raid_vol" ]; @@ -107,12 +106,6 @@ in autoprune = true; }; - environment.systemPackages = with pkgs; [ - zfs - screen #can be user (and global) - (inputs.dockermcmgr.packages.${pkgs.stdenv.hostPlatform.system}.default) - ]; - networking = { hostName = "server"; @@ -124,7 +117,7 @@ in defaultGateway.address = "192.168.1.254"; defaultGateway.interface = "eth0"; nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"]; - hostId = "68290da7"; + hostId = "68290da7"; firewall.allowedTCPPorts = ports; firewall.allowedUDPPorts = ports; @@ -144,6 +137,18 @@ in boot = true; }; + systemd.services.dockermcmgr-server = { + enable = true; + wantedBy = ["multi-user.target"]; + restartIfChanged = true; + serviceConfig = { + ExecStart = "${inputs.dockermcmgr.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/dmm serverMode"; + User = "tom"; + Group= "users"; + }; + }; + + nix.settings.trusted-users = [ "root" "builder" "tom" ]; users.users.builder = { @@ -157,18 +162,4 @@ in users.groups.builder = {}; mods.remote-build.enable = false; - - - - systemd.services.dockermcmgr-server = { - enable = true; - wantedBy = ["multi-user.target"]; - restartIfChanged = true; - serviceConfig = { - ExecStart = "${inputs.dockermcmgr.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/dmm serverMode"; - User = "tom"; - Group= "users"; - }; - }; - } diff --git a/osConfigs/modules/displayManager.nix b/osConfigs/modules/displayManager.nix deleted file mode 100644 index 643fb45..0000000 --- a/osConfigs/modules/displayManager.nix +++ /dev/null @@ -1,36 +0,0 @@ -# **************************************************************************** # -# # -# ::: :::::::: # -# displayManager.nix :+: :+: :+: # -# +:+ +:+ +:+ # -# By: tomoron +#+ +:+ +#+ # -# +#+#+#+#+#+ +#+ # -# Created: 2025/09/05 23:47:16 by tomoron #+# #+# # -# Updated: 2025/11/17 14:32:13 by tomoron ### ########.fr # -# # -# **************************************************************************** # - -{config, lib, ... }: - -{ - options.mods.displayManager.enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "enable the ly display manager"; - }; - - config = lib.mkIf config.mods.displayManager.enable { - services.displayManager.enable = true; - services.displayManager.ly.enable = true; - services.displayManager.ly.settings = - { - animation = "gameoflife"; - min_refresh_delta = 50; - bigclock = "en"; - sleep_cmd = "systemctl sleep"; - asterisk = "A"; - auth_fails= 3; - }; - }; -} - diff --git a/osConfigs/modules/virtualHost.nix b/osConfigs/modules/virtualHost.nix index 71d2361..7df1015 100644 --- a/osConfigs/modules/virtualHost.nix +++ b/osConfigs/modules/virtualHost.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/05 23:47:19 by tomoron #+# #+# # -# Updated: 2025/09/06 01:03:07 by tomoron ### ########.fr # +# Updated: 2026/06/15 02:01:25 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -20,10 +20,10 @@ }; config = lib.mkIf config.mods.virtualHost.enable { - programs.virt-manager.enable = true; - virtualisation.libvirtd.enable = true; - virtualisation.libvirtd.qemu.runAsRoot = true; - virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ]; + programs.virt-manager.enable = true; + virtualisation.libvirtd.enable = true; + virtualisation.libvirtd.qemu.runAsRoot = true; + virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ]; virtualisation.spiceUSBRedirection.enable = true; environment.systemPackages = with pkgs; [ spice-gtk ]; diff --git a/osConfigs/modules/zfs.nix b/osConfigs/modules/zfs.nix new file mode 100644 index 0000000..e878a5f --- /dev/null +++ b/osConfigs/modules/zfs.nix @@ -0,0 +1,13 @@ +{ pkgs, config, lib, ... }: +{ + options.mods.zfs.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "does this system support zfs filesystems"; + }; + + config = lib.mkIf config.mods.zfs.enable { + boot.kernelPackages = pkgs.linuxPackages; + boot.supportedFilesystems = [ "zfs" ]; + }; +} diff --git a/osConfigs/os.nix b/osConfigs/os.nix index 1eea66c..790ed4d 100644 --- a/osConfigs/os.nix +++ b/osConfigs/os.nix @@ -6,21 +6,22 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:56:36 by tomoron #+# #+# # -# Updated: 2026/05/31 15:39:42 by tomoron ### ########.fr # +# Updated: 2026/06/14 18:56:12 by tomoron ### ########.fr # # # # **************************************************************************** # -{ lib, flakeName, ... }: +{ lib, flakeName, minimal, ... }: { - imports = lib.concatLists [ + imports = (lib.concatLists [ [ ./hardware-configuration.nix ] - (lib.fileset.toList ./global) (lib.fileset.toList ./modules) - ]; + ]) + ++ (lib.lists.optionals minimal (lib.fileset.toList ./global/minimal)) + ++ (lib.lists.optionals (!minimal) (lib.fileset.toList ./global)); - system.stateVersion = "25.05"; + + system.stateVersion ="25.05"; environment.etc.nixosFlakeName.text = "${flakeName}"; - catppuccin.autoEnable = false; }