Compare commits
19 commits
main
...
structure-
Author | SHA1 | Date | |
---|---|---|---|
66ff9820f8 | |||
1271294049 | |||
ab18a42418 | |||
f8afc9f461 | |||
851a4d0d32 | |||
e01237d59a | |||
1c3665ec1c | |||
587e8d321b | |||
87bb04f065 | |||
8e7c0584ef | |||
a600143e8a | |||
7174a33a44 | |||
b86f1470ed | |||
de6ea242c0 | |||
5acf11adca | |||
96425172a0 | |||
8338818b7d | |||
ffb60ac869 | |||
e98a15db1d |
131 changed files with 1120 additions and 875 deletions
17
README.md
17
README.md
|
@ -4,31 +4,29 @@ My NixOS configurations, using flakes.
|
|||
|
||||
# </> Software I use
|
||||
|
||||
- Wayland compositor: [niri](https://github.com/YaLTeR/niri)
|
||||
- Wayland compositor: [Hyprland](https://github.com/hyprwm/Hyprland)
|
||||
- Text editor: [neovim](https://github.com/neovim/neovim)
|
||||
- Shell: [fish](https://github.com/fish-shell/fish-shell)
|
||||
- Colors: [Catppuccin](https://github.com/catppuccin/catppuccin)
|
||||
- Font: [Intel One Mono](https://github.com/intel/intel-one-mono)
|
||||
|
||||
Additionally using a lot of other software you can find in the configuration files.
|
||||
|
||||
# 🛠️ Structure
|
||||
|
||||
| Name | Description |
|
||||
| ------------------- | -------------------------- |
|
||||
| [home](home/) | Home manager configuration |
|
||||
| ----------------- | ------------------------------------------------------------- |
|
||||
| [assets](assets/) | Resources used throughout the system (images etc.) |
|
||||
| [config](config/) | System configuration (separated between NixOS / home-manager) |
|
||||
| [hosts](hosts/) | Host-specific |
|
||||
| [lib](lib/) | Helper functions |
|
||||
| [modules](modules/) | NixOS modules |
|
||||
| [pkgs](pkgs/) | Custom packages |
|
||||
| [system](system/) | NixOS configuration |
|
||||
| [shared](shared/) | Re-used components (internal modules, custom derivations) |
|
||||
|
||||
My configuration is structured based on the following principles:
|
||||
|
||||
1. Hosts should be the main entry points and outputs.
|
||||
2. Abstractions should be avoided as much as possible.
|
||||
3. Setting up theming should be as simple as changing one or two options.
|
||||
|
||||
The bulk of the configuration can be found either in [home](home/) or [system](system/), which declares most of my programs, with some extra Nix code in [lib](lib/) and custom [modules](modules/), mostly for convenience and to provide a way to globally set styles and themes for now.
|
||||
The main configuration can be found in [config](config/), which declares most of my programs, with re-usable modules and derivations in [shared](shared/), to provide a way to globally set themes, usernames and more.
|
||||
|
||||
My hosts can then pick and choose the programs and configurations that they need from the other directories. If the need arises for a more modular setup for a specific piece of software (ie. having different flavors of Firefox per host), I will write a custom module for it. This helps to avoid unnecessarily abstracting my configuration, as I don't find it necessary for the most part, and I would also like it to remain as simple as possible.
|
||||
|
||||
|
@ -39,5 +37,6 @@ People / repositories I have copied / learned from:
|
|||
- [fufexan/dotfiles](https://github.com/fufexan/dotfiles) for the configuration structure
|
||||
- [jacekpoz/nixos](https://git.jacekpoz.pl/poz/niksos) for learning how NixOS modules work
|
||||
- [sodiboo](https://github.com/sodiboo) for helping me a whole lot with Niri-specific issues
|
||||
- [llakala](https://github.com/llakala) for being very thorough and helpful when cleaning up my code and general structure.
|
||||
|
||||
Some bits have also been borrowed from within the configuration, and credit has been given where its due.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
{osConfig, ...}: {
|
||||
imports = [
|
||||
./services/udiskie.nix
|
||||
./terminal
|
||||
./programs
|
||||
];
|
||||
home = {
|
||||
username = "nezia";
|
||||
homeDirectory = "/home/nezia";
|
||||
home = rec {
|
||||
inherit (osConfig.local.systemVars) username;
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
color-scheme = "prefer-dark";
|
||||
};
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri-dark = "file://" + builtins.toString osConfig.theme.wallpaper;
|
||||
picture-uri-dark = "file://" + builtins.toString osConfig.local.style.wallpaper;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/search-providers" = {
|
|
@ -11,7 +11,7 @@
|
|||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe pkgs.swaybg} -i ${osConfig.theme.wallpaper} -m fill";
|
||||
ExecStart = "${lib.getExe pkgs.swaybg} -i ${osConfig.local.style.wallpaper} -m fill";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
_: {
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 0;
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
users.users.nezia = {
|
||||
{config, ...}: {
|
||||
users.users.${config.local.systemVars.username} = {
|
||||
isNormalUser = true;
|
||||
description = "Anthony Rodriguez";
|
||||
description = config.local.homeVars.fullName or "User";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"audio"
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
{config, ...}: {
|
||||
networking = {
|
||||
inherit (config.local.systemVars) hostName;
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
|
@ -36,7 +37,7 @@ in {
|
|||
settings = {
|
||||
default_session = {
|
||||
command = "${Hyprland} --config ${hyprlandConfig}";
|
||||
user = "nezia";
|
||||
user = config.local.systemVars.username;
|
||||
};
|
||||
};
|
||||
};
|
16
flake.lock
16
flake.lock
|
@ -3234,7 +3234,6 @@
|
|||
"nvf": "nvf",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"portfolio": "portfolio",
|
||||
"systems": "systems_7",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
|
@ -3391,21 +3390,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_7": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_9"
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
agenix,
|
||||
deploy-rs,
|
||||
treefmt-nix,
|
||||
...
|
||||
} @ inputs: let
|
||||
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
||||
eachSystem = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
|
||||
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
in {
|
||||
devShells = eachSystem (pkgs: {
|
||||
|
@ -25,14 +24,13 @@
|
|||
});
|
||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
nixosConfigurations = import ./hosts {inherit inputs;};
|
||||
packages = eachSystem (pkgs: import ./pkgs {inherit inputs pkgs;});
|
||||
deploy.nodes = import ./nodes {inherit inputs;};
|
||||
packages = eachSystem (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
|
||||
deploy.nodes = import ./nodes.nix {inherit inputs;};
|
||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
};
|
||||
inputs = {
|
||||
# nix related
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
{inputs, ...}: let
|
||||
lib' = import ../lib;
|
||||
lib' = import ../shared/lib;
|
||||
mkSystem = args:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs lib';};
|
||||
modules = args.modules or [];
|
||||
modules = [../shared/nixosModules] ++ (args.modules or []);
|
||||
};
|
||||
in {
|
||||
vamos = mkSystem {
|
||||
modules = [
|
||||
./vamos
|
||||
../modules
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
];
|
||||
};
|
||||
|
@ -17,7 +16,6 @@ in {
|
|||
solaire = mkSystem {
|
||||
modules = [
|
||||
./solaire
|
||||
../modules
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
_: {
|
||||
theme = {
|
||||
local.style = {
|
||||
enable = true;
|
||||
wallpaper = ../../../assets/wallpapers/lucy-edgerunners-wallpaper.jpg;
|
||||
};
|
|
@ -3,54 +3,63 @@
|
|||
specialArgs,
|
||||
...
|
||||
}: let
|
||||
system = "${inputs.self}/system";
|
||||
home = "${inputs.self}/home";
|
||||
nixos = "${inputs.self}/config/nixos";
|
||||
hm = "${inputs.self}/config/home-manager";
|
||||
in {
|
||||
local.systemVars = {
|
||||
hostName = "solaire";
|
||||
username = "nezia";
|
||||
};
|
||||
|
||||
local.homeVars = {
|
||||
fullName = "Anthony Rodriguez";
|
||||
email = "anthony@nezia.dev";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
./config/nvidia.nix
|
||||
./config/theme.nix
|
||||
|
||||
system
|
||||
"${system}/hardware/uni-sync.nix"
|
||||
nixos
|
||||
"${nixos}/hardware/uni-sync.nix"
|
||||
|
||||
"${system}/programs/games.nix"
|
||||
"${system}/hardware/nvidia.nix"
|
||||
"${nixos}/programs/games.nix"
|
||||
|
||||
"${system}/services/logind.nix"
|
||||
"${system}/services/greetd.nix"
|
||||
"${nixos}/services/logind.nix"
|
||||
"${nixos}/services/greetd.nix"
|
||||
|
||||
"${system}/programs/hyprland.nix"
|
||||
"${system}/services/gnome.nix"
|
||||
"${nixos}/programs/hyprland.nix"
|
||||
"${nixos}/services/gnome.nix"
|
||||
|
||||
"${system}/services/documentation.nix"
|
||||
"${nixos}/services/documentation.nix"
|
||||
|
||||
"${system}/services/flatpak.nix"
|
||||
"${nixos}/services/flatpak.nix"
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users.nezia.imports = [
|
||||
"${home}"
|
||||
"${home}/services/udiskie.nix"
|
||||
"${home}/programs/games"
|
||||
hm
|
||||
"${hm}/services/udiskie.nix"
|
||||
"${hm}/programs/games"
|
||||
|
||||
"${home}/programs/waybar"
|
||||
"${home}/programs/fuzzel.nix"
|
||||
"${home}/programs/hypr"
|
||||
"${hm}/programs/waybar"
|
||||
"${hm}/programs/fuzzel.nix"
|
||||
"${hm}/programs/hypr"
|
||||
|
||||
"${home}/services/swaync"
|
||||
"${home}/programs/swaybg.nix"
|
||||
"${home}/programs/swaylock.nix"
|
||||
"${hm}/services/swaync"
|
||||
"${hm}/programs/swaybg.nix"
|
||||
"${hm}/programs/swaylock.nix"
|
||||
|
||||
"${home}/terminal/emulators/foot.nix"
|
||||
"${hm}/terminal/emulators/foot.nix"
|
||||
|
||||
"${home}/services/flatpak.nix"
|
||||
"${home}/services/syncthing.nix"
|
||||
"${hm}/services/flatpak.nix"
|
||||
"${hm}/services/syncthing.nix"
|
||||
|
||||
"${home}/programs/editors/neovim.nix"
|
||||
"${hm}/programs/editors/neovim.nix"
|
||||
];
|
||||
extraSpecialArgs = specialArgs;
|
||||
};
|
||||
|
||||
networking.hostName = "solaire";
|
||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
imports = [./theme.nix];
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
theme = {
|
||||
local.style = {
|
||||
enable = true;
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
|
|
@ -3,53 +3,62 @@
|
|||
specialArgs,
|
||||
...
|
||||
}: let
|
||||
system = "${inputs.self}/system";
|
||||
home = "${inputs.self}/home";
|
||||
nixos = "${inputs.self}/config/nixos";
|
||||
hm = "${inputs.self}/config/home-manager";
|
||||
in {
|
||||
local.systemVars = {
|
||||
hostName = "vamos";
|
||||
username = "nezia";
|
||||
};
|
||||
|
||||
local.homeVars = {
|
||||
fullName = "Anthony Rodriguez";
|
||||
email = "anthony@nezia.dev";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
./config/theme.nix
|
||||
|
||||
"${system}"
|
||||
"${system}/core/lanzaboote.nix"
|
||||
"${nixos}"
|
||||
"${nixos}/core/lanzaboote.nix"
|
||||
|
||||
"${system}/hardware/fprintd.nix"
|
||||
"${system}/services/power.nix"
|
||||
"${system}/services/brightness.nix"
|
||||
"${nixos}/hardware/fprintd.nix"
|
||||
"${nixos}/services/power.nix"
|
||||
"${nixos}/services/brightness.nix"
|
||||
|
||||
"${system}/services/logind.nix"
|
||||
"${system}/services/greetd.nix"
|
||||
"${system}/services/kanata.nix"
|
||||
"${nixos}/services/logind.nix"
|
||||
"${nixos}/services/greetd.nix"
|
||||
"${nixos}/services/kanata.nix"
|
||||
|
||||
"${system}/programs/hyprland.nix"
|
||||
"${system}/services/gnome.nix"
|
||||
"${system}/services/mail.nix"
|
||||
"${nixos}/programs/hyprland.nix"
|
||||
"${nixos}/services/gnome.nix"
|
||||
"${nixos}/services/mail.nix"
|
||||
|
||||
"${system}/services/documentation.nix"
|
||||
"${nixos}/services/documentation.nix"
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users.nezia.imports = [
|
||||
"${home}"
|
||||
"${home}/services/udiskie.nix"
|
||||
"${hm}"
|
||||
"${hm}/services/udiskie.nix"
|
||||
|
||||
"${home}/programs/hypr"
|
||||
"${home}/programs/waybar"
|
||||
"${home}/programs/fuzzel.nix"
|
||||
"${hm}/programs/hypr"
|
||||
"${hm}/programs/waybar"
|
||||
"${hm}/programs/fuzzel.nix"
|
||||
|
||||
"${home}/services/swaync"
|
||||
"${home}/programs/swaybg.nix"
|
||||
"${home}/programs/wlogout.nix"
|
||||
"${hm}/services/swaync"
|
||||
"${hm}/programs/swaybg.nix"
|
||||
"${hm}/programs/wlogout.nix"
|
||||
|
||||
"${home}/services/syncthing.nix"
|
||||
"${hm}/services/syncthing.nix"
|
||||
|
||||
"${home}/programs/editors/neovim.nix"
|
||||
"${hm}/programs/editors/neovim.nix"
|
||||
|
||||
"${home}/terminal/emulators/foot.nix"
|
||||
"${hm}/terminal/emulators/foot.nix"
|
||||
];
|
||||
extraSpecialArgs = specialArgs;
|
||||
};
|
||||
|
||||
networking.hostName = "vamos";
|
||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue