add overlays, add nix search defaults
This commit is contained in:
parent
f934843607
commit
a3e8f36936
8 changed files with 92 additions and 23 deletions
17
default.nix
17
default.nix
|
@ -4,12 +4,25 @@
|
||||||
# home manager
|
# home manager
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
# modules
|
# modules
|
||||||
#i dont think this is right
|
# import for each folder
|
||||||
|
# modules/desktop IMPORT
|
||||||
|
# modules/desktop/example DO NOT IMPORT,
|
||||||
|
# add entry to module's default.nix
|
||||||
outputs.nixosModules.desktop
|
outputs.nixosModules.desktop
|
||||||
|
outputs.nixosModules.shell
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes"];
|
nix.settings.experimental-features = [ "nix-command" "flakes"];
|
||||||
|
|
||||||
|
# import the overlays
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = [
|
||||||
|
outputs.overlays.additions
|
||||||
|
outputs.overlays.modifications
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# grub (mount efi partition to /boot/efi)
|
# grub (mount efi partition to /boot/efi)
|
||||||
# why /boot/efi? instead of /efi?
|
# why /boot/efi? instead of /efi?
|
||||||
# 1. when dualbooting, windows makes the efi partition 100mb instead of 512mb+ (we need this for generations
|
# 1. when dualbooting, windows makes the efi partition 100mb instead of 512mb+ (we need this for generations
|
||||||
|
|
|
@ -12,16 +12,17 @@
|
||||||
networking.hostName = "sakotop"; # Define your hostname.
|
networking.hostName = "sakotop"; # Define your hostname.
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
#services.xserver = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
# bspwm
|
# # bspwm
|
||||||
windowManager.bspwm.enable = true;
|
# windowManager.bspwm.enable = true;
|
||||||
layout = "us";
|
# layout = "us";
|
||||||
};
|
#};
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
|
bspwm.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,9 +108,9 @@
|
||||||
keepassxc
|
keepassxc
|
||||||
tree
|
tree
|
||||||
dmenu
|
dmenu
|
||||||
rofi
|
#rofi
|
||||||
kitty
|
#kitty
|
||||||
polybar
|
#polybar
|
||||||
steam
|
steam
|
||||||
winetricks
|
winetricks
|
||||||
wineWowPackages.staging
|
wineWowPackages.staging
|
||||||
|
@ -143,12 +144,6 @@
|
||||||
XDG_RUNTIME_DIR = "/run/user/1000";
|
XDG_RUNTIME_DIR = "/run/user/1000";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO(sako):: make overlays in different folder
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: { qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; })
|
|
||||||
(final: prev: { polybar = prev.polybar.override { pulseSupport = true;}; })
|
|
||||||
];
|
|
||||||
|
|
||||||
# garbage collection
|
# garbage collection
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
desktop = import ./desktop;
|
desktop = import ./desktop;
|
||||||
|
shell = import ./shell;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ options, config, lib, pkgs, ...}:
|
{ outputs, options, config, lib, pkgs, ...}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.bspwm;
|
cfg = config.modules.desktop.bspwm;
|
||||||
|
@ -14,15 +14,19 @@ in
|
||||||
windowManager.bspwm.enable = true;
|
windowManager.bspwm.enable = true;
|
||||||
};
|
};
|
||||||
users.users.sako.packages = with pkgs; [
|
users.users.sako.packages = with pkgs; [
|
||||||
kitty
|
polybar
|
||||||
|
rofi
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.sako = { pkgs , ...}: {
|
home-manager.users.sako = { pkgs , ...}: {
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
kitty = {
|
bspwm = {
|
||||||
source = ../../../config/kitty;
|
source = ../../../config/bspwm;
|
||||||
};
|
};
|
||||||
};
|
sxhkd = {
|
||||||
|
source = ../../../config/sxhkd;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
5
modules/shell/default.nix
Normal file
5
modules/shell/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./nix
|
||||||
|
];
|
||||||
|
}
|
5
modules/shell/nix/default.nix
Normal file
5
modules/shell/nix/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./search.nix
|
||||||
|
];
|
||||||
|
}
|
18
modules/shell/nix/search.nix
Normal file
18
modules/shell/nix/search.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ options, config, lib, pkgs, ...}:
|
||||||
|
with lib;
|
||||||
|
let cfg = config.modules.shell.nix.search;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.shell.nix.search = {
|
||||||
|
enable = mkEnableOption false;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
nix = {
|
||||||
|
registry = {
|
||||||
|
nixpkgs.flake = nixpkgs;
|
||||||
|
nixos-hardware.flake = nixos-hw;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1 +1,29 @@
|
||||||
{}
|
{ inputs, ...}:
|
||||||
|
{
|
||||||
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
|
additions = final: _prev: import ../packages { pkgs = final; };
|
||||||
|
|
||||||
|
# This one contains whatever you want to overlay
|
||||||
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
|
# https://nixos.wiki/wiki/Overlays
|
||||||
|
modifications = final: prev: {
|
||||||
|
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||||
|
# ...
|
||||||
|
# });
|
||||||
|
polybar = prev.polybar.override {
|
||||||
|
pulseSupport = true;
|
||||||
|
};
|
||||||
|
qutebrowser = prev.qutebrowser.override {
|
||||||
|
enableWideVine = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||||
|
# be accessible through 'pkgs.unstable'
|
||||||
|
unstable-packages = final: _prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = final.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue