Update sway config and flake.nix
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
{ lib, pkgs, localPackages, ... }: {
|
|
||||||
|
|
||||||
imports = [];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
curl
|
|
||||||
wget
|
|
||||||
git
|
|
||||||
killall
|
|
||||||
vim
|
|
||||||
eza
|
|
||||||
ripgrep
|
|
||||||
fzf
|
|
||||||
ncdu
|
|
||||||
btop
|
|
||||||
nil
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ lib, pkgs, localPackages, ... }: {
|
|
||||||
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; [
|
|
||||||
protonup-qt
|
|
||||||
vesktop
|
|
||||||
lutris
|
|
||||||
gamescope-old
|
|
||||||
wine
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{ lib, pkgs, localPackages, ... }: {
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; [
|
|
||||||
wl-clipboard
|
|
||||||
grim
|
|
||||||
slurp
|
|
||||||
swaybg
|
|
||||||
waybar
|
|
||||||
alacritty
|
|
||||||
kickoff
|
|
||||||
kickoff-dot-desktop
|
|
||||||
wayland-pipewire-idle-inhibit
|
|
||||||
firefox
|
|
||||||
mpv
|
|
||||||
cinny-desktop
|
|
||||||
thunderbird
|
|
||||||
protonmail-bridge
|
|
||||||
libsecret
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.sway.enable = true;
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
services.dbus.packages = [ pkgs.gnome.seahorse ];
|
|
||||||
|
|
||||||
xdg.portal.wlr.enable = true;
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
font-awesome
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{ lib, pkgs, localPackages, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.light.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ lib, pkgs, localPackages, ... }: {
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
ldns
|
|
||||||
wireguard-tools
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
38
flake.lock
generated
38
flake.lock
generated
@@ -2,8 +2,8 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"currentSystem": {
|
"currentSystem": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717720375,
|
"lastModified": 1717721450,
|
||||||
"narHash": "sha256-nbltg3gor6ZPWg1zQXGAgIHqJ05lfvJmwaJRjI+HYws=",
|
"narHash": "sha256-V2OISNdFOCaFrUjA6fLVe3HsZC9nn7vMjGfhKSHTRIk=",
|
||||||
"path": "/etc/nixos/hostname",
|
"path": "/etc/nixos/hostname",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
@@ -12,6 +12,24 @@
|
|||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"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": [
|
||||||
@@ -51,9 +69,25 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"currentSystem": "currentSystem",
|
"currentSystem": "currentSystem",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
35
flake.nix
35
flake.nix
@@ -3,15 +3,21 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
currentSystem.url = "path:/etc/nixos/hostname";
|
currentSystem.url = "path:/etc/nixos/hostname";
|
||||||
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, currentSystem, nixpkgs, home-manager, ... }: let
|
outputs = inputs@{ self, currentSystem, nixpkgs, home-manager, flake-utils, ... }: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
|
inherit (currentSystem) hostname;
|
||||||
|
|
||||||
hostname = currentSystem.hostname;
|
overlays = import ./overlays;
|
||||||
|
utils = import ./utils;
|
||||||
|
|
||||||
configs."ankaa" = {
|
configs."ankaa" = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -79,7 +85,10 @@
|
|||||||
|
|
||||||
common.nil.enable = true;
|
common.nil.enable = true;
|
||||||
|
|
||||||
networking.wireguard.enable = true;
|
networking = {
|
||||||
|
wireguard.enable = true;
|
||||||
|
nameservers = [ "192.168.0.100" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -90,10 +99,8 @@
|
|||||||
audio = {
|
audio = {
|
||||||
pipewire.enable = true;
|
pipewire.enable = true;
|
||||||
music.enable = true;
|
music.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
protonmail = true;
|
protonmail = true;
|
||||||
@@ -114,22 +121,28 @@
|
|||||||
|
|
||||||
common.nil.enable = true;
|
common.nil.enable = true;
|
||||||
|
|
||||||
networking.wireguard.enable = true;
|
networking = {
|
||||||
|
wireguard.enable = true;
|
||||||
|
nameservers = [ "192.168.0.100" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
configs."default-hostname" = {
|
|
||||||
|
|
||||||
};
|
configs."default-hostname" = {};
|
||||||
|
|
||||||
utils = import ./utils;
|
|
||||||
system = configs."${hostname}".system;
|
system = configs."${hostname}".system;
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = with overlays; [ gamescope ];
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"${hostname}" = nixpkgs.lib.nixosSystem {
|
"${hostname}" = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit (outputs) localPackages;
|
inherit (outputs) localPackages;
|
||||||
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
@@ -153,7 +166,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
localPackages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
|
localPackages = pkgs.lib.genAttrs flake-utils.lib.defaultSystems (system:
|
||||||
{
|
{
|
||||||
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix {};
|
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix {};
|
||||||
gamescope-old = pkgs.callPackage ./pkgs/gamescope-old {};
|
gamescope-old = pkgs.callPackage ./pkgs/gamescope-old {};
|
||||||
|
|||||||
@@ -10,19 +10,16 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [];
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
|
rocmPackages.clr.icd
|
||||||
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|||||||
@@ -12,6 +12,17 @@ with lib; let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf gui.sway.enable {
|
config = mkIf gui.sway.enable {
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
|
||||||
|
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
checkConfig = false;
|
checkConfig = false;
|
||||||
@@ -26,6 +37,7 @@ in
|
|||||||
"XF86AudioPause" = "exec playerctl play-pause";
|
"XF86AudioPause" = "exec playerctl play-pause";
|
||||||
"XF86AudioNext" = "exec playerctl next";
|
"XF86AudioNext" = "exec playerctl next";
|
||||||
"XF86AudioPrev" = "exec playerctl previous";
|
"XF86AudioPrev" = "exec playerctl previous";
|
||||||
|
"${modifier}+space" = "exec \"kickoff-dot-desktop | ${pkgs.kickoff}/bin/kickoff --from-stdin --stdout | xargs -d '\\n' ${pkgs.sway}/bin/swaymsg exec\"";
|
||||||
"${modifier}+Return" = "exec alacritty ";
|
"${modifier}+Return" = "exec alacritty ";
|
||||||
"${modifier}+Control+f" = "exec MOZ_ENABLE_WAYLAND=1 firefox";
|
"${modifier}+Control+f" = "exec MOZ_ENABLE_WAYLAND=1 firefox";
|
||||||
"${modifier}+Control+s" = "exec steam";
|
"${modifier}+Control+s" = "exec steam";
|
||||||
@@ -54,11 +66,12 @@ in
|
|||||||
"${modifier}+Shift+Right" = "move right";
|
"${modifier}+Shift+Right" = "move right";
|
||||||
"${modifier}+b" = "split h";
|
"${modifier}+b" = "split h";
|
||||||
"${modifier}+v" = "split v";
|
"${modifier}+v" = "split v";
|
||||||
|
"${modifier}+r" = "mode 'resize'";
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
|
"${modifier}+Shift+space" = "floating toggle";
|
||||||
"${modifier}+s" = "layout stacking";
|
"${modifier}+s" = "layout stacking";
|
||||||
"${modifier}+w" = "layout tabbed";
|
"${modifier}+w" = "layout tabbed";
|
||||||
"${modifier}+e" = "layout toggle split";
|
"${modifier}+e" = "layout toggle split";
|
||||||
"${modifier}+Shift+space" = "floating toggle";
|
|
||||||
"${modifier}+a" = "focus parent";
|
"${modifier}+a" = "focus parent";
|
||||||
"${modifier}+1" = "workspace 1 ";
|
"${modifier}+1" = "workspace 1 ";
|
||||||
"${modifier}+2" = "workspace 2";
|
"${modifier}+2" = "workspace 2";
|
||||||
@@ -82,12 +95,9 @@ in
|
|||||||
"${modifier}+Shift+0" = "move container to workspace 10";
|
"${modifier}+Shift+0" = "move container to workspace 10";
|
||||||
"${modifier}+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'";
|
"${modifier}+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'";
|
||||||
"${modifier}+Shift+c" = "reload";
|
"${modifier}+Shift+c" = "reload";
|
||||||
"${modifier}+r" = "mode 'resize'";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
startup = [
|
startup = []
|
||||||
{ command = "--no-startup-id swayidle -w timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"'"; }
|
|
||||||
]
|
|
||||||
++ optionals gui.sway.desktop [
|
++ optionals gui.sway.desktop [
|
||||||
{ command = "vorta"; }
|
{ command = "vorta"; }
|
||||||
{ command = "MOZ_ENABLE_WAYLAND=1 firefox"; }
|
{ command = "MOZ_ENABLE_WAYLAND=1 firefox"; }
|
||||||
@@ -154,7 +164,7 @@ in
|
|||||||
|
|
||||||
input."type:keyboard" = {
|
input."type:keyboard" = {
|
||||||
xkb_layout = "us,de";
|
xkb_layout = "us,de";
|
||||||
xkb_options = "caps:escape,grp:shifts_toggle";
|
xkb_options = "grp:shifts_toggle";
|
||||||
};
|
};
|
||||||
|
|
||||||
output = gui.monitors;
|
output = gui.monitors;
|
||||||
@@ -184,14 +194,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
bars = [
|
bars = [
|
||||||
{ command = "\${pkgs.waybar}/bin/waybar"; }
|
{ command = "${pkgs.waybar}/bin/waybar"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
bindsym ${modifier}+space exec kickoff-dot-desktop | kickoff --from-stdin --stdout | xargs -d '\n' swaymsg exec
|
|
||||||
|
|
||||||
set $bg-color #58536d
|
set $bg-color #58536d
|
||||||
set $inactive-bg-color #2f343f
|
set $inactive-bg-color #2f343f
|
||||||
@@ -207,6 +217,7 @@ in
|
|||||||
client.urgent $urgent-bg-color $urgent-bg-color $text-color #4B5177
|
client.urgent $urgent-bg-color $urgent-bg-color $text-color #4B5177
|
||||||
|
|
||||||
smart_gaps inverse_outer
|
smart_gaps inverse_outer
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ in
|
|||||||
type = types.enum [ "fish" ];
|
type = types.enum [ "fish" ];
|
||||||
default = "fish";
|
default = "fish";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
caps = mkOption {
|
||||||
|
description = "What key to bind caps lock to";
|
||||||
|
type = types.enum [ "ctrl-esc" "esc" "caps" ];
|
||||||
|
default = "ctrl-esc";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -42,6 +48,7 @@ in
|
|||||||
eza
|
eza
|
||||||
ripgrep
|
ripgrep
|
||||||
fzf
|
fzf
|
||||||
|
yazi
|
||||||
ncdu
|
ncdu
|
||||||
btop
|
btop
|
||||||
]
|
]
|
||||||
@@ -52,6 +59,19 @@ in
|
|||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.keyd = mkIf (cfg.caps != "caps") {
|
||||||
|
enable = true;
|
||||||
|
keyboards.default = {
|
||||||
|
ids = [ "*" ];
|
||||||
|
settings = {
|
||||||
|
main = mkMerge [
|
||||||
|
(mkIf (cfg.caps == "ctrl-esc") { capslock = "overload(control, esc)"; })
|
||||||
|
(mkIf (cfg.caps == "esc") { capslock = "esc"; })
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.fish.enable = mkIf (cfg.shell == "fish") true;
|
programs.fish.enable = mkIf (cfg.shell == "fish") true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; []
|
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; []
|
||||||
++ optional cfg.protonup.enable protonup-qt
|
++ optional cfg.protonup.enable protonup-qt
|
||||||
++ optional cfg.gamescope.enable gamescope-old
|
++ optional cfg.gamescope.enable gamescope
|
||||||
++ optional cfg.discord.enable vesktop
|
++ optional cfg.discord.enable vesktop
|
||||||
++ optionals cfg.lutris.enable [ lutris wine ];
|
++ optionals cfg.lutris.enable [ lutris wine ];
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ in
|
|||||||
allowedTCPPorts = mkOption {
|
allowedTCPPorts = mkOption {
|
||||||
description = "Which tcp ports to allow through firewall";
|
description = "Which tcp ports to allow through firewall";
|
||||||
type = types.listOf types.int;
|
type = types.listOf types.int;
|
||||||
default = []
|
default = [];
|
||||||
++ optional openssh.enable openssh.port;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
allowedUDPPorts = mkOption {
|
allowedUDPPorts = mkOption {
|
||||||
@@ -66,7 +65,9 @@ in
|
|||||||
networking.nameservers = cfg.nameservers;
|
networking.nameservers = cfg.nameservers;
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = cfg.firewall.enable;
|
enable = cfg.firewall.enable;
|
||||||
allowedTCPPorts = cfg.firewall.allowedTCPPorts;
|
allowedTCPPorts = cfg.firewall.allowedTCPPorts
|
||||||
|
++ optional openssh.enable openssh.port;
|
||||||
|
|
||||||
allowedUDPPorts = cfg.firewall.allowedUDPPorts;
|
allowedUDPPorts = cfg.firewall.allowedUDPPorts;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
3
overlays/default.nix
Normal file
3
overlays/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
gamescope = import ./gamescope-last-working.nix;
|
||||||
|
}
|
||||||
11
overlays/gamescope-last-working.nix
Normal file
11
overlays/gamescope-last-working.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
final: prev: {
|
||||||
|
gamescope = prev.gamescope.overrideAttrs ( old: {
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "ValveSoftware";
|
||||||
|
repo = "gamescope";
|
||||||
|
rev = "d0d23c4c3010c81add1bd90cbe478ce4a386e28d";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
hash = "sha256-Ym1kl9naAm1MGlxCk32ssvfiOlstHiZPy7Ga8EZegus=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user