Update sway config
This commit is contained in:
19
flake.lock
generated
19
flake.lock
generated
@@ -1,5 +1,17 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"currentSystem": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717562249,
|
||||||
|
"narHash": "sha256-WdcVxEl64ZRLVUmnn9ZVXBId0eGkzxwZSVDxZDy0mgU=",
|
||||||
|
"path": "/etc/nixos/hostname",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"path": "/etc/nixos/hostname",
|
||||||
|
"type": "path"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -22,11 +34,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717196966,
|
"lastModified": 1717602782,
|
||||||
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
|
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
|
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -38,6 +50,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"currentSystem": "currentSystem",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
|||||||
84
flake.nix
84
flake.nix
@@ -2,14 +2,17 @@
|
|||||||
description = "NixOS configuration";
|
description = "NixOS configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
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";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }: let
|
outputs = inputs@{ self, currentSystem, nixpkgs, home-manager, ... }: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
|
|
||||||
|
hostname = currentSystem.hostname;
|
||||||
|
|
||||||
configs."ankaa" = {
|
configs."ankaa" = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
@@ -69,7 +72,10 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
games.enable = true;
|
games = {
|
||||||
|
enable = true;
|
||||||
|
lutris.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
common.nil.enable = true;
|
common.nil.enable = true;
|
||||||
|
|
||||||
@@ -109,54 +115,44 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hostname =
|
|
||||||
if (builtins.pathExists ./hostname) then
|
|
||||||
builtins.readFile(./hostname)
|
|
||||||
else
|
|
||||||
"default-hostname";
|
|
||||||
|
|
||||||
utils = import ./utils;
|
utils = import ./utils;
|
||||||
system = configs."${hostname}".system;
|
system = configs."${hostname}".system;
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"${hostname}" = nixpkgs.lib.nixosSystem {
|
"${hostname}" = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit (outputs) localPackages;
|
inherit (outputs) localPackages;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
}
|
simmer = configs."${hostname}";
|
||||||
(import ./modules/nix)
|
}
|
||||||
{
|
(import ./modules/nix)
|
||||||
simmer = configs."${hostname}";
|
(./. + "/hosts/${hostname}/system.nix")
|
||||||
}
|
(./. + "/hosts/${hostname}/hardware-configuration.nix")
|
||||||
(./. + "/hosts/${hostname}/system.nix")
|
home-manager.nixosModules.home-manager
|
||||||
(./. + "/hosts/${hostname}/hardware-configuration.nix")
|
{
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.useGlobalPkgs = true;
|
||||||
{
|
home-manager.useUserPackages = true;
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.extraSpecialArgs = {
|
||||||
home-manager.useUserPackages = true;
|
inherit utils;
|
||||||
home-manager.extraSpecialArgs = {
|
systemConfig = configs."${hostname}";
|
||||||
systemConfig = configs."${hostname}";
|
};
|
||||||
inherit utils;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.eesim = import (./. + "/hosts/${hostname}/home.nix");
|
home-manager.users.eesim = import (./. + "/hosts/${hostname}/home.nix");
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
localPackages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
|
||||||
|
{
|
||||||
|
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix {};
|
||||||
|
gamescope-old = pkgs.callPackage ./pkgs/gamescope-old {};
|
||||||
|
gamescope-dbg = pkgs.callPackage ./pkgs/gamescope-dbg {};
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
localPackages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
|
|
||||||
{
|
|
||||||
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix { };
|
|
||||||
gamescope-old = pkgs.callPackage ./pkgs/gamescope-old {};
|
|
||||||
gamescope-dbg = pkgs.callPackage ./pkgs/gamescope-dbg {};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,11 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.simmer.sway;
|
|
||||||
gui = systemConfig.gui;
|
gui = systemConfig.gui;
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.simmer.sway = {
|
config = mkIf gui.sway.enable {
|
||||||
enable = mkOption {
|
|
||||||
description = "Whether to install and set sway as window manager";
|
|
||||||
type = types.bool;
|
|
||||||
default = gui.enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
checkConfig = false;
|
checkConfig = false;
|
||||||
@@ -144,11 +135,10 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
"6" = [
|
"6" = [
|
||||||
{app_id="com.obsproject.Studio"; }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
"7" = [
|
"7" = [
|
||||||
{app_id="org.strawberrymusicplayer.strawberry"; }
|
{class="feishin"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
"8" = [
|
"8" = [
|
||||||
@@ -159,10 +149,7 @@ in
|
|||||||
|
|
||||||
"9" = [];
|
"9" = [];
|
||||||
|
|
||||||
"0" = [
|
"0" = [];
|
||||||
{app_id="python3"; }
|
|
||||||
{class="steam_proton"; }
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
input."type:keyboard" = {
|
input."type:keyboard" = {
|
||||||
|
|||||||
@@ -16,16 +16,6 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
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 = {
|
music = {
|
||||||
@@ -56,23 +46,22 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages =
|
environment.systemPackages = with pkgs; []
|
||||||
with pkgs; []
|
++ optional cfg.pipewire.enable pulseaudio
|
||||||
|
++ optional cfg.music.enable feishin
|
||||||
++ optional cfg.tools.helvum helvum
|
++ optional cfg.tools.helvum helvum
|
||||||
++ optional cfg.tools.easyeffects easyeffects
|
++ optional cfg.tools.easyeffects easyeffects
|
||||||
++ optional cfg.tools.pavucontrol pavucontrol
|
++ optional cfg.tools.pavucontrol pavucontrol;
|
||||||
++ optional cfg.pipewire.pulseSupport pulseaudio
|
|
||||||
++ optional cfg.music.enable feishin;
|
|
||||||
|
|
||||||
|
|
||||||
security.rtkit.enable = mkIf cfg.pipewire.enable true;
|
security.rtkit.enable = mkIf cfg.pipewire.enable true;
|
||||||
services.pipewire = mkIf cfg.pipewire.enable {
|
services.pipewire = mkIf cfg.pipewire.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa = mkIf cfg.pipewire.alsaSupport {
|
alsa = {
|
||||||
enable = true;
|
enable = true;
|
||||||
support32Bit = true;
|
support32Bit = true;
|
||||||
};
|
};
|
||||||
pulse.enable = mkIf cfg.pipewire.pulseSupport true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
passphrase = mkOption {
|
passphrase = mkOption {
|
||||||
description = "path to file containing passphrase";
|
description = "Path to file containing passphrase";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ in
|
|||||||
nil.enable = mkOption {
|
nil.enable = mkOption {
|
||||||
description = "Whether to install nil";
|
description = "Whether to install nil";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
shell = mkOption {
|
shell = mkOption {
|
||||||
|
|||||||
@@ -47,12 +47,11 @@ 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-old
|
++ optional cfg.discord.enable vesktop
|
||||||
++ optional cfg.discord.enable vesktop
|
++ optionals cfg.lutris.enable [ lutris wine ];
|
||||||
++ optionals cfg.lutris.enable [ lutris wine ];
|
|
||||||
|
|
||||||
programs.steam = mkIf cfg.steam.enable {
|
programs.steam = mkIf cfg.steam.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -103,8 +103,8 @@ in
|
|||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
ubuntu_font_family
|
ubuntu_font_family
|
||||||
font-awesome
|
|
||||||
vazir-fonts
|
vazir-fonts
|
||||||
|
font-awesome
|
||||||
];
|
];
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ValveSoftware";
|
owner = "ValveSoftware";
|
||||||
repo = "gamescope";
|
repo = "gamescope";
|
||||||
rev = "0065946d1bf69584714a17698947ab80a97128bc";
|
rev = "420eb91387a484fd7b1ea71449091f0480d9e538";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
hash = "sha256-PiDXHq7/CxIOday5DQyAG6i3+ggm6zp3iSPIhq63EOk=";
|
hash = "sha256-XcefR0wiDHQY7wMX+LQTEntffi2RdMW8m2HNQMz035A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@@ -144,11 +144,11 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
--add-needed ${libgcc.lib}/lib/libasan.so.8 \
|
--add-needed ${libgcc.lib}/lib/libasan.so.8 \
|
||||||
--add-needed libvulkan.so.1
|
--add-needed libvulkan.so.1
|
||||||
|
|
||||||
LD_PRELOAD="${libgcc.lib}/lib/libasan.so.8"
|
|
||||||
|
|
||||||
# --debug-layers flag expects these in the path
|
# --debug-layers flag expects these in the path
|
||||||
wrapProgram "$out/bin/gamescope" \
|
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
|
# Install ReShade shaders
|
||||||
mkdir -p $out/share/gamescope/reshade
|
mkdir -p $out/share/gamescope/reshade
|
||||||
|
|||||||
Reference in New Issue
Block a user