Compare commits

...

2 commits

52 changed files with 979 additions and 1309 deletions

View file

@ -1,15 +0,0 @@
{ inputs
, lib
, config
, pkgs
, ...
}:
{
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags = {
enable = true;
configDir = ./config;
};
}

View file

@ -1,3 +0,0 @@
(defpoll time :interval "10s" "date '+%H:%M'")
(defpoll year :interval "10h" "date '+%Y'")
(defpoll date :interval "30m" "date '+%m-%d'")

View file

@ -1,87 +0,0 @@
(defwidget notifications []
(eventbox :class "notifications"
""
)
)
(defwidget audio []
(eventbox :class "audio"
:onclick "eww open --toggle audio"
"󰕾"
))
(defwidget clipboard []
(eventbox :class "clipboard"
"󰅌"
)
)
(defwidget left []
(box :class "left"
:space-evenly "false"
:halign "start"
:valign "center"
:orientation "h"
(notifications)
(audio)
(clipboard)
)
)
(defwidget workspace-indicator []
". . . . . . . . . ."
)
(defwidget center []
(box :class "center"
:space-evenly "false"
:halign "center"
:valign "center"
:orientation "h"
(workspace-indicator)
)
)
(defwidget time []
(eventbox :class "time"
time
)
)
(defwidget date []
(eventbox :class "date"
"${year}-${date}"
)
)
(defwidget right []
(box :class "right"
:space-evenly "false"
:halign "end"
:valign "center"
:orientation "v"
(time)
(date)
)
)
(defwidget bar []
(box :class "bar"
:orientation "h"
(left)
(center)
(right)
)
)
(defwindow bar
:monitor 2
:geometry (geometry :x "0px"
:y "10px"
:width "1060px"
:height "48px"
:anchor "center top")
:stacking "fg"
:exclusive true
(bar)
)

View file

View file

@ -1,2 +0,0 @@
(include "_variables.yuck")
(include "bar.yuck")

View file

@ -1,14 +0,0 @@
{ inputs
, lib
, config
, pkgs
, ...
}:
{
programs.eww = {
enable = true;
configDir = ./config;
};
}

View file

@ -30,11 +30,12 @@
};
outputs =
{ self
, nixpkgs
, home-manager
, ...
} @ inputs:
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
inherit (self) outputs;
in
@ -43,23 +44,24 @@
nixosConfigurations = {
"kalle-pc" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ ./nixos/kalle-pc/configuration.nix ];
specialArgs = {
inherit inputs outputs;
};
modules = [ ./hosts/kalle-pc ];
};
"kalle-laptop" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
specialArgs = {
inherit inputs outputs;
};
modules = [ ./nixos/kalle-laptop/configuration.nix ];
};
};
homeConfigurations = {
"kalle@kalle-pc" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./home-manager/kalle-pc/kalle.nix ];
};
"kalle@kalle-laptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ ./home-manager/kalle-laptop/kalle.nix ];
};
};

View file

