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

View file

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

View file

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