Fixing Hyprland crash

This commit is contained in:
soraefir 2023-11-16 23:06:28 +01:00
parent 5726d5c6d1
commit 63941b5c44
47 changed files with 518 additions and 494 deletions

194
flake.lock generated
View File

@ -23,11 +23,11 @@
]
},
"locked": {
"lastModified": 1698429334,
"narHash": "sha256-Gq3+QabboczSu7RMpcy79RSLMSqnySO3wsnHQk4DfbE=",
"lastModified": 1699867978,
"narHash": "sha256-+arl45HUOcBdKiRGrKXZYXDyBQ6MQGkYPZa/28f6Yzo=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "afe83cbc2e673b1f08d32dd0f70df599678ff1e7",
"rev": "e67f2bf515343da378c3f82f098df8ca01bccc5f",
"type": "github"
},
"original": {
@ -37,65 +37,13 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1696331477,
"narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1699159446,
"narHash": "sha256-cL63IjsbPl2otS7R4kdXbVOJOXYMpGw5KGZoWgdCuCM=",
"lastModified": 1699997707,
"narHash": "sha256-ugb+1TGoOqqiy3axyEZpfF6T4DQUGjfWZ3Htry1EfvI=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "627bc9b88256379578885a7028c9e791c29fb581",
"rev": "5689f3ebf899f644a1aabe8774d4f37eb2f6c2f9",
"type": "github"
},
"original": {
@ -111,11 +59,11 @@
]
},
"locked": {
"lastModified": 1699368917,
"narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=",
"lastModified": 1700118404,
"narHash": "sha256-XkqpZpVoy1FV7UbiLkP+fQxxv/6KnwLYkFEHgE8z2IQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3",
"rev": "c1a033122df8a3c74fda3780c83a104a7d60873c",
"type": "github"
},
"original": {
@ -127,17 +75,19 @@
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1699391198,
"narHash": "sha256-HrnlCdZBqqE37gFORapfSGEGcqhCyhX2aSMRnDEmR0k=",
"lastModified": 1700168597,
"narHash": "sha256-N+FsHxNTnSnqQW0e1SbMm3Vw59PZ7KTj+vR1hivSWCw=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "751d2851cc270c3322ffe2eb83c156e4298a0c0e",
"rev": "1d9bfa60a19975274afb5fd9a3492f8cb6742c2e",
"type": "github"
},
"original": {
@ -192,15 +142,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1698134075,
"narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
"owner": "NixOS",
"lastModified": 1699963925,
"narHash": "sha256-LE7OV/SwkIBsCpAlIPiFhch/J+jBDGEZjNfdnzCnCrY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
"rev": "bf744fe90419885eefced41b3e5ae442d732712d",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -221,45 +171,13 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1699110214,
"narHash": "sha256-L2TU4RgtiqF69W8Gacg2jEkEYJrW+Kp0Mp4plwQh5b8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78f3a4ae19f0e99d5323dd2e3853916b8ee4afee",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1699094435,
"narHash": "sha256-YLZ5/KKZ1PyLrm2MO8UxRe4H3M0/oaYqNhSlq6FDeeA=",
"lastModified": 1699374756,
"narHash": "sha256-X21OIoVcJejN9JKoLuoZSx3ZZkMh/iSpJ+GGrSNQyGU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9d5d25bbfe8c0297ebe85324addcb5020ed1a454",
"rev": "9b92dad3804b543a8b5db878aabf7132d601fa91",
"type": "github"
},
"original": {
@ -271,11 +189,11 @@
},
"nur": {
"locked": {
"lastModified": 1699430897,
"narHash": "sha256-/9fkDvkl16UReQs08KlHk7888SXfBEM89fl3buvSAVg=",
"lastModified": 1700183050,
"narHash": "sha256-sf10J/I0xdSVzufCq4r/Ad94yDNhecKKB/Lc7PyA+aI=",
"owner": "nix-community",
"repo": "nur",
"rev": "aa435f27b4a4f58c8acf5e0c4f9e3cf72aac2834",
"rev": "d76c6e4d1870d551f54f47045966f685e0249053",
"type": "github"
},
"original": {
@ -291,45 +209,24 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs",
"nur": "nur",
"snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1696432959,
"narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1699311858,
"narHash": "sha256-W/sQrghPAn5J9d+9kMnHqi4NPVWVpy0V/qzQeZfS/dM=",
"lastModified": 1699951338,
"narHash": "sha256-1GeczM7XfgHcYGYiYNcdwSFu3E62vmh4d7mffWZvyzE=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "664187539871f63857bda2d498f452792457b998",
"rev": "0e3a94167dcd10a47b89141f35b2ff9e04b34c46",
"type": "github"
},
"original": {
@ -353,37 +250,22 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1697909146,
"narHash": "sha256-jU0I6FoCKnj4zIBL4daosFWh81U1fM719Z6cae8PxSY=",
"lastModified": 1699292815,
"narHash": "sha256-HXu98PyBMKEWLqiTb8viuLDznud/SdkdJsx5A5CWx7I=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2",
"rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2",
"rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1",
"type": "gitlab"
}
},

