1
0
Fork 0

Compare commits

..

No commits in common. "dc57b47ab997a2eda335985615c513f1279ad118" and "10d3dc205cbef4e2062119f23e787f64ec03432a" have entirely different histories.

13 changed files with 311 additions and 285 deletions

1
.envrc
View file

@ -1,4 +1,3 @@
watch_dir ./base
watch_dir ./sops
watch_file ./home-manager/default.nix
use flake

View file

@ -1,13 +1,14 @@
{ inputs, ... }:
{ flake-parts-lib, inputs, ... }:
{
imports = [
inputs.treefmt-nix.flakeModule
inputs.git-hooks-nix.flakeModule
inputs.devshell.flakeModule
];
perSystem =
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
config = {
devshells.default = {
commands = [
{
@ -51,4 +52,6 @@
# https://flake.parts/options/treefmt-nix.html
treefmt.projectRootFile = "flake.nix";
};
}
);
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ flake-parts-lib, ... }:
let
dictionary = [
"Asahi"
@ -11,7 +11,7 @@ let
];
in
{
perSystem =
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ pkgs, ... }:
let
tomlFormatter = pkgs.formats.toml { };
@ -85,6 +85,7 @@ in
};
in
{
config = {
helix.languages.language-server = {
# https://ltex-plus.github.io/ltex-plus/supported-languages.html
ltex-ls-plus = {
@ -145,4 +146,6 @@ in
# '';
};
};
}
);
}

View file

@ -1,9 +1,10 @@
{ ... }:
{ flake-parts-lib, ... }:
{
imports = [ ../en-us ];
perSystem =
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
config = {
helix.languages = {
language = [
{
@ -40,4 +41,6 @@
};
pre-commit.settings.hooks.markdownlint.enable = true;
};
}
);
}

View file

@ -1,7 +1,7 @@
{ ... }:
{ flake-parts-lib, ... }:
{
imports = [ ../en-us ];
perSystem =
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
helix.languages = {
@ -30,5 +30,6 @@
enable = true;
strict = true;
};
};
}
);
}

View file

@ -1,9 +1,10 @@
{ ... }:
{ flake-parts-lib, ... }:
{
imports = [ ../en-us ];
perSystem =
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
config = {
helix.languages = {
language = [
{
@ -29,4 +30,6 @@
treefmt.programs.taplo.enable = true;
pre-commit.settings.hooks.check-toml.enable = true;
};
}
);
}

View file

@ -1,9 +1,10 @@
{ ... }:
{ flake-parts-lib, ... }:
{
imports = [ ../en-us ];
perSystem =
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ config, pkgs, ... }:
{
config = {
helix.languages = {
language = [
{
@ -41,4 +42,6 @@
sort-simple-yaml.enable = true;
};
};
}
);
}

View file

@ -41,15 +41,42 @@
systems = [ "aarch64-linux" ];
imports = [
./base
./sops
./home-manager
];
perSystem =
{ pkgs, system, ... }:
# let
# pkgs = import inputs.nixpkgs {
# inherit system;
# overlays = [
# inputs.nur.overlays.default
# inputs.nixgl.overlays.default
# ];
# };
# in
{
# _module.args.pkgs = pkgs;
# https://flake.parts/options/devshell.html
devshells.default = {
packages = [ pkgs.forgejo-cli ];
commands = [
{
help = " generate age key";
name = "age-generate-key";
command = "${pkgs.uutils-coreutils-noprefix}/bin/mkdir -p ~/.config/sops/age && ${pkgs.age}/bin/age-keygen -o ~/.config/sops/age/keys.txt && ${pkgs.uutils-coreutils-noprefix}/bin/cat ~/.config/sops/age/keys.txt";
category = " SOPS";
}
{
help = " edit secrets.yaml";
name = "sops-edit";
command = "${pkgs.sops}/bin/sops edit ./home-manager/secrets/secrets.yaml";
category = " SOPS";
}
];
packages = [
pkgs.age
pkgs.forgejo-cli
pkgs.sops
];
devshell = {
motd = ''
{202} Nix Laptop Configuration{reset}

View file

@ -1,26 +1,16 @@
{ inputs, withSystem, ... }:
{
flake-parts-lib,
inputs,
withSystem,
...
}:
{
imports = [ inputs.home-manager.flakeModules.home-manager ];
# https://nix-community.github.io/home-manager/options.xhtml
flake.homeConfigurations = {
asahi = withSystem "aarch64-linux" (
{ pkgs, ... }:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs pkgs; };
modules = [
{ nixpkgs.overlays = [ inputs.nur.overlays.default ]; }
inputs.lix-module.nixosModules.default
inputs.sops-nix.homeManagerModules.sops
inputs.stylix.homeModules.stylix
inputs.catppuccin.homeModules.catppuccin
./home.nix
];
}
);
};
perSystem =
options = {
perSystem = flake-parts-lib.mkPerSystemOption (
{ config, system, ... }:
{
config =
let
pkgs = import inputs.nixpkgs {
inherit system;
@ -58,4 +48,27 @@
pre-commit.settings.excludes = [ "home-manager/vencord.nix" ];
treefmt.settings.global.excludes = [ "home-manager/vencord.nix" ];
};
}
);
};
config = {
# https://nix-community.github.io/home-manager/options.xhtml
flake.homeConfigurations = {
asahi = withSystem "aarch64-linux" (
{ pkgs, ... }:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs pkgs; };
modules = [
{ nixpkgs.overlays = [ inputs.nur.overlays.default ]; }
inputs.lix-module.nixosModules.default
inputs.sops-nix.homeManagerModules.sops
inputs.stylix.homeModules.stylix
inputs.catppuccin.homeModules.catppuccin
./home.nix
];
}
);
};
};
}

View file

@ -18,7 +18,7 @@ in
secrets = {
openrouter_api_key = { };
};
defaultSopsFile = ../sops/secrets.yaml;
defaultSopsFile = ./secrets/secrets.yaml;
age.keyFile = /home/${username}/.config/sops/age/keys.txt;
};
# https://nix.catppuccin.com/search/rolling/

View file

@ -1,29 +0,0 @@
{ ... }:
{
perSystem =
{ pkgs, ... }:
{
config = {
devshells.default = {
commands = [
{
help = " generate age key";
name = "age-generate-key";
command = "${pkgs.uutils-coreutils-noprefix}/bin/mkdir -p ~/.config/sops/age && ${pkgs.age}/bin/age-keygen -o ~/.config/sops/age/keys.txt && ${pkgs.uutils-coreutils-noprefix}/bin/cat ~/.config/sops/age/keys.txt";
category = " SOPS";
}
{
help = " edit secrets.yaml";
name = "sops-edit";
command = "${pkgs.sops}/bin/sops edit ./sops/secrets.yaml";
category = " SOPS";
}
];
packages = [
pkgs.age
pkgs.sops
];
};
};
};
}