Compare commits

...

5 Commits

Author SHA1 Message Date
Noah Masur
22885f1b27 temp: try to show users in lightdm greeter
still isn't working unfortunately
2022-10-30 20:16:37 -04:00
Noah Masur
52edaa7d9c prevent ctrl-q from quitting firefox
will this affect macos?
2022-10-30 20:16:01 -04:00
Noah Masur
c74d003a57 change alacritty scrollback keybind to match kitty
add fonts for kitty
2022-10-30 20:15:32 -04:00
Noah Masur
2d10939285 clean up flake inputs and allow standalone home-manager
closes #11
2022-10-30 20:14:41 -04:00
Noah Masur
b15cd8c0b6 add basic kitty config
closes #7
2022-10-30 20:13:32 -04:00
16 changed files with 136 additions and 21 deletions

View File

@ -61,27 +61,31 @@
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
in rec {
nixosConfigurations = with inputs; {
desktop = import ./hosts/desktop {
inherit nixpkgs home-manager nur globals wallpapers;
};
wsl = import ./hosts/wsl { inherit nixpkgs wsl home-manager globals; };
oracle =
import ./hosts/oracle { inherit nixpkgs home-manager globals; };
nixosConfigurations = {
desktop = import ./hosts/desktop { inherit inputs globals; };
wsl = import ./hosts/wsl { inherit inputs globals; };
oracle = import ./hosts/oracle { inherit inputs globals; };
};
darwinConfigurations = with inputs; {
macbook = import ./hosts/macbook {
inherit nixpkgs darwin home-manager nur globals;
};
darwinConfigurations = {
macbook = import ./hosts/macbook { inherit inputs globals; };
};
# For quickly applying local settings with:
# home-manager switch --flake .#desktop
homeConfigurations = {
desktop =
nixosConfigurations.desktop.config.home-manager.users.${globals.user}.home;
macbook =
darwinConfigurations.macbook.config.home-manager.users."Noah.Masur".home;
};
# Package servers into images with a generator
packages.x86_64-linux = with inputs; {
aws = import ./hosts/aws {
inherit nixpkgs nixos-generators home-manager globals;
inherit inputs globals;
system = "x86_64-linux";
};
};

View File

@ -1,4 +1,6 @@
{ nixpkgs, system, nixos-generators, home-manager, globals, ... }:
{ inputs, globals, ... }:
with inputs;
nixos-generators.nixosGenerate {
inherit system;

View File

@ -1,4 +1,6 @@
{ nixpkgs, home-manager, nur, globals, wallpapers, ... }:
{ inputs, globals, ... }:
with inputs;
# System configuration for my desktop
nixpkgs.lib.nixosSystem {

View File

@ -1,4 +1,6 @@
{ nixpkgs, darwin, home-manager, nur, globals, ... }:
{ inputs, globals, ... }:
with inputs;
# System configuration for my work MacBook
darwin.lib.darwinSystem {

View File

@ -1,4 +1,6 @@
{ nixpkgs, home-manager, globals, ... }:
{ inputs, globals, ... }:
with inputs;
# System configuration for an Oracle free server

View File

@ -1,4 +1,6 @@
{ nixpkgs, wsl, home-manager, globals, ... }:
{ inputs, globals, ... }:
with inputs;
# System configuration for WSL
nixpkgs.lib.nixosSystem {

View File

@ -34,8 +34,8 @@
chars = "\\x11F";
}
{
key = "K";
mods = "Control";
key = "H";
mods = "Control|Shift";
mode = "~Vi";
action = "ToggleViMode";
}

View File

@ -6,6 +6,7 @@
./calibre.nix
./discord.nix
./firefox.nix
./kitty.nix
./media.nix
./obsidian.nix
./qbittorrent.nix

View File

@ -33,6 +33,7 @@
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.warnOnQuit" = false;
"browser.quitShortcut.disabled" = true;
"browser.theme.dark-private-windows" = true;
"browser.toolbars.bookmarks.visibility" = "newtab";
"browser.startup.page" = 3; # Restore previous session

View File

@ -0,0 +1,73 @@
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable {
home-manager.users.${config.user} = {
# xsession.windowManager.i3.config.terminal = "kitty";
# programs.rofi.terminal = "${pkgs.kitty}/bin/kitty";
programs.kitty = {
enable = true;
darwinLaunchOptions = null;
environment = { };
extraConfig = "";
font.size = 14;
keybindings = { };
settings = {
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
background = config.colorscheme.base00;
foreground = config.colorscheme.base05;
selection_background = config.colorscheme.base05;
selection_foreground = config.colorscheme.base00;
url_color = config.colorscheme.base04;
cursor = config.colorscheme.base05;
active_border_color = config.colorscheme.base03;
inactive_border_color = config.colorscheme.base01;
active_tab_background = config.colorscheme.base00;
active_tab_foreground = config.colorscheme.base05;
inactive_tab_background = config.colorscheme.base01;
inactive_tab_foreground = config.colorscheme.base04;
tab_bar_background = config.colorscheme.base01;
# normal
color0 = config.colorscheme.base00;
color1 = config.colorscheme.base08;
color2 = config.colorscheme.base0B;
color3 = config.colorscheme.base0A;
color4 = config.colorscheme.base0D;
color5 = config.colorscheme.base0E;
color6 = config.colorscheme.base0C;
color7 = config.colorscheme.base05;
# bright
color8 = config.colorscheme.base03;
color9 = config.colorscheme.base08;
color10 = config.colorscheme.base0B;
color11 = config.colorscheme.base0A;
color12 = config.colorscheme.base0D;
color13 = config.colorscheme.base0E;
color14 = config.colorscheme.base0C;
color15 = config.colorscheme.base07;
# extended base16 colors
color16 = config.colorscheme.base09;
color17 = config.colorscheme.base0F;
color18 = config.colorscheme.base01;
color19 = config.colorscheme.base02;
color20 = config.colorscheme.base04;
color21 = config.colorscheme.base06;
# Scrollback
scrolling_lines = 10000;
scrollback_pager_history_size = 10; # MB
scrollback_pager = ''
${pkgs.neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
# Window
window_padding_width = 4;
# macos_traditional_fullscreen = true;
};
};
};
};
}

View File

@ -9,6 +9,11 @@
font.normal.family = "FiraCode Nerd Font Mono";
};
programs.kitty.font = {
package = pkgs.nerdfonts;
name = "FiraCode";
};
};
}

View File

@ -18,6 +18,13 @@
commandline --function execute
'';
};
rebuild-home = lib.mkForce {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
commandline -r ${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
commandline --function execute
'';
};
};
};

View File

@ -21,6 +21,7 @@ in {
services.polybar.config."bar/main".font-0 = "Hack Nerd Font:size=10;2";
programs.rofi.font = "Hack Nerd Font 14";
programs.alacritty.settings.font.normal.family = fontName;
programs.kitty.font.name = fontName;
};
};

View File

@ -27,6 +27,11 @@ in {
# Make the login screen dark
greeters.gtk.theme = gtkTheme;
# Show default user
extraSeatDefaults = ''
greeter-hide-users = false
'';
};
};

View File

@ -12,6 +12,7 @@
nixh = "man home-configuration.nix";
nr = "rebuild-nixos";
nro = "rebuild-nixos offline";
hm = "rebuild-home";
};
functions = {
nix-shell-run = {
@ -43,6 +44,13 @@
commandline --function execute
'';
};
rebuild-home = {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
commandline --function execute
'';
};
};
};

View File

@ -723,7 +723,7 @@ key_bindings:
- { key: L, mods: Control|Shift, chars: "\x1F" }
# Used for searching nixpkgs in fish_user_key_bindings
- { key: N, mods: Control|Shift, chars: "\x11F" }
- { key: K, mods: Control, mode: ~Vi, action: ToggleViMode }
- { key: H, mods: Control|Shift, mode: ~Vi, action: ToggleViMode }
- { key: Return, mode: Vi, action: ToggleViMode }
# Used to enable $ keybind in Vi mode
- { key: 5, mods: Shift, mode: Vi|~Search, action: Last }