View File

@ -16,45 +16,77 @@
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
sops-nix.url = "github:Mic92/sops-nix";
nix-colors.url = "github:misterio77/nix-colors";
snowfall-lib = {
url = "github:snowfallorg/lib";
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
nix-colors.url = "github:misterio77/nix-colors";
};
outputs = inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
gen = import ./generator.nix { inherit inputs; };
forEachSystem =
inputs.nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
in {
devShells = forEachSystem (system:
let
overlays = import ./pkgs/overlay.nix { inherit pkgs; };
overrides = { custom = import ./pkgs { inherit pkgs; }; };
pkgs = import inputs.nixpkgs { inherit system overlays; }
// overrides;
in { default = import ./shells/vevsh { inherit pkgs; }; });
nixosConfigurations = {
valinor = gen.generate {
type = "nixos";
system = "x86_64-linux";
host = "valinor";
};
in lib.mkFlake {
package-namespace = "custom";
channels-config = {
allowUnfree = true;
permittedInsecurePackages = [ ];
iriy = gen.generate {
type = "nixos";
system = "x86_64-linux";
host = "iriy";
};
efir = gen.generate {
type = "nixos";
system = "x86_64-linux";
host = "efir";
};
avalon = gen.generate {
type = "nixos";
system = "x86_64-linux";
host = "avalon";
};
systems = {
modules = {
darwin = with inputs; [ sops-nix.nixosModules.sops ];
home = with inputs; [
nix-colors.homeManagerModules
hyprland.homeManagerModules
];
nixos = with inputs; [ sops-nix.nixosModules.sops ];
};
darwinConfigurations = {
asgard = gen.generate {
type = "macos";
system = "x86_64-darwin";
host = "asgard";
};
};
homeConfigurations = {
yomi = gen.generate {
type = "home";
system = "arm-64";
host = "example";
};
example = gen.generate {
type = "home";
system = "-"; # supports any
host = "example";
};
};
};
# ===== Unsupported/NotImplemented ======

51
generator.nix Executable file
View File

@ -0,0 +1,51 @@
{ inputs, ... }: {
generate = { type, system, host }:
({
"nixos" = inputs.nixpkgs.lib.nixosSystem {
system = system;
modules = [
inputs.sops-nix.nixosModules.sops
./modules/nixos
./systems/${host}
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.sora = {
imports = [
./modules/home
inputs.nix-colors.homeManagerModule
inputs.hyprland.homeManagerModules.default
./systems/${host}/home.nix
];
};
}
];
};
"macos" = inputs.darwin.lib.darwinSystem {
system = system;
modules = [
inputs.sops-nix.nixosModules.sops
./systems/${host}
inputs.home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.sora = {
imports = [
inputs.nix-colors.homeManagerModule
inputs.hyprland.homeManagerModules.default
./systems/${host}/home.nix
];
};
}
];
};
"home" = inputs.home-manager.lib.homeManagerConfiguration {
modules = [ ./modules/home ./systems/${host}/home.nix ];
};
_ = throw "Unsupported system";
}.${type});
}

View File

@ -1,13 +0,0 @@
{ pkgs, ... }: {
home = {
packages = with pkgs; [ ];
stateVersion = "23.05";
};
programs = {
zsh = {
enable = true;
# FIND SETTINGS FROM /home/cli/zsh
};
};
}

View File

@ -1,17 +0,0 @@
{ ... }: {
services.kanshi = {
enable = true;
systemdTarget = "graphical-session.target";
profiles = {
default = {
outputs = [{
criteria = "CEX CX133 0x00000001";
mode = "1920x1200@59.972";
position = "0,0";
status = "enable";
}];
};
};
};
}

View File

@ -1,33 +0,0 @@
{ ... }: {
services.kanshi = {
enable = true;
systemdTarget = "graphical-session.target";
profiles = {
default = {
outputs = [{
criteria = "eDP-1";
mode = "1920x1080@60.020";
position = "0,0";
status = "enable";
}];
};
d0 = {
outputs = [
{
criteria = "CEX CX133 0x00000001";
mode = "2560x1600@59.972";
position = "0,0";
status = "enable";
}
{
criteria = "eDP-1";
mode = "1920x1080@60.020";
position = "2560,0";
status = "enable";
}
];
};
};
};
}

View File

@ -1,4 +1,4 @@
{ config, ... }: {
{ lib, config, ... }: {
systemd.user.startServices = "sd-switch";
programs.home-manager.enable = true;

View File

@ -0,0 +1,4 @@
{ ... }: {
imports =
[ ./btop ./git ./helix ./kitty ./neofetch ./other ./starship ./zsh ];
}

1
modules/home/default.nix Normal file
View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./base ./cli ./gui ./homecfg ./wayland ./xdg ./xorg ]; }

View File

@ -0,0 +1,3 @@
{ ... }: {
imports = [ ./firefox ./images ./mpv ./pipewire ./vosk ./vscodium ./zathura ];
}

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./apps ./base ./games ./theme ]; }

