This commit is contained in:
Varris 2022-09-04 01:54:47 +02:00
parent d4b8cf1bdd
commit 0ba93289fe
8 changed files with 113 additions and 47 deletions

View File

@ -20,15 +20,16 @@
flake = false; flake = false;
}; };
kakoune-auto-pairs = {
url = "github:alexherbo2/auto-pairs.kak";
flake = false;
};
kakoune-sort-selections = { kakoune-sort-selections = {
url = "github:occivink/kakoune-sort-selections"; url = "github:occivink/kakoune-sort-selections";
flake = false; flake = false;
}; };
xorg-git = {
url = "git+https://gitlab.freedesktop.org/xorg/xserver.git";
flake = false;
};
# Kakoune Plugins End # Kakoune Plugins End
rofi-theme = { rofi-theme = {
@ -36,11 +37,21 @@
flake = false; flake = false;
}; };
wlroots-git = {
url = "git+https://gitlab.freedesktop.org/wlroots/wlroots.git";
flake = false;
};
sway-git = {
url = "github:swaywm/sway";
flake = false;
};
grub2-themes.url = "github:vinceliuice/grub2-themes"; grub2-themes.url = "github:vinceliuice/grub2-themes";
}; };
outputs = { self, nixpkgs, home-manager, nur, grub2-themes, ... }@inputs: outputs = { self, nixpkgs, home-manager, nur, ... }@inputs:
let let
username = "manuel"; username = "manuel";
hostname = "terra"; hostname = "terra";
@ -57,18 +68,45 @@
}; };
in in
{ {
overlays.default = overlays.default = (final: prev: rec {
(final: prev: rec { nerdfonts = prev.nerdfonts.override {
nerdfonts = prev.nerdfonts.override { fonts = [
fonts = [ "JetBrainsMono"
"JetBrainsMono" ];
]; };
};
wlroots = prev.wlroots.overrideAttrs (old: {
version = "0.16.0";
src = inputs.wlroots-git;
}); });
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
version = "1.8";
buildInputs = old.buildInputs ++ [
prev.xorg.xcbutilwm
prev.pcre2
];
nativeBuildInputs = old.nativeBuildInputs ++ [
prev.cmake
];
src = inputs.sway-git;
});
xwayland = prev.xwayland.overrideAttrs (old: {
version = "22.2";
src = inputs.xorg-git;
buildInputs = old.buildInputs ++ [
prev.udev
prev.xorg.libpciaccess
];
});
});
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem
{ {
inherit system; inherit system;
inherit pkgs;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./system/configuration.nix ./system/configuration.nix
@ -84,7 +122,7 @@
}; };
}; };
} }
grub2-themes.nixosModule inputs.grub2-themes.nixosModule
]; ];
}; };
}; };

View File

@ -47,7 +47,13 @@
kernelModules = [ "i2c-dev" "i2c-piix4" ]; kernelModules = [ "i2c-dev" "i2c-piix4" ];
}; };
networking.hostName = "terra"; # Define your hostname. networking = {
hostName = "terra"; # Define your hostname.
networkmanager = {
enable = true;
};
firewall.checkReversePath = false;
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Vienna"; time.timeZone = "Europe/Vienna";
@ -102,37 +108,50 @@
interval = "hourly"; interval = "hourly";
}; };
security.doas.enable = true; services.fstrim = {
security.sudo.enable = false; enable = true;
interval = "weekly";
};
security.doas.extraRules = [{ security = {
users = [ "manuel" ]; sudo.enable = false;
keepEnv = true; doas = {
persist = true; enable = true;
}]; extraRules = [{
users = [ "manuel" ];
security.polkit.enable = true; keepEnv = true;
persist = true;
}];
};
polkit.enable = true;
};
programs.fish.enable = true; programs.fish.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.manuel = { users.users.manuel = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "users" "wheel" "audio" "video" "games" "input" "geoclue" ]; extraGroups = [ "users" "wheel" "audio" "video" "games" "input" "geoclue" "networkmanager" "nm-openvpn" ];
shell = pkgs.fish; shell = pkgs.fish;
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment = {
git systemPackages = with pkgs; [
links2 git
ripgrep links2
fd ripgrep
htop fd
openrgb htop
]; openrgb
environment.pathsToLink = [ "/share/zsh" ]; unzip
unrar
p7zip
];
pathsToLink = [ "/share/zsh" ];
binsh = "${pkgs.dash}/bin/dash";
};
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.

View File

@ -42,8 +42,8 @@
fileSystems."/home" = fileSystems."/home" =
{ {
device = "/dev/disk/by-uuid/d94babc9-ef09-43bb-949d-ed477ff4f4c2"; device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f";
fsType = "ext4"; fsType = "xfs";
}; };
fileSystems."/opt/games" = fileSystems."/opt/games" =
@ -60,7 +60,7 @@
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; # networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;

