add hm
This commit is contained in:
parent
3fc09b571b
commit
a238dac0ea
8 changed files with 150 additions and 82 deletions
15
flake.nix
15
flake.nix
|
|
@ -8,7 +8,7 @@
|
||||||
url = "github:tinted-theming/schemes";
|
url = "github:tinted-theming/schemes";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
|
|
@ -17,15 +17,16 @@
|
||||||
wrappers,
|
wrappers,
|
||||||
flake-parts,
|
flake-parts,
|
||||||
base16,
|
base16,
|
||||||
|
home-manager,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
flake-parts.lib.mkFlake { inherit inputs; } (
|
||||||
{ config, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
imports = [
|
imports = [
|
||||||
wrappers.flakeModules.wrappers
|
wrappers.flakeModules.wrappers
|
||||||
./modules/programs/emacs/emacs.nix
|
|
||||||
./modules/theme.nix
|
./modules/theme.nix
|
||||||
|
./modules/programs/emacs/emacs.nix
|
||||||
];
|
];
|
||||||
flake.nixosConfigurations.nerv = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations.nerv = inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
|
|
@ -35,10 +36,14 @@
|
||||||
./modules/hosts/nerv/configuration.nix
|
./modules/hosts/nerv/configuration.nix
|
||||||
config.flake.wrappers.emacs.install
|
config.flake.wrappers.emacs.install
|
||||||
{ wrappers.emacs.enable = true; }
|
{ wrappers.emacs.enable = true; }
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPkgs = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.lucy = ./modules/home.nix
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
modules/home.nix
Normal file
13
modules/home.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ inputs, pkgs, config, ...}:
|
||||||
|
let
|
||||||
|
schemeName = (pkgs.callPackage inputs.base16.lib {}).mkSchemeAttrs config.theme.name;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.lucy = {
|
||||||
|
home-stateVersion = "26.05";
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/hosts/nerv/#theme.nix#
Normal file
23
modules/hosts/nerv/#theme.nix#
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
schemeName = config.theme.name;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
scheme = (pkgs.callPackage inputs.base16.lib { }).mkSchemeAttrs schemeName;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
1
modules/hosts/nerv/.#theme.nix
Symbolic link
1
modules/hosts/nerv/.#theme.nix
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
lucy@nerv.31959:1788169501
|
||||||
7
modules/hosts/nerv/theme.nix
Normal file
7
modules/hosts/nerv/theme.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ inputs, config, lib, ... }: let
|
||||||
|
schemeName = config.theme.name;
|
||||||
|
in
|
||||||
|
{config, lib, pkgs, ...}:
|
||||||
|
|
||||||
|
let scheme = (pkgs.callPackage inputs.base16.lib {}).mkSchemeAttrs schemeName; in
|
||||||
|
{}
|
||||||
|
|
@ -1,6 +1,22 @@
|
||||||
{ inputs, lib, config, ... }: {
|
{
|
||||||
flake.wrappers.emacs = { pkgs, wlib, config, ... }:
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
schemeName = config.theme.name;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.wrappers.emacs =
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
wlib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
scheme = (pkgs.callPackage inputs.base16.lib { }).mkSchemeAttrs schemeName;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
wlib.wrapperModules.emacs
|
wlib.wrapperModules.emacs
|
||||||
|
|
@ -25,13 +41,12 @@
|
||||||
configFile = ''
|
configFile = ''
|
||||||
;;; -*- lexical-binding: t; -*-
|
;;; -*- lexical-binding: t; -*-
|
||||||
(setq make-backup-files nil)
|
(setq make-backup-files nil)
|
||||||
(load-theme "base16-${config.theme.scheme}" t)
|
(load-theme 'base16-${scheme.scheme-slug} t)
|
||||||
(use-package
|
(use-package
|
||||||
corfu
|
corfu
|
||||||
:init
|
:init
|
||||||
(setq
|
(setq
|
||||||
corfu-auto t
|
corfu-auto t
|
||||||
corfu-auto-prefix 1
|
|
||||||
corfu-auto-delay 0.2)
|
corfu-auto-delay 0.2)
|
||||||
(global-corfu-mode))
|
(global-corfu-mode))
|
||||||
|
|
||||||
|
|
@ -41,9 +56,9 @@
|
||||||
:bind ("C-c p" . cape-prefix-map) ;; Alternative key: M-<tab>, M-p, M-+
|
:bind ("C-c p" . cape-prefix-map) ;; Alternative key: M-<tab>, M-p, M-+
|
||||||
:init (add-hook 'completion-at-point-functions #'cape-file))
|
:init (add-hook 'completion-at-point-functions #'cape-file))
|
||||||
(setq corfu-auto-prefix 2)
|
(setq corfu-auto-prefix 2)
|
||||||
(use-package qml-mode :ensure t)
|
(use-package qml-mode)
|
||||||
(use-package lua-mode :ensure t)
|
(use-package lua-mode)
|
||||||
(use-package elcord :ensure t :init (elcord-mode))
|
(use-package elcord :init (elcord-mode))
|
||||||
|
|
||||||
(add-to-list
|
(add-to-list
|
||||||
'display-buffer-alist
|
'display-buffer-alist
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
{ inputs, lib }: {
|
{ inputs, lib, pkgs, config, ... }: {
|
||||||
options.scheme = lib.mkOption {
|
options.theme.name = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "${inputs.tt-schemes}/base16/oxocarbon-dark.yaml";
|
default = "${inputs.tt-schemes}/base16/oxocarbon-dark.yaml";
|
||||||
example = "${inputs.tt-schemes}/base16/catppuccin-mocha.yaml";
|
example = "${inputs.tt-schemes}/base16/catppuccin-mocha.yaml";
|
||||||
description = "set the used theme";
|
description = "set the used theme";
|
||||||
};
|
};
|
||||||
config.scheme = "${inputs.tt-schemes}/base16/oxocarbon-dark.yaml";
|
options.theme.mkSchemeAttr = lib.mkOption {
|
||||||
|
type = lib.types.attrSet;
|
||||||
|
};
|
||||||
|
config.theme.name = "${inputs.tt-schemes}/base16/oxocarbon-dark.yaml";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
result
Symbolic link
1
result
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/3jh5fidnaf2jwps902nycb421bmiwnqb-emacs-with-packages-31.1
|
||||||
Loading…
Reference in a new issue