mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 19:47:47 +00:00
Clean up flake
This commit is contained in:
parent
2cc888498d
commit
b2f5ff1ee3
12 changed files with 120 additions and 92 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -154,7 +154,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-super": {
|
"nixSuper": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"libgit2": "libgit2",
|
"libgit2": "libgit2",
|
||||||
|
@ -262,7 +262,7 @@
|
||||||
"homeManager": "homeManager",
|
"homeManager": "homeManager",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprpicker": "hyprpicker",
|
"hyprpicker": "hyprpicker",
|
||||||
"nix-super": "nix-super",
|
"nixSuper": "nixSuper",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"themes": "themes",
|
"themes": "themes",
|
||||||
"tools": "tools"
|
"tools": "tools"
|
||||||
|
@ -386,4 +386,4 @@
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
}
|
}
|
156
flake.nix
156
flake.nix
|
@ -1,6 +1,35 @@
|
||||||
{
|
{
|
||||||
description = "All my NixOS configurations.";
|
description = "All my NixOS configurations.";
|
||||||
|
|
||||||
|
# nixConfig = with builtins; mapAttrs (_: concatStringsSep " ") {
|
||||||
|
# extra-substituters = [
|
||||||
|
# "https://nix-community.cachix.org/"
|
||||||
|
# "https://hyprland.cachix.org/"
|
||||||
|
# "https://cache.privatevoid.net/"
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# extra-trusted-public-keys = [
|
||||||
|
# "nix-community.cachix.org:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
# "hyprland.cachix.org:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
# "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# inputs = with builtins; mapAttrs (name: url: {
|
||||||
|
# url = "git+https://${url}";
|
||||||
|
# } // (if elem name [ "nixSuper" "hyprland" "hyprpicker" ] then {} else {
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# })) {
|
||||||
|
# nixSuper = "github.com/privatevoid-net/nix-super";
|
||||||
|
# nixpkgs = "github.com/NixOS/nixpkgs/tree/nixos-unstable";
|
||||||
|
# homeManager = "github.com/nix-community/home-manager";
|
||||||
|
# hyprland = "github.com/hyprwm/Hyprland";
|
||||||
|
# hyprpicker = "github.com/hyprwm/hyprpicker";
|
||||||
|
# fenix = "github.com/nix-community/fenix";
|
||||||
|
# tools = "github.com/RGBCube/FlakeTools";
|
||||||
|
# themes = "github.com/RGBCube/ThemeNix";
|
||||||
|
# };
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = ''
|
extra-substituters = ''
|
||||||
https://nix-community.cachix.org/
|
https://nix-community.cachix.org/
|
||||||
|
@ -20,7 +49,7 @@
|
||||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-super = {
|
nixSuper = {
|
||||||
url = "github:privatevoid-net/nix-super";
|
url = "github:privatevoid-net/nix-super";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,6 +58,19 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
url = "github:hyprwm/Hyprland";
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprpicker = {
|
||||||
|
url = "github:hyprwm/hyprpicker";
|
||||||
|
};
|
||||||
|
|
||||||
|
fenix = {
|
||||||
|
url = "github:nix-community/fenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
tools = {
|
tools = {
|
||||||
url = "github:RGBCube/FlakeTools";
|
url = "github:RGBCube/FlakeTools";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -37,49 +79,23 @@
|
||||||
themes = {
|
themes = {
|
||||||
url = "github:RGBCube/ThemeNix";
|
url = "github:RGBCube/ThemeNix";
|
||||||
};
|
};
|
||||||
|
|
||||||
fenix = {
|
|
||||||
url = "github:nix-community/fenix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
hyprland = {
|
|
||||||
url = "github:hyprwm/Hyprland";
|
|
||||||
};
|
|
||||||
|
|
||||||
hyprpicker = {
|
|
||||||
url = "github:hyprwm/hyprpicker";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, nix-super, homeManager, tools, themes, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let
|
outputs = inputs @ {
|
||||||
|
self,
|
||||||
|
nixSuper,
|
||||||
|
nixpkgs,
|
||||||
|
homeManager,
|
||||||
|
fenix,
|
||||||
|
tools,
|
||||||
|
themes,
|
||||||
|
...
|
||||||
|
}: tools.eachDefaultLinuxArch (system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
upkgs = {
|
upkgs = tools.recursiveUpdateMap (name: {
|
||||||
theme = themes.custom (themes.raw.gruvbox-dark-hard // {
|
${name} = inputs.${name}.packages.${system}.default;
|
||||||
corner-radius = 12;
|
}) [ "hyprland" "hyprpicker" ];
|
||||||
border-width = 3;
|
|
||||||
|
|
||||||
font.size.normal = 12;
|
|
||||||
font.size.big = 18;
|
|
||||||
|
|
||||||
font.sans.name = "Lexend";
|
|
||||||
font.sans.package = pkgs.lexend;
|
|
||||||
|
|
||||||
font.mono.name = "RobotoMono Nerd Font";
|
|
||||||
font.mono.package = (pkgs.nerdfonts.override {
|
|
||||||
fonts = [
|
|
||||||
"RobotoMono"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
icons.name = "Gruvbox-Plus-Dark";
|
|
||||||
icons.package = pkgs.callPackage (import ./derivations/gruvbox-icons.nix) {};
|
|
||||||
});
|
|
||||||
|
|
||||||
hyprland = inputs.hyprland.packages.${system}.default;
|
|
||||||
hyprpicker = inputs.hyprpicker.packages.${system}.default;
|
|
||||||
};
|
|
||||||
|
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
|
@ -89,18 +105,29 @@
|
||||||
recursiveUpdate3 = x: y: z: lib.recursiveUpdate x (lib.recursiveUpdate y z);
|
recursiveUpdate3 = x: y: z: lib.recursiveUpdate x (lib.recursiveUpdate y z);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
theme = themes.custom (themes.raw.gruvbox-dark-hard // {
|
||||||
|
corner-radius = 12;
|
||||||
|
border-width = 3;
|
||||||
|
|
||||||
|
font.size.normal = 12;
|
||||||
|
font.size.big = 18;
|
||||||
|
|
||||||
|
font.sans.name = "Lexend";
|
||||||
|
font.sans.package = pkgs.lexend;
|
||||||
|
|
||||||
|
font.mono.name = "RobotoMono Nerd Font";
|
||||||
|
font.mono.package = (pkgs.nerdfonts.override { fonts = [ "RobotoMono" ]; });
|
||||||
|
|
||||||
|
icons.name = "Gruvbox-Plus-Dark";
|
||||||
|
icons.package = pkgs.callPackage (import ./derivations/gruvbox-icons.nix) {};
|
||||||
|
});
|
||||||
|
|
||||||
abstractions = rec {
|
abstractions = rec {
|
||||||
importAll = paths: {
|
imports = paths: lib.genAttrs [ "imports" ] (_: paths);
|
||||||
imports = paths;
|
|
||||||
};
|
|
||||||
|
|
||||||
enabled = attributes: attributes // {
|
enabled = attributes: attributes // { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
normalUser = attributes: attributes // {
|
normalUser = attributes: attributes // { isNormalUser = true; };
|
||||||
isNormalUser = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemConfiguration = attributes: attributes;
|
systemConfiguration = attributes: attributes;
|
||||||
|
|
||||||
|
@ -113,9 +140,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfiguration = user: attributes: systemConfiguration {
|
homeConfiguration = user: attributes: systemConfiguration {
|
||||||
home-manager.users = builtins.foldl' lib.recursiveUpdate {} (builtins.map (user: {
|
home-manager.users = tools.recursiveUpdateMap (user: {
|
||||||
${user} = attributes;
|
${user} = attributes;
|
||||||
}) (if builtins.isList user then user else [ user ]));
|
}) (if builtins.isList user then user else [ user ]);
|
||||||
};
|
};
|
||||||
|
|
||||||
homePackages = user: packages: homeConfiguration user {
|
homePackages = user: packages: homeConfiguration user {
|
||||||
|
@ -131,25 +158,25 @@
|
||||||
persistent = true;
|
persistent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
|
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
|
|
||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.settings.trusted-users = [
|
nix.registry = {
|
||||||
"root"
|
nixpkgs.flake = nixpkgs;
|
||||||
"@wheel"
|
default.flake = nixpkgs;
|
||||||
];
|
};
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
nix.settings.trusted-users = [ "root" "@wheel" ];
|
||||||
|
|
||||||
|
nix.settings.warn-dirty = false;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
fenix.overlays.default
|
fenix.overlays.default
|
||||||
nix-super.overlays.default
|
nixSuper.overlays.default
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-ld = enabled {};
|
programs.nix-ld = enabled {};
|
||||||
|
@ -159,12 +186,13 @@
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
networking.hostName = host;
|
networking.hostName = host;
|
||||||
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
specialArgs = abstractions // {
|
specialArgs = abstractions // {
|
||||||
inherit upkgs ulib;
|
inherit upkgs ulib theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
importConfigurations = tools.recursiveUpdateMap (host: {
|
importConfigurations = tools.recursiveUpdateMap (host: {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ upkgs, homeConfiguration, enabled, ... }:
|
{ theme, homeConfiguration, enabled, ... }:
|
||||||
|
|
||||||
homeConfiguration [ "nixos" "root" ] {
|
homeConfiguration [ "nixos" "root" ] {
|
||||||
programs.nushell.environmentVariables = {
|
programs.nushell.environmentVariables = {
|
||||||
|
@ -11,8 +11,8 @@ homeConfiguration [ "nixos" "root" ] {
|
||||||
less = "bat --plain";
|
less = "bat --plain";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bat = with upkgs.theme; enabled {
|
programs.bat = enabled {
|
||||||
config.theme = "default";
|
config.theme = "default";
|
||||||
themes.default = tmTheme;
|
themes.default = theme.tmTheme;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ulib, systemConfiguration, homeConfiguration, importAll, ... }: ulib.recursiveUpdate3
|
{ pkgs, ulib, systemConfiguration, homeConfiguration, imports, ... }: ulib.recursiveUpdate3
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
})
|
})
|
||||||
|
|
||||||
(importAll [
|
(imports [
|
||||||
./bat
|
./bat
|
||||||
./blueman
|
./blueman
|
||||||
./discord
|
./discord
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, pkgs, upkgs, homeConfiguration, homePackages, ... }: lib.recursiveUpdate
|
{ lib, pkgs, theme, homeConfiguration, homePackages, ... }: lib.recursiveUpdate
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(homeConfiguration "nixos" {
|
||||||
xdg.configFile."Vencord/settings/quickCss.css".text = upkgs.theme.discordCss;
|
xdg.configFile."Vencord/settings/quickCss.css".text = theme.discordCss;
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; homePackages "nixos" [
|
(with pkgs; homePackages "nixos" [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ upkgs, homeConfiguration, enabled, ... }:
|
{ theme, homeConfiguration, enabled, ... }:
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
homeConfiguration "nixos" {
|
||||||
services.dunst = with upkgs.theme.withHashtag; enabled {
|
services.dunst = with theme.withHashtag; enabled {
|
||||||
iconTheme = icons;
|
iconTheme = icons;
|
||||||
|
|
||||||
settings.global = {
|
settings.global = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, upkgs, systemConfiguration, systemFonts, ... }: lib.recursiveUpdate
|
{ lib, pkgs, theme, systemConfiguration, systemFonts, ... }: lib.recursiveUpdate
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
console = {
|
console = {
|
||||||
|
@ -11,8 +11,8 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
(with pkgs; systemFonts [
|
(with pkgs; systemFonts [
|
||||||
upkgs.theme.font.sans.package
|
theme.font.sans.package
|
||||||
upkgs.theme.font.mono.package
|
theme.font.mono.package
|
||||||
|
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ upkgs, homeConfiguration, enabled, ... }:
|
{ theme, homeConfiguration, enabled, ... }:
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
homeConfiguration "nixos" {
|
||||||
programs.fuzzel = with upkgs.theme; enabled {
|
programs.fuzzel = with theme; enabled {
|
||||||
settings.main = {
|
settings.main = {
|
||||||
dpi-aware = false;
|
dpi-aware = false;
|
||||||
font = "${font.sans.name}:size=${toString font.size.big}";
|
font = "${font.sans.name}:size=${toString font.size.big}";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, upkgs, systemConfiguration, homeConfiguration, enabled, ... }: lib.recursiveUpdate
|
{ lib, pkgs, theme, systemConfiguration, homeConfiguration, enabled, ... }: lib.recursiveUpdate
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
programs.dconf = enabled {};
|
programs.dconf = enabled {};
|
||||||
|
@ -6,16 +6,16 @@
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(homeConfiguration "nixos" {
|
||||||
gtk = enabled {
|
gtk = enabled {
|
||||||
gtk3.extraCss = upkgs.theme.adwaitaGtkCss;
|
gtk3.extraCss = theme.adwaitaGtkCss;
|
||||||
gtk4.extraCss = upkgs.theme.adwaitaGtkCss;
|
gtk4.extraCss = theme.adwaitaGtkCss;
|
||||||
|
|
||||||
font = with upkgs.theme.font; {
|
font = with theme.font; {
|
||||||
inherit (sans) name package;
|
inherit (sans) name package;
|
||||||
|
|
||||||
size = size.normal;
|
size = size.normal;
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = upkgs.theme.icons;
|
iconTheme = theme.icons;
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
name = "Adwaita-dark";
|
name = "Adwaita-dark";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, upkgs, ulib, systemConfiguration, homeConfiguration, homePackages, enabled, ... }: ulib.recursiveUpdate3
|
{ pkgs, upkgs, ulib, theme, systemConfiguration, homeConfiguration, homePackages, enabled, ... }: ulib.recursiveUpdate3
|
||||||
|
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
hardware.opengl = enabled {};
|
hardware.opengl = enabled {};
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
(homeConfiguration "nixos" {
|
(homeConfiguration "nixos" {
|
||||||
wayland.windowManager.hyprland = with upkgs.theme; enabled {
|
wayland.windowManager.hyprland = with theme; enabled {
|
||||||
package = upkgs.hyprland;
|
package = upkgs.hyprland;
|
||||||
|
|
||||||
extraConfig =
|
extraConfig =
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ upkgs, homeConfiguration, enabled, ... }:
|
{ theme, homeConfiguration, enabled, ... }:
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
homeConfiguration "nixos" {
|
||||||
programs.kitty = with upkgs.theme.withHashtag; enabled {
|
programs.kitty = with theme.withHashtag; enabled {
|
||||||
font = with font; {
|
font = with font; {
|
||||||
inherit (mono) name package;
|
inherit (mono) name package;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ upkgs, homeConfiguration, enabled, ... }:
|
{ theme, homeConfiguration, enabled, ... }:
|
||||||
|
|
||||||
homeConfiguration "nixos" {
|
homeConfiguration "nixos" {
|
||||||
programs.waybar = with upkgs.theme.withHashtag; enabled {
|
programs.waybar = with theme.withHashtag; enabled {
|
||||||
systemd = enabled {};
|
systemd = enabled {};
|
||||||
|
|
||||||
settings = [{
|
settings = [{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue