Compare commits
3 Commits
5ed359d561
...
ceee1b418c
Author | SHA1 | Date | |
---|---|---|---|
ceee1b418c | |||
3a2a4e42df | |||
1379670cd9 |
@ -3,5 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./wm.nix
|
./wm.nix
|
||||||
./nodm.nix
|
./nodm.nix
|
||||||
|
./nix.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
45
home/common/nix.nix
Normal file
45
home/common/nix.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{ pkgs, lib, config, osConfig ? { }, options, nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.nixfiles.common.nix;
|
||||||
|
standalone = !(osConfig ? home-manager);
|
||||||
|
in {
|
||||||
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||||
|
{
|
||||||
|
nix.registry = {
|
||||||
|
nixfiles = {
|
||||||
|
exact = true;
|
||||||
|
from = {
|
||||||
|
id = "nixfiles";
|
||||||
|
type = "indirect";
|
||||||
|
};
|
||||||
|
to = {
|
||||||
|
type = "git";
|
||||||
|
url = "file://${config.home.homeDirectory}/nixfiles";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
(lib.mkIf standalone {
|
||||||
|
home.sessionVariables.NIX_PATH = "nixpkgs=${nixpkgs}\${NIX_PATH:+:\${NIX_PATH}}";
|
||||||
|
nix.registry = {
|
||||||
|
nixpkgs = {
|
||||||
|
exact = true;
|
||||||
|
from = {
|
||||||
|
id = "nixpkgs";
|
||||||
|
type = "indirect";
|
||||||
|
};
|
||||||
|
to = {
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
rev = "${nixpkgs.rev}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
options.nixfiles.common.nix = {
|
||||||
|
enable = lib.mkEnableOption "Nix configuration";
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, config, lib, options, osConfig ? { }, nixpkgs, home-manager, inputs, ... }@args:
|
{ pkgs, config, lib, options, osConfig ? { }, nixpkgs, home-manager, inputs, ... }@args:
|
||||||
let
|
let
|
||||||
isStandalone = with builtins; !( (typeOf osConfig == "set") && hasAttr "home-manager" osConfig );
|
isStandalone = osConfig ? home-manager;
|
||||||
cfg = config.nixfiles;
|
cfg = config.nixfiles;
|
||||||
flakeType = cfg.lib.types.flake;
|
flakeType = cfg.lib.types.flake;
|
||||||
in
|
in
|
||||||
|
@ -15,6 +15,7 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
nixfiles.programs.comma.enable = true;
|
nixfiles.programs.comma.enable = true;
|
||||||
|
nixfiles.common.nix.enable = true;
|
||||||
|
|
||||||
home.sessionVariables = lib.mkMerge [
|
home.sessionVariables = lib.mkMerge [
|
||||||
(lib.mkIf config.programs.neovim.enable {
|
(lib.mkIf config.programs.neovim.enable {
|
||||||
|
@ -238,6 +238,7 @@ in
|
|||||||
|
|
||||||
"$mod, f, fullscreen"
|
"$mod, f, fullscreen"
|
||||||
"$mod SHIFT, f, fakefullscreen"
|
"$mod SHIFT, f, fakefullscreen"
|
||||||
|
"$mod CTRL, f, fullscreen, 1"
|
||||||
|
|
||||||
# Move focus with mod + arrow keys
|
# Move focus with mod + arrow keys
|
||||||
"$mod, left, movefocus, l"
|
"$mod, left, movefocus, l"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user