formatted nix files using alejandra
This commit is contained in:
52
flake.nix
52
flake.nix
@@ -8,10 +8,10 @@
|
||||
hyprpicker.url = "github:hyprwm/hyprpicker";
|
||||
stylix.url = "github:danth/stylix";
|
||||
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
@@ -41,29 +41,31 @@
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
username = "pagedmov";
|
||||
wallpaper = "${self}/assets/wallpapers/sleeping.png";
|
||||
base16scheme = "nord"; # can be easily changed with the chscheme script
|
||||
wallpaper = "${self}/assets/wallpapers/sleeping.png";
|
||||
base16scheme = "nord"; # can be easily changed with the chscheme script
|
||||
|
||||
# Map colors from yaml to attribute set
|
||||
# Extracting colors into a set here allows them to be propagated across the entire config, with or without stylix
|
||||
lib = nixpkgs.lib;
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
# Extracting colors into a set here allows them to be propagated across the entire config, with or without stylix
|
||||
lib = nixpkgs.lib;
|
||||
pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||
scheme_path = "${pkgs.base16-schemes}/share/themes/${base16scheme}.yaml";
|
||||
scheme_string = builtins.readFile scheme_path;
|
||||
scheme_string = builtins.readFile scheme_path;
|
||||
scheme_list = lib.splitString "\n" "${scheme_string}";
|
||||
colors = lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) scheme_list;
|
||||
scheme = lib.lists.foldl' (acc: line:
|
||||
let
|
||||
splitLine = lib.splitString ": " line;
|
||||
key = builtins.elemAt splitLine 0;
|
||||
value = builtins.elemAt splitLine 1;
|
||||
trimmedKey = lib.trim key;
|
||||
cleanValue_step1 = lib.splitString " " value;
|
||||
cleanValue_step2 = builtins.elemAt cleanValue_step1 0;
|
||||
cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2;
|
||||
scheme =
|
||||
lib.lists.foldl' (
|
||||
acc: line: let
|
||||
splitLine = lib.splitString ": " line;
|
||||
key = builtins.elemAt splitLine 0;
|
||||
value = builtins.elemAt splitLine 1;
|
||||
trimmedKey = lib.trim key;
|
||||
cleanValue_step1 = lib.splitString " " value;
|
||||
cleanValue_step2 = builtins.elemAt cleanValue_step1 0;
|
||||
cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2;
|
||||
in
|
||||
acc // { "${trimmedKey}" = cleanValue_final; }
|
||||
) {} colors;
|
||||
acc // {"${trimmedKey}" = cleanValue_final;}
|
||||
) {}
|
||||
colors;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
oganesson = nixpkgs.lib.nixosSystem {
|
||||
@@ -75,7 +77,7 @@
|
||||
modules = [
|
||||
./hosts/desktop
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
@@ -88,7 +90,7 @@
|
||||
modules = [
|
||||
./hosts/laptop
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
@@ -101,7 +103,7 @@
|
||||
modules = [
|
||||
./hosts/server
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
@@ -113,7 +115,7 @@
|
||||
};
|
||||
modules = [
|
||||
./hosts/installer
|
||||
nixvim.nixosModules.nixvim
|
||||
nixvim.nixosModules.nixvim
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user