feat(homix): update configuration

Extract `river` configuration into a `home-manager` module
Fix `xkb` configuration
Unpin `neovim-nightly-overlay`:
    - https://github.com/nix-community/neovim-nightly-overlay/pull/166
    - https://github.com/nix-community/neovim-nightly-overlay/pull/167
This commit is contained in:
reo101 2023-03-13 18:18:03 +02:00
parent e122d8ba94
commit e86d916ae8
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
10 changed files with 122 additions and 67 deletions

View file

@ -272,7 +272,9 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"neovim-flake": "neovim-flake", "neovim-flake": "neovim-flake",
"nixpkgs": "nixpkgs" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1678090567, "lastModified": 1678090567,
@ -380,16 +382,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1671983799, "lastModified": 1677932085,
"narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", "narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836", "rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -425,22 +427,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1677932085,
"narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -497,7 +483,7 @@
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"wired": "wired", "wired": "wired",
"zig-overlay": "zig-overlay", "zig-overlay": "zig-overlay",
"zls-overlay": "zls-overlay" "zls-overlay": "zls-overlay"

View file

@ -37,8 +37,7 @@
neovim-nightly-overlay = { neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay"; url = "github:nix-community/neovim-nightly-overlay";
# inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.url = "github:nixos/nixpkgs?rev=fad51abd42ca17a60fc1d4cb9382e2d79ae31836";
}; };
zig-overlay = { zig-overlay = {

View file

@ -123,6 +123,9 @@
"MOZ_DISABLE_RDD_SANDBOX" = "1"; "MOZ_DISABLE_RDD_SANDBOX" = "1";
"EGL_PLATFORM" = "wayland"; "EGL_PLATFORM" = "wayland";
"XDG_CURRENT_DESKTOP" = "sway"; # river "XDG_CURRENT_DESKTOP" = "sway"; # river
"XKB_DEFAULT_LAYOUT" = "us,bg";
"XKB_DEFAULT_VARIANT" = ",phonetic";
"XKB_DEFAULT_OPTIONS" = "caps:escape,grp:lalt_lshift_toggle";
}; };
### Wayland specific ### Wayland specific

View file

@ -26,15 +26,15 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
## WM ## WM
river # river
swww # wallpaper deamon # swww # wallpaper deamon
# wired-notify # dunst on wayland # # wired-notify # dunst on wayland
waybar # status bar # waybar # status bar
xwayland # xwayland
wl-clipboard # wl-clipboard
slurp # select regions from wayland # slurp # select regions from wayland
grim # grap images from regions # grim # grap images from regions
playerctl # music control # playerctl # music control
## Terminals ## Terminals
# wezterm # wezterm
@ -45,6 +45,7 @@
git git
firefox firefox
discord discord
armcord # modded discord
vifm # file editor vifm # file editor
pciutils # lspci pciutils # lspci
usbutils # lsusb usbutils # lsusb
@ -98,54 +99,26 @@
userEmail = "pavel.atanasov2001@gmail.com"; userEmail = "pavel.atanasov2001@gmail.com";
}; };
reo101 = { reo101 = {
shell = { shell = {
enable = true; enable = true;
direnv = true; direnv = true;
zoxide = true; zoxide = true;
}; };
river = {
enable = true;
};
wezterm = { wezterm = {
enable = true; enable = true;
}; };
}; };
systemd.user.services."swww" = {
Unit = {
Description = "Swww Daemon";
PartOf = "graphical-session.target";
};
Service = {
ExecStart = "${pkgs.swww}/bin/swww init";
ExecStop = "${pkgs.swww}/bin/swww kill";
Type = "simple";
Restart = "always";
RestartSec = 5;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
# services.swww = {
# enabled = true;
# };
services.wired = {
enable = true;
config = ../configs/wired.ron;
};
home.file = { home.file = {
".config/nvim" = { ".config/nvim" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/src/reovim"; source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/src/reovim";
}; };
}; };
home.file.".config/river/init" = {
executable = true;
source = ../configs/river;
};
# home.file.".stack/config.yaml".text = lib.generators.toYAML {} { # home.file.".stack/config.yaml".text = lib.generators.toYAML {} {
# templates = { # templates = {
# scm-init = "git"; # scm-init = "git";
@ -157,5 +130,4 @@
# }; # };
# nix.enable = true; # nix.enable = true;
# }; # };
} }

View file

@ -5,5 +5,6 @@
# List your module files here # List your module files here
# my-module = import ./my-module.nix; # my-module = import ./my-module.nix;
reo101-shell = import ./reo101-shell.nix; reo101-shell = import ./reo101-shell.nix;
reo101-river = import ./reo101-river;
reo101-wezterm = import ./reo101-wezterm; reo101-wezterm = import ./reo101-wezterm;
} }

View file

@ -0,0 +1,83 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.reo101.river;
in
{
imports =
[
];
options =
{
reo101.river = {
enable = mkEnableOption "reo101 river setup";
# swww = mkOption {
# type = types.boolean;
# description = "Enable swww (wallpaper daemon)";
# default = false;
# };
};
};
config =
mkIf cfg.enable {
home.packages = with pkgs;
builtins.concatLists [
[
river
swww # wallpaper deamon
waybar # status bar
xwayland
wl-clipboard
slurp # select regions from wayland
grim # grap images from regions
playerctl # music control
]
# (optionals cfg.swww [
# swww
# ])
];
home.file.".config/river/init" = {
executable = true;
source = ./river;
};
systemd.user.services."swww" = {
Unit = {
Description = "swww Daemon";
PartOf = "graphical-session.target";
};
Service = {
ExecStart = "${pkgs.swww}/bin/swww init --no-daemon";
ExecStop = "${pkgs.swww}/bin/swww kill";
Type = "simple";
Restart = "always";
RestartSec = 5;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
# description = "Swww Deamon";
# wantedBy = [ "graphical-session.target" ];
# partOf = [ "graphical-session.target" ];
# script = "${pkgs.swww}/bin/swww init --no-daemon";
};
# services.swww = {
# enabled = true;
# };
# dunst on wayland
services.wired = {
enable = true;
config = ./wired.ron;
};
};
meta = {
maintainers = with lib.maintainers; [ reo101 ];
};
}

View file

@ -17,7 +17,7 @@ in
type = types.str; type = types.str;
description = "Extra zsh config"; description = "Extra zsh config";
default = '' default = ''
''; '';
}; };
}; };
}; };

View file

@ -14,5 +14,16 @@
river = prev.river.overrideAttrs (oldAttrs: rec { river = prev.river.overrideAttrs (oldAttrs: rec {
xwaylandSupport = true; xwaylandSupport = true;
}); });
# armcord = prev.armcord.overrideAttrs (oldAttrs: let
# openasar = final.fetchurl {
# url = "https://github.com/GooseMod/OpenAsar/releases/download/nightly/app.asar";
# sha256 = final.lib.fakeSha256;
# };
# in rec {
# postInstall = (oldAttrs.postInstall or "") ++ ''
# install -v "${openasar}" "$out/opt/Discord/resources/app.asar"
# '';
# });
}; };
} }