-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
1,131 additions
and
1,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Nixus | ||
|
||
## Contents | ||
|
||
This repo contains my reorganized and rewritten NixOS configuration. | ||
It might not be widely considered _correct_ or whatever, because I used some of my braincells to come up with this autistic design philosophy: | ||
|
||
- **Do not overengineer** - Yeah, we get it, you are good at Nix, but you don't really need to overcomplicate everything. You sacrifice both readability and evaluation times in exchange for absolutely nothing | ||
> An idiot admires complexity, a genius admires simplicity, a physicist tries to make it simple, for an idiot anything the more complicated it is the more he will admire it, if you make something so clusterfucked he can't understand it he's gonna think you're a god cause you made it so complicated nobody can understand it. That's how they write journals in Academics, they try to make it so complicated people think you're a genius | ||
> ~ Terry Davis, Creator of Temple OS | ||
- **No inputs other than nixpkgs** - This is probably the most controversial one, for me it's just a proof of concept that you can achieve behaviour provided by external modules in a much simpler way. Just straight up rawdogging nix | ||
- Wrap binaries rather than creating user modifable files in home directory, just to be _pure_ ™️ | ||
- Avoid `with` keyword at ALL COST | ||
- Disk partitioning should not be declarative, I don't like the way disko does it. I use same partition layout for all of my hosts, and that's enough. | ||
- I like to keep my secrets in one place that is not my repo | ||
|
||
# Why I don't use some of the popular NixOS modules? | ||
|
||
## Home-manager | ||
|
||
I don't like it. I prefer to wrap my binaries and use systemd tmpfiles instead. Much better solution. | ||
|
||
Everyone in nix community will tell you that hm is a mess. | ||
|
||
## Flake-parts | ||
|
||
Actually I have nothing against using flake-parts, although I don't see the use case in my NixOS configuration since I only use one cpu architecture. | ||
|
||
Trust me, I tried. It never compiles on ARM anyway | ||
|
||
## Impermanence | ||
|
||
Bind mounts are somewhat unreliable at best and lead to undefined behaviour. Again, systemd-tmpfiles on top | ||
|
||
## Nix-colors | ||
|
||
It's just a glorified attribute set | ||
|
||
## 💛 Donate | ||
|
||
If you would like to support me you can sponsor me via ko-fi | ||
|
||
<a href="https://ko-fi.com/sioodmy"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support me on kofi" /> </a> | ||
|
||
... or if you prefer crypto | ||
|
||
Ethereum/EVM compatible: `0x2fa1e5e90c011d08bba1f6dbdc317fd293311c0d` | ||
|
||
[![Star History Chart](https://api.star-history.com/svg?repos=sioodmy/dotfiles&type=Date)](https://star-history.com/#sioodmy/dotfiles&Date) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,31 @@ | ||
{ | ||
description = "My NixOS configuration"; | ||
# https://dotfiles.sioodmy.dev | ||
description = "Consequence of allowing autistic people on the internet. Stay mad one-proper-config-structure purists :3"; | ||
|
||
outputs = {flake-parts, ...} @ inputs: | ||
flake-parts.lib.mkFlake {inherit inputs;} ({...}: { | ||
systems = [ | ||
"x86_64-linux" | ||
"aarch64-linux" | ||
]; | ||
|
||
imports = [ | ||
inputs.flake-parts.flakeModules.easyOverlay | ||
inputs.treefmt-nix.flakeModule | ||
]; | ||
|
||
perSystem = { | ||
config, | ||
pkgs, | ||
... | ||
}: { | ||
devShells.default = pkgs.mkShell { | ||
buildInputs = let | ||
colors = inputs.nix-colors.colorSchemes.catppuccin-frappe.palette; | ||
in | ||
[ | ||
config.treefmt.build.wrapper | ||
(pkgs.callPackage ./shell {inherit pkgs inputs colors;}) | ||
] | ||
++ (import ./shell/packages.nix {inherit pkgs;}); | ||
shellHook = '' | ||
nucleus | ||
''; | ||
}; | ||
|
||
# configure treefmt | ||
treefmt = { | ||
projectRootFile = "flake.nix"; | ||
|
||
programs = { | ||
alejandra.enable = true; | ||
black.enable = true; | ||
deadnix.enable = false; | ||
shellcheck.enable = true; | ||
shfmt = { | ||
enable = true; | ||
indent_size = 4; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
flake = { | ||
nixosConfigurations = import ./hosts inputs; | ||
}; | ||
}); | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
|
||
nixos-hardware.url = "github:nixos/nixos-hardware"; | ||
impermanence.url = "github:nix-community/impermanence"; | ||
nix-colors.url = "github:Misterio77/nix-colors"; | ||
|
||
wrapper-manager = { | ||
url = "github:viperML/wrapper-manager"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
# a tree-wide formatter | ||
treefmt-nix = { | ||
url = "github:numtide/treefmt-nix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
homix = { | ||
url = "github:sioodmy/homix"; | ||
inputs = { | ||
nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
|
||
flake-parts = { | ||
url = "github:hercules-ci/flake-parts"; | ||
inputs.nixpkgs-lib.follows = "nixpkgs"; | ||
outputs = {nixpkgs, ...} @ inputs: let | ||
pkgs = nixpkgs.legacyPackages.x86_64-linux; | ||
theme = import ./theme; | ||
user = import ./user { | ||
inherit pkgs theme; | ||
}; | ||
in { | ||
nixosConfigurations = import ./hosts inputs; | ||
nixosModules = | ||
{ | ||
# This module is not meant to be imported by anyone but me | ||
# it's just so I can easily avoid ../../../../../ mess | ||
system = import ./system; | ||
|
||
user = user.module; | ||
|
||
# place for my home brew modules | ||
} | ||
// import ./modules; | ||
|
||
inherit theme; | ||
packages.x86_64-linux = user.packages; | ||
formatter.x86_64-linux = pkgs.alejandra; | ||
devShells.x86_64-linux.default = user.shell; | ||
}; | ||
} | ||
# see also: | ||
# - https://github.com/notashelf/nyx | ||
# - https://github.com/fufexan/dotfiles/ | ||
# - https://github.com/n3oney/nixus | ||
# (I love you guys) | ||
|
||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.