diff --git a/nix/README.md b/README.md similarity index 100% rename from nix/README.md rename to README.md diff --git a/nix/TODO.md b/TODO.md similarity index 100% rename from nix/TODO.md rename to TODO.md diff --git a/nix/flake.lock b/flake.lock similarity index 67% rename from nix/flake.lock rename to flake.lock index 2df44ce..4689c36 100644 --- a/nix/flake.lock +++ b/flake.lock @@ -20,6 +20,24 @@ "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1731533236, "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", @@ -96,6 +114,27 @@ "type": "github" } }, + "nixos-vscode-server": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770124655, + "narHash": "sha256-yHmd2B13EtBUPLJ+x0EaBwNkQr9LTne1arLVxT6hSnY=", + "owner": "nix-community", + "repo": "nixos-vscode-server", + "rev": "92ce71c3ba5a94f854e02d57b14af4997ab54ef0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-vscode-server", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": "flake-compat", @@ -104,11 +143,11 @@ ] }, "locked": { - "lastModified": 1770494267, - "narHash": "sha256-LBKeSntmhCBj0tHFVFGfT4+KBmKi57gAnr240/F1Qkc=", + "lastModified": 1770657009, + "narHash": "sha256-v/LA5ZSJ+JQYzMSKB4sySM0wKfsAqddNzzxLLnbsV/E=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "843582709028607bf112d7cdc99af825e224a29b", + "rev": "5b50ea1aaa14945d4794c80fcc99c4aa1db84d2d", "type": "github" }, "original": { @@ -135,11 +174,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1770464364, - "narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=", + "lastModified": 1770617025, + "narHash": "sha256-1jZvgZoAagZZB6NwGRv2T2ezPy+X6EFDsJm+YSlsvEs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457", + "rev": "2db38e08fdadcc0ce3232f7279bab59a15b94482", "type": "github" }, "original": { @@ -165,11 +204,27 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1770197578, + "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, "root": { "inputs": { "home-manager": "home-manager", "home-manager-wsl": "home-manager-wsl", "nix-darwin": "nix-darwin", + "nixos-vscode-server": "nixos-vscode-server", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", @@ -185,11 +240,11 @@ ] }, "locked": { - "lastModified": 1770526836, - "narHash": "sha256-xbvX5Ik+0inJcLJtJ/AajAt7xCk6FOCrm5ogpwwvVDg=", + "lastModified": 1770683991, + "narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "d6e0e666048a5395d6ea4283143b7c9ac704720d", + "rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033", "type": "github" }, "original": { @@ -213,23 +268,37 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tasksquire": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ] + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1770493706, - "narHash": "sha256-r8tbD+K3skUd3nDD+M6FIZ82azewnDYdhyLfFAEkCFs=", - "ref": "refs/heads/dev", - "rev": "e3effe8b2570a815c9710d94a1e9541b9532bfb6", - "revCount": 46, + "lastModified": 1770735271, + "narHash": "sha256-Vt1di5EUPq6ijBX0h8aaRVnSkCDpI5Myd2tXjQlK3Tw=", + "ref": "dev", + "rev": "6e606985267d438f6d30a117863812347960694b", + "revCount": 48, "type": "git", "url": "ssh://git@git.pander.me/martin/tasksquire.git" }, "original": { + "ref": "dev", "type": "git", "url": "ssh://git@git.pander.me/martin/tasksquire.git" } diff --git a/nix/flake.nix b/flake.nix similarity index 91% rename from nix/flake.nix rename to flake.nix index e3786a6..18e2ed2 100644 --- a/nix/flake.nix +++ b/flake.nix @@ -29,18 +29,23 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # individual packages sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - tasksquire = { - url = "git+ssh://git@git.pander.me/martin/tasksquire.git"; + nixos-vscode-server = { + url = "github:nix-community/nixos-vscode-server"; inputs.nixpkgs.follows = "nixpkgs"; }; + + tasksquire = { + url = "git+ssh://git@git.pander.me/martin/tasksquire.git?ref=dev"; + }; }; - outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-wsl-stable, nixos-wsl, home-manager, home-manager-wsl, nix-darwin, sops-nix, ... }@inputs: + outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-wsl-stable, nixos-wsl, home-manager, home-manager-wsl, nix-darwin, ... }@inputs: let linuxSystem = "x86_64-linux"; linuxAarchSystem = "aarch64-linux"; @@ -73,6 +78,10 @@ }; home-manager.users.pan = import ./hosts/work/nixos/home.nix; } + inputs.nixos-vscode-server.nixosModules.default + ({ pkgs, ... }: { + services.vscode-server.enable = true; + }) ]; }; diff --git a/nix/hosts/home/common.nix b/hosts/home/common.nix similarity index 100% rename from nix/hosts/home/common.nix rename to hosts/home/common.nix diff --git a/nix/hosts/home/darwin/configuration.nix b/hosts/home/darwin/configuration.nix similarity index 100% rename from nix/hosts/home/darwin/configuration.nix rename to hosts/home/darwin/configuration.nix diff --git a/nix/hosts/home/nix/home.nix b/hosts/home/nix/home.nix similarity index 100% rename from nix/hosts/home/nix/home.nix rename to hosts/home/nix/home.nix diff --git a/nix/hosts/home/nixos/configuration.nix b/hosts/home/nixos/configuration.nix similarity index 100% rename from nix/hosts/home/nixos/configuration.nix rename to hosts/home/nixos/configuration.nix diff --git a/nix/hosts/home/nixos/home.nix b/hosts/home/nixos/home.nix similarity index 100% rename from nix/hosts/home/nixos/home.nix rename to hosts/home/nixos/home.nix diff --git a/nix/hosts/work/common.nix b/hosts/work/common.nix similarity index 100% rename from nix/hosts/work/common.nix rename to hosts/work/common.nix diff --git a/nix/hosts/work/nix/home.nix b/hosts/work/nix/home.nix similarity index 100% rename from nix/hosts/work/nix/home.nix rename to hosts/work/nix/home.nix diff --git a/nix/hosts/work/nixos/configuration.nix b/hosts/work/nixos/configuration.nix similarity index 100% rename from nix/hosts/work/nixos/configuration.nix rename to hosts/work/nixos/configuration.nix diff --git a/nix/hosts/work/nixos/home.nix b/hosts/work/nixos/home.nix similarity index 100% rename from nix/hosts/work/nixos/home.nix rename to hosts/work/nixos/home.nix diff --git a/nix/modules/home/common.nix b/modules/home/common.nix similarity index 100% rename from nix/modules/home/common.nix rename to modules/home/common.nix diff --git a/nix/modules/home/dev.nix b/modules/home/dev.nix similarity index 100% rename from nix/modules/home/dev.nix rename to modules/home/dev.nix diff --git a/nix/modules/home/git.nix b/modules/home/git.nix similarity index 100% rename from nix/modules/home/git.nix rename to modules/home/git.nix diff --git a/nix/modules/home/nvim.nix b/modules/home/nvim.nix similarity index 90% rename from nix/modules/home/nvim.nix rename to modules/home/nvim.nix index edb77af..4479a05 100644 --- a/nix/modules/home/nvim.nix +++ b/modules/home/nvim.nix @@ -81,7 +81,7 @@ in extraLuaConfig = '' _G.is_work = ${if cfg.workMode then "true" else "false"} - _G.is_mac = ${if pkgs.stdenv.isDarwin then "true" else "false"} + _G.is_home = ${if pkgs.stdenv.isDarwin then "true" else "false"} require('base') require('keymaps') @@ -90,9 +90,8 @@ in ''; }; - # Symlink the nvim/lua directory to ~/.config/nvim/lua - # This allows for editing the lua modules without a nix rebuild - xdg.configFile."nvim/lua".source = config.lib.file.mkOutOfStoreSymlink "${config.dot.dotfilesPath}/nvim/lua"; + # Allow for editing the lua modules without a nix rebuild + xdg.configFile."nvim/lua".source = config.lib.file.mkOutOfStoreSymlink "${config.dot.dotfilesPath}/modules/nvim/lua"; home.packages = with pkgs; [ nodejs-slim diff --git a/nix/modules/home/secrets.nix b/modules/home/secrets.nix similarity index 100% rename from nix/modules/home/secrets.nix rename to modules/home/secrets.nix diff --git a/nix/modules/home/sh.nix b/modules/home/sh.nix similarity index 100% rename from nix/modules/home/sh.nix rename to modules/home/sh.nix diff --git a/nix/modules/home/task.nix b/modules/home/task.nix similarity index 99% rename from nix/modules/home/task.nix rename to modules/home/task.nix index 6564bda..8e63f2e 100644 --- a/nix/modules/home/task.nix +++ b/modules/home/task.nix @@ -62,7 +62,7 @@ home.packages = with pkgs; [ taskwarrior-tui - timewarrior + unstable.timewarrior inputs.tasksquire.packages.${pkgs.system}.default ]; diff --git a/nix/modules/home/tmux.nix b/modules/home/tmux.nix similarity index 100% rename from nix/modules/home/tmux.nix rename to modules/home/tmux.nix diff --git a/nix/modules/nixos/common.nix b/modules/nixos/common.nix similarity index 96% rename from nix/modules/nixos/common.nix rename to modules/nixos/common.nix index 49181f8..142ffb0 100644 --- a/nix/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -22,6 +22,7 @@ programs.zsh.enable = true; programs.ssh.startAgent = true; + programs.nix-ld.enable = true; nix.settings = { experimental-features = [ "nix-command" "flakes" ]; diff --git a/nix/modules/nixos/secrets.nix b/modules/nixos/secrets.nix similarity index 100% rename from nix/modules/nixos/secrets.nix rename to modules/nixos/secrets.nix diff --git a/nvim/lua/base.lua b/modules/nvim/lua/base.lua similarity index 100% rename from nvim/lua/base.lua rename to modules/nvim/lua/base.lua diff --git a/nvim/lua/filetype.lua b/modules/nvim/lua/filetype.lua similarity index 100% rename from nvim/lua/filetype.lua rename to modules/nvim/lua/filetype.lua diff --git a/nvim/lua/keymaps.lua b/modules/nvim/lua/keymaps.lua similarity index 100% rename from nvim/lua/keymaps.lua rename to modules/nvim/lua/keymaps.lua diff --git a/nvim/lua/plugins.lua b/modules/nvim/lua/plugins.lua similarity index 99% rename from nvim/lua/plugins.lua rename to modules/nvim/lua/plugins.lua index 1f394f4..bb17f18 100644 --- a/nvim/lua/plugins.lua +++ b/modules/nvim/lua/plugins.lua @@ -377,7 +377,7 @@ dap.configurations.zig = { }, } -if _G.is_mac then +if _G.is_home then workspaces = { { name = "privat", diff --git a/nvim/writing-init.lua b/modules/nvim/writing-init.lua similarity index 100% rename from nvim/writing-init.lua rename to modules/nvim/writing-init.lua diff --git a/nix/modules/overlays/unstable.nix b/modules/overlays/unstable.nix similarity index 100% rename from nix/modules/overlays/unstable.nix rename to modules/overlays/unstable.nix diff --git a/nix/secrets/.sops.yaml b/secrets/.sops.yaml similarity index 100% rename from nix/secrets/.sops.yaml rename to secrets/.sops.yaml diff --git a/nix/secrets/secrets.yaml b/secrets/secrets.yaml similarity index 100% rename from nix/secrets/secrets.yaml rename to secrets/secrets.yaml