View File

@ -38,7 +38,6 @@
"threads" = 8; "threads" = 8;
}; };
}; };
}; };
} }

View File

@ -42,7 +42,7 @@
nou = '' nou = ''
pushd &> /dev/null pushd &> /dev/null
cd "${config.home.homeDirectory}/.dotfiles" cd "${config.home.homeDirectory}/.dotfiles"
nix flake lock --commit-lock-file --update-input nixpkgs --update-input home-manager nix flake lock --commit-lock-file --update-input nixpkgs --update-input home-manager --update-input nur
doas nixos-rebuild switch --upgrade --flake .# doas nixos-rebuild switch --upgrade --flake .#
popd &> /dev/null popd &> /dev/null
''; '';

View File

@ -5,10 +5,6 @@ let
src = inputs.kakoune-smarttab; src = inputs.kakoune-smarttab;
}; };
auto-pairs = pkgs.kakouneUtils.buildKakounePlugin {
name = "kakoune-auto-pairs";
src = inputs.kakoune-auto-pairs;
};
sort-selections = pkgs.kakouneUtils.buildKakounePlugin { sort-selections = pkgs.kakouneUtils.buildKakounePlugin {
name = "sort-selections-kak"; name = "sort-selections-kak";
src = inputs.kakoune-sort-selections; src = inputs.kakoune-sort-selections;
@ -21,9 +17,11 @@ in
plugins = with pkgs.kakounePlugins; [ plugins = with pkgs.kakounePlugins; [
smarttab smarttab
kakboard kakboard
auto-pairs #auto-pairs-kak
pkgs.kak-lsp kak-lsp
sort-selections sort-selections
powerline-kak
kakoune-extra-filetypes
]; ];
config = { config = {
colorScheme = "gruvbox-dark"; colorScheme = "gruvbox-dark";
@ -53,13 +51,17 @@ in
}; };
extraConfig = '' extraConfig = ''
set global startup_info_version 99999999 set global startup_info_version 99999999
set-option global auto_pairs ( ) { } [ ] '"' '"' "'" "'" ` ` « » #set-option global auto_pairs ( ) { } [ ] '"' '"' "'" "'" ` ` “ ” « »
eval %sh{kak-lsp --kakoune -s $kak_session} # Not needed if you load it with plug.kak. eval %sh{kak-lsp --kakoune -s $kak_session} # Not needed if you load it with plug.kak.
lsp-enable lsp-enable
map global user l %{: enter-user-mode lsp<ret>} -docstring "LSP mode" map global user l %{: enter-user-mode lsp<ret>} -docstring "LSP mode"
require-module powerline
powerline-start
powerline-theme gruvbox
powerline-separator global half-step
''; '';
}; };

View File

@ -131,6 +131,7 @@ in
{ command = "${xwaylandSetPrimary}/bin/xwayland-setprimary.sh"; always = true; } { command = "${xwaylandSetPrimary}/bin/xwayland-setprimary.sh"; always = true; }
{ command = "${pkgs.autotiling}/bin/autotiling"; always = true; } { command = "${pkgs.autotiling}/bin/autotiling"; always = true; }
{ command = "${pkgs.openrgb}/bin/openrgb --server --profile autorun.orp"; } { command = "${pkgs.openrgb}/bin/openrgb --server --profile autorun.orp"; }
{ command = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator"; }
]; ];
bars = [{ bars = [{
command = "${pkgs.waybar}/bin/waybar"; command = "${pkgs.waybar}/bin/waybar";
@ -167,6 +168,7 @@ in
}; };
}; };
extraConfig = '' extraConfig = ''
seat seat0 xcursor_theme capitaine-cursors-white 32
''; '';
extraSessionCommands = '' extraSessionCommands = ''
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1

View File

@ -17,9 +17,10 @@
home.homeDirectory = "/home/manuel"; home.homeDirectory = "/home/manuel";
home.packages = [ home.packages = [
pkgs.appimage-run pkgs.appimage-run
pkgs.bottles # pkgs.bottles
pkgs.discord pkgs.discord
pkgs.firefox pkgs.firefox
pkgs.lutris
pkgs.nerdfonts pkgs.nerdfonts
pkgs.noto-fonts-cjk-sans pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-cjk-serif pkgs.noto-fonts-cjk-serif
@ -70,6 +71,11 @@
package = pkgs.gruvbox-dark-icons-gtk; package = pkgs.gruvbox-dark-icons-gtk;
name = "oomox-gruvbox-dark"; name = "oomox-gruvbox-dark";
}; };
cursorTheme = {
package = pkgs.capitaine-cursors;
name = "capitaine-cursors-white";
size = 32;
};
}; };
programs.git = { programs.git = {