@ -1,128 +0,0 @@
{ inputs
, outputs
, lib
, config
, pkgs
, ...
}:
{
home = {
username = "kalle";
homeDirectory = "/home/kalle";
};
imports =
[
../../nvim
../../tmux
];
nixpkgs = {
overlays = with outputs.overlays; [
nvim-plugins
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [
"electron-25.9.0"
];
};
};
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
discord
vesktop
firefox
chromium
httpie
kate
dolphin
ark
rustup
gcc
pavucontrol
difftastic
sops
obsidian
cachix
];
programs.home-manager.enable = true;
programs.bash = {
enable = true;
shellAliases = {
# Git aliases
gg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all";
gca = "git add -A; git commit -a --amend --no-edit";
gs = "git status";
# Replace some commands with better versions
ssh = "kitty +kitten ssh";
diff = "${pkgs.difftastic}/bin/difftastic";
};
initExtra = ''
function open() {
xdg-open $@ &> /dev/null &
}
'';
};
programs.kitty = {
enable = true;
theme = "Catppuccin-Mocha";
settings = {
background_opacity = "0.8";
allow_remote_control = true;
};
};
programs.starship = {
enable = true;
settings = {
add_newline = true;
# Remove text from nix shell component
nix_shell.format = "via [$symbol]($style) ";
git_status.disabled = true;
package.disabled = true;
};
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.git = {
enable = true;
userName = "Kalle Struik";
userEmail = "kalle@kallestruik.nl";
difftastic.enable = true;
extraConfig = {
init.defaultBranch = "main";
};
};
home.sessionVariables = {
EDITOR = "nvim";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
}

View file

@ -1,276 +0,0 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}:
{
home = {
username = "kalle";
homeDirectory = "/home/kalle";
};
imports = [
../../nvim
../../tmux
../../eww
../../hyprland
../../hyprland/hyprpaper.nix
../../ags
];
hyprland =
let
mod = "SUPER";
in
{
mod = mod;
primaryMonitor = "DP-2";
monitors = [
{
name = "DP-2";
width = 1920;
height = 1080;
refreshRate = 144;
x = 0;
y = 1080;
vrr = 1;
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
x = 1500;
y = 0;
}
{
name = "HDMI-A-2";
width = 1920;
height = 1080;
x = 1920;
y = 1080;
transform = 3;
}
];
autoStart = [
# Bar
"${pkgs.ags}/bin/ags"
"${pkgs.firefox}/bin/firefox"
"${pkgs.discord}/bin/discord"
"${pkgs.kitty}/bin/kitty"
];
environment = {
XCURSOR_SIZE = "24";
};
sensitivity = 0.1;
layout = "dwindle";
layerRules = {
"gtk-layer-shell" = [
"blur"
"ignorezero"
];
"notifications2" = [
"noanim"
"blur"
"ignorezero"
];
};
windowRules = {
# Auto workspace
firefox = [ "workspace 1 silent" ];
discord = [ "workspace name:HDMI-A-2" ];
};
windowRulesV2 = {
# ULauncher
"class:^(ulauncher)$" = [
"dimaround"
];
};
# Media keys
# bind = ,XF86AudioPlay, exec, playerctl --player plasma-browser-integration play-pause
# bind = ,XF86AudioPrev, exec, playerctl previous
# bind = ,XF86AudioNext, exec, playerctl next
# bind = ,XF86AudioLowerVolume, exec, playerctl --player plasma-browser-integration volume 0.01-
# bind = ,XF86AudioRaiseVolume, exec, playerctl --player plasma-browser-integration volume 0.01+
# This is a dumb work around for hyprland not passing ALT half the time with the pass dispatcher.
# bind = ALT, M, exec, xdotool key 'ALT+m'
# bind = ALT, B, exec, xdotool key 'ALT+b'
binds = {
"${mod}, return" = "exec, ${pkgs.kitty}/bin/kitty";
"${mod}, E" = "exec, ${pkgs.ulauncher}/bin/ulauncher-toggle #wofi --show drun";
"${mod}, Print" = "exec, ${pkgs.bash}/bin/bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
# Clipboard history
# bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
};
mouseBinds = { };
};
hyprpaper = {
wallpaperFolder = "/home/kalle/Pictures/Wallpapers";
};
nixpkgs = {
overlays = with outputs.overlays; [ nvim-plugins ];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [
"electron-25.9.0"
"electron-29.4.6"
];
};
};
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
discord
discord-canary
vesktop
chromium
httpie
kate
dolphin
ark
rustup
gcc
prismlauncher
pavucontrol
difftastic
sops
(obsidian.override { electron = electron_29-bin; })
unzip
vlc
feishin
cachix
];
programs.home-manager.enable = true;
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.plasma-browser-integration ];
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
iconTheme = {
name = "breeze-dark";
package = pkgs.kdePackages.breeze-icons;
};
cursorTheme = {
name = "breeze_cursors";
package = pkgs.libsForQt5.breeze-qt5;
};
};
qt = {
enable = true;
style.name = "breeze";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
programs.bash = {
enable = true;
shellAliases = {
# Git aliases
gg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all";
gca = "git add -A; git commit -a --amend --no-edit";
gs = "git status";
# Replace some commands with better versions
ssh = "kitty +kitten ssh";
diff = "${pkgs.difftastic}/bin/difft";
};
initExtra = ''
function open() {
xdg-open $@ &> /dev/null &
}
'';
};
programs.kitty = {
enable = true;
themeFile = "Catppuccin-Mocha";
settings = {
background_opacity = "0.8";
allow_remote_control = true;
enable_audio_bell = false;
};
};
programs.starship = {
enable = true;
settings = {
add_newline = true;
# Remove text from nix shell component
nix_shell.format = "via [$symbol]($style) ";
git_status.disabled = true;
package.disabled = true;
};
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.git = {
enable = true;
userName = "Kalle Struik";
userEmail = "kalle@kallestruik.nl";
difftastic.enable = true;
extraConfig = {
init.defaultBranch = "main";
};
};
home.sessionVariables = {
EDITOR = "nvim";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
}

136
hosts/_base/default.nix Normal file
View file

@ -0,0 +1,136 @@
{
inputs,
pkgs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
];
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
# Allow me to use cachix
trusted-users = [
"root"
"kalle"
];
};
nixpkgs.config.allowUnfree = true;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages = with pkgs; [
xdg-user-dirs
];
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
fira-code
fira-code-symbols
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
fontconfig = {
defaultFonts = {
serif = [
"Noto Serif"
"Symbols Nerd Font"
];
sansSerif = [
"Noto Sans"
"Symbols Nerd Font"
];
monospace = [
"Fira Code"
"Symbols Nerd Font Mono"
];
};
};
};
users.users.kalle = {
isNormalUser = true;
group = "kalle";
extraGroups = [
"wheel"
];
};
users.groups.kalle.gid = 1000;
home-manager.users.kalle = {
home = {
username = "kalle";
homeDirectory = "/home/kalle";
sessionVariables = {
EDITOR = "nvim";
};
};
programs.home-manager.enable = true;
# TODO: Make this be based on the system wide style
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
iconTheme = {
name = "breeze-dark";
package = pkgs.kdePackages.breeze-icons;
};
cursorTheme = {
name = "breeze_cursors";
package = pkgs.libsForQt5.breeze-qt5;
};
};
qt = {
enable = true;
style.name = "breeze";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
};
services.openssh.enable = true;
}