View File

@ -5,7 +5,7 @@
config = lib.mkIf (config.homecfg.make.game) {
home.packages = with pkgs; [
custom.simc
# custom.simc
#games
steam

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./dunst ./eww ./kanshi ./waylock ./wofi ]; }

View File

@ -0,0 +1,67 @@
{ ... }: {
services.kanshi = {
enable = true;
systemdTarget = "graphical-session.target";
profiles = {
tower_0 = {
outputs = [{
criteria = "CEX CX133 0x00000001";
mode = "1920x1200@59.972";
position = "0,0";
status = "enable";
}];
};
tower_1 = {
outputs = [{
criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000";
position = "0,0";
status = "enable";
adaptiveSync = true;
}];
};
laptop_0 = {
outputs = [{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
position = "0,0";
status = "enable";
}];
};
laptop_1 = {
outputs = [
{
criteria = "CEX CX133 0x00000001";
mode = "2560x1600@59.972";
position = "0,0";
status = "enable";
}
{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
position = "2560,0";
status = "enable";
}
];
};
laptop_2 = {
outputs = [
{
criteria = "AOC 16G3 1DDP7HA000348";
mode = "1920x1080@144.000";
position = "0,0";
status = "enable";
adaptiveSync = true;
}
{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
position = "1920,0";
status = "enable";
}
];
};
};
};
}

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./apps ./base ./hyprland ]; }

View File

