From 3b3dec36ea8bc1c7771ebe67fff243decb5e8da4 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Thu, 17 Aug 2023 16:31:59 +0000 Subject: [PATCH] im still going to figure out gpg signing just later --- flake.lock | 18 +++++----- flake.nix | 3 ++ hosts/sakowsl/configuration.nix | 61 +++++++++++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 31b0e3c9..3464181c 100644 --- a/flake.lock +++ b/flake.lock @@ -63,11 +63,11 @@ ] }, "locked": { - "lastModified": 1691963086, - "narHash": "sha256-OHpCjDC9jsMDzyNJslJUeONaNkSDQA5t7qGpurVsVww=", + "lastModified": 1692099905, + "narHash": "sha256-/pSusGhmIdSdAaywQRFA5dVbfdIzlWQTecM+E46+cJ0=", "owner": "nix-community", "repo": "home-manager", - "rev": "7f351e2993ed170dd9b8521a9e41f4d91d9b9c5d", + "rev": "2a6679aa9cc3872c29ba2a57fe1b71b3e3c5649f", "type": "github" }, "original": { @@ -79,11 +79,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1691950488, - "narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=", + "lastModified": 1692207601, + "narHash": "sha256-tfPGNKQcJT1cvT6ufqO/7ydYNL6mcJClvzbrzhKjB80=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "720e61ed8de116eec48d6baea1d54469b536b985", + "rev": "b30c68669df77d981ce4aefd6b9d378563f6fc4e", "type": "github" }, "original": { @@ -95,11 +95,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1691899779, - "narHash": "sha256-IBf4KVr/UQJlzrqB2/IHtlvmwsvyIVLPerSzCPU/6Xk=", + "lastModified": 1692174805, + "narHash": "sha256-xmNPFDi/AUMIxwgOH/IVom55Dks34u1g7sFKKebxUm0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "100a1550b0e7a64b960c625b656f9229bdef5f87", + "rev": "caac0eb6bdcad0b32cb2522e03e4002c8975c62e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c6699e2a..09be60f8 100644 --- a/flake.nix +++ b/flake.nix @@ -73,8 +73,11 @@ ]; }; sakowsl = nixpkgs.lib.nixosSystem { + # because theres no hardware-configuration.nix + system = "x86_64-linux"; specialArgs = {inherit inputs outputs;}; modules = [ + { nix.registry.nixpkgs.flake = nixpkgs;} ./hosts/sakowsl/configuration.nix NixOS-WSL.nixosModules.wsl ]; diff --git a/hosts/sakowsl/configuration.nix b/hosts/sakowsl/configuration.nix index f5b98e3e..f6203d18 100644 --- a/hosts/sakowsl/configuration.nix +++ b/hosts/sakowsl/configuration.nix @@ -1,13 +1,18 @@ -{ lib, pkgs, config, modulesPath, ... }: +{ lib, pkgs, config, modulesPath, inputs, outputs, ... }: { imports = [ - nixos-wsl.nixosModules.wsl + inputs.home-manager.nixosModules.default + "${modulesPath}/profiles/minimal.nix" + outputs.nixosModules.shell + outputs.nixosModules.hardware + outputs.nixosModules.dev + outputs.nixosModules.media ]; wsl = { enable = true; - automountPath = "/mnt"; + wslConf.automount.root = "/mnt"; defaultUser = "sako"; startMenuLaunchers = true; @@ -31,6 +36,56 @@ nix.extraOptions = '' experimental-features = nix-command flakes ''; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # Home manager setup + home-manager.useUserPackages = true; + home-manager.users.sako = { pkgs, ... }: { + home.stateVersion = "22.05"; + home.packages = []; + home.username = "sako"; + home.homeDirectory = "/home/sako"; + xdg.configFile.git = { + source = ../../config/git; + }; +}; + + # bare minimum + environment.systemPackages = with pkgs; [ + vim # backup + wget #double u get + killall # die processes + unzip # zip file + gh # github + htop # htop + tree # trees + ]; + # you phisiclally cannot live without this + # litearlly! ! ! ! ! ! + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "tty"; + # enableSSHSupport = true; + }; + + environment.noXlibs = lib.mkForce false; + + programs.git = { + enable = true; + package = pkgs.gitFull; + }; + + modules = { + dev = { + editors = { + nvim.enable = true; + }; + cc.enable = true; + }; + shell = { + zsh.enable = true; + }; + }; system.stateVersion = "22.05"; }