Update sway config

This commit is contained in:
2024-06-06 19:13:50 -05:00
parent 170191583c
commit 2a2a046560
9 changed files with 79 additions and 95 deletions

19
flake.lock generated
View File

@@ -1,5 +1,17 @@
{
"nodes": {
"currentSystem": {
"locked": {
"lastModified": 1717562249,
"narHash": "sha256-WdcVxEl64ZRLVUmnn9ZVXBId0eGkzxwZSVDxZDy0mgU=",
"path": "/etc/nixos/hostname",
"type": "path"
},
"original": {
"path": "/etc/nixos/hostname",
"type": "path"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -22,11 +34,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github"
},
"original": {
@@ -38,6 +50,7 @@
},
"root": {
"inputs": {
"currentSystem": "currentSystem",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}

View File

@@ -2,14 +2,17 @@
description = "NixOS configuration";
inputs = {
currentSystem.url = "path:/etc/nixos/hostname";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }: let
outputs = inputs@{ self, currentSystem, nixpkgs, home-manager, ... }: let
inherit (self) outputs;
hostname = currentSystem.hostname;
configs."ankaa" = {
system = "x86_64-linux";
@@ -69,7 +72,10 @@
};
games.enable = true;
games = {
enable = true;
lutris.enable = true;
};
common.nil.enable = true;
@@ -109,18 +115,10 @@
};
hostname =
if (builtins.pathExists ./hostname) then
builtins.readFile(./hostname)
else
"default-hostname";
utils = import ./utils;
system = configs."${hostname}".system;
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
"${hostname}" = nixpkgs.lib.nixosSystem {
@@ -130,11 +128,9 @@
modules = [
{
networking.hostName = hostname;
}
(import ./modules/nix)
{
simmer = configs."${hostname}";
}
(import ./modules/nix)
(./. + "/hosts/${hostname}/system.nix")
(./. + "/hosts/${hostname}/hardware-configuration.nix")
home-manager.nixosModules.home-manager
@@ -142,8 +138,8 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
systemConfig = configs."${hostname}";
inherit utils;
systemConfig = configs."${hostname}";
};
home-manager.users.eesim = import (./. + "/hosts/${hostname}/home.nix");

View File

@@ -7,20 +7,11 @@
}:
with lib; let
cfg = config.simmer.sway;
gui = systemConfig.gui;
modifier = "Mod4";
in
{
options.simmer.sway = {
enable = mkOption {
description = "Whether to install and set sway as window manager";
type = types.bool;
default = gui.enable;
};
};
config = mkIf cfg.enable {
config = mkIf gui.sway.enable {
wayland.windowManager.sway = {
enable = true;
checkConfig = false;
@@ -144,11 +135,10 @@ in
];
"6" = [
{app_id="com.obsproject.Studio"; }
];
"7" = [
{app_id="org.strawberrymusicplayer.strawberry"; }
{class="feishin"; }
];
"8" = [
@@ -159,10 +149,7 @@ in
"9" = [];
"0" = [
{app_id="python3"; }
{class="steam_proton"; }
];
"0" = [];
};
input."type:keyboard" = {

View File

@@ -16,16 +16,6 @@ in
type = types.bool;
default = false;
};
pulseSupport = mkOption {
description = "Enable pulse support for pipewire";
type = types.bool;
default = true;
};
alsaSupport = mkOption {
description = "Enable alsa support for pipewire";
type = types.bool;
default = true;
};
};
music = {
@@ -56,23 +46,22 @@ in
};
config = {
environment.systemPackages =
with pkgs; []
environment.systemPackages = with pkgs; []
++ optional cfg.pipewire.enable pulseaudio
++ optional cfg.music.enable feishin
++ optional cfg.tools.helvum helvum
++ optional cfg.tools.easyeffects easyeffects
++ optional cfg.tools.pavucontrol pavucontrol
++ optional cfg.pipewire.pulseSupport pulseaudio
++ optional cfg.music.enable feishin;
++ optional cfg.tools.pavucontrol pavucontrol;
security.rtkit.enable = mkIf cfg.pipewire.enable true;
services.pipewire = mkIf cfg.pipewire.enable {
enable = true;
alsa = mkIf cfg.pipewire.alsaSupport {
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = mkIf cfg.pipewire.pulseSupport true;
pulse.enable = true;
};
};
}

View File

@@ -38,7 +38,7 @@ in
};
passphrase = mkOption {
description = "path to file containing passphrase";
description = "Path to file containing passphrase";
type = types.path;
};

View File

@@ -20,7 +20,7 @@ in
nil.enable = mkOption {
description = "Whether to install nil";
type = types.bool;
default = false;
default = true;
};
shell = mkOption {

View File

@@ -47,8 +47,7 @@ in
};
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.gamescope.enable gamescope-old
++ optional cfg.discord.enable vesktop

View File

@@ -103,8 +103,8 @@ in
packages = with pkgs; [
liberation_ttf
ubuntu_font_family
font-awesome
vazir-fonts
font-awesome
];
fontconfig = {

View File

@@ -50,9 +50,9 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "ValveSoftware";
repo = "gamescope";
rev = "0065946d1bf69584714a17698947ab80a97128bc";
rev = "420eb91387a484fd7b1ea71449091f0480d9e538";
fetchSubmodules = true;
hash = "sha256-PiDXHq7/CxIOday5DQyAG6i3+ggm6zp3iSPIhq63EOk=";
hash = "sha256-XcefR0wiDHQY7wMX+LQTEntffi2RdMW8m2HNQMz035A=";
};
patches = [
@@ -144,11 +144,11 @@ stdenv.mkDerivation (finalAttrs: {
--add-needed ${libgcc.lib}/lib/libasan.so.8 \
--add-needed libvulkan.so.1
LD_PRELOAD="${libgcc.lib}/lib/libasan.so.8"
# --debug-layers flag expects these in the path
wrapProgram "$out/bin/gamescope" \
--prefix PATH : ${with xorg; lib.makeBinPath [xprop xwininfo]}
--prefix PATH : ${with xorg; lib.makeBinPath [xprop xwininfo]} \
--set ASAN_OPTIONS "halt_on_error=false" \
--set LD_PRELOAD "${libgcc.lib}/lib/libasan.so.8"
# Install ReShade shaders
mkdir -p $out/share/gamescope/reshade