@ -1,24 +1,19 @@
{ lib, config, pkgs, ... }: {
config = lib.mkIf (config.homecfg.wm == "Wayland") {
home.packages = with pkgs; [ hyprland ];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
extraConfig = ''
monitor=,preferred,auto,1
input {
kb_layout = us, ru
kb_variant = intl, phonetic
kb_model = pc104
kb_options = grp:ctrls_toggle
kb_rules =
follow_mouse = 1
sensitivity = 0 # -0.5 # -1.0 - 1.0, 0 means no modification.
force_no_accel = true
touchpad {
natural_scroll=no
@ -31,21 +26,19 @@
misc {
disable_hyprland_logo=true
#animate_mouse_windowdragging=false
#animate_manual_resizes=false
animate_mouse_windowdragging=false
animate_manual_resizes=false
#vrr=2 #Note broken on renoir AMD DRM potentially ?
vrr=1 #Note broken on renoir AMD DRM potentially ?
}
general {
gaps_in = 8
gaps_out = 15
gaps_in = 5
gaps_out = 5
border_size = 2
# col.active_border = rgb(${config.colorScheme.colors.base05})
# col.inactive_border = rgb(${config.colorScheme.colors.base03})
#col.group_border_active = rgb(${config.colorScheme.colors.base05})
#col.group_border = rgb(${config.colorScheme.colors.base03})
layout = dwindle
@ -107,48 +100,46 @@
#windowrules
windowrulev2 = noshadow, floating:0
windowrule = noshadow, floating:0
windowrulev2 = float, title:^(flying_kitty)$
windowrulev2 = size 1100 600, title:^(flying_kitty)$
windowrulev2 = move center, title:^(flying_kitty)$
windowrulev2 = animation slide, title:^(flying_kitty)$
windowrulev2 = float, title:^(Volume Control)$
windowrulev2 = float, title:^(Picture-in-Picture)$
windowrulev2 = float, title:^(Steam)$
windowrulev2 = fullscreen, title:^(wlogout)$
windowrulev2 = float, title:^(wlogout)$
windowrule = float, title:^(flying_kitty)$
windowrule = size 1100 600, title:^(flying_kitty)$
windowrule = move center, title:^(flying_kitty)$
windowrule = animation slide, title:^(flying_kitty)$
windowrule = float, title:^(Volume Control)$
windowrule = float, title:^(Picture-in-Picture)$
windowrule = float, title:^(Steam)$
windowrule = fullscreen, title:^(wlogout)$
windowrule = float, title:^(wlogout)$
windowrulev2 = workspace 2 silent, class:^(org.telegram.desktop)$
windowrulev2 = workspace 2 silent, class:^(discord)$
windowrule = workspace 2 silent, class:^(org.telegram.desktop)$
windowrule = workspace 2 silent, class:^(discord)$
windowrulev2 = workspace 8 silent, class:^(org.keepassxc.KeePassXC)$
windowrulev2 = workspace 8 silent, title:^(Nextcloud)$
windowrulev2 = workspace 8 silent, class:^(Tk)$,title:^(Server Configuration)$
windowrule = workspace 8 silent, class:^(org.keepassxc.KeePassXC)$
windowrule = workspace 8 silent, title:^(Nextcloud)$
windowrule = workspace 8 silent, class:^(Tk)$,title:^(Server Configuration)$
#SPECIAL FLOATERS
windowrulev2 = float,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrulev2 = pin,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrulev2 = float,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$
windowrulev2 = pin,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$
windowrulev2 = float,title:^(Open)$
windowrulev2 = float,title:^(Choose Files)$
windowrulev2 = float,title:^(Save As)$
windowrulev2 = float,title:^(Confirm to replace files)$
windowrulev2 = float,title:^(File Operation Progress)$
windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = pin,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = float,class:^(firefox)$,title:^(Firefox Sharing Indicator)$
windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Firefox Sharing Indicator)$
windowrulev2 = float,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$
windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$
windowrulev2 = float,class:^(org.telegram.desktop)$,title:^(Media viewer)$
windowrulev2 = center,class:^(org.telegram.desktop)$,title:^(Media viewer)$
windowrule = float,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrule = pin,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrule = float,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$
windowrule = pin,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$
windowrule = float,title:^(Open)$
windowrule = float,title:^(Choose Files)$
windowrule = float,title:^(Save As)$
windowrule = float,title:^(Confirm to replace files)$
windowrule = float,title:^(File Operation Progress)$
windowrule = float,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrule = pin,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrule = nofullscreenrequest,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrule = float,class:^(firefox)$,title:^(Firefox Sharing Indicator)$
windowrule = nofullscreenrequest,class:^(firefox)$,title:^(Firefox Sharing Indicator)$
windowrule = float,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$
windowrule = nofullscreenrequest,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$
windowrule = float,class:^(org.telegram.desktop)$,title:^(Media viewer)$
windowrule = center,class:^(org.telegram.desktop)$,title:^(Media viewer)$
#binds
$mainMod = SUPER
bind = SUPER, RETURN, exec, kitty
bind = SUPER_SHIFT, RETURN,togglespecialworkspace,
@ -165,11 +156,10 @@
bind = SUPER, L, exec, swaylock
bind = SUPER, P, pseudo, # dwindle
bind = SUPER, J, togglesplit, # dwindle
bind = SUPER, G, togglegroup
bind = SUPER, tab, changegroupactive
# bind = SUPER, P, pseudo, # dwindle
# bind = SUPER, J, togglesplit, # dwindle
# bind = SUPER, G, togglegroup
# bind = SUPER, tab, changegroupactive
bind = SUPER, left, movefocus, l
bind = SUPER, right, movefocus, r
@ -218,6 +208,7 @@
};
xdg.configFile."startup.sh".text = ''
#!/bin/sh
sleep 2
keepassxc &

View File

@ -0,0 +1,4 @@
{ ... }:
{
}

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./apps ./bspwm ]; }

View File

@ -0,0 +1,4 @@
{ ... }:
{
}

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./cli ./gui ./hostcfg ./system ./tools ./users ]; }

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./audio ./games ./greet ./xserver ]; }

View File

