Compare commits
No commits in common. "16b65ac39c0d715d15410606a7d085475d8d8a4b" and "373ab1c3986f8be6c13294f9a33e5d2fcaa2f094" have entirely different histories.
16b65ac39c
...
373ab1c398
24 changed files with 345 additions and 242 deletions
27
README.md
27
README.md
|
@ -8,28 +8,19 @@ My NixOS configurations, using flakes.
|
|||
- 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)
|
||||
- Font: [Intel One Mono](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 |
|
||||
| [hosts](hosts/) | Host-specific |
|
||||
| [lib](lib/) | Helper functions |
|
||||
| [modules](modules/) | NixOS modules |
|
||||
| [system](system/) | NixOS configuration |
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
| Name | Description |
|
||||
| ------------------- | ------------------------------------------------- |
|
||||
| [home](home/) | Home manager configuration |
|
||||
| [hosts](hosts/) | Host-specific (entry-points of the configuration) |
|
||||
| [lib](lib/) | Helper functions |
|
||||
| [modules](modules/) | NixOS modules |
|
||||
| [system](system/) | NixOS configuration |
|
||||
|
||||
# 👥 Credits
|
||||
|
||||
|
@ -38,4 +29,4 @@ 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
|
||||
|
||||
Some bits have also been borrowed from within the configuration, and credit has been given where its due.
|
||||
Some bits have also been borrowed from within the configuration, and credit has been given when its due.
|
||||
|
|
194
flake.lock
194
flake.lock
|
@ -39,6 +39,28 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"chaotic": {
|
||||
"inputs": {
|
||||
"flake-schemas": "flake-schemas",
|
||||
"home-manager": "home-manager",
|
||||
"jovian": "jovian",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729510449,
|
||||
"narHash": "sha256-/EwjBMYBZ3/2ROT+4M/6tLomgJEgZBpKosWhqtYZkDI=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "4e03e8d762623ca925c604800aa18f109cd3bd97",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chaotic-cx",
|
||||
"ref": "nyxpkgs-unstable",
|
||||
"repo": "nyx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -134,6 +156,26 @@
|
|||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"lanzaboote",
|
||||
|
@ -154,7 +196,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"flake-parts_4": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
|
@ -172,7 +214,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_4": {
|
||||
"flake-parts_5": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib_3"
|
||||
},
|
||||
|
@ -190,6 +232,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-schemas": {
|
||||
"locked": {
|
||||
"lastModified": 1721999734,
|
||||
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
|
||||
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
|
||||
"revCount": 75,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1629284811,
|
||||
|
@ -206,6 +262,26 @@
|
|||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
|
@ -223,7 +299,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
|
@ -241,7 +317,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"flake-utils_5": {
|
||||
"inputs": {
|
||||
"systems": "systems_6"
|
||||
},
|
||||
|
@ -316,6 +392,27 @@
|
|||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729414726,
|
||||
"narHash": "sha256-Dtmm1OU8Ymiy9hVWn/a2B8DhRYo9Eoyx9veERdOBR4o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fe56302339bb28e3471632379d733547caec8103",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
|
@ -335,12 +432,34 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"jovian": {
|
||||
"inputs": {
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729177642,
|
||||
"narHash": "sha256-DdKal+ZhB9QD/tnEwFg4cZ4j4YnrkvSljBxnyG+3eE0=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "bb69165ff372ddbd3228a03513922acd783040e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
|
@ -444,10 +563,10 @@
|
|||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"flake-parts": "flake-parts_4",
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
|
@ -499,23 +618,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-db": {
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"jovian",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729394935,
|
||||
"narHash": "sha256-2ntUG+NJKdfhlrh/tF+jOU0fOesO7lm5ZZVSYitsvH8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "04f8a11f247ba00263b060fbcdc95484fd046104",
|
||||
"lastModified": 1690328911,
|
||||
"narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "96df4a39c52f53cb7098b923224d8ce941b64747",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"owner": "zhaofengli",
|
||||
"ref": "matrix-name",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -667,6 +789,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1729256560,
|
||||
"narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1726871744,
|
||||
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
|
||||
|
@ -682,7 +820,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1656753965,
|
||||
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
|
||||
|
@ -698,7 +836,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1726871744,
|
||||
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
|
||||
|
@ -732,11 +870,11 @@
|
|||
},
|
||||
"nvf": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_4",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-parts": "flake-parts_5",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"mnw": "mnw",
|
||||
"nil": "nil",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nmd": "nmd",
|
||||
"plugin-alpha-nvim": "plugin-alpha-nvim",
|
||||
"plugin-bufdelete-nvim": "plugin-bufdelete-nvim",
|
||||
|
@ -2526,7 +2664,7 @@
|
|||
"rnix-lsp": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -2547,13 +2685,15 @@
|
|||
"inputs": {
|
||||
"ags": "ags",
|
||||
"basix": "basix",
|
||||
"chaotic": "chaotic",
|
||||
"firefox-addons": "firefox-addons",
|
||||
"home-manager": "home-manager",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"home-manager": "home-manager_2",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"niri": "niri",
|
||||
"nix-index-db": "nix-index-db",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nvf": "nvf",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"systems": "systems_5",
|
||||
|
@ -2726,7 +2866,7 @@
|
|||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729242555,
|
||||
|
@ -2759,7 +2899,7 @@
|
|||
},
|
||||
"wezterm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"freetype2": "freetype2",
|
||||
"harfbuzz": "harfbuzz",
|
||||
"libpng": "libpng",
|
||||
|
|
111
flake.nix
111
flake.nix
|
@ -1,64 +1,85 @@
|
|||
{
|
||||
description = "nezia's nixos configuration";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
treefmt-nix,
|
||||
...
|
||||
} @ inputs: let
|
||||
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
||||
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
in {
|
||||
devShells = eachSystem (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.alejandra
|
||||
pkgs.git
|
||||
];
|
||||
outputs = inputs:
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux"];
|
||||
|
||||
imports = [
|
||||
./hosts
|
||||
./modules
|
||||
];
|
||||
|
||||
perSystem = {pkgs, ...}: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.alejandra
|
||||
pkgs.git
|
||||
];
|
||||
};
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
});
|
||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
nixosModules = import ./modules;
|
||||
nixosConfigurations = import ./hosts {inherit self inputs;};
|
||||
};
|
||||
inputs = {
|
||||
# nix related
|
||||
nixpkgs.url = "github:NixOS/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";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-index-db = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# other
|
||||
ags.url = "github:Aylur/ags";
|
||||
basix.url = "github:notashelf/basix";
|
||||
inputs = {
|
||||
# global, so they can be `.follow`ed
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
niri = {url = "github:sodiboo/niri-flake";};
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
wezterm = {
|
||||
url = "github:wez/wezterm/main?dir=nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
};
|
||||
|
||||
basix.url = "github:notashelf/basix";
|
||||
|
||||
plasma-manager = {
|
||||
url = "github:nix-community/plasma-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
wezterm = {
|
||||
url = "github:wez/wezterm/main?dir=nix";
|
||||
|
||||
ags.url = "github:Aylur/ags";
|
||||
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
};
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
|
||||
# Optional but recommended to limit the size of your system closure.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
|
@ -60,6 +61,7 @@ in {
|
|||
profiles = {
|
||||
nezia = {
|
||||
settings = {
|
||||
"browser.urlbar.suggest.searches" = true;
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"ui.key.menuAccessKeyFocuses" = false;
|
||||
};
|
||||
|
@ -71,12 +73,48 @@ in {
|
|||
stylus
|
||||
ublock-origin
|
||||
violentmonkey
|
||||
idontcareaboutcookies
|
||||
];
|
||||
|
||||
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
|
||||
search = {
|
||||
default = "SearxNG";
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
||||
iconUpdateURL = "https://wiki.nixos.org/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = ["@nw"];
|
||||
};
|
||||
"Home Manager Options" = {
|
||||
urls = [{template = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}";}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@hm"];
|
||||
};
|
||||
"Arch Wiki" = {
|
||||
urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}];
|
||||
icon = "https://archlinux.org/favicon.ico";
|
||||
definedAliases = ["@aw"];
|
||||
};
|
||||
"SearxNG" = {
|
||||
urls = [
|
||||
{
|
||||
|
@ -101,56 +139,13 @@ in {
|
|||
"type" = "application/x-suggestions+json";
|
||||
}
|
||||
];
|
||||
iconUpdateURL = "https://searx.tiekoetter.com/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = ["@s"];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
||||
iconUpdateURL = "https://wiki.nixos.org/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = ["@nw"];
|
||||
};
|
||||
"NixOS Options" = {
|
||||
urls = [{template = "https://search.nixos.org/options?channel=unstable&type=packages&query={searchTerms}";}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@no"];
|
||||
};
|
||||
"Noogle" = {
|
||||
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@ng"];
|
||||
};
|
||||
"Home Manager" = {
|
||||
urls = [{template = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}";}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@hm"];
|
||||
definedAliases = ["@sx"];
|
||||
};
|
||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
};
|
||||
};
|
||||
# https://github.com/oddlama/nix-config/blob/main/users/myuser/graphical/firefox.nix#L53-L57
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
(builtins.readFile "${betterfox}/user.js")
|
||||
(builtins.readFile "${betterfox}/Securefox.js")
|
||||
(builtins.readFile "${betterfox}/Fastfox.js")
|
||||
(builtins.readFile "${betterfox}/Peskyfox.js")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
osConfig,
|
||||
nixosConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
|
@ -15,7 +15,7 @@
|
|||
font = "monospace:size=14";
|
||||
};
|
||||
colors = let
|
||||
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
|
||||
inherit (inputs.basix.schemeData.base16.${nixosConfig.style.scheme}) palette;
|
||||
in {
|
||||
background = "${palette.base00}ff";
|
||||
text = "${palette.base05}ff";
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
isDark = inputs.basix.schemeData.base16.${osConfig.theme.scheme}.variant == "dark";
|
||||
isDark = inputs.basix.schemeData.base16.${osConfig.style.scheme}.variant == "dark";
|
||||
in {
|
||||
home.pointerCursor = {
|
||||
inherit (osConfig.theme.cursorTheme) name package size;
|
||||
inherit (osConfig.style.cursorTheme) name package size;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
@ -35,11 +35,11 @@ in {
|
|||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
iconTheme = {
|
||||
inherit (osConfig.theme.gtk.iconTheme) name package;
|
||||
inherit (osConfig.style.gtk.iconTheme) name package;
|
||||
};
|
||||
|
||||
theme = lib.mkIf (!osConfig.services.xserver.desktopManager.gnome.enable) {
|
||||
inherit (osConfig.theme.gtk.theme) name package;
|
||||
inherit (osConfig.style.gtk.theme) name package;
|
||||
};
|
||||
};
|
||||
dconf.settings = {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
osConfig,
|
||||
...
|
||||
}: let
|
||||
colors = inputs.basix.schemeData.base16.${osConfig.theme.scheme}.palette;
|
||||
colors = inputs.basix.schemeData.base16.${osConfig.style.scheme}.palette;
|
||||
in {
|
||||
imports = [./binds.nix];
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
nixosConfig,
|
||||
...
|
||||
}: {
|
||||
systemd.user.services.swaybg = {
|
||||
|
@ -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 ${nixosConfig.style.wallpaper} -m fill";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
nixosConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
|
||||
inherit (inputs.basix.schemeData.base16.${nixosConfig.style.scheme}) palette;
|
||||
in {
|
||||
# requires `security.pam.services.swaylock = { };` at the system level or else
|
||||
# unlock will not work.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
osConfig,
|
||||
nixosConfig,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
|
@ -14,7 +14,7 @@
|
|||
shell = "${lib.getExe config.programs.fish.package}";
|
||||
};
|
||||
colors = let
|
||||
schemeData = inputs.basix.schemeData.base16.${osConfig.theme.scheme};
|
||||
schemeData = inputs.basix.schemeData.base16.${nixosConfig.style.scheme};
|
||||
in {
|
||||
background = schemeData.palette.base00;
|
||||
foreground = schemeData.palette.base05;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
./tmux.nix
|
||||
./direnv.nix
|
||||
./zellij.nix
|
||||
./nix-index.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.nix-index-db.hmModules.nix-index];
|
||||
programs = {
|
||||
nix-index = {
|
||||
enable = true;
|
||||
symlinkToCacheHome = true; # needed for comma
|
||||
};
|
||||
command-not-found.enable = false;
|
||||
nix-index-database.comma.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
# 💻 Hosts
|
||||
|
||||
This directory contains the entry points for different NixOS system configurations. Each host represents a complete system configuration, combining NixOS system settings and Home Manager configurations.
|
||||
|
||||
## Components
|
||||
|
||||
### default.nix
|
||||
|
||||
The `default.nix` file in each host directory serves as the main entry point for the system configuration. It:
|
||||
|
||||
- Sets up NixOS configurations
|
||||
- Sets up Home Manager configurations
|
||||
- References host-specific module declarations
|
||||
|
||||
### modules/
|
||||
|
||||
The `modules/` directory contains host-specific declarations for custom modules that are defined in the flake's `nixosModules` output. This so far only includes global theme / style related declarations.
|
||||
|
||||
## Adding a New Host
|
||||
|
||||
1. Create a new directory for the host
|
||||
2. Add a `hardware-configuration.nix` generated with `nixos-generate-config`
|
||||
3. Add a `default.nix` that imports the desired configurations
|
||||
4. Create host-specific module declarations in the `modules/` subdirectory to customize the global modules as needed
|
||||
5. Reference the new host in `hosts/default.nix`
|
|
@ -2,30 +2,48 @@
|
|||
self,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
};
|
||||
in {
|
||||
vamos = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./vamos
|
||||
}: {
|
||||
flake.nixosConfigurations = let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
};
|
||||
in {
|
||||
vamos = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./vamos
|
||||
|
||||
self.nixosModules.theme
|
||||
self.nixosModules.style
|
||||
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
];
|
||||
};
|
||||
({pkgs, ...}: {
|
||||
style = let
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
|
||||
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
|
||||
};
|
||||
in {
|
||||
gtk.enable = true;
|
||||
inherit wallpaper;
|
||||
};
|
||||
})
|
||||
|
||||
solaire = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./solaire
|
||||
self.nixosModules.theme
|
||||
];
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
];
|
||||
};
|
||||
|
||||
solaire = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./solaire
|
||||
self.nixosModules.style
|
||||
{
|
||||
style = {
|
||||
gtk.enable = false;
|
||||
wallpaper = ../wallpapers/lucy-edgerunners-wallpaper.jpg;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
|
||||
"${mod}"
|
||||
"${mod}/hardware/uni-sync.nix"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
imports = [./theme.nix];
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
theme.wallpaper = ../../wallpapers/lucy-edgerunners-wallpaper.jpg;
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
|
||||
"${mod}"
|
||||
"${mod}/core/lanzaboote.nix"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
imports = [./theme.nix];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
theme = {
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
|
||||
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
theme = import ./theme;
|
||||
flake.nixosModules = {
|
||||
style = import ./style;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
inherit (lib.types) string path package;
|
||||
in {
|
||||
imports = [./gtk.nix];
|
||||
options.theme = {
|
||||
options.style = {
|
||||
scheme = mkOption {
|
||||
description = ''
|
||||
Name of the tinted-scheming color scheme to use.
|
||||
|
@ -22,10 +22,6 @@ in {
|
|||
'';
|
||||
type = path;
|
||||
example = lib.literalExpression "./wallpaper.png";
|
||||
default = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
|
||||
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
|
||||
};
|
||||
};
|
||||
|
||||
cursorTheme = {
|
|
@ -8,9 +8,9 @@
|
|||
inherit (lib) mkOption mkEnableOption;
|
||||
inherit (lib.types) package str;
|
||||
|
||||
cfg = config.theme.gtk;
|
||||
cfg = config.style.gtk;
|
||||
in {
|
||||
options.theme.gtk = {
|
||||
options.style.gtk = {
|
||||
enable = mkEnableOption "enable GTK theming options";
|
||||
theme = {
|
||||
name = mkOption {
|
||||
|
@ -57,7 +57,7 @@ in {
|
|||
${toString themePath} set by the GTK module does not exist!
|
||||
|
||||
To suppress this message, make sure that
|
||||
`config.modules.theme.gtk.theme.package` contains
|
||||
`config.modules.style.gtk.theme.package` contains
|
||||
the path `${cfg.theme.name}`
|
||||
'';
|
||||
})
|
12
treefmt.nix
12
treefmt.nix
|
@ -1,10 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
# TODO: maybe use flake-parts
|
||||
{...}: {
|
||||
# Used to find the project root
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
prettier = {
|
||||
enable = true;
|
||||
package = pkgs.prettierd;
|
||||
};
|
||||
};
|
||||
programs.alejandra.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue