Whovian9369
d9046b8321
- Adds `mySSHKeys` via `inherit` from `system/sshKeys.nix` for easier setting of allowed SSH keys - Especially useful for self-built `x86_64-linux` NixOS ISO. - Swap where user groups are set to `system/users.nix` - Add `myOptions.isWSL` to identify if an environment is used in WSL or not. - Used for setting user groups between WSL and bare-metal. - Requires adding `myOptions` as module to WSL systems? - Need to investiage if this properly works on bare-metal machines - So likely needs tested in VM? - Added `myOptions.isWSL` option to `nixos-wsl` for group setting reasons, see above. - Fleshed out `nixosConfigurations.isoimage-pc` to make keep some tools handy for live environment. - Plus, gave ssh key access to `root` user on ISO. - Need to double check if `nixos` user needs keys too. - Is that user still even generated with current config? Need to test. - Added `unnix_script` to `home-manager` environment's `home.packages`, so I can remove Nix Store paths from text input easily for ease of comparing against other builds.
142 lines
4 KiB
Nix
142 lines
4 KiB
Nix
{
|
|
description = "Whovian9369's WSL NixOS Config";
|
|
inputs = {
|
|
|
|
### Basically required
|
|
nixpkgs = {
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
### My extra inputs
|
|
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
# Optional, not necessary for the module
|
|
inputs.darwin.follows = "";
|
|
# Optionally choose not to download darwin deps
|
|
# (saves some resources on Linux)
|
|
inputs.systems.follows = "nix-systems_default";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
xil = {
|
|
url = "github:Qyriad/Xil";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
nix-index-database = {
|
|
url = "github:nix-community/nix-index-database";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
### Lix! Lix! Lix!
|
|
|
|
lix = {
|
|
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
|
|
flake = false;
|
|
};
|
|
|
|
lix-module = {
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
|
inputs.lix.follows = "lix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
#########
|
|
# Extra inputs that I am adding just to make my life easier,
|
|
# but don't like that they're included >:(
|
|
#########
|
|
|
|
# I don't like `flake-utils`, but so many things use it that I might as
|
|
# well only keep a single version of it.
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
inputs.systems.follows = "nix-systems_default";
|
|
};
|
|
|
|
# Ditto to github:nix-systems/default
|
|
nix-systems_default = {
|
|
url = "github:nix-systems/default";
|
|
};
|
|
|
|
}; # inputs
|
|
|
|
outputs = {
|
|
# Needed
|
|
self, nixpkgs,
|
|
# Lix
|
|
lix-module,
|
|
# Added by me
|
|
agenix, home-manager, nix-index-database, xil, ... }:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
config.allowUnfree = true;
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
chimchar = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
# ./system/chimchar/configuration.nix
|
|
# Am I going to use "configuration.nix" in this next config?
|
|
# Am I going to put it all into the flake itself?
|
|
# Am I going to do something else?
|
|
./system/dotnet_os_codename-workaround.nix
|
|
# Source of this fix file is
|
|
# https://github.com/nazarewk-iac/nix-configs/blob/main/modules/ascii-workaround.nix
|
|
./system/nix_lix.nix
|
|
# Enable Nix fork "Lix" instead of default "Nix" version from
|
|
# upstream
|
|
./system/users.nix
|
|
lix-module.nixosModules.default
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
system.configurationRevision = self.shortRev or self.dirtyShortRev or "dirty";
|
|
system.stateVersion = "24.05";
|
|
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
|
|
users = {
|
|
whovian = {
|
|
home = {
|
|
homeDirectory = "/home/whovian";
|
|
stateVersion = "23.05";
|
|
};
|
|
imports = [
|
|
# ./home/home.nix
|
|
agenix.homeManagerModules.default
|
|
nix-index-database.hmModules.nix-index
|
|
];
|
|
};
|
|
};
|
|
|
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
|
extraSpecialArgs = {
|
|
system = "x86_64-linux";
|
|
inherit xil;
|
|
inherit nixpkgs;
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
config.allowUnfree = true;
|
|
};
|
|
inherit agenix;
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|