Compare commits

...

7 Commits

4 changed files with 177 additions and 18 deletions

125
.old/flake.nix Normal file
View File

@ -0,0 +1,125 @@
{
description = "Whovian9369's WSL NixOS Config";
inputs = {
### Basically required
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL/main";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
### 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";
};
my_packages = {
url = "/home/whovian/.flakes";
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";
};
#########
# 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, nixos-wsl,
# Added by me
agenix, home-manager, my_packages, nix-index-database, xil, ... }:
{
nixosConfigurations = {
testing-wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system/configuration.nix
nixos-wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
{
system.configurationRevision = self.rev or self.dirtyRev or "dirty";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit my_packages;
inherit xil;
my_pkgs = my_packages.packages.x86_64-linux;
system = "x86_64-linux";
};
sharedModules = [
# ./home/home.nix
agenix.homeManagerModules.default
nix-index-database.hmModules.nix-index
];
users.whovian = import ./home/home.nix;
# users.whovian.home.packages = [
# agenix.packages.x86_64-linux.default
# ];
/*
home-manager.lib.homeManagerConfiguration {
# configuration = import ./home/home.nix;
# system = "x86_64-linux";
# pkgs = import nixpkgs {
# system = "x86_64-linux";
# config = {
# allowUnfree = true;
# };
# };
};
*/
};
}
];
};
};
};
}

View File

@ -4,7 +4,7 @@
"inputs": {
"darwin": [],
"home-manager": [
"nixpkgs"
"home-manager"
],
"nixpkgs": [
"nixpkgs"
@ -14,11 +14,11 @@
]
},
"locked": {
"lastModified": 1715101957,
"narHash": "sha256-fs5uVQFTfgb4L9pnhldeyTHNcYwn1U4nKYoCBJ6W3W4=",
"lastModified": 1715290355,
"narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=",
"owner": "ryantm",
"repo": "agenix",
"rev": "07479c2e7396acaaaac5925483498154034ea80a",
"rev": "8d37c5bdeade12b6479c85acd133063ab53187a0",
"type": "github"
},
"original": {
@ -70,11 +70,11 @@
]
},
"locked": {
"lastModified": 1715077503,
"narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=",
"lastModified": 1715380449,
"narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6e277d9566de9976f47228dd8c580b97488734d4",
"rev": "d7682620185f213df384c363288093b486b2883f",
"type": "github"
},
"original": {
@ -100,6 +100,26 @@
"type": "path"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714878592,
"narHash": "sha256-E68C03sYRsYFsK7wiGHUIJm8IsyPRALOrFoTL0glXnI=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "a362555e9dbd4ecff3bb98969bbdb8f79fe87f10",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nix-systems_default": {
"locked": {
"lastModified": 1681028828,
@ -126,11 +146,11 @@
]
},
"locked": {
"lastModified": 1715114695,
"narHash": "sha256-Pw81Wkm8RhCZr17ltsDabFpat1lRltRAszkppBmmdaI=",
"lastModified": 1715237610,
"narHash": "sha256-/ZeWQ4mL3DfHsbTZYc80qMrL4vBfENP0RiGv2KrCrEo=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "19c7ae9034389f5a7bbc6b17a7b72289c1c52272",
"rev": "61fe33f4194bbbc48c090a2e79f4eb61b47c9b75",
"type": "github"
},
"original": {
@ -142,11 +162,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1714906307,
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"type": "github"
},
"original": {
@ -162,6 +182,7 @@
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"my_packages": "my_packages",
"nix-index-database": "nix-index-database",
"nix-systems_default": "nix-systems_default",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",

View File

@ -23,7 +23,7 @@
# Optionally choose not to download darwin deps
# (saves some resources on Linux)
inputs.systems.follows = "nix-systems_default";
inputs.home-manager.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
home-manager = {
@ -42,6 +42,11 @@
inputs.flake-utils.follows = "flake-utils";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
#########
# Extra inputs that I am adding just to make my life easier,
# but don't like that they're included >:(
@ -62,7 +67,11 @@
}; # inputs
outputs = { self, nixpkgs, nixos-wsl, agenix, home-manager, my_packages, xil, ... }:
outputs = {
# Needed
self, nixpkgs, nixos-wsl,
# Added by me
agenix, home-manager, my_packages, nix-index-database, xil, ... }:
{
nixosConfigurations = {
nixos-wsl = nixpkgs.lib.nixosSystem {
@ -72,19 +81,19 @@
nixos-wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
{
system.configurationRevision = self.rev or self.dirtyRev or "dirty";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
./home/home.nix
agenix.homeManagerModules.default
nix-index-database.hmModules.nix-index
];
users.whovian.home.packages = [
agenix.packages.x86_64-linux.default
];
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix

View File

@ -40,6 +40,7 @@
pkgs.colorized-logs
pkgs.croc
pkgs.dhex
pkgs.fd
pkgs.file
pkgs.gdrive3
pkgs.git
@ -126,6 +127,9 @@
jq = {
enable = true;
};
nix-index = {
enable = true;
};
ripgrep = {
enable = true;
};