@ -3,14 +3,11 @@ let cfg = config.hostcfg.make.gui;
in {
config = lib.mkIf cfg {
environment.systemPackages = with pkgs; [ hyprland ];
# environment.systemPackages = with pkgs; [ bspwm ];
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "zsh -c '${pkgs.hyprland}/bin/Hyprland'";
command = "zsh";
user = "${config.hostcfg.username}";
};
default_session = initial_session;

View File

@ -0,0 +1,3 @@
{ ... }: {
imports = [ ./dbus ./fonts ./hw ./locale ./network ./nix ./security ./xdg ];
}

View File

@ -1 +1,4 @@
{ ... }: { services.fwupd.enable = true; }
{ ... }: {
services.fwupd.enable = true;
hardware.enableAllFirmware = true;
}

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./base ./boot ./fs ./opengl ./power ./udev ./virt ]; }

View File

@ -1 +1,5 @@
{ ... }: { hardware.opengl = { enable = true; }; }
{ ... }: {
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
}

View File

@ -0,0 +1,3 @@
{ ... }: {
imports = [ ./base ./bluetooth ./gsm ./security ./wifi ./wireguard ];
}

View File

@ -0,0 +1,4 @@
{ ... }:
{
}

View File

@ -1,4 +1,13 @@
{ pkgs, ... }: {
nixpkgs.config = {
permittedInsecurePackages = [ ];
allowUnfree = true;
packageOverrides = pkgs: rec {
custom = import ../../../../packages { inherit pkgs; };
};
};
nixpkgs.overlays = import ../../../../overlays { inherit pkgs; };
nix = {
package = pkgs.nixFlakes;
extraOptions = ''

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./gpg ./polkit ./sops ./ssh ]; }

View File

@ -5,14 +5,14 @@
# wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
# xdg-desktop-portal-gtk
];
};
environment.sessionVariables = rec {
GBM_BACKEND = "amd-drm";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
__GL_VRR_ALLOWED = "1";
WLR_DRM_NO_ATOMIC = "1";
__GLX_VENDOR_LIBRARY_NAME = "amd";
_JAVA_AWT_WM_NONREPARENTING = "1";

View File

@ -0,0 +1 @@
{ ... }: { imports = [ ./debug ./devel ]; }

View File

@ -0,0 +1,4 @@
{ ... }:
{
}

3
overlays/default.nix Normal file
View File

@ -0,0 +1,3 @@
{ pkgs, ... }:
[ ]
# [(import ./openttd-jgrpp) (import ./yarn-berry)]

14
packages/default.nix Normal file
View File

@ -0,0 +1,14 @@
{ pkgs, ... }: {
simc = pkgs.qt6.callPackage ./simc { };
repalette = pkgs.callPackage ./repalette { };
vosk = pkgs.callPackage ./vosk { };
pythonPackages = {
};
nodePackages = {
};
}

View File

@ -2,7 +2,7 @@
buildGoModule rec {
pname = "voskcli";
version = "5eedba33b96dcd3826010cbd12e404cbfb544383";
vendorSha256 = "sha256-8l2i/fhN+2q+tjHpWdjRmesDDBBpxEPrTB8IE5Cr0I8=";
vendorHash = "sha256-8l2i/fhN+2q+tjHpWdjRmesDDBBpxEPrTB8IE5Cr0I8=";
src = fetchFromGitea {
domain = "git.helcel.net";
owner = "helcel";

View File

@ -5,7 +5,7 @@
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages;
@ -18,7 +18,6 @@
'';
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f612abce-6f3f-439a-8585-6a050e18b7fc";
fsType = "ext4";
@ -36,6 +35,5 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl.driSupport32Bit = true;
lib.mkDefault config.hardware.enableAllFirmware;
}

View File

@ -1,6 +1,4 @@
{ ... }: {
imports = [ ./display.nix ];
config.homecfg = {
username = "sora";
make = {

View File

@ -1,8 +1,8 @@
{ config, inputs, ... }: {
imports = with inputs.hardware.nixosModules; [
imports = [
./hardware-configuration.nix
common-cpu-amd
common-gpu-amd
#common-cpu-amd
#common-gpu-amd
];
hostcfg = {

View File

@ -5,7 +5,7 @@
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
#boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages;
@ -28,6 +28,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl.driSupport32Bit = true;
lib.mkDefault config.hardware.enableAllFirmware;
}

View File

@ -1,5 +1,4 @@
{ config, ... }: {
imports = [ ./display.nix ];
config.homecfg = {
username = "sora";