feat: modernize work config

This commit is contained in:
Michael Thomas 2023-08-14 17:03:13 -04:00
parent afbf17321d
commit 73810b2046
7 changed files with 83 additions and 38 deletions

57
flake.lock generated
View File

@ -73,6 +73,24 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"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"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -171,7 +189,8 @@
"nur": "nur",
"rust-overlay": "rust-overlay",
"unstable": "unstable",
"utils": "utils"
"utils": "utils",
"vscode-server": "vscode-server"
}
},
"rust-overlay": {
@ -238,6 +257,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1688590700,
@ -270,6 +304,27 @@
"repo": "flake-utils",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1684517665,
"narHash": "sha256-SaAr66uCQ8CF75jIr23FZjk1+9Kfwm5sQnwV25206Gs=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "1e1358493df6529d4c7bc4cc3066f76fd16d4ae6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
}
},
"root": "root",

View File

@ -15,6 +15,10 @@
nixpkgs.follows = "nixpkgs";
};
};
vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
@ -29,7 +33,7 @@
};
};
outputs = { self, nixpkgs, unstable, nur, utils, rust-overlay, nixos-wsl, darwin, home-manager, ... }@inputs: {
outputs = { self, nixpkgs, unstable, nur, utils, rust-overlay, nixos-wsl, vscode-server, darwin, home-manager, ... }@inputs: {
# This repo's overlay plus any other overlays you use
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\
@ -82,14 +86,15 @@
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
(import ./overlays/iptables)
];
}
vscode-server.nixosModules.default
# {
# nixpkgs.overlays = [
# (import ./overlays/iptables)
# ];
# }
./modules/containers.nix
./modules/nix.nix
./modules/vscode-server.nix
# ./modules/vscode-server.nix
./machines/work/configuration.nix
];

View File

@ -1,4 +1,4 @@
{ lib, pkgs, config, modulesPath, inputs, ... }:
{ lib, pkgs, modulesPath, inputs, ... }:
with lib;
let
@ -13,7 +13,10 @@ in
wsl = {
enable = true;
automountPath = "/mnt";
wslConf = {
automount.root = "/mnt";
interop.appendWindowsPath = false;
};
defaultUser = defaultUser;
startMenuLaunchers = true;
@ -34,25 +37,18 @@ in
};
environment.systemPackages = with pkgs; [
wget
wget
];
# Proxychains
programs.proxychains = {
enable = true;
proxies.main = {
enable = true;
type = "http";
host = "172.21.32.1";
port = 1080;
};
};
services.vscode-server.enable = true;
programs.zsh.enable = true;
users.users.${defaultUser} = {
uid = pkgs.lib.mkForce 1001;
uid = pkgs.lib.mkForce 1001;
extraGroups = [ "wheel" "docker" "podman" ];
shell = pkgs.zsh;
};
system.stateVersion = "21.11";
system.stateVersion = "22.05";
}

View File

@ -4,7 +4,7 @@
virtualisation.podman = {
enable = true;
dockerSocket.enable = true;
defaultNetwork.dnsname.enable = true;
defaultNetwork.settings.dns_enabled = true;
};
environment.systemPackages = with pkgs; [

View File

@ -1,10 +0,0 @@
{
imports = [
(fetchTarball {
url = "https://github.com/msteen/nixos-vscode-server/tarball/d2343b5eb47b811856085f3eff4d899a32b2c136";
sha256 = "sha256:1cszfjwshj6imkwip270ln4l1j328aw2zh9vm26wv3asnqlhdrak";
})
];
services.vscode-server.enable = true;
}

View File

@ -18,8 +18,7 @@
shellAliases = {
code = "/mnt/c/Program\\ Files/Microsoft\\ VS\\ Code/Code.exe";
};
profileExtra = ''
source $HOME/.profile
'';
};
home.stateVersion = "22.05";
}

View File

@ -16,7 +16,7 @@
kubectl
kubernetes-helm
# Nix
rnix-lsp
nil
nixpkgs-fmt
# Rust
(rust-bin.stable.latest.default.override {