diff --git a/flake.lock b/flake.lock index 66ebce0..d93698f 100644 --- a/flake.lock +++ b/flake.lock @@ -24,15 +24,14 @@ "dms": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs", - "quickshell": "quickshell" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1777675128, - "narHash": "sha256-2zuDs9Lju99dg8MsSPf1frKPPgCRakDn+CEGX71cHJ0=", + "lastModified": 1781822553, + "narHash": "sha256-lINO2V/B5MxB6RXGahrPlaL07WvFiJur1WDF6rTYuyk=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "c1cbd0994f5a3585dded85069f2c9103c54f5285", + "rev": "4203148cabb74abfb17e5c02f3b76c28b52601e7", "type": "github" }, "original": { @@ -103,11 +102,11 @@ ] }, "locked": { - "lastModified": 1777679572, - "narHash": "sha256-egYNbRrkn+6SwTHinhdb6WUfzzdC3nXfCRqS321VylY=", + "lastModified": 1781906751, + "narHash": "sha256-6Ld1PqmptFtFKblE+SynhRgyBApUWcmrISetWqWHeeo=", "owner": "nix-community", "repo": "home-manager", - "rev": "9cb587ade2aa1b4a7257f0238d41072690b0ca4f", + "rev": "37f21dfa5d27e71b75bacd9418b156f9265e312e", "type": "github" }, "original": { @@ -164,11 +163,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1771283045, - "narHash": "sha256-AgD3KAkrQ4cs34kKZE8v/+FyFTc1Vq2sOJaPrWiCRio=", + "lastModified": 1781817881, + "narHash": "sha256-pRPtSWYy9XsVnvjHhXhaGX3uwqFdfAn2fXvxQ0xKXnk=", "owner": "argosnothing", "repo": "niri", - "rev": "eab116015a5a4d8f027c915dbd7b0a90e1e9a5e1", + "rev": "cd36d0374d6e66bc07248899d02478f42719ecc2", "type": "github" }, "original": { @@ -203,11 +202,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1776169885, - "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=", + "lastModified": 1778443072, + "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9", + "rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32", "type": "github" }, "original": { @@ -251,11 +250,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1777731324, - "narHash": "sha256-piLMdJYPP/9+/yiHxVMpqbAAoP8EnsqRO5921ilx0lk=", + "lastModified": 1781960011, + "narHash": "sha256-66fKJZTRbxFJ48dE3kDdCaHTbux6nmApvIQhtwcaI0E=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "38e436af6ec1a3b1c9b666ceea098bf5ef05fc66", + "rev": "c1b9ab3ad7c39b61915438b2222e3655b7d8a16f", "type": "github" }, "original": { @@ -266,11 +265,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1777578337, - "narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=", + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "15f4ee454b1dce334612fa6843b3e05cf546efab", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "type": "github" }, "original": { @@ -286,11 +285,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1777729540, - "narHash": "sha256-tF5WMS4SSSmDvEZ7qgOosh8q0BVdz/ynb4Wnruc1rgY=", + "lastModified": 1781959811, + "narHash": "sha256-ZKWWQbvWnZwHU6YTWB7uoIgeXw70z82mJglH7DmCTDg=", "owner": "nix-community", "repo": "NUR", - "rev": "1091dd1d0f6589dc9a88d808052dda9b85835670", + "rev": "8ccedaa4ba8b650594426145a6f67201b685359c", "type": "github" }, "original": { @@ -299,28 +298,6 @@ "type": "github" } }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "dms", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1776854048, - "narHash": "sha256-lLbV66V3RMNp1l8/UelmR4YzoJ5ONtgvEtiUMJATH/o=", - "ref": "refs/heads/master", - "rev": "783c953987dc56ff0601abe6845ed96f1d00495a", - "revCount": 806, - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - }, - "original": { - "rev": "783c953987dc56ff0601abe6845ed96f1d00495a", - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - } - }, "root": { "inputs": { "disko": "disko", @@ -342,11 +319,11 @@ ] }, "locked": { - "lastModified": 1767322002, - "narHash": "sha256-yHKXXw2OWfIFsyTjduB4EyFwR0SYYF0hK8xI9z4NIn0=", + "lastModified": 1781752752, + "narHash": "sha256-kVG5tV9hddPviGAgqf9sGSuStvv+HAB9onfKqGptV0k=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "03c6e38661c02a27ca006a284813afdc461e9f7e", + "rev": "c06d86dabe5b92982b9d67acccb9990d58da3a0e", "type": "github" }, "original": { @@ -380,11 +357,11 @@ ] }, "locked": { - "lastModified": 1777338324, - "narHash": "sha256-bc+ZZCmOTNq86/svGnw0tVpH7vJaLYvGLLKFYP08Q8E=", + "lastModified": 1781943681, + "narHash": "sha256-NFHmA7H47adqiyp+0iEOyZOQhmigDqA/NBAlf4imB6U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8eaee5c45428b28b8c47a83e4c09dccec5f279b5", + "rev": "420f8d2e9882911f65cfac15cc706f639ba96cca", "type": "github" }, "original": { diff --git a/home/agents.nix b/home/agents.nix index 630454b..b069af8 100644 --- a/home/agents.nix +++ b/home/agents.nix @@ -227,7 +227,7 @@ let enable = true; setSessionVariables = false; extraConfig = { - XDG_CACHE_HOME = "$HOME/.cache"; + XDG_CACHE_HOME = "${HOME}/.cache"; }; }; }; diff --git a/home/nvim/default.nix b/home/nvim/default.nix index 4e9cc2e..08e064e 100644 --- a/home/nvim/default.nix +++ b/home/nvim/default.nix @@ -61,13 +61,13 @@ in }) ''; } - { - plugin = comment-nvim; - type = "lua"; - config = '' - require('Comment').setup() - ''; - } + # { + # plugin = comment-nvim; + # type = "lua"; + # config = '' + # require('Comment').setup() + # ''; + # } { plugin = conform-nvim; type = "lua"; @@ -107,14 +107,6 @@ in ''; } leap-nvim - { - plugin = lsp_lines-nvim; - type = "lua"; - config = '' - require("lsp_lines").setup() - vim.keymap.set("n", "it", require("lsp_lines").toggle, { desc = "Toggle LSP lines" }) - ''; - } { plugin = mini-icons; type = "lua"; @@ -380,23 +372,12 @@ in require("ts-autotag").setup() ''; } - # { - # plugin = toggleterm-nvim; - # type = "lua"; - # config = '' - # require("toggleterm").setup() - # vim.keymap.set("n", "nt", "ToggleTerm size=120 direction=tab name=ttermh", { desc = "Toggle tterm tab" }) - # vim.keymap.set("n", "ns", "ToggleTerm direction=vertical name=ttermv", { desc = "Toggle tterm vertical" }) - # vim.keymap.set("n", "", "ToggleTerm direction=float name=ttermf", { desc = "Toggle tterm float" }) - # ''; - # } { plugin = trouble-nvim; type = "lua"; config = '' require("trouble").setup({}) vim.keymap.set("n", "id", "Trouble diagnostics toggle", { desc = "Trouble project" }) - -- vim.keymap.set("n", "io", "Trouble diagnostics toggle filter.buf=0", { desc = "Trouble buffer" }) ''; } { diff --git a/home/nvim/plugins.lua b/home/nvim/plugins.lua index a0ea9f2..d68a383 100644 --- a/home/nvim/plugins.lua +++ b/home/nvim/plugins.lua @@ -152,15 +152,3 @@ vim.api.nvim_create_autocmd("CmdlineLeave", { vim.keymap.set({ "n", "x", "o" }, "s", "(leap)", { desc = "leap" }) vim.keymap.set({ "n", "x", "o" }, "S", "(leap-from-window)", { desc = "leap across window" }) - -require("neotest").setup({ - adapters = { - require("neotest-pest"), - }, -}) -vim.keymap.set("n", "pn", function() - require("neotest").run.run() -end, { desc = "test nearest" }) -vim.keymap.set("n", "pe", function() - require("neotest").run.run(vim.fn.expand("%")) -end, { desc = "test file" }) diff --git a/home/nvim/settings.lua b/home/nvim/settings.lua index 7cdbfb3..e4caa0d 100644 --- a/home/nvim/settings.lua +++ b/home/nvim/settings.lua @@ -114,7 +114,7 @@ vim.diagnostic.config({ virtual_lines = true, signs = true, underline = true, - update_in_insert = false, + update_in_insert = true, severity_sort = true, }) diff --git a/home/root.nix b/home/root.nix index f601343..77593f3 100644 --- a/home/root.nix +++ b/home/root.nix @@ -19,7 +19,7 @@ ssh = { enable = true; enableDefaultConfig = false; - matchBlocks = { + settings = { "icefox.sh" = { user = "git"; identityFile = "/root/.ssh/desktop"; diff --git a/home/user.nix b/home/user.nix index bccadfe..485558b 100644 --- a/home/user.nix +++ b/home/user.nix @@ -229,7 +229,7 @@ extraConfig = { SCREENSHOTS = "$HOME/pictures/screenshots"; - XDG_CACHE_HOME = "$HOME/.cache"; + XDG_CACHE_HOME = "${HOME}/.cache"; }; }; @@ -238,7 +238,7 @@ ssh = { enable = true; enableDefaultConfig = false; - matchBlocks = { + settings = { "*" = { serverAliveInterval = 60; serverAliveCountMax = 3; @@ -275,15 +275,15 @@ user = { name = "felipematos"; email = "5471818+fnzr@users.noreply.github.com"; - signingkey = "E6C30AB4CD83BB00"; + signingkey = "${HOME}/.ssh/desktop.pub"; }; }; } ]; settings = { user = { - email = "felipe@icefox.sh"; - name = "icefox"; + email = "felipe@imatos.dev"; + name = "fmatos"; signingkey = "${HOME}/.ssh/desktop.pub"; }; gpg.format = "ssh"; diff --git a/kernel/default.nix b/kernel/default.nix index 404a84e..d0f948e 100644 --- a/kernel/default.nix +++ b/kernel/default.nix @@ -57,6 +57,10 @@ in runAs = "root"; keepEnv = true; persist = true; + setEnv = [ + "EDITOR" + "TERM" + ]; } { users = [ "user" ]; diff --git a/networking.nix b/networking.nix index 65c34eb..72cb6ee 100644 --- a/networking.nix +++ b/networking.nix @@ -15,9 +15,8 @@ networking = { hostName = hostname; - nameservers = [ "192.168.88.3" ]; networkmanager.enable = false; - firewall.trustedInterfaces = [ "vlan66" ]; + nameservers = [ "192.168.88.3" ]; useDHCP = false; useNetworkd = true; @@ -72,20 +71,28 @@ linkConfig.RequiredForOnline = "routable"; }; - # netdevs."30-vlan66" = { - # netdevConfig = { - # Kind = "vlan"; - # Name = "vlan66"; - # }; - # vlanConfig = { - # Id = 66; - # }; - # }; + networks."30-vm-1" = { + matchConfig.Name = "vm-1"; + address = [ "10.0.0.1/24" ]; + networkConfig.IPMasquerade = "both"; + }; - # networks."30-vlan66" = { - # matchConfig.Name = "vlan66"; - # networkConfig.DHCP = "yes"; - # }; + }; + + networking.nat = { + enable = true; + internalInterfaces = [ "vm-*" ]; + externalInterface = "br0"; + }; + + services.resolved = { + enable = true; + settings = { + Resolve = { + Domains = [ "~." ]; + FallbackDNS = null; + }; + }; }; services.wireguard-netns = { @@ -113,46 +120,4 @@ }; }; }; - - # systemd.services."netns@wg0ns" = { - # description = "wg0 network namespace"; - # before = [ "network.target" ]; - # serviceConfig = { - # Type = "oneshot"; - # RemainAfterExit = true; - # ExecStart = pkgs.writers.writeBash "wg0ns-up" '' - # ${pkgs.coreutils}/bin/mkdir -p /etc/netns/wg0ns - # echo "nameserver $(cat ${config.sops.secrets."wg0/dns".path})" > /etc/netns/wg0ns/resolv.conf - # ${pkgs.iproute2}/bin/ip netns add wg0ns - # ''; - # ExecStop = "${pkgs.iproute2}/bin/ip netns del wg0ns"; - # }; - # }; - # - # systemd.services.wg0 = { - # description = "wg0 network interface"; - # bindsTo = [ "netns@wg0ns.service" ]; - # requires = [ "network-online.target" ]; - # after = [ "netns@wg0ns.service" ]; - # wants = [ "network-online.target" ]; - # wantedBy = [ "multi-user.target" ]; - # serviceConfig = { - # Type = "oneshot"; - # RemainAfterExit = true; - # ExecStart = pkgs.writers.writeBash "wg-up" '' - # ${pkgs.iproute2}/bin/ip link add wg0 type wireguard - # ${pkgs.iproute2}/bin/ip link set wg0 netns wg0ns - # ${pkgs.iproute2}/bin/ip -n wg0ns address add $(< ${config.sops.secrets."wg0/address".path}) dev wg0 - # ${pkgs.iproute2}/bin/ip netns exec wg0ns \ - # ${pkgs.wireguard-tools}/bin/wg setconf wg0 ${config.sops.secrets."wg0/conf".path} - # ${pkgs.iproute2}/bin/ip -n wg0ns link set lo up - # ${pkgs.iproute2}/bin/ip -n wg0ns link set wg0 up - # ${pkgs.iproute2}/bin/ip -n wg0ns route add default dev wg0 - # ''; - # ExecStop = pkgs.writers.writeBash "wg-down" '' - # ${pkgs.iproute2}/bin/ip -n wg0ns route del default dev wg0 - # ${pkgs.iproute2}/bin/ip -n wg0ns link del wg0 - # ''; - # }; - # }; } diff --git a/packages.nix b/packages.nix index 3c863b3..feda5e9 100644 --- a/packages.nix +++ b/packages.nix @@ -19,7 +19,7 @@ clang-tools clevis cliphist - chromium + ungoogled-chromium distrobox dos2unix dnsutils @@ -38,7 +38,6 @@ git gh ghostty - go google-chrome gopass gopass-jsonapi @@ -118,6 +117,7 @@ vscode-langservers-extracted watchexec wayland + waypipe wgsl-analyzer # wineWowPackages.waylandFull wineWow64Packages.waylandFull diff --git a/storage.nix b/storage.nix index 8ecc9fd..edb6a45 100644 --- a/storage.nix +++ b/storage.nix @@ -32,6 +32,13 @@ "noatime" ]; }; + "@downloads" = { + mountpoint = "/home/user/downloads"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; }; }; }; diff --git a/users.nix b/users.nix index b56284c..b32143d 100644 --- a/users.nix +++ b/users.nix @@ -7,7 +7,7 @@ imports = [ ./home/user.nix ./home/root.nix - ./home/agents.nix + # ./home/agents.nix ]; sops.secrets."user/password" = { neededForUsers = true; @@ -77,6 +77,7 @@ "sandbox" "audio" "video" + "render" "bluetooth" # "work" ];