View file

@ -0,0 +1,75 @@
{
inputs,
config,
pkgs,
...
}:
{
imports = [
../_base
./hardware-configuration.nix
../../modules/sddm.nix
../../modules/bash.nix
../../modules/kitty.nix
../../modules/git.nix
../../modules/direnv.nix
../../modules/firefox.nix
../../modules/nvim
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "kalle-laptop";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Amsterdam";
services.xserver = {
enable = true;
xkb.layout = "us";
xkb.options = "eurosign:e,caps:escape";
};
# Disable firewall.
networking.firewall.enable = false;
home-manager.users.kalle = {
home.packages = with pkgs; [
discord
vesktop
firefox
chromium
httpie
kate
dolphin
ark
rustup
gcc
pavucontrol
difftastic
sops
obsidian
cachix
];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
}

167
hosts/kalle-pc/default.nix Normal file
View file

@ -0,0 +1,167 @@
{
inputs,
config,
pkgs,
...
}:
{
imports = [
../_base
./hardware-configuration.nix
./hardware-configuration.override.nix
../../modules/sddm.nix
../../modules/hyprland.nix
../../modules/hyprpaper.nix
../../modules/bash.nix
../../modules/kitty.nix
../../modules/git.nix
../../modules/direnv.nix
../../modules/firefox.nix
../../modules/steam.nix
../../modules/nvim
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.btrfs.autoScrub.enable = true;
networking.hostName = "kalle-pc";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Amsterdam";
services.xserver = {
enable = true;
xkb.layout = "us";
};
services.gvfs.enable = true;
# Allow flashing ZSA keyboards
hardware.keyboard.zsa.enable = true;
# No need for firewall, since this machine is always at home
networking.firewall.enable = false;
hyprland =
let
mod = "SUPER";
uwsm = "${pkgs.uwsm}/bin/uwsm";
mkUwsmApp = pkg: name: "${uwsm} app -- ${pkg}/share/applications/${name}.desktop";
in
{
mod = mod;
primaryMonitor = "DP-2";
monitors = [
{
name = "DP-2";
width = 1920;
height = 1080;
refreshRate = 144;
x = 0;
y = 1080;
vrr = 1;
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
x = 1500;
y = 0;
}
{
name = "HDMI-A-2";
width = 1920;
height = 1080;
x = 1920;
y = 1080;
transform = 3;
}
];
autoStart = [
"${pkgs.ags}/bin/ags"
(mkUwsmApp pkgs.firefox "firefox")
(mkUwsmApp pkgs.discord "discord")
];
binds = {
"${mod}, return" = "exec, ${mkUwsmApp pkgs.kitty "kitty"}";
"${mod}, E" = "exec, ${pkgs.ulauncher}/bin/ulauncher-toggle #wofi --show drun";
"${mod}, Print" = "exec, ${pkgs.bash}/bin/bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
# Clipboard history
# bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
};
sensitivity = 0.1;
layerRules = {
"gtk-layer-shell" = [
"blur"
"ignorezero"
];
"notifications2" = [
"noanim"
"blur"
"ignorezero"
];
};
windowRules = {
# Auto workspace
firefox = [ "workspace 1 silent" ];
discord = [ "workspace name:HDMI-A-2" ];
};
windowRulesV2 = {
# ULauncher
"class:^(ulauncher)$" = [
"dimaround"
];
};
};
hyprpaper.wallpaperFolder = "/home/kalle/Pictures/Wallpapers";
home-manager.users.kalle = {
home.packages = with pkgs; [
discord
discord-canary
vesktop
chromium
httpie
kate
dolphin
ark
rustup
gcc
prismlauncher
pavucontrol
difftastic
sops
unzip
vlc
feishin
cachix
];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home-manager.users.kalle.home.stateVersion = "23.05"; # Please read the comment before changing.
}

View file

@ -0,0 +1,68 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/23F6-1045";
fsType = "vfat";
};
fileSystems."/swap" = {
device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (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
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp35s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,11 +1,20 @@
{ config, lib, pkgs, modulesPath, ...}:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
fileSystems = {
# Extra filesystem configs to enable compression.
"/".options = [ "compress=zstd" ];
"/home".options = [ "compress=zstd" ];
"/nix".options = [ "compress=zstd" "noatime" ];
"/nix".options = [
"compress=zstd"
"noatime"
];
"/swap".options = [ "noatime" ];
# Mount other drives

View file

@ -1,311 +0,0 @@
{
inputs,
lib,
config,
pkgs,
...
}:
{
options =
let
inherit (lib) mkOption types;
in
{
hyprland = {
mod = mkOption {
type = types.str;
default = "SUPER";
};
autoStart = mkOption {
type = types.listOf types.str;
default = [ ];
};
primaryMonitor = mkOption {
type = types.str;
};
monitors = mkOption {
type = types.listOf (
types.submodule {
options = {
name = mkOption {
type = types.str;
};
width = mkOption {
type = types.int;
};
height = mkOption {
type = types.int;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
transform = mkOption {
type = types.int;
default = 0;
};
vrr = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
};
}
);
default = [ ];
};
environment = mkOption {
type = types.attrsOf types.str;
default = { };
};
sensitivity = mkOption {
type = types.float;
default = 0.0;
};
keyboard = {
layout = mkOption {
type = types.str;
default = "us";
};
variant = mkOption {
type = types.str;
default = "";
};
options = mkOption {
type = types.str;
default = "";
};
};
layout = mkOption { type = types.str; };
layerRules = mkOption {
type = types.attrsOf (types.listOf types.str);
default = { };
};
windowRules = mkOption {
type = types.attrsOf (types.listOf types.str);
default = { };
};
windowRulesV2 = mkOption {
type = types.attrsOf (types.listOf types.str);
default = { };
};
binds = mkOption {
type = types.attrsOf types.str;
default = { };
};
mouseBinds = mkOption {
type = types.attrsOf types.str;
default = { };
};
};
};
config =
let
cfg = config.hyprland;
in
{
home.packages = with pkgs; [
wl-clipboard
cliphist
ulauncher
];
wayland.windowManager.hyprland = {
enable = true;
settings = {
monitor =
map (
m:
let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
vrr = if m.vrr != 0 then ",vrr,${toString m.vrr}" else "";
transform = if m.transform != 0 then ",transform,${toString m.transform}" else "";
in
"${m.name},${if m.enabled then "${resolution},${position},1${vrr}${transform}" else "disable"}"
) (cfg.monitors)
# Automatically detect newly connected monitors
++ [ ",preferred,auto,auto" ];
exec-once = [
"${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store"
"${pkgs.ulauncher}/bin/ulauncher --no-window-shadow --hide-window"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
# kde-connect (somehow, wasnt working well last time)
] ++ cfg.autoStart;
env = lib.mapAttrsToList (k: v: "${toString k},${v}") cfg.environment;
input = {
kb_layout = cfg.keyboard.layout;
kb_variant = cfg.keyboard.variant;
kb_options = cfg.keyboard.options;
follow_mouse = 1;
touchpad = {
natural_scroll = "yes";
};
sensitivity = cfg.sensitivity;
accel_profile = "flat";
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = cfg.layout;
};
misc = {
force_default_wallpaper = 2;
};
decoration = {
rounding = 5;
blur = {
enabled = "yes";
size = 3;
passes = 1;
new_optimizations = "on";
};
# drop_shadow = "yes";
# shadow_range = 4;
# shadow_render_power = 3;
# "col.shadow" = "rgba(1a1a1aee)";
};
gestures = {
workspace_swipe = "on";
};
animations = {
enabled = "yes";
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = [
"myBezier, 0.05, 0.9, 0.1, 1.05"
];
animation = [
"windows, 1, 3, myBezier"
"windowsOut, 1, 3, default, popin 80%"
"border, 1, 5, default"
"borderangle, 1, 4, default"
"fade, 1, 3, default"
"workspaces, 1, 2, default"
];
};
layerrule =
let
y = ident: value: "${value},${ident}";
x = ident: values: map (y ident) values;
in
lib.flatten (lib.mapAttrsToList x cfg.layerRules);
workspace =
let
# Create one work space for each non primary monitor
perMonitorWorkspaces = map (m: "name:${m.name}, monitor:${m.name}") (
lib.filter (m: m.name != cfg.primaryMonitor) cfg.monitors
);
# Create 10 work spaces on the primary monitor
primaryMonitorWorkspaces = map (i: "${toString i}, monitor:${cfg.primaryMonitor}") (lib.range 1 10);
in
primaryMonitorWorkspaces ++ perMonitorWorkspaces;
bind =
let
# Create binds to switch workspaces and move windows between them
workspaceBinds = lib.flatten (
map (
i:
let
k = if i == 10 then 0 else i;
in
[
"${cfg.mod}, ${toString k}, workspace, ${toString i}"
"${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}"
]
) (lib.range 1 10)
);
# Create binds to manage wiwdows
windowManagementBinds = [
"${cfg.mod} SHIFT, Q, killactive"
"${cfg.mod}, F, togglefloating"
"${cfg.mod} SHIFT, F, fullscreen"
];
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.binds;
in
configBinds ++ workspaceBinds ++ windowManagementBinds;
bindm =
let
windowManagementBinds = [
"${cfg.mod}, mouse:272, movewindow"
"${cfg.mod}, mouse:273, resizewindow"
];
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.mouseBinds;
in
configBinds ++ windowManagementBinds;
windowrule =
let
y = ident: value: "${value},${ident}";
x = ident: values: map (y ident) values;
in
lib.flatten (lib.mapAttrsToList x cfg.windowRules);
windowrulev2 =
let
y = ident: value: "${value},${ident}";
x = ident: values: map (y ident) values;
in
lib.flatten (lib.mapAttrsToList x cfg.windowRulesV2);
};
};
};
}

View file

@ -1,59 +0,0 @@
{ inputs
, lib
, config
, pkgs
, ...
}:
{
options =
let
inherit (lib) mkOption types;
in
{
hyprpaper = {
wallpaperFolder = mkOption {
type = types.str;
};
};
};
config =
let
cfg = config.hyprpaper;
hyprlandCfg = config.hyprland;
changeWallpaperScript =
pkgs.writeShellScriptBin
"change-wallpaper"
(lib.concatStringsSep
"\n"
(lib.flatten
(map
(m:
let
output = m.name;
wallpaper = "\"$(${pkgs.findutils}/bin/find -L \"${cfg.wallpaperFolder}\" -type f | ${pkgs.coreutils}/bin/shuf -n 1)\"";
in
[
"wallpaper=${wallpaper}"
"${pkgs.hyprland}/bin/hyprctl hyprpaper preload $wallpaper"
"${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ${output},$wallpaper"
]
)
hyprlandCfg.monitors)
++ [ "${pkgs.hyprland}/bin/hyprctl hyprpaper unload all" ])
);
in
{
hyprland.autoStart = [
"${pkgs.hyprpaper}/bin/hyprpaper"
"sleep 2; ${changeWallpaperScript}/bin/change-wallpaper"
];
home.packages = with pkgs; [
hyprpaper
changeWallpaperScript
];
};
}

15
modules/ags/default.nix Normal file
View file

@ -0,0 +1,15 @@
{
inputs,
...
}:
{
home-manager.users.kalle = {
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags = {
enable = true;
configDir = ./config;
};
};
}

38
modules/bash.nix Normal file
View file

@ -0,0 +1,38 @@
{
pkgs,
...
}:
{
home-manager.users.kalle = {
programs.bash = {
enable = true;
shellAliases = {
# Git aliases
gg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all";
gca = "git add -A; git commit -a --amend --no-edit";
gs = "git status";
# Replace some commands with better versions
diff = "${pkgs.difftastic}/bin/difft";
};
initExtra = ''
function open() {
xdg-open $@ &> /dev/null &
}
'';
};
programs.starship = {
enable = true;
settings = {
add_newline = true;
# Remove text from nix shell component
nix_shell.format = "via [$symbol]($style) ";
git_status.disabled = true;
package.disabled = true;
};
};
};
}

10
modules/direnv.nix Normal file
View file

@ -0,0 +1,10 @@
{
...
}:
{
home-manager.users.kalle.programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
}

11
modules/firefox.nix Normal file
View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home-manager.users.kalle.programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.plasma-browser-integration ];
};
}

15
modules/git.nix Normal file
View file

@ -0,0 +1,15 @@
{
...
}:
{
home-manager.users.kalle.programs.git = {
enable = true;
userName = "Kalle Struik";
userEmail = "kalle@kallestruik.nl";
difftastic.enable = true;
extraConfig = {
init.defaultBranch = "main";
};
};
}

293
modules/hyprland.nix Normal file
View file

@ -0,0 +1,293 @@
{
inputs,
pkgs,
lib,
config,
...
}:
{
options =
let
inherit (lib) mkOption types;
in
{
hyprland = {
mod = mkOption {
type = types.str;
default = "SUPER";
};
primaryMonitor = mkOption {
type = types.str;
};
monitors = mkOption {
type = types.listOf (
types.submodule {
options = {
name = mkOption {
type = types.str;
};
width = mkOption {
type = types.int;
};
height = mkOption {
type = types.int;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
transform = mkOption {
type = types.int;
default = 0;
};
vrr = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
};
}
);
default = [ ];
};
autoStart = mkOption {
type = types.listOf types.str;
default = [ ];
};
sensitivity = mkOption {
type = types.float;
default = 0.0;
};
layerRules = mkOption {
type = types.attrsOf (types.listOf types.str);
default = { };
};
windowRules = mkOption {
type = types.attrsOf (types.listOf types.str);
default = { };
};
windowRulesV2 = mkOption {
type = types.attrsOf (types.listOf types.str);
default = { };
};
binds = mkOption {
type = types.attrsOf types.str;
default = { };
};
};
};
config =
let
cfg = config.hyprland;
in
{
nix.settings = {
substituters = [
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
programs.hyprland = {
enable = true;
withUWSM = true;
package = inputs.hyprland.packages.x86_64-linux.hyprland;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
environment.systemPackages = with pkgs; [
grim # For xdg-desktop-portal-hyprland which does not declare this dependency
slurp # Some for this one
];
home-manager.users.kalle = {
home.packages = with pkgs; [
wl-clipboard
cliphist
ulauncher
];
wayland.windowManager.hyprland = {
enable = true;
# Disable systemd integration since we are using UWSM
systemd.enable = false;
settings = {
monitor =
map (
m:
let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
vrr = if m.vrr != 0 then "vrr,${toString m.vrr}" else "";
transform = if m.transform != 0 then "transform,${toString m.transform}" else "";
in
"${m.name},${if m.enabled then "${resolution},${position},1,${vrr}${transform}" else "disable"}"
) (cfg.monitors)
# Automatically detect newly connected monitors
++ [ ",preferred,auto,auto" ];
# TODO: Make these start via UWSM
exec-once = [
"${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store"
"${pkgs.ulauncher}/bin/ulauncher --no-window-shadow --hide-window"
# TODO: Replace this with hyprland's polkit agent
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
] ++ cfg.autoStart;
env = [
"XCURSOR_SIZE,24"
];
input = {
kb_layout = "us";
kb_variant = "";
kb_options = "";
follow_mouse = 1;
touchpad = {
natural_scroll = "yes";
};
sensitivity = cfg.sensitivity;
accel_profile = "flat";
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
# TODO: Make this use system color scheme
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
};
misc.force_default_wallpaper = 1;
decoration = {
rounding = 5;
blur = {
enabled = "yes";
size = 3;
passes = 1;
new_optimizations = "on";
};
};
animations = {
enabled = "yes";
bezier = [
"myBezier, 0.05, 0.9, 0.1, 1.05"
];
animation = [
"windows, 1, 3, myBezier"
"windowsOut, 1, 3, default, popin 80%"
"border, 1, 5, default"
"borderangle, 1, 4, default"
"fade, 1, 3, default"
"workspaces, 1, 2, default"
];
};
layerrule =
let
y = ident: value: "${value},${ident}";
x = ident: values: map (y ident) values;
in
lib.flatten (lib.mapAttrsToList x cfg.layerRules);
workspace =
let
# Create one work space for each non primary monitor
perMonitorWorkspaces = map (m: "name:${m.name}, monitor:${m.name}") (
lib.filter (m: m.name != cfg.primaryMonitor) cfg.monitors
);
# Create 10 work spaces on the primary monitor
primaryMonitorWorkspaces = map (i: "${toString i}, monitor:${cfg.primaryMonitor}") (lib.range 1 10);
in
primaryMonitorWorkspaces ++ perMonitorWorkspaces;
bind =
let
# Create binds to switch workspaces and move windows between them
workspaceBinds = lib.flatten (
map (
i:
let
k = if i == 10 then 0 else i;
in
[
"${cfg.mod}, ${toString k}, workspace, ${toString i}"
"${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}"
]
) (lib.range 1 10)
);
# Create binds to manage windows
windowManagementBinds = [
"${cfg.mod} SHIFT, Q, killactive"
"${cfg.mod}, F, togglefloating"
"${cfg.mod} SHIFT, F, fullscreen"
];
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.binds;
in
configBinds ++ workspaceBinds ++ windowManagementBinds;
bindm = [
"${cfg.mod}, mouse:272, movewindow"
"${cfg.mod}, mouse:273, resizewindow"
];
windowrule =
let
y = ident: value: "${value},${ident}";
x = ident: values: map (y ident) values;
in
lib.flatten (lib.mapAttrsToList x cfg.windowRules);
windowrulev2 =
let
y = ident: value: "${value},${ident}";
x = ident: values: map (y ident) values;
in
lib.flatten (lib.mapAttrsToList x cfg.windowRulesV2);
};
};
};
};
}

58
modules/hyprpaper.nix Normal file
View file

@ -0,0 +1,58 @@
{
lib,
config,
pkgs,
...
}:
{
options =
let
inherit (lib) mkOption types;
in
{
hyprpaper = {
wallpaperFolder = mkOption {
type = types.str;
};
};
};
config =
let
cfg = config.hyprpaper;
hyprlandCfg = config.hyprland;
changeWallpaperScript = pkgs.writeShellScriptBin "change-wallpaper" (
lib.concatStringsSep "\n" (
lib.flatten (
map (
m:
let
output = m.name;
wallpaper = "\"$(${pkgs.findutils}/bin/find -L \"${cfg.wallpaperFolder}\" -type f | ${pkgs.coreutils}/bin/shuf -n 1)\"";
in
[
"wallpaper=${wallpaper}"
"${pkgs.hyprland}/bin/hyprctl hyprpaper preload $wallpaper"
"${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ${output},$wallpaper"
]
) hyprlandCfg.monitors
)
++ [ "${pkgs.hyprland}/bin/hyprctl hyprpaper unload all" ]
)
);
in
{
hyprland.autoStart = [
"${pkgs.hyprpaper}/bin/hyprpaper"
"sleep 2; ${changeWallpaperScript}/bin/change-wallpaper"
];
home-manager.users.kalle.home.packages = with pkgs; [
hyprpaper
changeWallpaperScript
];
};
}

14
modules/kitty.nix Normal file
View file

@ -0,0 +1,14 @@
{
...
}:
{
home-manager.users.kalle.programs.kitty = {
enable = true;
themeFile = "Catppuccin-Mocha";
settings = {
background_opacity = "0.8";
allow_remote_control = true;
enable_audio_bell = false;
};
};
}

View file

@ -1,13 +1,15 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}:
{
programs.neovim =
nixpkgs = {
overlays = with outputs.overlays; [ nvim-plugins ];
};
home-manager.users.kalle.programs.neovim =
let
toLua = str: "lua << EOF\n${str}\nEOF\n";
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";

6
modules/plasma.nix Normal file
View file

@ -0,0 +1,6 @@
{
...
}:
{
services.xserver.desktopManager.plasma6.enable = true;
}

6
modules/sddm.nix Normal file
View file

@ -0,0 +1,6 @@
{
...
}:
{
services.displayManager.sddm.enable = true;
}

34
modules/steam.nix Normal file
View file

@ -0,0 +1,34 @@
{
pkgs,
...
}:
{
programs.steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs =
pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
];
extraLibraries =
pkgs: with pkgs; [
gperftools # Needed for tf2 to work
];
};
};
environment.systemPackages = with pkgs; [
gamescope
pkgsi686Linux.gperftools # Needed for tf2
];
}

View file

@ -1,117 +0,0 @@
{ inputs
, config
, pkgs
, ...
}:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "kalle-laptop";
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable the X11 windowing system.
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma6.enable = true;
# Configure keymap in X11
xkb = {
layout = "us";
options = "eurosign:e,caps:escape";
};
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.kalle = {
isNormalUser = true;
group = "kalle";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
users.groups.kalle.gid = 1000;
environment.systemPackages = with pkgs; [
xdg-user-dirs
];
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-color-emoji
fira-code
fira-code-symbols
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
fontconfig = {
defaultFonts = {
serif = [ "Noto Serif" "Symbols Nerd Font" ];
sansSerif = [ "Noto Sans" "Symbols Nerd Font" ];
monospace = [ "Fira Code" "Symbols Nerd Font Mono" ];
};
};
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Disable firewall.
networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}

View file

@ -1,183 +0,0 @@
{
inputs,
config,
pkgs,
...
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./hardware-configuration.override.nix
# inputs.nixos-cosmic.nixosModules.default
];
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
# Allow me to use cachix
trusted-users = [
"root"
"kalle"
];
substituters = [
"https://hyprland.cachix.org"
"https://cosmic.cachix.org/"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
};
services.btrfs.autoScrub.enable = true;
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "kalle-pc";
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable the X11 windowing system.
services.displayManager.sddm.enable = true;
services.xserver = {
enable = true;
xkb.layout = "us";
};
# services.desktopManager.cosmic.enable = true;
# services.displayManager.cosmic-greeter.enable = true;
# Allow flashing ZSA keyboards
hardware.keyboard.zsa.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.x86_64-linux.hyprland;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.kalle = {
isNormalUser = true;
group = "kalle";
extraGroups = [
"wheel"
"dialout"
]; # Enable sudo for the user.
};
users.groups.kalle.gid = 1000;
environment.systemPackages = with pkgs; [
xdg-user-dirs
grim # For xdg-desktop-portal-hyprland which does not declare this dependency
slurp # Some for this one
gamescope
pkgsi686Linux.gperftools # Needed for tf2
];
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
fira-code
fira-code-symbols
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
fontconfig = {
defaultFonts = {
serif = [
"Noto Serif"
"Symbols Nerd Font"
];
sansSerif = [
"Noto Sans"
"Symbols Nerd Font"
];
monospace = [
"Fira Code"
"Symbols Nerd Font Mono"
];
};
};
};
# Steam needs to be installed on system level, because reasons
programs.steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs =
pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
];
extraLibraries =
pkgs: with pkgs; [
gperftools # Needed for tf2 to work
];
};
};
services.gvfs.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Disable firewall.
networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}

View file

@ -1,56 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/23F6-1045";
fsType = "vfat";
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (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
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp35s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,38 +0,0 @@
{ inputs
, lib
, config
, pkgs
, ...
}:
{
programs.tmux = {
enable = true;
keyMode = "vi";
mouse = true;
baseIndex = 1;
escapeTime = 20;
terminal = "tmux-256color";
historyLimit = 100000;
plugins = with pkgs.tmuxPlugins;
[
better-mouse-mode
catppuccin
];
extraConfig = ''
# Use catppuccin-mocha theme.
set -g @catppuccin_flavour 'mocha'
# Other catppuccin settigns.
set -g @catppuccin_window_default_text "#{window_name}"
# Don't leave gaps inDon't leave gaps in window numbers.
set -g renumber-windows on
# Vim keys for pane navigation.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
'';
};
}