TXA66OLAOYNGEDRBC4SKWDZPLBZXUU7WHDIAYN4TXGEJR6WIJOIQC
H3GYCX27WTONFBIJN7UIV26LJSCENQJC4XXIOEYINXJLEDGKYJJQC
F26DJCZ7RLGRDZSYACB6MGMNTW7L5FE332EBYEIJTBRK7QJ6ZIYAC
JOK7DA5XBOK2MIVR7ORTSAEMQ6U5642I537IGUYBX67DPFF5QJ3QC
JHOTQEAZM26AZEYLC3IZVPCZZMXCL7K6V2UEGE3ABGO4GL67AT6QC
EVVP46IQ4U6JEDWVJ4D6KT77ABOMY7XKIO2ITX4DHJDRTGTYCUTQC
NNUJU4U7H6QBAKSVR2N5NGQDODJFAJ6UWFU6N656WU2ORRG7RQRQC
config,
pkgs,
...
}: {
programs.qutebrowser.enable = true;
programs.qutebrowser = {
enable = true;
searchEngines = {
r = "https://doc.rust-lang.org/stable/std/?search={}";
lib = "https://lib.rs/search?q={}";
nip = "https://jisho.org/search/{}";
};
# TODO: Make this prettier overall
settings = {
colors = {
downloads = {
bar.bg = bg;
start.bg = theme.dark.blue;
stop.bg = theme.bright.green;
};
tabs = rec {
bar.bg = bg;
odd.bg = bg;
odd.fg = fg;
even = odd;
selected = rec {
odd.bg = theme.bright.white;
odd.fg = theme.dark.black;
even = odd;
};
indicator.start = theme.dark.blue;
indicator.stop = theme.bright.green;
};
statusbar = rec {
url = {
inherit fg;
error.fg = theme.bright.red;
warn.fg = theme.bright.yellow;
hover.fg = theme.bright.cyan;
success.http.fg = fg;
success.https.fg = fg;
};
normal.bg = bg;
normal.fg = fg;
private.bg = theme.dark.magenta;
private.fg = bg;
insert.bg = theme.dark.green;
insert.fg = bg;
passthrough.bg = theme.dark.blue;
passthrough.fg = bg;
command = {
inherit bg fg;
private = { inherit bg fg; };
};
};
completion = rec {
inherit fg;
category.bg = theme.bright.black;
category.fg = fg;
odd.bg = bg;
even = odd;
match.fg = theme.bright.red;
item.selected = {
inherit match;
bg = fg;
fg = bg;
border.top = fg;
border.bottom = fg;
};
};
};
tabs = {
indicator.width = 3;
};
# TODO: The terminal shouldn't be hardcoded
editor.command = [ "kitty" "hx" "{file}" ];
fonts = {
# default_family = "Cozette";
# default_size = "13px";
default_family = "Iosevka";
default_size = "13px";
};
content = {
canvas_reading = true;
blocking.method = "both";
blocking.whitelist = [ "*.amplitude.com" "amplitude.com" ];
};
};
# Workaround because the nix module doesn't properly handle options that expect a dict
extraConfig = ''
c.tabs.padding = { 'top': 5, 'bottom': 5, 'right': 10, 'left': 10 }
c.statusbar.padding = { 'top': 5, 'bottom': 5, 'right': 10, 'left': 10 }
'';
keyBindings = {
passthrough = {
"<Ctrl-Escape>" = "mode-leave";
};
};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/chrome" = "org.qutebrowser.qutebrowser.desktop";
"text/html" = "org.qutebrowser.qutebrowser.desktop";
"application/x-extension-htm" = "org.qutebrowser.qutebrowser.desktop";
"application/x-extension-html" = "org.qutebrowser.qutebrowser.desktop";
"application/x-extension-shtml" = "org.qutebrowser.qutebrowser.desktop";
"application/xhtml+xml" = "org.qutebrowser.qutebrowser.desktop";
"application/x-extension-xhtml" = "org.qutebrowser.qutebrowser.desktop";
"application/x-extension-xht" = "org.qutebrowser.qutebrowser.desktop";
"application/pdf" = "org.qutebrowser.qutebrowser.desktop";
};
};
{ stdenvNoCC, lib, fetchFromGitHub }:
let
version = "1.2.0";
src = fetchFromGitHub {
owner = "cmvnd";
repo = "fonts";
rev = version;
sha256 = "sha256-3/VL6E4hc8Y6JnR00P5NHnovXETsYsxIiC2Df+IjPWI=";
};
in
stdenvNoCC.mkDerivation rec {
inherit version src;
pname = "cmvnd-fonts";
installPhase = ''
mkdir -p $out/share/fonts/${pname}
cp -t $out/share/fonts/${pname} {.,spectrum-fonts}/{*.bdf,*.otb}
'';
}
{ config, pkgs, ... }:
let
theme = import ../../theme.nix;
bg = theme.dark.black;
fg = theme.bright.white;
in
{
programs.chromium = {
enable = true;
extensions = [
{ id = "oocalimimngaihdkbihfgmpkcpnmlaoa"; }
];
};
}
outputs = {
nixpkgs,
home-manager,
fenix,
...
}: let
system = "x86_64-linux";
user = "niko";
hmConfig = with nixpkgs.lib;
{
rust ? false,
sway ? false,
qute ? false,
imports ? [],
}: {...}: {
imports =
[
./home-manager/home.nix
]
++ optional rust ./home-manager/rust.nix
++ optional sway ./home-manager/sway.nix
++ optional qute ./home-manager/desktop/qute.nix
++ imports;
outputs =
{ self
, nixpkgs
, home-manager
, fenix
, deploy-rs
, nur
, ...
}:
let
system = "x86_64-linux";
user = "niko";
hmConfig = with nixpkgs.lib;
{ rust ? false
, sway ? false
, qute ? false
, node ? false
, chromium ? false
, imports ? [ ]
,
}: { ... }: {
imports =
[
./home-manager/home.nix
]
++ optional rust ./home-manager/rust.nix
++ optional sway ./home-manager/desktop/wayland/sway.nix
++ optional qute ./home-manager/desktop/qute.nix
++ optional node ./home-manager/node.nix
++ optional chromium ./home-manager/desktop/chromium.nix
++ imports;
};
nurpkgs = nixpkgs.legacyPackages.${system};
in
{
homeConfigurations.wsl = home-manager.lib.homeManagerConfiguration {
configuration = hmConfig { rust = true; };
inherit system user;
homeDirectory = "/home/${user}";
stateVersion = "22.05";
extraSpecialArgs = { inherit fenix; };
specialArgs = {inherit user;};
modules = [
./nixos/virtualBox.nix
({ ... }: {
nixpkgs.overlays = [ fenix.overlay ];
})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user} = hmConfig {
rust = true;
sway = true;
};
}
];
};
modules = [
./nixos/virtualBox.nix
({...}: {nixpkgs.overlays = [fenix.overlay];})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user} = hmConfig {
rust = true;
sway = true;
};
}
];
};
nixosConfigurations.legion = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {inherit user;};
modules = [
./nixos/legion.nix
({ ... }: {
nixpkgs.overlays = [ fenix.overlay ];
nixpkgs.config.packageOverrides = pkgs: {
nur = import nur {
inherit pkgs nurpkgs;
};
};
})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user} = hmConfig {
rust = true;
qute = true;
sway = true;
node = true;
chromium = true;
imports = [
./home-manager/desktop/xorg/i3.nix
./home-manager/pijul.nix
({ pkgs, ... }: {
home.packages = with pkgs; [ virt-manager steam-run slack logseq ghidra-bin pwndbg ];
})
];
};
}
];
};
modules = [
./nixos/legion.nix
({...}: {nixpkgs.overlays = [fenix.overlay];})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user} = hmConfig {
rust = true;
qute = true;
imports = [
./home-manager/desktop/xorg/i3.nix
./home-manager/pijul.nix
({pkgs, ...}: {
home.packages = with pkgs; [virt-manager];
})
];
};
}
];
};
nixosConfigurations.server = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
};
modules = [
./nixos/scaleway.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${user} = hmConfig {
imports = [
./home-manager/pijul.nix
];
};
}
];
};
deploy.nodes.satelite = {
hostname = "51.15.70.96";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.server;
};
};
formatter.${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1659725433,
"narHash": "sha256-1ZxuK67TL29YLw88vQ18Y2Y6iYg8Jb7I6/HVzmNB6nM=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "41f15759dd8b638e7b4f299730d94d5aa46ab7eb",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"lastModified": 1653339422,
"narHash": "sha256-8nc7lcYOgih3YEmRMlBwZaLLJYpLPYKBlewqHqx8ieg=",
"owner": "rycee",
"repo": "nmd",
"rev": "9e7a20e6ee3f6751f699f79c0b299390f81f7bcd",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
"lastModified": 1663330052,
"narHash": "sha256-jvMr54DdvkwR3WGsT8pS7CRp2qW0HRtFpXExYJ8FoJI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "5144a46baaccc807cd6ca6fad428068b05cd8d53",
"type": "github"
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"type": "github"
},
"original": {
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
}
},
"utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
Moved to: https://nest.pijul.com/nrabulinski/nix-config
Rough roadmap:
- [x] Basic setup with ease of adding new hosts
- [ ] Modularize the codebase
- [ ] Make it possible to update user configuration without root access, even on machines which use NixOS Home Manager module
- [ ] Make the theme consistent throughout the system
- [ ] Hopefully make it so that others can use some parts of this config without having to copy or fork it :)
Theme used throughout:
https://github.com/Manas140/paradise
## Hosts
- `legion` - My main laptop and development machine
- `satelite` - Small VPS I use to experiment with remote deployments
- `wsl` - Obsolete, configuration for when I used Nix on WSL
- `virtualBox` - Obsolete, VirtualBox config I tried before installing NixOS
.git
.DS_Store