diff --git a/flake.lock b/flake.lock index 1e5670d..8d92749 100644 --- a/flake.lock +++ b/flake.lock @@ -22,6 +22,22 @@ "type": "github" } }, + "flake-compat": { + "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-utils": { "inputs": { "systems": "systems" @@ -356,7 +372,8 @@ "tclip": "tclip", "templ": "templ", "tmpl": "tmpl", - "website": "website" + "website": "website", + "wsl": "wsl" } }, "systems": { @@ -510,6 +527,30 @@ "url": "https://git.jojodev.com/jolheiser/jolheiser.com" } }, + "wsl": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703521177, + "narHash": "sha256-V95s2ypDpdaFGbeG3pvazEE7qdjwZknoauv89DJQvz0=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "ec53b11f0c78572a2b0b5263ae1c46293daaf55f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NixOS-WSL", + "type": "github" + } + }, "xc": { "inputs": { "flake-utils": "flake-utils_2", diff --git a/flake.nix b/flake.nix index b5b15ed..62328cf 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,12 @@ url = "github:a-h/templ"; inputs.nixpkgs.follows = "nixpkgs"; }; + # WSL + wsl = { + url = "github:nix-community/NixOS-WSL"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; }; outputs = { @@ -92,6 +98,7 @@ home-manager, agenix, nixpkgs-py36, + wsl, ... } @ inputs: let overlays = [ @@ -148,49 +155,62 @@ }; }; }; + workModules = [ + home-manager.nixosModules.home-manager + agenix.nixosModules.default + (commonConfig {}) + ({pkgs, ...}: { + config = { + nixpkgs.overlays = [ + (_: _: { + py36 = import nixpkgs-py36 {inherit (pkgs) system;}; + }) + ]; + home-manager.users.${username}.programs = { + git.package = pkgs.gitSVN; + firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)]; + }; + age.secrets = { + netrc = { + file = ./secrets/work/netrc.age; + owner = username; + path = "/home/${username}/.netrc"; + }; + pipconf = { + file = ./secrets/work/pip.conf.age; + owner = username; + path = "/home/${username}/.config/pip/pip.conf"; + }; + pypirc = { + file = ./secrets/work/pypirc.age; + owner = username; + path = "/home/${username}/.pypirc"; + }; + cifs = userSecret ./secrets/work/cifs.age; + }; + }; + }) + ]; username = "jolheiser"; in { nixosConfigurations = { "chai" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - home-manager.nixosModules.home-manager - agenix.nixosModules.default - ./machines/chai - (commonConfig {}) - ({pkgs, ...}: { - config = { - nixpkgs.overlays = [ - (_: _: { - py36 = import nixpkgs-py36 {inherit (pkgs) system;}; - }) - ]; - home-manager.users.${username}.programs = { - git.package = pkgs.gitSVN; - firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)]; - }; - age.secrets = { - netrc = { - file = ./secrets/work/netrc.age; - owner = username; - path = "/home/${username}/.netrc"; - }; - pipconf = { - file = ./secrets/work/pip.conf.age; - owner = username; - path = "/home/${username}/.config/pip/pip.conf"; - }; - pypirc = { - file = ./secrets/work/pypirc.age; - owner = username; - path = "/home/${username}/.pypirc"; - }; - cifs = userSecret ./secrets/work/cifs.age; - }; - }; - }) - ]; + modules = + workModules + ++ [ + ./machines/chai + ]; + }; + "masala" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = + workModules + ++ [ + wsl.nixosModules.wsl + ./machines/masala + ]; }; "matcha" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; diff --git a/machines/masala/default.nix b/machines/masala/default.nix new file mode 100644 index 0000000..54e8526 --- /dev/null +++ b/machines/masala/default.nix @@ -0,0 +1,34 @@ +{pkgs, ...}: let + username = "jolheiser"; +in { + imports = [../common/gui]; + + networking.hostName = "masala"; + + wsl = { + enable = true; + defaultUser = username; + startMenuLaunchers = true; + }; + + users.users."${username}" = { + extraGroups = ["wheel" "docker"]; + isNormalUser = true; + }; + + services.openssh.enable = true; + + environment.systemPackages = with pkgs; [ + libxcrypt + py36.python36 + py36.python36Packages.virtualenv + py36.python36Packages.psycopg2 + py36.python36Packages.wheel + py36.python36Packages.setuptools + py36.python36Packages.pip + python3Packages.twine + subversion + ]; + + system.stateVersion = "23.11"; +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix index cf1a436..b2fb11a 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,9 +2,10 @@ let jolheiser = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKrPUqk9v7FE7OgMDaOMdlnItiXSDkmS+eU94RzQFiMS nix"; matcha = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILZxjkZLj/9xvmg1enK+B7k8qf6Px0j4kTZ2caQfYmB1 root@matcha"; chai = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA7PS9SJ+OVrUku9dPUQZigioy+r3VlFHVntsa/F7AdM root@chai"; + masala = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH0bnlygiFqNwl0mHxcD+t78bTsn1NcHm6L2B4le4FtS root@nixos"; dragonwell = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN32Cwxer2AOGvEqSqXSPp49gj1VtR7G2XmPnmXj6o53 root@dragonwell"; - all = [jolheiser matcha chai dragonwell]; + all = [jolheiser matcha chai masala dragonwell]; in { "shared/ssh-config.age".publicKeys = all; "shared/ssh-config-work.age".publicKeys = all; @@ -12,8 +13,8 @@ in { "shared/irc-pw.age".publicKeys = all; "shared/gist-pw.age".publicKeys = all; "shared/git-send-email.age".publicKeys = all; - "work/netrc.age".publicKeys = [jolheiser chai]; - "work/pip.conf.age".publicKeys = [jolheiser chai]; - "work/pypirc.age".publicKeys = [jolheiser chai]; - "work/cifs.age".publicKeys = [jolheiser chai]; + "work/netrc.age".publicKeys = [jolheiser chai masala]; + "work/pip.conf.age".publicKeys = [jolheiser chai masala]; + "work/pypirc.age".publicKeys = [jolheiser chai masala]; + "work/cifs.age".publicKeys = [jolheiser chai masala]; } diff --git a/secrets/shared/gist-pw.age b/secrets/shared/gist-pw.age index 82a3a1d..50b30a7 100644 --- a/secrets/shared/gist-pw.age +++ b/secrets/shared/gist-pw.age @@ -1,13 +1,17 @@ age-encryption.org/v1 --> ssh-ed25519 E8j6/g r0iWFrtSeUT6qVFrQhLCba6rZfsaFynSC8Rb3EuGoFg -JzeAiUCWhojQa5mRvqT+SrR3VqSW2k4anUSv9/DBC2s --> ssh-ed25519 xUMv2w oCscH65NfnZyMvSwHXsK/TvgnpWNq5+7DjiYMrIL6xk -GdXBCV88GpOBfadA3w3CXuVf/U5Q2u3SgnEPesPBAgA --> ssh-ed25519 jo1MPA 37bTADVSe/ztBINGlXjDgTWMcchKycTP83MIvpIZNDc -TDJOpE9KrE3DrTD4OM5ikL8mU85WbvrsId3lRp507Yk --> ssh-ed25519 f31uNA sX0XTVf+92VqUA7Hdd6x6fxVqmWqHj1l9eOSE6yUlAU -hc1ZeagJ4w/jRKXtCHZxHcs0k+JafopzU3s4/Z44cuM --> C2|J-grease |je;R;d -V1hB5+X/bsklAn8HeRPukBNz5efwE0bT8pL9P58jWb0ZdkBXRpPXUacCjbm1njk ---- WpYUFBbDJptLs3YK9UBQfgfRngN7MFaTrmmWLMMKWxE -pbIWo, kZQ\P;neAC_64'p \ No newline at end of file +-> ssh-ed25519 E8j6/g MoQ+KiKt+A1JLrO7Xdo/EUY1/RXgT02IT5KdDIrBFnI +ivOpO8f87yAm1k/1FL3qhiaS5G/eW7jYV19Mz5QoEXc +-> ssh-ed25519 xUMv2w xht8LuQJaV0yhzvwbmYjUsgn3KdUqj8BtumeNRqrP10 +0WlxPmL1t8GqRMX+ll0nnDDPDDhEAOqkJFZKwwFYZ10 +-> ssh-ed25519 jo1MPA XPE2K3xYt5ECbDQP5T5VMTsGkIg9awvvLflpPSc522E +G4xPLpMYsOz+5au7BaNk1n5naS5SWaxFKYue6f0gHWA +-> ssh-ed25519 JBrabQ QFUSyS+N63P5XCJTbD32yfZ2GIh5J4A1YYL5T3CWDgg +i/+qf3N+/p/34jW4of+YaQzQZI/Glab91Gu540ePDI8 +-> ssh-ed25519 f31uNA eP9MiIZQs8j6/PocSCyRvNUFQXdPZetJPjrz4ReZbwA +cV/u5ijihDRgpOF9PaV5oxzkTpuo972S+ekPzPs4LT4 +-> vA-grease { +smNSOi0Et4PW98y+miaCzQtIJp4B+Z5mKMPKc4Vf8eU0q24RtCR8YryrVuxlF7WH +myDH7dBP3MGhltMuMpzi/9rQIYjmPol5BSjDjANVhrgj2E7hfPBw3DjcXKiSaZMW +YTOf +--- PcaNjf88InU5siJmdazbEPYDJd1YeTDVFkrYzZcsJgM +RQ){َŊ vZQ8#oRPYGw֋ h7 \ No newline at end of file diff --git a/secrets/shared/git-send-email.age b/secrets/shared/git-send-email.age index 7553e5d..84c7d8d 100644 Binary files a/secrets/shared/git-send-email.age and b/secrets/shared/git-send-email.age differ diff --git a/secrets/shared/irc-pw.age b/secrets/shared/irc-pw.age index 2ee514e..8bef121 100644 --- a/secrets/shared/irc-pw.age +++ b/secrets/shared/irc-pw.age @@ -1,13 +1,16 @@ age-encryption.org/v1 --> ssh-ed25519 E8j6/g L6JKvzM29Su9WrpTXYds709Im89Bn1mIb5XUNi/P6wk -R7OjLQqaqvffrwSB/K43IAGYYiLmO9y+0BFKv65Rc8w --> ssh-ed25519 xUMv2w A+XITd1k+ZbRENhYT7D+llj8s432GNHi5iCVGf5R+g4 -3gb8GpE721I1iOhzlo23T2lkIBZk93iPjGc3jByogLQ --> ssh-ed25519 jo1MPA obUysJUglKrJ/oEHCp6zKljoL3ihi+bENlqp45saCFs -Q2h23BFO7cNkp2XmDpoE03U86N83Jsryf6GNMzLy2EI --> ssh-ed25519 f31uNA xv/hgJrLtbX7qRBpkHs0fwa29xaozdywuLWeOsHZFyQ -PLgZwEqyiueLoLfppOMBhp0S+gwunPEB3j+VRNcML4o --> `T!`LPM5-grease -3Q ---- 9W+QAbKfdMBX119Hf8t1ZdNbQ8QUN1as6qL6eSvIh34 -\#!s6^ ɑ,1!h0giHQ؂{оV \ No newline at end of file +-> ssh-ed25519 E8j6/g d1zXFjUit7YPN55uV8l2k3CVDFcKIdKBlSAwmUHY+nw +Y+W5puz47ItyxU6eMYh/2C/s+Qs+CWfA+80tp14ZiZY +-> ssh-ed25519 xUMv2w /pGFstD9CQoIfQ++vK4xsacup4DmJLrAbJc8DhbPyG0 +BT9/wTt4UYUPQJL/ZJXNVBfAUUykiyXt2Pc2FQe9Dm4 +-> ssh-ed25519 jo1MPA +GG0hnR/eBw122D4dZvbMcsIfQitviv2UUv3I4yiYAs +KCsDTbnfxRyY8xXBtaEg9GHMF0eHrF9Ss5OgSSQWDq8 +-> ssh-ed25519 JBrabQ KGZMHVVEwuGMkEqa5wM4/cZo7A9lnbySp1Sn2bA3wi4 +NlPafvcnBfs1S0iDKqG0zAg7/grGI3VVkWOWhFF5iHQ +-> ssh-ed25519 f31uNA tEh1lMZ5BM/T1kuAJS3a9uirZ37atm+SRoDFHlOnKBA +ip6L5nl7gXVD7UqkwFVfUWpUM0htLnVmBHIFUtnK5K4 +-> Gh,!h[-grease Bqfg 5Mp&F< * +mxpybjNX +--- TyFKdTP94CXHZg3iL0zb+OdKWLB1FbPwMXaNEkzdAHM +<6anOQ^YPq2j +zFgc \ No newline at end of file diff --git a/secrets/shared/spotify.age b/secrets/shared/spotify.age index 1b760f0..8367be4 100644 Binary files a/secrets/shared/spotify.age and b/secrets/shared/spotify.age differ diff --git a/secrets/shared/ssh-config-work.age b/secrets/shared/ssh-config-work.age index 9b8fde5..0bee148 100644 Binary files a/secrets/shared/ssh-config-work.age and b/secrets/shared/ssh-config-work.age differ diff --git a/secrets/shared/ssh-config.age b/secrets/shared/ssh-config.age index 80eb15d..3680169 100644 Binary files a/secrets/shared/ssh-config.age and b/secrets/shared/ssh-config.age differ diff --git a/secrets/work/cifs.age b/secrets/work/cifs.age index a6afadb..35eb63b 100644 Binary files a/secrets/work/cifs.age and b/secrets/work/cifs.age differ diff --git a/secrets/work/netrc.age b/secrets/work/netrc.age index 774e663..65acd2f 100644 --- a/secrets/work/netrc.age +++ b/secrets/work/netrc.age @@ -1,9 +1,11 @@ age-encryption.org/v1 --> ssh-ed25519 E8j6/g hgdVbcQfIHvJiJRe9r3q/v7NxC4iZSIt7S4h8ssg8z0 -m8m8yBCLpDN35B0rQC4Ku09TH96Qnzkm33db6KJaU3g --> ssh-ed25519 jo1MPA Sdr/lN+YUF5HTHgJgzya5dGlSy3aJOPnSn8+tPiqUyI -vNyotaaDLjLb8un4mB4VwK99ufmpqfH8JcGBQ8zfFqI --> nu:d]-grease -Cf35v94eity+boz3dhzFWtQEjnz68ot/m7Q ---- ILAAgk4TZ8C+Bimy1GqNWGGw7MB9ArhdCt/fN4uDbII -yV)=/;o8v]=m0j..Ǻ" Ȑn <O]$'ϏS1fXÐ声EdcS:SEV-\5np',6?"`i \ No newline at end of file +-> ssh-ed25519 E8j6/g Qz7+yH51tMzj1uY98P9MV0tXEf1DCSDCO2lIr/C5Bjc +1B8DKpZVzVQfevZ1xfalrpaM40hZiBjL3rKBOwmueE0 +-> ssh-ed25519 jo1MPA ZsuqgFfcyKEZINlcqBqc3mnmtM8yE7Vh6dtj4i/D5TI +GAw5T8Mqd8LqGXtLZqJ+ADewL5H4wctHHbgIOZOZflg +-> ssh-ed25519 JBrabQ Zvf0y/ZYm9ogPC0fZV+J/FCIyRrP48X4ccoVTeV5bFQ +uKIKyKDnrAdnDjPBP0oY3NktEBQK9O9VSAykFrjC+24 +-> yC7d,N9-grease eFX(X HYK 7L:a +oj6ihhdnlM6qHEUSBecee/K563PIko1Krw8YNoO16cRHtt8y9w +--- i+jG579wY+HL4+iSuVU6naQJLiTbWonfzZvuJgyYl7o + UISFi & mrI!##{B%sM]k \eWJ ='+Jd@8\pz ~,1oSrn+ 2D=K֌PTY-S2Mփ"2 \ No newline at end of file diff --git a/secrets/work/pip.conf.age b/secrets/work/pip.conf.age index fc7b9d6..5262b33 100644 --- a/secrets/work/pip.conf.age +++ b/secrets/work/pip.conf.age @@ -1,11 +1,11 @@ age-encryption.org/v1 --> ssh-ed25519 E8j6/g F7h/Mq3rogVymYRt3IOzkDjbBK7I3sD1T4ceCmEDEXo -zUUHdvIyxF3rLEVl1jSDS7hAt4j+gYF3NHfhTKpppj0 --> ssh-ed25519 jo1MPA Dq0CaqxGF3fWSLNQMmGnLBrxd71YWMn4XHGH0gHUWXY -RCC6r7JQHEqT93qSLkRIEV00E0JiIZCipjcSgREw0GQ --> O*-grease LdJ1E\ =rA~m=U\ tRE$^ Sp!>@ -qWkYBMCMgMuc32E7aU3dOzC9tZx9cTob4q1BaOpwaayn88/u17e4HRiNWsZDZ0Fj -FpRD7dVE3isCLpJoKzSSbVRwnZdkKWLeoEZlCQUcGmA ---- SYU6o/b687IysT9BbpE4ah3Ux2eLXdP2v1tIIoJS/pg -Ǣ9M5%%l/T-K̉Fv]ŷzI!|&QW*,#I \ No newline at end of file +-> ssh-ed25519 E8j6/g NZuccuIuBc6BV6hSYzyNZlzreL6m+ny6CpopOk23IXU +9Ql8ZvhLUmtoSPGyd6kXVQ0VZdhFae50NiCcfhYsr4E +-> ssh-ed25519 jo1MPA 7Uzs08jqKXGNDKRLlN8RfEUlCgdrX5rB42GMO+DZCHk +YqBJyeRPepYrV32ENUvIlco5qjpFcbwIxnfGUxrbTME +-> ssh-ed25519 JBrabQ lNBa2QQK3kvaIhQsSuOrIC/MZI+OLGb+62yF53uGqik +JRZKfqjo35uXYqb30A6XmQuBGQlDaMXTuQXVrjSK9Oc +-> o&4Y>`-grease 3VH RqXPQ_E < +mZGs +--- t/cD29ZAnpVX6+vdvjsOgMTpzoiML46trO2I/+NDqe0 +/w,Ӫ?k= R|4ۦCJO ؄wtis .JɥM KƆQ2o,6oY\;3,1`4Qq)vĠ]k#1zz \ No newline at end of file diff --git a/secrets/work/pypirc.age b/secrets/work/pypirc.age index 8b61bab..479a227 100644 Binary files a/secrets/work/pypirc.age and b/secrets/work/pypirc.age differ