From b2e61f97f1c38362a3c9c676668d48c1007158c2 Mon Sep 17 00:00:00 2001 From: Michael Thomas <michaelhthomas@outlook.com> Date: Thu, 4 Jul 2024 13:15:09 -0400 Subject: [PATCH] chore: remove unused wsl work config --- flake.lock | 139 ++----------------------------- flake.nix | 46 ---------- machines/work/configuration.nix | 57 ------------- user/environments/wsl/config.nix | 3 - user/environments/wsl/home.nix | 27 ------ 5 files changed, 6 insertions(+), 266 deletions(-) delete mode 100644 machines/work/configuration.nix delete mode 100644 user/environments/wsl/config.nix delete mode 100644 user/environments/wsl/home.nix diff --git a/flake.lock b/flake.lock index daeb810..50ec69f 100644 --- a/flake.lock +++ b/flake.lock @@ -107,7 +107,7 @@ }, "devshell": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixvim", "nixpkgs" @@ -144,22 +144,6 @@ } }, "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -173,7 +157,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_4": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1696426674, @@ -250,24 +234,6 @@ "inputs": { "systems": "systems_5" }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_6" - }, "locked": { "lastModified": 1701680307, "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", @@ -282,27 +248,9 @@ "type": "github" } }, - "flake-utils_5": { - "inputs": { - "systems": "systems_8" - }, - "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" - } - }, "git-hooks": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "gitignore": "gitignore", "nixpkgs": [ "nixvim", @@ -656,28 +604,6 @@ "type": "github" } }, - "nixos-wsl": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719220171, - "narHash": "sha256-xywM6JoGT8AwfoOFJBTv8GRlvNu8LYqqqMS/OQ6uCgE=", - "owner": "nix-community", - "repo": "NixOS-WSL", - "rev": "269411cfed6aab694e46f719277c972de96177bb", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NixOS-WSL", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1718714799, @@ -774,7 +700,7 @@ "nixvim": { "inputs": { "devshell": "devshell", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "git-hooks": "git-hooks", "home-manager": "home-manager_3", @@ -823,14 +749,12 @@ "hyprland": "hyprland", "ironbar": "ironbar", "nix-vscode-extensions": "nix-vscode-extensions", - "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_5", "nixvim": "nixvim", "nur": "nur", "rust-overlay": "rust-overlay_2", "unstable": "unstable", - "utils": "utils", - "vscode-server": "vscode-server" + "utils": "utils" } }, "rust-overlay": { @@ -963,36 +887,6 @@ "type": "github" } }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1031,7 +925,7 @@ }, "utils": { "inputs": { - "systems": "systems_7" + "systems": "systems_6" }, "locked": { "lastModified": 1710146030, @@ -1047,27 +941,6 @@ "type": "github" } }, - "vscode-server": { - "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713958148, - "narHash": "sha256-8PDNi/dgoI2kyM7uSiU4eoLBqUKoA+3TXuz+VWmuCOc=", - "owner": "nix-community", - "repo": "nixos-vscode-server", - "rev": "fc900c16efc6a5ed972fb6be87df018bcf3035bc", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixos-vscode-server", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", diff --git a/flake.nix b/flake.nix index 8b38643..2d7acaa 100644 --- a/flake.nix +++ b/flake.nix @@ -34,17 +34,6 @@ url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - - nixos-wsl = { - url = "github:nix-community/NixOS-WSL"; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; - }; - vscode-server = { - url = "github:nix-community/nixos-vscode-server"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = { @@ -56,8 +45,6 @@ utils, rust-overlay, nix-vscode-extensions, - nixos-wsl, - vscode-server, darwin, home-manager, ... @@ -175,21 +162,6 @@ ]; specialArgs = {inherit inputs;}; }; - - # WSL environment - work = inputs.nixpkgs.lib.nixosSystem { - system = utils.lib.system.x86_64-linux; - modules = - defaultModules - ++ [ - vscode-server.nixosModules.default - ./modules/containers.nix - ./modules/nix.nix - - ./machines/work/configuration.nix - ]; - specialArgs = {inherit inputs;}; - }; }; darwinConfigurations = { @@ -229,24 +201,6 @@ }; }; - wsl = inputs.home-manager.lib.homeManagerConfiguration { - system = "x86_64-linux"; - homeDirectory = "/home/michael"; - username = "michael"; - stateVersion = "21.05"; - configuration = { - config, - pkgs, - ... - }: { - programs.home-manager.enable = true; - - imports = [ - ./user/environments/wsl/home.nix - ]; - }; - }; - mac = inputs.home-manager.lib.homeManagerConfiguration { system = "aarch64-darwin"; homeDirectory = "/Users/michael"; diff --git a/machines/work/configuration.nix b/machines/work/configuration.nix deleted file mode 100644 index 59de1f7..0000000 --- a/machines/work/configuration.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - lib, - pkgs, - modulesPath, - inputs, - ... -}: -with lib; let - defaultUser = "michael"; -in { - imports = [ - "${modulesPath}/profiles/minimal.nix" - - inputs.nixos-wsl.nixosModules.wsl - ]; - - wsl = { - enable = true; - wslConf = { - automount.root = "/mnt"; - interop.appendWindowsPath = false; - }; - defaultUser = defaultUser; - startMenuLaunchers = true; - - # Enable integration with Docker Desktop (needs to be installed) - # docker.enable = true; - }; - - time.timeZone = "America/New_York"; - - programs.adb.enable = true; - - # Required because for some reason WSL kernel doesn't play well with nftables - networking.firewall.package = pkgs.iptables-legacy; - - home-manager = { - users.michael = import ../../user/environments/wsl/home.nix pkgs; - useGlobalPkgs = true; - }; - - environment.systemPackages = with pkgs; [ - wget - ]; - - services.vscode-server.enable = true; - - programs.zsh.enable = true; - - users.users.${defaultUser} = { - uid = pkgs.lib.mkForce 1001; - extraGroups = ["wheel" "docker" "podman"]; - shell = pkgs.zsh; - }; - - system.stateVersion = "22.05"; -} diff --git a/user/environments/wsl/config.nix b/user/environments/wsl/config.nix deleted file mode 100644 index 1dd1750..0000000 --- a/user/environments/wsl/config.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - allowUnfree = true; -} diff --git a/user/environments/wsl/home.nix b/user/environments/wsl/home.nix deleted file mode 100644 index 02701ca..0000000 --- a/user/environments/wsl/home.nix +++ /dev/null @@ -1,27 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../../modules/dev.nix - ../../modules/git.nix - ../../modules/nvim.nix - ../../modules/zsh.nix - ]; - - home.packages = with pkgs; [ - neofetch - pfetch - fortune - micro - ]; - - programs.git.extraConfig = { - safe.directory = "*"; - }; - - programs.zsh = { - shellAliases = { - code = "/mnt/c/Program\\ Files/Microsoft\\ VS\\ Code/Code.exe"; - }; - }; - - home.stateVersion = "22.05"; -}