readd common components
This commit is contained in:
parent
a10f8af167
commit
def3826dd5
20 changed files with 832 additions and 267 deletions
48
common/firefox.nix
Normal file
48
common/firefox.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ inputs, pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && firefox.enable) {
|
||||||
|
environment.systemPackages = []
|
||||||
|
++ lib.optionals config.services.desktopManager.plasma6.enable [ pkgs.plasma-browser-integration ];
|
||||||
|
|
||||||
|
programs.firefox = {
|
||||||
|
# package = grimm-shared-inputs.ff_nightly.packages.${pkgs.system}.firefox-nightly-bin;
|
||||||
|
enable = true;
|
||||||
|
nativeMessagingHosts.packages = []
|
||||||
|
++ lib.optionals (cfg.tooling.enable && cfg.tooling.pass) [ pkgs.passff-host ];
|
||||||
|
languagePacks = [ "de" "en-US" ];
|
||||||
|
policies = {
|
||||||
|
ExtensionSettings = lib.mkMerge [
|
||||||
|
(lib.mkIf cfg.firefox.disableUserPlugins {
|
||||||
|
"*".installation_mode = "blocked";
|
||||||
|
} )
|
||||||
|
(lib.mapAttrs (guid: shortId: { # explicit plugins by config
|
||||||
|
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
} ) cfg.firefox.plugins )
|
||||||
|
(lib.mkIf (cfg.tooling.enable && cfg.tooling.pass) { # password-store support
|
||||||
|
"passff@invicem.pro" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/passff/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
};
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableFirefoxAccounts = true;
|
||||||
|
DisableAccounts = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
47
common/gaming.nix
Normal file
47
common/gaming.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && gaming) {
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
gamescopeSession.env = {
|
||||||
|
DRI_PRIME = "1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gamemode = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
inhibit_screensaver=0;
|
||||||
|
renice = 10;
|
||||||
|
};
|
||||||
|
custom = {
|
||||||
|
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||||||
|
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.udev.packages = [ pkgs.wooting-udev-rules ];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
GAMEMODERUNEXEC="env DRI_PRIME=1";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
heroic
|
||||||
|
prismlauncher
|
||||||
|
wootility
|
||||||
|
(pkgs.symlinkJoin {
|
||||||
|
name = "osu";
|
||||||
|
paths = [
|
||||||
|
(pkgs.writeShellScriptBin "osu!" ''exec gamemoderun ${pkgs.osu-lazer-bin}/bin/'osu!'
|
||||||
|
'')
|
||||||
|
pkgs.osu-lazer-bin
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
29
common/localisation.nix
Normal file
29
common/localisation.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && locale) {
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
|
LC_NAME = "de_DE.UTF-8";
|
||||||
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
console.keyMap = "de";
|
||||||
|
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "de";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
29
common/networking.nix
Normal file
29
common/networking.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(with cfg; lib.mkIf (enable && network) {
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wireguard-tools
|
||||||
|
bluetuith
|
||||||
|
];
|
||||||
|
})
|
||||||
|
(with cfg; lib.mkIf (enable && network && graphical) {
|
||||||
|
services.blueman.enable = true;
|
||||||
|
})
|
||||||
|
(with cfg; lib.mkIf (enable && network && sound) {
|
||||||
|
systemd.user.services.mpris-proxy = {
|
||||||
|
description = "Mpris proxy";
|
||||||
|
after = [ "network.target" "sound.target" ];
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
29
common/opengl.nix
Normal file
29
common/opengl.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && graphical) {
|
||||||
|
# Enable OpenGL
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
extraPackages = with pkgs; [];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
__GL_LOG_MAX_ANISO = "0";
|
||||||
|
__GL_SHADER_DISK_CACHE = "1";
|
||||||
|
__GL_SYNC_TO_VBLANK = "0";
|
||||||
|
__GL_THREADED_OPTIMIZATIONS = "1";
|
||||||
|
__GL_VRR_ALLOWED = "1";
|
||||||
|
# MESA_LOADER_DRIVER_OVERRIDE="zink";
|
||||||
|
# FLATPAK_GL_DRIVERS="mesa-git";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
glfw
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
28
common/pass.nix
Normal file
28
common/pass.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && tooling.enable && tooling.pass) {
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mkpasswd
|
||||||
|
pinentry
|
||||||
|
gnupg
|
||||||
|
pass
|
||||||
|
libsecret
|
||||||
|
(writeShellScriptBin "passw" "pass $@")
|
||||||
|
] ++ lib.optionals cfg.graphical [
|
||||||
|
lxqt.lxqt-policykit
|
||||||
|
];
|
||||||
|
|
||||||
|
services.passSecretService.enable = true;
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
settings = {
|
||||||
|
# default-cache-ttl = 6000;
|
||||||
|
};
|
||||||
|
pinentryPackage = lib.mkForce pkgs.pinentry;
|
||||||
|
enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
common/portals.nix
Normal file
22
common/portals.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && portals) {
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal-wlr
|
||||||
|
xdg-desktop-portal-kde
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
XDG_CONFIG_HOME = "$HOME/.config";
|
||||||
|
FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.fontDir.enable = true;
|
||||||
|
};
|
||||||
|
}
|
20
common/printing.nix
Normal file
20
common/printing.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && printing) {
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
services.printing.drivers = with pkgs; [ brgenml1lpr brgenml1cupswrapper ];
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
services.printing.cups-pdf.enable = true;
|
||||||
|
hardware.sane.brscan4.enable = true; # enables support for SANE scanners
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
skanpage
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
24
common/sound.nix
Normal file
24
common/sound.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ grimm-shared-inputs, pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && sound) {
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true; # osu uses jack
|
||||||
|
lowLatency.enable = true;
|
||||||
|
systemWide = true; # required for spotifyd as spotifyd runs as the spotifyd user
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pavucontrol
|
||||||
|
playerctl
|
||||||
|
pulseaudio
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
190
common/sway-defaults.nix
Normal file
190
common/sway-defaults.nix
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
{ inputs, system, pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
swaymux_pkg = inputs.swaymux.packages."${system}".default;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && sway.enable && sway.populateDefaultConfig ) {
|
||||||
|
environment.systemPackages = (with pkgs; [
|
||||||
|
alacritty
|
||||||
|
wmenu
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
])
|
||||||
|
++ [ swaymux_pkg ];
|
||||||
|
|
||||||
|
grimmShared.sway = {
|
||||||
|
definitions = {
|
||||||
|
mod = "Mod4";
|
||||||
|
left = "h";
|
||||||
|
down = "j";
|
||||||
|
up = "k";
|
||||||
|
right = "l";
|
||||||
|
term = "alacritty";
|
||||||
|
menu = "dmenu_path | wmenu | xargs swaymsg exec --";
|
||||||
|
|
||||||
|
primecol = "#8800FF";
|
||||||
|
accentcol = "#5700a0";
|
||||||
|
splitcol = "#69507f";
|
||||||
|
actsplitcol = "#cd97fc";
|
||||||
|
darkcol = "#202020";
|
||||||
|
urgentcol = "#9e3c3c";
|
||||||
|
realwhite = "#C7D3E3";
|
||||||
|
};
|
||||||
|
keybinds = {
|
||||||
|
"$mod+d" = "exec $menu";
|
||||||
|
"$mod+Shift+s" = ''exec grim -g "$(slurp -d)" - | wl-copy'';
|
||||||
|
"$mod+Return" = "exec $term";
|
||||||
|
"$mod+Shift+q" = "kill";
|
||||||
|
"$mod+Shift+c" = "reload";
|
||||||
|
"$mod+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
||||||
|
|
||||||
|
# Move your focus around
|
||||||
|
"$mod+$left" = "focus left";
|
||||||
|
"$mod+$down" = "focus down";
|
||||||
|
"$mod+$up" = "focus up";
|
||||||
|
"$mod+$right" = "focus right";
|
||||||
|
# Or use $mod+[up|down|left|right]
|
||||||
|
"$mod+Left" = "focus left";
|
||||||
|
"$mod+Down" = "focus down";
|
||||||
|
"$mod+Up" = "focus up";
|
||||||
|
"$mod+Right" = "focus right";
|
||||||
|
|
||||||
|
# Move the focused window with the same, but add Shift
|
||||||
|
"$mod+Shift+$left" = "move left";
|
||||||
|
"$mod+Shift+$down" = "move down";
|
||||||
|
"$mod+Shift+$up" = "move up";
|
||||||
|
"$mod+Shift+$right" = "move right";
|
||||||
|
# Ditto, with arrow keys
|
||||||
|
"$mod+Shift+Left" = "move left";
|
||||||
|
"$mod+Shift+Down" = "move down";
|
||||||
|
"$mod+Shift+Up" = "move up";
|
||||||
|
"$mod+Shift+Right" = "move right";
|
||||||
|
#
|
||||||
|
# Workspaces:
|
||||||
|
#
|
||||||
|
# Switch to workspace
|
||||||
|
"$mod+1" = "workspace number 1";
|
||||||
|
"$mod+2" = "workspace number 2";
|
||||||
|
"$mod+3" = "workspace number 3";
|
||||||
|
"$mod+4" = "workspace number 4";
|
||||||
|
"$mod+5" = "workspace number 5";
|
||||||
|
"$mod+6" = "workspace number 6";
|
||||||
|
"$mod+7" = "workspace number 7";
|
||||||
|
"$mod+8" = "workspace number 8";
|
||||||
|
"$mod+9" = "workspace number 9";
|
||||||
|
"$mod+0" = "workspace number 10";
|
||||||
|
# Move focused container to workspace
|
||||||
|
"$mod+Shift+1" = "move container to workspace number 1";
|
||||||
|
"$mod+Shift+2" = "move container to workspace number 2";
|
||||||
|
"$mod+Shift+3" = "move container to workspace number 3";
|
||||||
|
"$mod+Shift+4" = "move container to workspace number 4";
|
||||||
|
"$mod+Shift+5" = "move container to workspace number 5";
|
||||||
|
"$mod+Shift+6" = "move container to workspace number 6";
|
||||||
|
"$mod+Shift+7" = "move container to workspace number 7";
|
||||||
|
"$mod+Shift+8" = "move container to workspace number 8";
|
||||||
|
"$mod+Shift+9" = "move container to workspace number 9";
|
||||||
|
"$mod+Shift+0" = "move container to workspace number 10";
|
||||||
|
# Note: workspaces can have any name you want, not just numbers.
|
||||||
|
# We just use 1-10 as the default.
|
||||||
|
#
|
||||||
|
# Layout stuff:
|
||||||
|
#
|
||||||
|
# You can "split" the current object of your focus with
|
||||||
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||||
|
# respectively.
|
||||||
|
"$mod+b" = "splith";
|
||||||
|
"$mod+v" = "splitv";
|
||||||
|
|
||||||
|
# Switch the current container between different layout styles
|
||||||
|
"$mod+s" = "layout stacking";
|
||||||
|
"$mod+w" = "layout tabbed";
|
||||||
|
"$mod+e" = "layout toggle split";
|
||||||
|
|
||||||
|
# Make the current focus fullscreen
|
||||||
|
"$mod+f" = "fullscreen";
|
||||||
|
|
||||||
|
# Toggle the current focus between tiling and floating mode
|
||||||
|
"$mod+Shift+space" = "floating toggle";
|
||||||
|
|
||||||
|
# Swap focus between the tiling area and the floating area
|
||||||
|
"$mod+space" = "focus mode_toggle";
|
||||||
|
|
||||||
|
# Move focus to the parent container
|
||||||
|
"$mod+a" = "focus parent";
|
||||||
|
|
||||||
|
"$mod+Shift+minus" = "move scratchpad";
|
||||||
|
"$mod+minus" = "scratchpad show";
|
||||||
|
|
||||||
|
"$mod+r" = ''mode "resize"'';
|
||||||
|
|
||||||
|
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||||
|
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||||
|
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||||
|
"XF86AudioNext" = "exec playerctl next";
|
||||||
|
"XF86AudioPrev" = "exec playerctl previous";
|
||||||
|
"$mod+c" = "exec swaymux";
|
||||||
|
};
|
||||||
|
autolaunch = [ # fixme: absolute paths
|
||||||
|
"blueman-applet"
|
||||||
|
"lxqt-policykit-agent"
|
||||||
|
"otd-daemon"
|
||||||
|
"dunst"
|
||||||
|
"systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP"
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
# fixme: wallpaper
|
||||||
|
output * bg ${./wallpapers/spain.jpg} fill
|
||||||
|
output HDMI-A-1 mode 1920x1080@60Hz position 0,0
|
||||||
|
for_window [app_id="lxqt-policykit-agent"] floating enable;
|
||||||
|
floating_modifier $mod normal
|
||||||
|
|
||||||
|
bar {
|
||||||
|
swaybar_command waybar
|
||||||
|
}
|
||||||
|
input type:keyboard xkb_numlock enabled
|
||||||
|
include /etc/sway/config.d/*
|
||||||
|
|
||||||
|
# Borders, gaps, titlebars, behavior
|
||||||
|
default_border pixel 3
|
||||||
|
default_floating_border pixel 3
|
||||||
|
gaps inner 5
|
||||||
|
titlebar_padding 5 5
|
||||||
|
|
||||||
|
#5Smart things
|
||||||
|
smart_gaps on
|
||||||
|
hide_edge_borders --i3 smart
|
||||||
|
|
||||||
|
|
||||||
|
input * {
|
||||||
|
xkb_layout "de"
|
||||||
|
}
|
||||||
|
|
||||||
|
for_window [app_id="swaymux"] floating enable
|
||||||
|
|
||||||
|
mode "resize" {
|
||||||
|
# left will shrink the containers width
|
||||||
|
# right will grow the containers width
|
||||||
|
# up will shrink the containers height
|
||||||
|
# down will grow the containers height
|
||||||
|
bindsym $left resize shrrnk width 10px
|
||||||
|
bindsym $down resize grow height 10px
|
||||||
|
bindsym $up resize shrink height 10px
|
||||||
|
bindsym $right resize grow width 10px
|
||||||
|
|
||||||
|
# Ditto, with arrow keys
|
||||||
|
bindsym Left resize shrink width 10px
|
||||||
|
bindsym Down resize grow height 10px
|
||||||
|
bindsym Up resize shrink height 10px
|
||||||
|
bindsym Right resize grow width 10px
|
||||||
|
|
||||||
|
# Return to default mode
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
# test
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
80
common/sway.nix
Normal file
80
common/sway.nix
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = let
|
||||||
|
build_definition_lines = lib.mapAttrsToList (name: value: "set \$${name} ${value}");
|
||||||
|
build_keybind_lines = lib.mapAttrsToList (key: value: "bindsym ${key} ${value}");
|
||||||
|
build_exec_lines = map (item: "exec " + item);
|
||||||
|
|
||||||
|
text = lib.strings.concatLines [
|
||||||
|
(lib.strings.concatLines (build_definition_lines cfg.sway.definitions))
|
||||||
|
(lib.strings.concatLines (build_keybind_lines cfg.sway.keybinds))
|
||||||
|
(lib.strings.concatLines (build_exec_lines cfg.sway.autolaunch))
|
||||||
|
cfg.sway.extraConfig
|
||||||
|
];
|
||||||
|
|
||||||
|
sway_conf = pkgs.writeText "sway.conf" text;
|
||||||
|
in with cfg; lib.mkIf (enable && sway.enable) {
|
||||||
|
environment.etc."sway.conf" = {
|
||||||
|
source = sway_conf;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
procps
|
||||||
|
slurp
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services.reload-sway = {
|
||||||
|
description = "Reload all running sway instances";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
script =''
|
||||||
|
for pid in $(${pkgs.procps}/bin/pgrep sway -x)
|
||||||
|
do
|
||||||
|
uid=$(id -u $(${pkgs.procps}/bin/ps -o user= -p $pid))
|
||||||
|
export SWAYSOCK="/run/user/$uid/sway-ipc.$uid.$pid.sock"
|
||||||
|
if [[ -e "$SWAYSOCK" ]] ; then
|
||||||
|
echo "sock is $SWAYSOCK"
|
||||||
|
${config.programs.sway.package}/bin/swaymsg reload
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
reloadTriggers = [ text ];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.waybar.enable = true;
|
||||||
|
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures = {
|
||||||
|
gtk = true;
|
||||||
|
base = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
swaylock
|
||||||
|
swayidle
|
||||||
|
wl-clipboard
|
||||||
|
wf-recorder
|
||||||
|
dmenu
|
||||||
|
wmenu
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
"--unsupported-gpu"
|
||||||
|
"--config"
|
||||||
|
"/etc/sway.conf"
|
||||||
|
];
|
||||||
|
extraSessionCommands = ''
|
||||||
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
# export MESA_LOADER_DRIVER_OVERRIDE="zink"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
106
common/toolchains.nix
Normal file
106
common/toolchains.nix
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
{ pkgs, config, lib, ... }: let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
config = with cfg; lib.mkIf (enable && tooling.enable) {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@")
|
||||||
|
(writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@")
|
||||||
|
(writeShellScriptBin "nix-referrers" "nix-store --query --referrers $@")
|
||||||
|
gcc
|
||||||
|
jdk17
|
||||||
|
python3
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
tea
|
||||||
|
acpi
|
||||||
|
|
||||||
|
fbcat
|
||||||
|
gomuks
|
||||||
|
gotop
|
||||||
|
ranger
|
||||||
|
nix-search-cli
|
||||||
|
|
||||||
|
wget
|
||||||
|
tree
|
||||||
|
file
|
||||||
|
util-linux
|
||||||
|
visualvm
|
||||||
|
ffmpeg-full
|
||||||
|
lm_sensors
|
||||||
|
imagemagick
|
||||||
|
pypy3
|
||||||
|
nmap
|
||||||
|
|
||||||
|
hyfetch
|
||||||
|
acpi
|
||||||
|
lshw
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
|
powertop
|
||||||
|
parted
|
||||||
|
] ++ lib.optionals cfg.graphical [
|
||||||
|
qdirstat
|
||||||
|
libva-utils
|
||||||
|
glxinfo
|
||||||
|
alacritty
|
||||||
|
vulkan-tools
|
||||||
|
pdfarranger
|
||||||
|
nomacs
|
||||||
|
gparted
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
config = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
credential.username = cfg.tooling.git_user;
|
||||||
|
core.editor = "${pkgs.neovim}/bin/nvim";
|
||||||
|
user.name = cfg.tooling.git_user;
|
||||||
|
user.email = cfg.tooling.git_email;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
historyLimit = 42000;
|
||||||
|
#keyMode = "vi";
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
viAlias = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
configure = {
|
||||||
|
customRC = ''
|
||||||
|
set number
|
||||||
|
set hidden
|
||||||
|
set fileencodings=utf-8
|
||||||
|
set nocompatible
|
||||||
|
set clipboard+=unnamedplus
|
||||||
|
if filereadable($HOME . "/.vimrc")
|
||||||
|
source ~/.vimrc
|
||||||
|
endif
|
||||||
|
'';
|
||||||
|
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
|
# loaded on launch
|
||||||
|
start = [
|
||||||
|
vim-nix
|
||||||
|
vim-scala
|
||||||
|
fugitive
|
||||||
|
];
|
||||||
|
|
||||||
|
# manually loadable by calling `:packadd $plugin-name`
|
||||||
|
opt = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.xonsh.enable = true;
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
programs.thefuck.enable = true;
|
||||||
|
};
|
||||||
|
}
|
BIN
common/wallpapers/spain.jpg
Normal file
BIN
common/wallpapers/spain.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 MiB |
BIN
common/wallpapers/switzerland.jpg
Normal file
BIN
common/wallpapers/switzerland.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 MiB |
|
@ -6,17 +6,10 @@
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./modules/fonts.nix
|
||||||
|
./modules/tabletdriver.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.system-features = [
|
|
||||||
"gccarch-icelake-client"
|
|
||||||
"kvm"
|
|
||||||
"big-parallel"
|
|
||||||
"benchmark"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
|
@ -45,7 +38,6 @@
|
||||||
};
|
};
|
||||||
sound = true;
|
sound = true;
|
||||||
graphical = true;
|
graphical = true;
|
||||||
gaming = true;
|
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = {
|
plugins = {
|
||||||
|
@ -70,13 +62,8 @@
|
||||||
platformTheme = "kde";
|
platformTheme = "kde";
|
||||||
};
|
};
|
||||||
|
|
||||||
age.identityPaths = [ "/home/grimmauld/.ssh/id_rsa" ];
|
|
||||||
|
|
||||||
networking.hostName = "grimmauld-nixos";
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
NIXPKGS_ALLOW_UNFREE="1";
|
NIXPKGS_ALLOW_UNFREE="1";
|
||||||
OMP_NUM_THREADS = "12";
|
|
||||||
MOZ_ENABLE_WAYLAND="1";
|
MOZ_ENABLE_WAYLAND="1";
|
||||||
# QT_QPA_PLATFORM="wayland-egl";
|
# QT_QPA_PLATFORM="wayland-egl";
|
||||||
OCI_CLI_RC_FILE="/home/grimmauld/.oci/config";
|
OCI_CLI_RC_FILE="/home/grimmauld/.oci/config";
|
||||||
|
@ -87,26 +74,6 @@
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# 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"; # "23.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
|
237
flake.lock
237
flake.lock
|
@ -56,22 +56,6 @@
|
||||||
"url": "https://flakehub.com/f/zhaofengli/attic/0.1.%2A.tar.gz"
|
"url": "https://flakehub.com/f/zhaofengli/attic/0.1.%2A.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cachix": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1635350005,
|
|
||||||
"narHash": "sha256-tAMJnUwfaDEB2aa31jGcu7R7bzGELM9noc91L2PbVjg=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "1c1f5649bb9c1b0d98637c8c365228f57126f361",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-20.09",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chaotic": {
|
"chaotic": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"attic": "attic",
|
"attic": "attic",
|
||||||
|
@ -94,11 +78,11 @@
|
||||||
"yafas": "yafas"
|
"yafas": "yafas"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710954445,
|
"lastModified": 1711229481,
|
||||||
"narHash": "sha256-vU2OGteZS6dMKZcu+btwsNN4HxIwhEb8dzP+h5NgKps=",
|
"narHash": "sha256-mugLPd8wlCx1s1PDv/sIFJq5xK3sycf+fROFHvE8boE=",
|
||||||
"owner": "chaotic-cx",
|
"owner": "chaotic-cx",
|
||||||
"repo": "nyx",
|
"repo": "nyx",
|
||||||
"rev": "2952a351037582a8aeb11be9cf57901d872bcf30",
|
"rev": "1520b69fa40d96c5e95b6e0da65831d3c7130fb0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -230,31 +214,6 @@
|
||||||
"url": "https://flakehub.com/f/nix-community/fenix/0.1.%2A.tar.gz"
|
"url": "https://flakehub.com/f/nix-community/fenix/0.1.%2A.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ff_nightly": {
|
|
||||||
"inputs": {
|
|
||||||
"cachix": "cachix",
|
|
||||||
"flake-compat": "flake-compat_2",
|
|
||||||
"lib-aggregate": "lib-aggregate",
|
|
||||||
"mozilla": "mozilla",
|
|
||||||
"nixpkgs": [
|
|
||||||
"shared",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710982600,
|
|
||||||
"narHash": "sha256-KC8V8aTUHZAORn0uJ5ENKkF8VIBvNmZvkF/O/nSaB1A=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-firefox-nightly",
|
|
||||||
"rev": "6778dc738c3a40a63df286005d44d2ddf5903e47",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-firefox-nightly",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -270,40 +229,9 @@
|
||||||
"url": "https://flakehub.com/f/edolstra/flake-compat/%2A.tar.gz"
|
"url": "https://flakehub.com/f/edolstra/flake-compat/%2A.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688025799,
|
|
||||||
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_3": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709336216,
|
"lastModified": 1709336216,
|
||||||
|
@ -353,24 +281,6 @@
|
||||||
"url": "https://flakehub.com/f/numtide/flake-utils/0.1.%2A.tar.gz"
|
"url": "https://flakehub.com/f/numtide/flake-utils/0.1.%2A.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710146030,
|
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -460,41 +370,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lib-aggregate": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils_2",
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710677371,
|
|
||||||
"narHash": "sha256-yqjXunc+Zvqf6rcH7W9wMvhr18jMZhDvIdnretlfj78=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "lib-aggregate",
|
|
||||||
"rev": "f890211817b941d9ed9de48d62ba8553fa2c20f3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "lib-aggregate",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mozilla": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1704373101,
|
|
||||||
"narHash": "sha256-+gi59LRWRQmwROrmE1E2b3mtocwueCQqZ60CwLG+gbg=",
|
|
||||||
"owner": "mozilla",
|
|
||||||
"repo": "nixpkgs-mozilla",
|
|
||||||
"rev": "9b11a87c0cc54e308fa83aac5b4ee1816d5418a2",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "mozilla",
|
|
||||||
"repo": "nixpkgs-mozilla",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"niri": {
|
"niri": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": [
|
"crane": [
|
||||||
|
@ -551,16 +426,15 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"shared",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711003080,
|
"lastModified": 1711242788,
|
||||||
"narHash": "sha256-YAycKYKMytiQe9L6yZuVcq/1rCFcDHIA6/G78oSofV8=",
|
"narHash": "sha256-6m6hw6uoIIvoAMR5RLhw7kGfNu3Govof9vnPAzveUgI=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "nix-gaming",
|
"repo": "nix-gaming",
|
||||||
"rev": "1e435616e688c2b9125cd5282febcad3ab981d5e",
|
"rev": "04028200841ec3b4ce163de4d136296d03123001",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -594,11 +468,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710806803,
|
"lastModified": 1711163522,
|
||||||
"narHash": "sha256-qrxvLS888pNJFwJdK+hf1wpRCSQcqA6W5+Ox202NDa0=",
|
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b06025f1533a1e07b6db3e75151caa155d1c7eb3",
|
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -609,21 +483,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710636348,
|
|
||||||
"narHash": "sha256-/kB+ZWSdkZjbZ0FTqm0u84sf2jFS+30ysaEajmBjtoY=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "fa827dda806c5aa98f454da4c567991ab8ce422c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-lib_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"dir": "lib",
|
||||||
"lastModified": 1709237383,
|
"lastModified": 1709237383,
|
||||||
|
@ -661,8 +520,9 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"chaotic": "chaotic",
|
"chaotic": "chaotic",
|
||||||
|
"nix-gaming": "nix-gaming",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"shared": "shared"
|
"swaymux": "swaymux"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
|
@ -709,34 +569,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"shared": {
|
|
||||||
"inputs": {
|
|
||||||
"ff_nightly": "ff_nightly",
|
|
||||||
"flake-compat": "flake-compat_3",
|
|
||||||
"nix-gaming": "nix-gaming",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"swaymux": "swaymux",
|
|
||||||
"utils": "utils"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"dirtyRev": "154b9aa8ec511edf7c3a62c94f5d04f5d070e36e-dirty",
|
|
||||||
"dirtyShortRev": "154b9aa-dirty",
|
|
||||||
"lastModified": 1710718492,
|
|
||||||
"narHash": "sha256-eonlerwNvoyXvtoLDQKtHXR/aP6pRX6YrbakcOfKY7Q=",
|
|
||||||
"type": "git",
|
|
||||||
"url": "file:///home/grimmauld/shared"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "file:///home/grimmauld/shared"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"swaymux": {
|
"swaymux": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"shared",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -784,54 +619,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_4"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710146030,
|
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"yafas": {
|
"yafas": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-schemas": [
|
"flake-schemas": [
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -13,14 +13,17 @@
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
shared = {
|
nix-gaming = {
|
||||||
# url = "git+https://git.grimmauld.de/Grimmauld/grimm-nix-shared";
|
url = "github:fufexan/nix-gaming";
|
||||||
url = "git+file:///home/grimmauld/shared";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
swaymux = {
|
||||||
|
url = "git+https://git.grimmauld.de/Grimmauld/swaymux";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, agenix, shared, nixpkgs, chaotic, ... }: let
|
outputs = inputs @ { self, swaymux, nix-gaming, agenix, nixpkgs, chaotic, ... }: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
@ -30,15 +33,16 @@
|
||||||
modules = [
|
modules = [
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
chaotic.nixosModules.default
|
chaotic.nixosModules.default
|
||||||
shared.nixosModules.default
|
inputs.nix-gaming.nixosModules.pipewireLowLatency
|
||||||
|
./load_common.nix
|
||||||
|
./specific/grimm-nixos-laptop.nix
|
||||||
|
|
||||||
# ./kernel.nix
|
# ./kernel.nix
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./modules/users.nix
|
./modules/users.nix
|
||||||
# ./modules/tlp.nix
|
# ./modules/tlp.nix
|
||||||
./modules/fonts.nix
|
|
||||||
./modules/screenshare_select.nix
|
./modules/screenshare_select.nix
|
||||||
./modules/spotify-tui.nix
|
./modules/spotify-tui.nix
|
||||||
./modules/tabletdriver.nix
|
|
||||||
./modules/xserver.nix
|
./modules/xserver.nix
|
||||||
./modules/system-packages.nix
|
./modules/system-packages.nix
|
||||||
./modules/kvm.nix
|
./modules/kvm.nix
|
||||||
|
|
138
load_common.nix
Normal file
138
load_common.nix
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
in {
|
||||||
|
options.grimmShared = {
|
||||||
|
enable = mkEnableOption "grimm-shared-common";
|
||||||
|
|
||||||
|
locale = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Sets german units but english language";
|
||||||
|
};
|
||||||
|
|
||||||
|
printing = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables print and scan related options";
|
||||||
|
};
|
||||||
|
|
||||||
|
portals = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables portals for wlr, gtk and kde as well as fixes fonts";
|
||||||
|
};
|
||||||
|
|
||||||
|
network = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables network manager, wifi and bluetooth";
|
||||||
|
};
|
||||||
|
|
||||||
|
tooling = {
|
||||||
|
enable = mkEnableOption "grimm-tooling";
|
||||||
|
|
||||||
|
pass = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Enables password-store, gnupg and such secret handling";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "Grimmauld";
|
||||||
|
description = "Username for git to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_email = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "${config.grimmShared.tooling.git_user}@grimmauld.de";
|
||||||
|
description = "Email for git to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sound = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "whether to enable sound";
|
||||||
|
};
|
||||||
|
|
||||||
|
graphical = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "whether to enable graphical components";
|
||||||
|
};
|
||||||
|
|
||||||
|
gaming = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "enables steam, heroic, prism and gamemoded";
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox = {
|
||||||
|
enable = mkEnableOption "grimm-firefox";
|
||||||
|
|
||||||
|
plugins = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
description = "set of plugins to install. Format: guid = short-id";
|
||||||
|
};
|
||||||
|
|
||||||
|
disableUserPlugins = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "disables user controlled plugins";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sway = {
|
||||||
|
enable = mkEnableOption "grimm-sway";
|
||||||
|
|
||||||
|
definitions = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
description = "set of definitions assigning variable to value";
|
||||||
|
};
|
||||||
|
|
||||||
|
keybinds = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
description = "set of keybinds assigning key combo to action";
|
||||||
|
};
|
||||||
|
|
||||||
|
autolaunch = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
description = "set of commands to be run at sway startup";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "additional sway config to be included";
|
||||||
|
};
|
||||||
|
|
||||||
|
populateDefaultConfig = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "puts my personal config in place using above methods";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./common/localisation.nix
|
||||||
|
./common/printing.nix
|
||||||
|
./common/portals.nix
|
||||||
|
./common/networking.nix
|
||||||
|
./common/toolchains.nix
|
||||||
|
./common/sound.nix
|
||||||
|
./common/opengl.nix
|
||||||
|
./common/gaming.nix
|
||||||
|
./common/firefox.nix
|
||||||
|
./common/pass.nix
|
||||||
|
./common/sway.nix
|
||||||
|
./common/sway-defaults.nix
|
||||||
|
];
|
||||||
|
}
|
17
specific/grimm-nixos-laptop.nix
Normal file
17
specific/grimm-nixos-laptop.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
imports = [ # Include the results of the hardware scan.
|
||||||
|
./grimm-nixos-laptop-hardware.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
age.identityPaths = [ "/home/grimmauld/.ssh/id_rsa" ];
|
||||||
|
|
||||||
|
networking.hostName = "grimmauld-nixos";
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
OMP_NUM_THREADS = "12";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
grimmShared.gaming = true;
|
||||||
|
}
|
Loading…
Reference in a new issue