Compare commits

...

5 Commits

11 changed files with 234 additions and 4 deletions

5
.gitignore vendored
View File

@ -1,5 +1,8 @@
.env .env
manualEpub* manualEpub*
# symlink for nixosConfigurations.nixos-wsl.config.system.build.manual.manualEpub # symlink for
# nixosConfigurations.nixos-wsl.config.system.build.manual.manualEpub
result* result*
# Symlink for system build # Symlink for system build
/system/xps/
# Ignore the `nixps` config since it's out of commission right now anyway.

146
chimchar-hold_for_flake.nix Normal file
View File

@ -0,0 +1,146 @@
{
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";
};
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, nixos-wsl,
# 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/chimchar/users.nix
./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
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;
};
};
}
];
};
};
};
}

View File

@ -133,6 +133,68 @@
} }
]; ];
}; };
/*
nixps = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system/xps/configuration.nix
# ./system/xps/users.nix
home-manager.nixosModules.home-manager
{
system.configurationRevision = self.shortRev or self.dirtyShortRev or "dirty";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users = {
whovian = {
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;
};
};
}
];
};
*/
isoimage = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# ./configuration.nix
{
nix = {
extraOptions = "
experimental-features = nix-command flakes
";
};
programs = {
zsh = {
enable = true;
};
};
users = {
defaultUserShell = pkgs.zsh;
};
}
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
];
};
}; };
packages.x86_64-linux = { packages.x86_64-linux = {

View File

@ -34,4 +34,7 @@
alias ssl "set ssl:verify-certificate false" alias ssl "set ssl:verify-certificate false"
''; '';
}; };
xdg.configFile = {
};
} }

View File

@ -56,6 +56,9 @@
itchy = { itchy = {
file = ./secrets/itchy.age; file = ./secrets/itchy.age;
}; };
elixire = {
file = ./secrets/elixire.age;
};
}; };
}; };
} }

View File

@ -113,7 +113,6 @@ in
pkgs.pyrosimple pkgs.pyrosimple
pkgs.python3 pkgs.python3
pkgs.quickbms pkgs.quickbms
pkgs.screen
pkgs.sshfs pkgs.sshfs
pkgs.unrar-wrapper pkgs.unrar-wrapper
pkgs.wget pkgs.wget
@ -142,6 +141,8 @@ in
# Replaced in favour of nixpkgs#_7zz # Replaced in favour of nixpkgs#_7zz
pkgs.rclone pkgs.rclone
# Replaced with my_packages.new_rclone which is a patched build. # Replaced with my_packages.new_rclone which is a patched build.
pkgs.screen
# Replaced with System `programs.screen.enable`
pkgs.terminator pkgs.terminator
# Not needed on WSL, even though I'd like it on WSL sometimes. # Not needed on WSL, even though I'd like it on WSL sometimes.
pkgs.yt-dlp pkgs.yt-dlp

View File

@ -5,4 +5,5 @@ in
"secrets/openai_key.age".publicKeys = [ whovian ]; "secrets/openai_key.age".publicKeys = [ whovian ];
"secrets/curse.age".publicKeys = [ whovian ]; "secrets/curse.age".publicKeys = [ whovian ];
"secrets/itchy.age".publicKeys = [ whovian ]; "secrets/itchy.age".publicKeys = [ whovian ];
"secrets/elixire.age".publicKeys = [ whovian ];
} }

5
home/secrets/elixire.age Normal file
View File

@ -0,0 +1,5 @@
age-encryption.org/v1
-> ssh-ed25519 nNjyyA lpCWUwoqTZP3L8/Ap89k/+2yK0XufS1g6thmXxPVoS4
si+irzsEUpboQtXYZ5FcsG7LYCGSSFIcT4Ycr2B2/GE
--- bBbONoee+wmDKPaVWYXv9USIk0LhFK7+ZwAF6a7hCLc
…ÊzÒ€ÿC}ŠÔ›w°LQT-#¬æààXѯëù›·Ð¨¸•ð¥ø}%=kõµë!m ¾IêÄ}#Q”qݶ\vÒÄä£DÀC±Ç(&5Þ«ý

View File

@ -10,5 +10,6 @@
OPENAI_API_KEY = "\$(cat ${config.age.secrets."openai".path})"; OPENAI_API_KEY = "\$(cat ${config.age.secrets."openai".path})";
CURSEFORGE_API_KEY = "\$(cat ${config.age.secrets."cursed".path})"; CURSEFORGE_API_KEY = "\$(cat ${config.age.secrets."cursed".path})";
ITCHIO_API_KEY = "\$(cat ${config.age.secrets."itchy".path})"; ITCHIO_API_KEY = "\$(cat ${config.age.secrets."itchy".path})";
ELIXIRE_API_KEY = "\$(cat ${config.age.secrets."elixire".path})";
}; };
} }

0
system/chimchar/.gitkeep Normal file
View File

View File

@ -22,15 +22,20 @@
enable = true; enable = true;
}; };
# I haven't figured out how to get `cdemu` properly working (in WSL), so
# I'm just going to leave it as `programs.cdemu.enable = false;` for now.
cdemu = { cdemu = {
# I haven't figured out how to get `cdemu` properly working (in WSL), so
# I'm just going to leave it as `programs.cdemu.enable = false;` for now.
enable = false; enable = false;
group = "cdrom"; group = "cdrom";
gui = false; gui = false;
image-analyzer = false; image-analyzer = false;
}; };
screen = {
enable = true;
};
}; };
# `documentation.man.generateCaches` seems to be mainly useful for `whatis`, # `documentation.man.generateCaches` seems to be mainly useful for `whatis`,