From 63941b5c4403bd1d1365cd4fffefa25c4ce8c555 Mon Sep 17 00:00:00 2001 From: soraefir Date: Thu, 16 Nov 2023 23:06:28 +0100 Subject: [PATCH] Fixing Hyprland crash --- flake.lock | 194 ++------ flake.nix | 90 ++-- generator.nix | 51 +++ homes/x86_64-darwin/sora@asgard/home.nix | 13 - homes/x86_64-linux/sora@iriy/display.nix | 17 - homes/x86_64-linux/sora@valinor/display.nix | 33 -- modules/home/base/default.nix | 2 +- modules/home/cli/default.nix | 4 + modules/home/cli/zsh/default.nix | 2 +- modules/home/default.nix | 1 + modules/home/gui/apps/default.nix | 3 + modules/home/gui/default.nix | 1 + modules/home/gui/games/default.nix | 2 +- modules/home/wayland/apps/default.nix | 1 + modules/home/wayland/apps/kanshi/default.nix | 67 +++ modules/home/wayland/default.nix | 1 + modules/home/wayland/hyprland/config.nix | 431 +++++++++--------- modules/home/xorg/apps/default.nix | 4 + modules/home/xorg/default.nix | 1 + modules/nixos/cli/default.nix | 4 + modules/nixos/default.nix | 1 + modules/nixos/gui/default.nix | 1 + modules/nixos/gui/greet/default.nix | 5 +- modules/nixos/system/default.nix | 3 + modules/nixos/system/hw/base/default.nix | 5 +- modules/nixos/system/hw/default.nix | 1 + modules/nixos/system/hw/opengl/default.nix | 6 +- modules/nixos/system/network/default.nix | 3 + modules/nixos/system/network/gsm/default.nix | 4 + modules/nixos/system/nix/default.nix | 9 + modules/nixos/system/security/default.nix | 1 + modules/nixos/system/xdg/default.nix | 4 +- modules/nixos/tools/default.nix | 1 + modules/nixos/tools/devel/default.nix | 4 + overlays/default.nix | 3 + .../yarn-berry/{adefault.nix => default.nix} | 0 packages/default.nix | 14 + packages/vosk/cli/default.nix | 2 +- .../{x86_64-darwin => asguard}/default.nix | 0 systems/{x86_64-linux => }/avalon/default.nix | 0 .../default.nix => systems/avalon/home.nix | 0 systems/{x86_64-linux => }/iriy/default.nix | 0 .../iriy/hardware-configuration.nix | 6 +- .../default.nix => systems/iriy/home.nix | 2 - .../{x86_64-linux => }/valinor/default.nix | 6 +- .../valinor/hardware-configuration.nix | 8 +- .../default.nix => systems/valinor/home.nix | 1 - 47 files changed, 518 insertions(+), 494 deletions(-) create mode 100755 generator.nix delete mode 100755 homes/x86_64-darwin/sora@asgard/home.nix delete mode 100644 homes/x86_64-linux/sora@iriy/display.nix delete mode 100644 homes/x86_64-linux/sora@valinor/display.nix create mode 100644 modules/home/cli/default.nix create mode 100644 modules/home/default.nix create mode 100644 modules/home/gui/apps/default.nix create mode 100644 modules/home/gui/default.nix create mode 100644 modules/home/wayland/apps/default.nix create mode 100644 modules/home/wayland/apps/kanshi/default.nix create mode 100644 modules/home/wayland/default.nix create mode 100644 modules/home/xorg/apps/default.nix create mode 100644 modules/home/xorg/default.nix create mode 100644 modules/nixos/cli/default.nix create mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/gui/default.nix create mode 100644 modules/nixos/system/default.nix create mode 100644 modules/nixos/system/hw/default.nix create mode 100644 modules/nixos/system/network/default.nix create mode 100644 modules/nixos/system/network/gsm/default.nix create mode 100644 modules/nixos/system/security/default.nix create mode 100644 modules/nixos/tools/default.nix create mode 100644 modules/nixos/tools/devel/default.nix create mode 100644 overlays/default.nix rename overlays/yarn-berry/{adefault.nix => default.nix} (100%) create mode 100644 packages/default.nix rename systems/{x86_64-darwin => asguard}/default.nix (100%) rename systems/{x86_64-linux => }/avalon/default.nix (100%) rename homes/x86_64-linux/sora@avalon/default.nix => systems/avalon/home.nix (100%) rename systems/{x86_64-linux => }/iriy/default.nix (100%) rename systems/{x86_64-linux => }/iriy/hardware-configuration.nix (87%) rename homes/x86_64-linux/sora@iriy/default.nix => systems/iriy/home.nix (89%) rename systems/{x86_64-linux => }/valinor/default.nix (85%) rename systems/{x86_64-linux => }/valinor/hardware-configuration.nix (80%) rename homes/x86_64-linux/sora@valinor/default.nix => systems/valinor/home.nix (90%) diff --git a/flake.lock b/flake.lock index 39d21a8..183f923 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } }, diff --git a/flake.nix b/flake.nix index 0bb5244..a513a30 100755 --- a/flake.nix +++ b/flake.nix @@ -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"; + }; + 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"; + }; + }; - in lib.mkFlake { - - package-namespace = "custom"; - - channels-config = { - allowUnfree = true; - permittedInsecurePackages = [ ]; - }; - - 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 ====== diff --git a/generator.nix b/generator.nix new file mode 100755 index 0000000..6d91f03 --- /dev/null +++ b/generator.nix @@ -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}); +} diff --git a/homes/x86_64-darwin/sora@asgard/home.nix b/homes/x86_64-darwin/sora@asgard/home.nix deleted file mode 100755 index 927e889..0000000 --- a/homes/x86_64-darwin/sora@asgard/home.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs, ... }: { - home = { - packages = with pkgs; [ ]; - stateVersion = "23.05"; - }; - - programs = { - zsh = { - enable = true; - # FIND SETTINGS FROM /home/cli/zsh - }; - }; -} diff --git a/homes/x86_64-linux/sora@iriy/display.nix b/homes/x86_64-linux/sora@iriy/display.nix deleted file mode 100644 index 77fcc9a..0000000 --- a/homes/x86_64-linux/sora@iriy/display.nix +++ /dev/null @@ -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"; - }]; - }; - }; - }; -} diff --git a/homes/x86_64-linux/sora@valinor/display.nix b/homes/x86_64-linux/sora@valinor/display.nix deleted file mode 100644 index 7f2f02b..0000000 --- a/homes/x86_64-linux/sora@valinor/display.nix +++ /dev/null @@ -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"; - } - ]; - }; - }; - }; -} diff --git a/modules/home/base/default.nix b/modules/home/base/default.nix index 002b20d..3367a8a 100644 --- a/modules/home/base/default.nix +++ b/modules/home/base/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ lib, config, ... }: { systemd.user.startServices = "sd-switch"; programs.home-manager.enable = true; diff --git a/modules/home/cli/default.nix b/modules/home/cli/default.nix new file mode 100644 index 0000000..ed7236c --- /dev/null +++ b/modules/home/cli/default.nix @@ -0,0 +1,4 @@ +{ ... }: { + imports = + [ ./btop ./git ./helix ./kitty ./neofetch ./other ./starship ./zsh ]; +} diff --git a/modules/home/cli/zsh/default.nix b/modules/home/cli/zsh/default.nix index 9534105..06f4553 100755 --- a/modules/home/cli/zsh/default.nix +++ b/modules/home/cli/zsh/default.nix @@ -1,5 +1,5 @@ { pkgs, ... }: -let +let nixflake_dir = "$HOME/files/nixconfig"; nixflake_url = "git+https://git.helcel.net/sora/nixconfig"; in { diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..8c8564a --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./base ./cli ./gui ./homecfg ./wayland ./xdg ./xorg ]; } diff --git a/modules/home/gui/apps/default.nix b/modules/home/gui/apps/default.nix new file mode 100644 index 0000000..833f452 --- /dev/null +++ b/modules/home/gui/apps/default.nix @@ -0,0 +1,3 @@ +{ ... }: { + imports = [ ./firefox ./images ./mpv ./pipewire ./vosk ./vscodium ./zathura ]; +} diff --git a/modules/home/gui/default.nix b/modules/home/gui/default.nix new file mode 100644 index 0000000..5a3caa3 --- /dev/null +++ b/modules/home/gui/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./apps ./base ./games ./theme ]; } diff --git a/modules/home/gui/games/default.nix b/modules/home/gui/games/default.nix index 3054ac6..798ebf9 100644 --- a/modules/home/gui/games/default.nix +++ b/modules/home/gui/games/default.nix @@ -5,7 +5,7 @@ config = lib.mkIf (config.homecfg.make.game) { home.packages = with pkgs; [ - custom.simc + # custom.simc #games steam diff --git a/modules/home/wayland/apps/default.nix b/modules/home/wayland/apps/default.nix new file mode 100644 index 0000000..b77240a --- /dev/null +++ b/modules/home/wayland/apps/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./dunst ./eww ./kanshi ./waylock ./wofi ]; } diff --git a/modules/home/wayland/apps/kanshi/default.nix b/modules/home/wayland/apps/kanshi/default.nix new file mode 100644 index 0000000..3748c18 --- /dev/null +++ b/modules/home/wayland/apps/kanshi/default.nix @@ -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"; + } + ]; + }; + }; + }; +} diff --git a/modules/home/wayland/default.nix b/modules/home/wayland/default.nix new file mode 100644 index 0000000..695ae7b --- /dev/null +++ b/modules/home/wayland/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./apps ./base ./hyprland ]; } diff --git a/modules/home/wayland/hyprland/config.nix b/modules/home/wayland/hyprland/config.nix index 04de3dd..b38153d 100755 --- a/modules/home/wayland/hyprland/config.nix +++ b/modules/home/wayland/hyprland/config.nix @@ -1,233 +1,224 @@ { 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 - disable_while_typing=true - scroll_factor=1 - disable_while_typing=0 - tap-to-click=0 - } - } - - misc { - disable_hyprland_logo=true - #animate_mouse_windowdragging=false - #animate_manual_resizes=false - - #vrr=2 #Note broken on renoir AMD DRM potentially ? - } - - general { - gaps_in = 8 - gaps_out = 15 - 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 - - } - - decoration { - rounding = 7 - - blur { - enabled = true - size = 2 - passes = 1 - new_optimizations = true - } - #multisample_edges = true - - #opactity - inactive_opacity = 1.0 - active_opacity = 1.0 - fullscreen_opacity = 1.0 - - # shadow - drop_shadow = no - shadow_range = 60 - shadow_offset = 0 5 - shadow_render_power = 4 - #col.shadow = rgba(00000099) - } - - animations { - enabled = false - } - - dwindle { - pseudotile = yes - # force_split = 0 - preserve_split = yes - } - - master { - new_is_master = true - } - - gestures { - workspace_swipe = off - } - - exec-once = eww open bar & dunst - - exec-once = swww init - - exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP - exec-once = /nix/store/$(ls -la /nix/store | grep 'polkit-gnome' | grep '4096' | awk '{print $9}' | sed -n '$p')/libexec/polkit-gnome-authentication-agent-1 & - - exec-once = wl-paste --type text --watch cliphist store #Stores only text data - exec-once = wl-paste --type image --watch cliphist store #Stores only image data - - exec-once = swayidle -w timeout 600 'swaylock' before-sleep 'swaylock' - - - #windowrules - windowrulev2 = 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)$ - - windowrulev2 = workspace 2 silent, class:^(org.telegram.desktop)$ - windowrulev2 = 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)$ - - #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)$ - - #binds - $mainMod = SUPER - - bind = SUPER, RETURN, exec, kitty - - bind = SUPER_SHIFT, RETURN,togglespecialworkspace, - # bind = SUPER_SHIFT, RETURN, exec, kitty --title flying_kitty --single-instance - bind = SUPER, Q, killactive, - bind = SUPER, T, togglefloating, - bind = SUPER, F, fullscreen, - - bind = SUPER, D, exec, wofi -modi --show drun - bind = SUPER SHIFT,D,exec, ~/.config/hypr/themes/apatheia/eww/launch_bar - - bind = SUPER, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy - bind = , Print, exec, grim -g "$(slurp -d)" - | swappy -f - - - 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, left, movefocus, l - bind = SUPER, right, movefocus, r - bind = SUPER, up, movefocus, u - bind = SUPER, down, movefocus, d - - bind = SUPER, 1, workspace, 1 - bind = SUPER, 2, workspace, 2 - bind = SUPER, 3, workspace, 3 - bind = SUPER, 4, workspace, 4 - bind = SUPER, 5, workspace, 5 - bind = SUPER, 6, workspace, 6 - bind = SUPER, 7, workspace, 7 - bind = SUPER, 8, workspace, 8 - bind = SUPER, 9, workspace, 9 - bind = SUPER, 0, workspace, 10 - - bind = SUPER SHIFT, 1, movetoworkspacesilent, 1 - bind = SUPER SHIFT, 2, movetoworkspacesilent, 2 - bind = SUPER SHIFT, 3, movetoworkspacesilent, 3 - bind = SUPER SHIFT, 4, movetoworkspacesilent, 4 - bind = SUPER SHIFT, 5, movetoworkspacesilent, 5 - bind = SUPER SHIFT, 6, movetoworkspacesilent, 6 - bind = SUPER SHIFT, 7, movetoworkspacesilent, 7 - bind = SUPER SHIFT, 8, movetoworkspacesilent, 8 - bind = SUPER SHIFT, 9, movetoworkspacesilent, 9 - bind = SUPER SHIFT, 0, movetoworkspacesilent, 10 - - bind = SUPER, mouse_down, workspace, e+1 - bind = SUPER, mouse_up, workspace, e-1 - - bindm = SUPER, mouse:272, movewindow - bindm = SUPER, mouse:273, resizewindow - bind = , XF86AudioPlay, exec, playerctl play-pause - bind = , XF86AudioPrev, exec, playerctl previous - bind = , XF86AudioNext, exec, playerctl next - bind = , XF86AudioRaiseVolume, exec, amixer -q sset 'Master' 5%+ - bind = , XF86AudioLowerVolume, exec, amixer -q sset 'Master' 5%- - bind = , XF86AudioMute, exec, amixer -q sset 'Master' toggle - bind = , XF86MonBrightnessUp, exec, brillo -A 5 - bind = , XF86MonBrightnessDown, exec, brillo -U 5 - - exec-once = [workspace special silent] kitty --title flying_kitty - exec-once = sh ~/.config/startup.sh + monitor=,preferred,auto,1 + + input { + kb_layout = us, ru + kb_variant = intl, phonetic + kb_options = grp:ctrls_toggle + + follow_mouse = 1 + + sensitivity = 0 # -0.5 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll=no + disable_while_typing=true + scroll_factor=1 + disable_while_typing=0 + tap-to-click=0 + } + } + + misc { + disable_hyprland_logo=true + animate_mouse_windowdragging=false + animate_manual_resizes=false + + vrr=1 #Note broken on renoir AMD DRM potentially ? + } + + general { + 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}) + + layout = dwindle + + } + + decoration { + rounding = 7 + + blur { + enabled = true + size = 2 + passes = 1 + new_optimizations = true + } + #multisample_edges = true + + #opactity + inactive_opacity = 1.0 + active_opacity = 1.0 + fullscreen_opacity = 1.0 + + # shadow + drop_shadow = no + shadow_range = 60 + shadow_offset = 0 5 + shadow_render_power = 4 + #col.shadow = rgba(00000099) + } + + animations { + enabled = false + } + + dwindle { + pseudotile = yes + # force_split = 0 + preserve_split = yes + } + + master { + new_is_master = true + } + + gestures { + workspace_swipe = off + } + + exec-once = eww open bar & dunst + + exec-once = swww init + + exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + exec-once = /nix/store/$(ls -la /nix/store | grep 'polkit-gnome' | grep '4096' | awk '{print $9}' | sed -n '$p')/libexec/polkit-gnome-authentication-agent-1 & + + exec-once = wl-paste --type text --watch cliphist store #Stores only text data + exec-once = wl-paste --type image --watch cliphist store #Stores only image data + + exec-once = swayidle -w timeout 600 'swaylock' before-sleep 'swaylock' + + + #windowrules + windowrule = noshadow, floating:0 + + 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)$ + + windowrule = workspace 2 silent, class:^(org.telegram.desktop)$ + windowrule = workspace 2 silent, class:^(discord)$ + + 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 + 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 + bind = SUPER, RETURN, exec, kitty + + bind = SUPER_SHIFT, RETURN,togglespecialworkspace, + # bind = SUPER_SHIFT, RETURN, exec, kitty --title flying_kitty --single-instance + bind = SUPER, Q, killactive, + bind = SUPER, T, togglefloating, + bind = SUPER, F, fullscreen, + + bind = SUPER, D, exec, wofi -modi --show drun + bind = SUPER SHIFT,D,exec, ~/.config/hypr/themes/apatheia/eww/launch_bar + + bind = SUPER, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy + bind = , Print, exec, grim -g "$(slurp -d)" - | swappy -f - + + 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, left, movefocus, l + bind = SUPER, right, movefocus, r + bind = SUPER, up, movefocus, u + bind = SUPER, down, movefocus, d + + bind = SUPER, 1, workspace, 1 + bind = SUPER, 2, workspace, 2 + bind = SUPER, 3, workspace, 3 + bind = SUPER, 4, workspace, 4 + bind = SUPER, 5, workspace, 5 + bind = SUPER, 6, workspace, 6 + bind = SUPER, 7, workspace, 7 + bind = SUPER, 8, workspace, 8 + bind = SUPER, 9, workspace, 9 + bind = SUPER, 0, workspace, 10 + + bind = SUPER SHIFT, 1, movetoworkspacesilent, 1 + bind = SUPER SHIFT, 2, movetoworkspacesilent, 2 + bind = SUPER SHIFT, 3, movetoworkspacesilent, 3 + bind = SUPER SHIFT, 4, movetoworkspacesilent, 4 + bind = SUPER SHIFT, 5, movetoworkspacesilent, 5 + bind = SUPER SHIFT, 6, movetoworkspacesilent, 6 + bind = SUPER SHIFT, 7, movetoworkspacesilent, 7 + bind = SUPER SHIFT, 8, movetoworkspacesilent, 8 + bind = SUPER SHIFT, 9, movetoworkspacesilent, 9 + bind = SUPER SHIFT, 0, movetoworkspacesilent, 10 + + bind = SUPER, mouse_down, workspace, e+1 + bind = SUPER, mouse_up, workspace, e-1 + + bindm = SUPER, mouse:272, movewindow + bindm = SUPER, mouse:273, resizewindow + bind = , XF86AudioPlay, exec, playerctl play-pause + bind = , XF86AudioPrev, exec, playerctl previous + bind = , XF86AudioNext, exec, playerctl next + bind = , XF86AudioRaiseVolume, exec, amixer -q sset 'Master' 5%+ + bind = , XF86AudioLowerVolume, exec, amixer -q sset 'Master' 5%- + bind = , XF86AudioMute, exec, amixer -q sset 'Master' toggle + bind = , XF86MonBrightnessUp, exec, brillo -A 5 + bind = , XF86MonBrightnessDown, exec, brillo -U 5 + + exec-once = [workspace special silent] kitty --title flying_kitty + exec-once = sh ~/.config/startup.sh ''; }; xdg.configFile."startup.sh".text = '' - #!/bin/sh - sleep 2 - keepassxc & - firefox & - jellyfin-mpv-shim & - easyeffects --gapplication-service & - - sleep 2 - nextcloud & - telegram-desktop& + + #!/bin/sh + sleep 2 + keepassxc & + firefox & + jellyfin-mpv-shim & + easyeffects --gapplication-service & + + sleep 2 + nextcloud & + telegram-desktop& ''; }; } diff --git a/modules/home/xorg/apps/default.nix b/modules/home/xorg/apps/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/modules/home/xorg/apps/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/modules/home/xorg/default.nix b/modules/home/xorg/default.nix new file mode 100644 index 0000000..ab880c8 --- /dev/null +++ b/modules/home/xorg/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./apps ./bspwm ]; } diff --git a/modules/nixos/cli/default.nix b/modules/nixos/cli/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/modules/nixos/cli/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..d556353 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./cli ./gui ./hostcfg ./system ./tools ./users ]; } diff --git a/modules/nixos/gui/default.nix b/modules/nixos/gui/default.nix new file mode 100644 index 0000000..8f1c2c1 --- /dev/null +++ b/modules/nixos/gui/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./audio ./games ./greet ./xserver ]; } diff --git a/modules/nixos/gui/greet/default.nix b/modules/nixos/gui/greet/default.nix index fd7d5d8..ee527ad 100644 --- a/modules/nixos/gui/greet/default.nix +++ b/modules/nixos/gui/greet/default.nix @@ -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; diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix new file mode 100644 index 0000000..5137e13 --- /dev/null +++ b/modules/nixos/system/default.nix @@ -0,0 +1,3 @@ +{ ... }: { + imports = [ ./dbus ./fonts ./hw ./locale ./network ./nix ./security ./xdg ]; +} diff --git a/modules/nixos/system/hw/base/default.nix b/modules/nixos/system/hw/base/default.nix index 3c21537..d7e34a3 100644 --- a/modules/nixos/system/hw/base/default.nix +++ b/modules/nixos/system/hw/base/default.nix @@ -1 +1,4 @@ -{ ... }: { services.fwupd.enable = true; } +{ ... }: { + services.fwupd.enable = true; + hardware.enableAllFirmware = true; +} diff --git a/modules/nixos/system/hw/default.nix b/modules/nixos/system/hw/default.nix new file mode 100644 index 0000000..c149db9 --- /dev/null +++ b/modules/nixos/system/hw/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./base ./boot ./fs ./opengl ./power ./udev ./virt ]; } diff --git a/modules/nixos/system/hw/opengl/default.nix b/modules/nixos/system/hw/opengl/default.nix index 3829a9f..a94a19a 100644 --- a/modules/nixos/system/hw/opengl/default.nix +++ b/modules/nixos/system/hw/opengl/default.nix @@ -1 +1,5 @@ -{ ... }: { hardware.opengl = { enable = true; }; } +{ ... }: { + hardware.opengl.enable = true; + hardware.opengl.driSupport = true; + hardware.opengl.driSupport32Bit = true; +} diff --git a/modules/nixos/system/network/default.nix b/modules/nixos/system/network/default.nix new file mode 100644 index 0000000..475eaff --- /dev/null +++ b/modules/nixos/system/network/default.nix @@ -0,0 +1,3 @@ +{ ... }: { + imports = [ ./base ./bluetooth ./gsm ./security ./wifi ./wireguard ]; +} diff --git a/modules/nixos/system/network/gsm/default.nix b/modules/nixos/system/network/gsm/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/modules/nixos/system/network/gsm/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/modules/nixos/system/nix/default.nix b/modules/nixos/system/nix/default.nix index 43ec949..973874f 100644 --- a/modules/nixos/system/nix/default.nix +++ b/modules/nixos/system/nix/default.nix @@ -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 = '' diff --git a/modules/nixos/system/security/default.nix b/modules/nixos/system/security/default.nix new file mode 100644 index 0000000..003301a --- /dev/null +++ b/modules/nixos/system/security/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./gpg ./polkit ./sops ./ssh ]; } diff --git a/modules/nixos/system/xdg/default.nix b/modules/nixos/system/xdg/default.nix index a7b0f01..e61b04f 100644 --- a/modules/nixos/system/xdg/default.nix +++ b/modules/nixos/system/xdg/default.nix @@ -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"; diff --git a/modules/nixos/tools/default.nix b/modules/nixos/tools/default.nix new file mode 100644 index 0000000..e2024ae --- /dev/null +++ b/modules/nixos/tools/default.nix @@ -0,0 +1 @@ +{ ... }: { imports = [ ./debug ./devel ]; } diff --git a/modules/nixos/tools/devel/default.nix b/modules/nixos/tools/devel/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/modules/nixos/tools/devel/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..ef51aac --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,3 @@ +{ pkgs, ... }: +[ ] +# [(import ./openttd-jgrpp) (import ./yarn-berry)] diff --git a/overlays/yarn-berry/adefault.nix b/overlays/yarn-berry/default.nix similarity index 100% rename from overlays/yarn-berry/adefault.nix rename to overlays/yarn-berry/default.nix diff --git a/packages/default.nix b/packages/default.nix new file mode 100644 index 0000000..7ccc7df --- /dev/null +++ b/packages/default.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + simc = pkgs.qt6.callPackage ./simc { }; + repalette = pkgs.callPackage ./repalette { }; + + vosk = pkgs.callPackage ./vosk { }; + + pythonPackages = { + + }; + + nodePackages = { + + }; +} diff --git a/packages/vosk/cli/default.nix b/packages/vosk/cli/default.nix index 97d29e9..94b5fcc 100644 --- a/packages/vosk/cli/default.nix +++ b/packages/vosk/cli/default.nix @@ -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"; diff --git a/systems/x86_64-darwin/default.nix b/systems/asguard/default.nix similarity index 100% rename from systems/x86_64-darwin/default.nix rename to systems/asguard/default.nix diff --git a/systems/x86_64-linux/avalon/default.nix b/systems/avalon/default.nix similarity index 100% rename from systems/x86_64-linux/avalon/default.nix rename to systems/avalon/default.nix diff --git a/homes/x86_64-linux/sora@avalon/default.nix b/systems/avalon/home.nix similarity index 100% rename from homes/x86_64-linux/sora@avalon/default.nix rename to systems/avalon/home.nix diff --git a/systems/x86_64-linux/iriy/default.nix b/systems/iriy/default.nix similarity index 100% rename from systems/x86_64-linux/iriy/default.nix rename to systems/iriy/default.nix diff --git a/systems/x86_64-linux/iriy/hardware-configuration.nix b/systems/iriy/hardware-configuration.nix similarity index 87% rename from systems/x86_64-linux/iriy/hardware-configuration.nix rename to systems/iriy/hardware-configuration.nix index bc5cfc7..a301322 100755 --- a/systems/x86_64-linux/iriy/hardware-configuration.nix +++ b/systems/iriy/hardware-configuration.nix @@ -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; } diff --git a/homes/x86_64-linux/sora@iriy/default.nix b/systems/iriy/home.nix similarity index 89% rename from homes/x86_64-linux/sora@iriy/default.nix rename to systems/iriy/home.nix index 570bf21..8bd106a 100644 --- a/homes/x86_64-linux/sora@iriy/default.nix +++ b/systems/iriy/home.nix @@ -1,6 +1,4 @@ { ... }: { - imports = [ ./display.nix ]; - config.homecfg = { username = "sora"; make = { diff --git a/systems/x86_64-linux/valinor/default.nix b/systems/valinor/default.nix similarity index 85% rename from systems/x86_64-linux/valinor/default.nix rename to systems/valinor/default.nix index 425c2d3..82ff84e 100644 --- a/systems/x86_64-linux/valinor/default.nix +++ b/systems/valinor/default.nix @@ -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 = { diff --git a/systems/x86_64-linux/valinor/hardware-configuration.nix b/systems/valinor/hardware-configuration.nix similarity index 80% rename from systems/x86_64-linux/valinor/hardware-configuration.nix rename to systems/valinor/hardware-configuration.nix index 4d42f14..42e615b 100755 --- a/systems/x86_64-linux/valinor/hardware-configuration.nix +++ b/systems/valinor/hardware-configuration.nix @@ -5,9 +5,9 @@ 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.kernelPackages = pkgs.linuxPackages_latest; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ]; @@ -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; + } diff --git a/homes/x86_64-linux/sora@valinor/default.nix b/systems/valinor/home.nix similarity index 90% rename from homes/x86_64-linux/sora@valinor/default.nix rename to systems/valinor/home.nix index 1c7fa8e..95b0182 100644 --- a/homes/x86_64-linux/sora@valinor/default.nix +++ b/systems/valinor/home.nix @@ -1,5 +1,4 @@ { config, ... }: { - imports = [ ./display.nix ]; config.homecfg = { username = "sora";