From 097b72c3cdc2178cf3dcab168147a441c4d133f6 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Mon, 16 Sep 2024 14:13:01 +0200 Subject: [PATCH 01/59] nix: Initial flake setup --- editor/default.nix | 5 +++++ editor/helix/default.nix | 8 +++++++ flake.lock | 48 ++++++++++++++++++++++++++++++++++++++++ flake.nix | 26 ++++++++++++++++++++++ nix/profiles/culisg.nix | 9 ++++++++ 5 files changed, 96 insertions(+) create mode 100644 editor/default.nix create mode 100644 editor/helix/default.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 nix/profiles/culisg.nix diff --git a/editor/default.nix b/editor/default.nix new file mode 100644 index 0000000..c672753 --- /dev/null +++ b/editor/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./helix + ]; +} diff --git a/editor/helix/default.nix b/editor/helix/default.nix new file mode 100644 index 0000000..01d61c9 --- /dev/null +++ b/editor/helix/default.nix @@ -0,0 +1,8 @@ +{ + pkgs, + ... +} : { + home.packages =[ + pkgs.helix + ]; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2564972 --- /dev/null +++ b/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726440980, + "narHash": "sha256-ChhIrjtdu5d83W+YDRH+Ec5g1MmM0xk6hJnkz15Ot7M=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1726243404, + "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..dccdae4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + description = "Configuration Home Manager jaajesque"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, home-manager }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + homeConfigurations."culisg@im2ag" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + modules = [ + ./nix/profiles/culisg.nix + ]; + }; + }; +} diff --git a/nix/profiles/culisg.nix b/nix/profiles/culisg.nix new file mode 100644 index 0000000..2cac644 --- /dev/null +++ b/nix/profiles/culisg.nix @@ -0,0 +1,9 @@ +{ + home.username = "culisg"; + home.homeDirectory = "/home/c/culisg"; + home.stateVersion = "24.05"; + + imports = [ + ../../editor + ]; +} -- 2.45.2 From 12b63427c7cb86d4eb45e48a3cbb83027065ed39 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Mon, 16 Sep 2024 14:59:29 +0200 Subject: [PATCH 02/59] nix: Added hypr config --- de/default.nix | 6 + de/hypr/default.nix | 15 ++ flake.lock | 301 +++++++++++++++++++++++++++++++++++++++- flake.nix | 12 +- nix/profiles/culisg.nix | 1 + 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 de/default.nix create mode 100644 de/hypr/default.nix diff --git a/de/default.nix b/de/default.nix new file mode 100644 index 0000000..3d62142 --- /dev/null +++ b/de/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hypr + ]; +} + diff --git a/de/hypr/default.nix b/de/hypr/default.nix new file mode 100644 index 0000000..2861d1c --- /dev/null +++ b/de/hypr/default.nix @@ -0,0 +1,15 @@ +{ + hy3, + pkgs, + ... +} : { + home.file = { + ".config/hypr/hyprland.conf.d".source = ./hyprland.conf.d; + }; + + wayland.windowManager.hyprland = { + enable = true; + extraConfig = builtins.readFile ./hyprland.conf; + plugins = [ hy3.packages.${pkgs.system}.hy3 ]; + }; +} diff --git a/flake.lock b/flake.lock index 2564972..207fadc 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,42 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hy3", + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hy3", + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725199881, + "narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -20,7 +57,216 @@ "type": "github" } }, + "hy3": { + "inputs": { + "hyprland": "hyprland" + }, + "locked": { + "lastModified": 1725825817, + "narHash": "sha256-hBvwaMlgBuR2cB1Kx6cA1z7x38HXUujNcHtBsKhaEZs=", + "owner": "outfoxxed", + "repo": "hy3", + "rev": "4b194eb5486b89102726ad5f4492bb3440c46031", + "type": "github" + }, + "original": { + "owner": "outfoxxed", + "repo": "hy3", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hy3", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722623071, + "narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "912d56025f03d41b1ad29510c423757b4379eb1c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1725814101, + "narHash": "sha256-+wE97utoDfhQP6AMdZHUmBeL8grbce/Jv2i5M+6AbaE=", + "ref": "refs/heads/main", + "rev": "0f594732b063a90d44df8c5d402d658f27471dfe", + "revCount": 5196, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "rev": "0f594732b063a90d44df8c5d402d658f27471dfe", + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hy3", + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hy3", + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725188252, + "narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "c12ab785ce1982f82594aff03b3104c598186ddd", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1724966483, + "narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1726243404, "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", @@ -39,7 +285,60 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "hy3": "hy3", + "hyprland": [ + "hy3", + "hyprland" + ], + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hy3", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hy3", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hy3", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725203932, + "narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index dccdae4..c21eb08 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,18 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # Hyprland + hyprland = { + url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + follows = "hy3/hyprland"; + }; + hy3 = { + url = "github:outfoxxed/hy3"; + }; }; - outputs = { self, nixpkgs, home-manager }: + outputs = { self, nixpkgs, home-manager, hy3, ... }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -18,6 +27,7 @@ homeConfigurations."culisg@im2ag" = home-manager.lib.homeManagerConfiguration { inherit pkgs; + extraSpecialArgs = {inherit hy3;}; modules = [ ./nix/profiles/culisg.nix ]; diff --git a/nix/profiles/culisg.nix b/nix/profiles/culisg.nix index 2cac644..eed8d9d 100644 --- a/nix/profiles/culisg.nix +++ b/nix/profiles/culisg.nix @@ -5,5 +5,6 @@ imports = [ ../../editor + ../../de ]; } -- 2.45.2 From 551aeea2fa1f5611dfb8415981cf417c6a39f7a8 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Mon, 16 Sep 2024 14:59:57 +0200 Subject: [PATCH 03/59] helix -> nix: Copy config using home manager --- editor/helix/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/helix/default.nix b/editor/helix/default.nix index 01d61c9..5faf18e 100644 --- a/editor/helix/default.nix +++ b/editor/helix/default.nix @@ -5,4 +5,9 @@ home.packages =[ pkgs.helix ]; + + home.file = { + ".config/helix/config.toml".source = ./config.toml; + ".config/helix/languages.toml".source = ./languages.toml; + }; } -- 2.45.2 From 0a11783ba3ac748696352130ac2f3387b4efcece Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 13:44:20 +0200 Subject: [PATCH 04/59] shell: Added nix config --- nix/profiles/culisg.nix | 1 + shell/bash/.bash_exec | 2 +- shell/bash/.bashrc | 2 +- shell/bash/default.nix | 18 ++++++++++++++++++ shell/default.nix | 6 ++++++ 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 shell/bash/default.nix create mode 100644 shell/default.nix diff --git a/nix/profiles/culisg.nix b/nix/profiles/culisg.nix index eed8d9d..81f659f 100644 --- a/nix/profiles/culisg.nix +++ b/nix/profiles/culisg.nix @@ -4,6 +4,7 @@ home.stateVersion = "24.05"; imports = [ + ../../shell ../../editor ../../de ]; diff --git a/shell/bash/.bash_exec b/shell/bash/.bash_exec index dae12e3..af4d26a 100644 --- a/shell/bash/.bash_exec +++ b/shell/bash/.bash_exec @@ -13,7 +13,7 @@ fi # Start in zellij by default export ZELLIJ_AUTO_EXIT=true export ZELLIJ_CONFIG_FILE=~/.config/zellij/config.kdl -eval "$(zellij setup --generate-auto-start bash)" +# eval "$(zellij setup --generate-auto-start bash)" # fnm FNM_PATH="$HOME/.local/share/fnm" diff --git a/shell/bash/.bashrc b/shell/bash/.bashrc index 54efb06..30ace4f 100755 --- a/shell/bash/.bashrc +++ b/shell/bash/.bashrc @@ -23,7 +23,7 @@ fi bind '"\e[A":history-search-backward' bind '"\e[B":history-search-forward' -export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.local/bin:$HOME/.nix-profile/bin:$PATH" export EDITOR="hx" diff --git a/shell/bash/default.nix b/shell/bash/default.nix new file mode 100644 index 0000000..4820460 --- /dev/null +++ b/shell/bash/default.nix @@ -0,0 +1,18 @@ +{ + pkgs, + ... +} : { + programs.bash.enable = true; + + home.file = { + ".bashrc".source = ./.bashrc; + ".bash_aliases".source = ./.bash_aliases; + ".bash_exec".source = ./.bash_exec; + ".bash_profile".source = ./.bash_profile; + }; + + home.packages = [ + pkgs.starship + ]; +} + diff --git a/shell/default.nix b/shell/default.nix new file mode 100644 index 0000000..3a67f04 --- /dev/null +++ b/shell/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bash + ]; +} + -- 2.45.2 From c575ff0a3cf45462f39ceacb29b81c46c3b88d95 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 13:49:32 +0200 Subject: [PATCH 05/59] term: Added nix config --- term/alacritty/default.nix | 14 ++++++++++++++ term/default.nix | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 term/alacritty/default.nix create mode 100644 term/default.nix diff --git a/term/alacritty/default.nix b/term/alacritty/default.nix new file mode 100644 index 0000000..48b3804 --- /dev/null +++ b/term/alacritty/default.nix @@ -0,0 +1,14 @@ +{ + pkgs, + ... +} : { + home.file = { + ".config/alacritty/alacritty.toml".source = ./alacritty.toml; + }; + + home.packages = [ + pkgs.alacritty + ]; +} + + diff --git a/term/default.nix b/term/default.nix new file mode 100644 index 0000000..38aa702 --- /dev/null +++ b/term/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./alacritty + ]; +} + + -- 2.45.2 From 77ce171dac8693c6ccfbbc643d70ee7c4ad640bc Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 13:49:52 +0200 Subject: [PATCH 06/59] helix: Set "EDITOR" env variable in nix config --- editor/helix/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/helix/default.nix b/editor/helix/default.nix index 5faf18e..13c7afb 100644 --- a/editor/helix/default.nix +++ b/editor/helix/default.nix @@ -10,4 +10,8 @@ ".config/helix/config.toml".source = ./config.toml; ".config/helix/languages.toml".source = ./languages.toml; }; + + home.sessionVariables = { + EDITOR = "hx"; + }; } -- 2.45.2 From ec3271786131f303c56188cad7fbc61f9fc92f67 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 13:50:23 +0200 Subject: [PATCH 07/59] profiles -> culisg: Fixed home-manager installation --- nix/profiles/culisg.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/profiles/culisg.nix b/nix/profiles/culisg.nix index 81f659f..1d896b2 100644 --- a/nix/profiles/culisg.nix +++ b/nix/profiles/culisg.nix @@ -3,6 +3,8 @@ home.homeDirectory = "/home/c/culisg"; home.stateVersion = "24.05"; + programs.home-manager.enable = true; + imports = [ ../../shell ../../editor -- 2.45.2 From 5988dcc257be348bdfbe40a069233f72c8d8d829 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 13:52:25 +0200 Subject: [PATCH 08/59] bash: Don't HM copy "bash_profile" anymore --- shell/bash/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/bash/default.nix b/shell/bash/default.nix index 4820460..8aff3f6 100644 --- a/shell/bash/default.nix +++ b/shell/bash/default.nix @@ -8,7 +8,6 @@ ".bashrc".source = ./.bashrc; ".bash_aliases".source = ./.bash_aliases; ".bash_exec".source = ./.bash_exec; - ".bash_profile".source = ./.bash_profile; }; home.packages = [ -- 2.45.2 From 42cc20e9a41e031e9a5cd2ba8c87277ccbcf007a Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 14:15:14 +0200 Subject: [PATCH 09/59] bash: Fix bashrc nix config --- shell/bash/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/bash/default.nix b/shell/bash/default.nix index 8aff3f6..07cb835 100644 --- a/shell/bash/default.nix +++ b/shell/bash/default.nix @@ -2,10 +2,12 @@ pkgs, ... } : { - programs.bash.enable = true; + programs.bash = { + enable = true; + bashrcExtra = ". ${./.bashrc}"; + }; home.file = { - ".bashrc".source = ./.bashrc; ".bash_aliases".source = ./.bash_aliases; ".bash_exec".source = ./.bash_exec; }; -- 2.45.2 From c040f83c51e1c86a1f1730a2c0124fe547202290 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 14:19:14 +0200 Subject: [PATCH 10/59] profiles -> culisg: Import "term" module --- nix/profiles/culisg.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/profiles/culisg.nix b/nix/profiles/culisg.nix index 1d896b2..411c373 100644 --- a/nix/profiles/culisg.nix +++ b/nix/profiles/culisg.nix @@ -7,6 +7,7 @@ imports = [ ../../shell + ../../term ../../editor ../../de ]; -- 2.45.2 From 479bb8028a9205bc62766fd58ed9336f53429fff Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 14:32:19 +0200 Subject: [PATCH 11/59] alacritty: Added "fira-code-nerdfont" package install --- term/alacritty/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/term/alacritty/default.nix b/term/alacritty/default.nix index 48b3804..2a798c2 100644 --- a/term/alacritty/default.nix +++ b/term/alacritty/default.nix @@ -8,6 +8,7 @@ home.packages = [ pkgs.alacritty + pkgs.fira-code-nerdfont ]; } -- 2.45.2 From 81ad140e73e81c4403fe235327e7a05620d0a328 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 14:55:52 +0200 Subject: [PATCH 12/59] alacritty: Fixed font config --- bar/default.nix | 7 +++++++ bar/eww/default.nix | 15 +++++++++++++++ de/hypr/default.nix | 5 +++++ term/alacritty/default.nix | 3 +++ 4 files changed, 30 insertions(+) create mode 100644 bar/default.nix create mode 100644 bar/eww/default.nix diff --git a/bar/default.nix b/bar/default.nix new file mode 100644 index 0000000..223c9a4 --- /dev/null +++ b/bar/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./eww + ]; +} + + diff --git a/bar/eww/default.nix b/bar/eww/default.nix new file mode 100644 index 0000000..7f7547b --- /dev/null +++ b/bar/eww/default.nix @@ -0,0 +1,15 @@ +{ + pkgs, + ... +} : { + home.file = { + ".config/eww".source = .; + }; + + home.packages = [ + pkgs.eww + ]; +} + + + diff --git a/de/hypr/default.nix b/de/hypr/default.nix index 2861d1c..1cf73cc 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -12,4 +12,9 @@ extraConfig = builtins.readFile ./hyprland.conf; plugins = [ hy3.packages.${pkgs.system}.hy3 ]; }; + + # bar is required + imports = { + ../../bar + }; } diff --git a/term/alacritty/default.nix b/term/alacritty/default.nix index 2a798c2..fb81d11 100644 --- a/term/alacritty/default.nix +++ b/term/alacritty/default.nix @@ -1,4 +1,5 @@ { + config, pkgs, ... } : { @@ -10,6 +11,8 @@ pkgs.alacritty pkgs.fira-code-nerdfont ]; + + fonts.fontconfig.enable = true; } -- 2.45.2 From 38a723941b738be5708727c71359e899a446f253 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 15:00:31 +0200 Subject: [PATCH 13/59] eww: Added nixos config --- bar/eww/default.nix | 2 +- de/hypr/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index 7f7547b..c895afe 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -3,7 +3,7 @@ ... } : { home.file = { - ".config/eww".source = .; + ".config/eww".source = ../eww; }; home.packages = [ diff --git a/de/hypr/default.nix b/de/hypr/default.nix index 1cf73cc..f533088 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -14,7 +14,7 @@ }; # bar is required - imports = { + imports = [ ../../bar - }; + ]; } -- 2.45.2 From 8891762fb32093d9900d223bb9cde31c240edc87 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Wed, 18 Sep 2024 15:01:37 +0200 Subject: [PATCH 14/59] hypr -> startup: Disable "hyprpm" --- de/hypr/hyprland.conf.d/startup.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/de/hypr/hyprland.conf.d/startup.conf b/de/hypr/hyprland.conf.d/startup.conf index ace6a7a..ccd4551 100644 --- a/de/hypr/hyprland.conf.d/startup.conf +++ b/de/hypr/hyprland.conf.d/startup.conf @@ -1,6 +1,5 @@ # Startup -exec-once = hyprpm reload -n exec-once = artix-pipewire-launcher restart exec-once = end-rs daemon exec-once = wallpaperctl daemon -- 2.45.2 From f7e6e1f3a452dfc921c01b2127fa6ad12abd47c4 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Thu, 19 Sep 2024 12:45:06 +0200 Subject: [PATCH 15/59] nix -> profiles: Enable "direnv" for culisg profile --- nix/profiles/culisg.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/profiles/culisg.nix b/nix/profiles/culisg.nix index 411c373..793739f 100644 --- a/nix/profiles/culisg.nix +++ b/nix/profiles/culisg.nix @@ -4,6 +4,7 @@ home.stateVersion = "24.05"; programs.home-manager.enable = true; + programs.direnv.enable = true; imports = [ ../../shell -- 2.45.2 From 056b899d77b0e0267450d9fe78790832a4bd2260 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Thu, 19 Sep 2024 12:57:44 +0200 Subject: [PATCH 16/59] hypr: Add `egl-wayland` dep installation --- de/hypr/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/de/hypr/default.nix b/de/hypr/default.nix index f533088..cb3ad60 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -6,6 +6,10 @@ home.file = { ".config/hypr/hyprland.conf.d".source = ./hyprland.conf.d; }; + + home.packages = [ + pkgs.egl-wayland # For NVIDIA compatibility + ]; wayland.windowManager.hyprland = { enable = true; -- 2.45.2 From 48987bcf34fc3edb1966ca84d6b54e91b010571e Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 06:44:48 +0000 Subject: [PATCH 17/59] nix: Added basic host config for "Zephyrus" --- hosts/Zephyrus/default.nix | 13 +++++++++++ hosts/Zephyrus/hardware-configuration.nix | 27 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 hosts/Zephyrus/default.nix create mode 100644 hosts/Zephyrus/hardware-configuration.nix diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix new file mode 100644 index 0000000..4ef5dbb --- /dev/null +++ b/hosts/Zephyrus/default.nix @@ -0,0 +1,13 @@ +{ + pkgs, + lib, + config, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; + + # Set your time zone. + time.timeZone = "Europe/Paris"; +} diff --git a/hosts/Zephyrus/hardware-configuration.nix b/hosts/Zephyrus/hardware-configuration.nix new file mode 100644 index 0000000..bd8f4c7 --- /dev/null +++ b/hosts/Zephyrus/hardware-configuration.nix @@ -0,0 +1,27 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp7s0f4u2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} -- 2.45.2 From 37f6be4137934bf03cd9bdb9ad691b1ab12dd6db Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 07:12:41 +0000 Subject: [PATCH 18/59] nix: Added default devShell for workspace --- .envrc | 2 ++ flake.nix | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..af0cc93 --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +use flake diff --git a/flake.nix b/flake.nix index c21eb08..9b8446d 100644 --- a/flake.nix +++ b/flake.nix @@ -32,5 +32,15 @@ ./nix/profiles/culisg.nix ]; }; + + devShells.${system}.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + git + helix + pkgs.home-manager + alejandra + nil + ]; + }; }; } -- 2.45.2 From 9286a631989ee537115d4f2b1b5e22bd2621a1b0 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 07:16:27 +0000 Subject: [PATCH 19/59] Added workspace helix nix language configuration --- .helix/languages.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .helix/languages.toml diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000..de278bd --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,4 @@ +[[language]] +name = "nix" +auto-format = true +formatter = { command = "alejandra" } -- 2.45.2 From a9a9eff3a3b713e2003dca3f811a187159c7ce79 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 07:20:19 +0000 Subject: [PATCH 20/59] flake: Set "EDITOR" env var in default mkShell --- flake.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 9b8446d..7089166 100644 --- a/flake.nix +++ b/flake.nix @@ -18,12 +18,16 @@ }; }; - outputs = { self, nixpkgs, home-manager, hy3, ... }: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in - { + outputs = { + self, + nixpkgs, + home-manager, + hy3, + ... + }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { homeConfigurations."culisg@im2ag" = home-manager.lib.homeManagerConfiguration { inherit pkgs; @@ -41,6 +45,10 @@ alejandra nil ]; + + shellHook = '' + export EDITOR=hx + ''; }; }; } -- 2.45.2 From a459a5f73ddafdcdb47bdd187d1e0260ead563f2 Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Fri, 20 Sep 2024 09:56:04 +0200 Subject: [PATCH 21/59] Update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f7275bb..a80b726 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ venv/ +.direnv -- 2.45.2 From 1ba1511c69daab4a2e6451ccdfa4409a89b4d83b Mon Sep 17 00:00:00 2001 From: Culis Gaspard Date: Fri, 20 Sep 2024 10:00:42 +0200 Subject: [PATCH 22/59] term: Added `zellij` nix config --- term/default.nix | 3 +-- term/zellij/default.nix | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 term/zellij/default.nix diff --git a/term/default.nix b/term/default.nix index 38aa702..92baeed 100644 --- a/term/default.nix +++ b/term/default.nix @@ -1,7 +1,6 @@ { imports = [ ./alacritty + ./zellij ]; } - - diff --git a/term/zellij/default.nix b/term/zellij/default.nix new file mode 100644 index 0000000..0f974bf --- /dev/null +++ b/term/zellij/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.file = { + ".config/zellij/config.kdl".source = ./config.kdl; + }; + + home.packages = [ + pkgs.zellij + ]; +} -- 2.45.2 From 4ef0d277edea745f24c5ca71e4806d5bf243c50b Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 11:36:09 +0000 Subject: [PATCH 23/59] hosts -> Zephyrus: Added disko config --- hosts/Zephyrus/disko-config.nix | 72 +++++++++++++++++++++++ hosts/Zephyrus/hardware-configuration.nix | 19 +++--- 2 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 hosts/Zephyrus/disko-config.nix diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix new file mode 100644 index 0000000..a0e63a3 --- /dev/null +++ b/hosts/Zephyrus/disko-config.nix @@ -0,0 +1,72 @@ +{ + disko.devices = { + disk = { + my-disk = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "500M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + extraOpenArgs = []; + settings = { + # if you want to use the key for interactive login be sure there is no trailing newline + # for example use `echo -n "password" > /tmp/secret.key` + keyFile = "/tmp/secret.key"; + allowDiscards = true; + }; + additionalKeyFiles = []; + content = { + type = "lvm_pv"; + vg = "pool"; + }; + }; + }; + }; + }; + }; + }; + lvm_vg = { + pool = { + type = "lvm_vg"; + lvs = { + root = { + size = "100M"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = [ + "defaults" + ]; + }; + }; + home = { + size = "10M"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/home"; + }; + }; + raw = { + size = "10M"; + }; + }; + }; + }; + }; +} diff --git a/hosts/Zephyrus/hardware-configuration.nix b/hosts/Zephyrus/hardware-configuration.nix index bd8f4c7..4e0a19f 100644 --- a/hosts/Zephyrus/hardware-configuration.nix +++ b/hosts/Zephyrus/hardware-configuration.nix @@ -1,17 +1,22 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") + ./disko-config.nix ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usbhid" "sdhci_pci"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's -- 2.45.2 From 9dbb7bd9951e00273e43748243cadbef3251d583 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 11:36:27 +0000 Subject: [PATCH 24/59] flake: Added Zephyrus host config to outputs --- flake.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/flake.nix b/flake.nix index 7089166..a1d56f8 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + disko = { + url = "github:nix-community/disko/make-disk-image"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # Hyprland hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; @@ -21,6 +26,7 @@ outputs = { self, nixpkgs, + disko, home-manager, hy3, ... @@ -28,6 +34,15 @@ system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; in { + nixosConfigurations = { + Zephyrus = nixpkgs.lib.nixosSystem { + modules = [ + ./hosts/Zephyrus + disko.nixosModules.disko + ]; + }; + }; + homeConfigurations."culisg@im2ag" = home-manager.lib.homeManagerConfiguration { inherit pkgs; -- 2.45.2 From 017c61fc1141d2078cdf9643e066b4641a8159c3 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 13:58:08 +0200 Subject: [PATCH 25/59] hosts -> Zephyrus: Finalize disko config --- hosts/Zephyrus/disko-config.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix index a0e63a3..5059924 100644 --- a/hosts/Zephyrus/disko-config.nix +++ b/hosts/Zephyrus/disko-config.nix @@ -43,8 +43,15 @@ pool = { type = "lvm_vg"; lvs = { + swap = { + size = "16G"; + content = { + type = "swap"; + resumeDevice = true; + }; + }; root = { - size = "100M"; + size = "64G"; content = { type = "filesystem"; format = "ext4"; @@ -54,17 +61,22 @@ ]; }; }; + var = { + size = "32G"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/var"; + }; + }; home = { - size = "10M"; + size = "100%FREE"; content = { type = "filesystem"; format = "ext4"; mountpoint = "/home"; }; }; - raw = { - size = "10M"; - }; }; }; }; -- 2.45.2 From 4569db7354cb287451fc252d0d63241a198c574c Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:19:38 +0200 Subject: [PATCH 26/59] Zephyrus -> disko: Renamed part labels --- hosts/Zephyrus/disko-config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix index 5059924..112305f 100644 --- a/hosts/Zephyrus/disko-config.nix +++ b/hosts/Zephyrus/disko-config.nix @@ -1,7 +1,7 @@ { disko.devices = { - disk = { - my-disk = { + nvme = { + samsung980 = { device = "/dev/nvme0n1"; type = "disk"; content = { -- 2.45.2 From 1cd2283b158f9e8bc77e40761f8d685bb7ba3711 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:21:57 +0200 Subject: [PATCH 27/59] Zephyrus -> disko: Fixed config --- hosts/Zephyrus/disko-config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix index 112305f..ad2cec4 100644 --- a/hosts/Zephyrus/disko-config.nix +++ b/hosts/Zephyrus/disko-config.nix @@ -1,6 +1,6 @@ { disko.devices = { - nvme = { + disk = { samsung980 = { device = "/dev/nvme0n1"; type = "disk"; -- 2.45.2 From d3195aa85025f6160790bc3d18a471ca72ec640a Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:33:25 +0200 Subject: [PATCH 28/59] Zephyrus -> disko: Renamed lvm labels --- hosts/Zephyrus/disko-config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix index ad2cec4..5446387 100644 --- a/hosts/Zephyrus/disko-config.nix +++ b/hosts/Zephyrus/disko-config.nix @@ -31,7 +31,7 @@ additionalKeyFiles = []; content = { type = "lvm_pv"; - vg = "pool"; + vg = "zephyrus_vg"; }; }; }; @@ -40,7 +40,7 @@ }; }; lvm_vg = { - pool = { + zephyrus_vg = { type = "lvm_vg"; lvs = { swap = { -- 2.45.2 From 9fe9cc09c596027387d26ebb2b75b75ef0849e04 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 12:56:27 +0000 Subject: [PATCH 29/59] Zephyrus: Fix hardware-config missing grub device --- hosts/Zephyrus/hardware-configuration.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/hosts/Zephyrus/hardware-configuration.nix b/hosts/Zephyrus/hardware-configuration.nix index 4e0a19f..0035108 100644 --- a/hosts/Zephyrus/hardware-configuration.nix +++ b/hosts/Zephyrus/hardware-configuration.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: { @@ -13,10 +12,22 @@ ./disko-config.nix ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usbhid" "sdhci_pci"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot = { + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + initrd = { + availableKernelModules = ["nvme" "xhci_pci" "usbhid" "sdhci_pci"]; + kernelModules = []; + }; + loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + device = "nodev"; + efiSupport = true; + }; + }; + }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's -- 2.45.2 From 08e019192df2d160b1afeab746b103ad1308fd7c Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 12:57:11 +0000 Subject: [PATCH 30/59] nix: Update flake.lock --- flake.lock | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/flake.lock b/flake.lock index 207fadc..a77bbe3 100644 --- a/flake.lock +++ b/flake.lock @@ -37,6 +37,27 @@ "type": "github" } }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690751248, + "narHash": "sha256-al5+aqPKL2VtCnuMccafyl4hQqZn+xIaG7vLuhGWfvE=", + "owner": "nix-community", + "repo": "disko", + "rev": "67c4508ce9a778f429a5af3571f49733fd3e8a05", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "make-disk-image", + "repo": "disko", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -284,6 +305,7 @@ }, "root": { "inputs": { + "disko": "disko", "home-manager": "home-manager", "hy3": "hy3", "hyprland": [ -- 2.45.2 From 9110a59790a0f4d3936b8dc2dd898e3623d41475 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 12:59:33 +0000 Subject: [PATCH 31/59] refactor: Moved user profiles to "users/" --- flake.nix | 2 +- {nix/profiles => users}/culisg.nix | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {nix/profiles => users}/culisg.nix (100%) diff --git a/flake.nix b/flake.nix index a1d56f8..3c53c0f 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,7 @@ extraSpecialArgs = {inherit hy3;}; modules = [ - ./nix/profiles/culisg.nix + ./users/culisg.nix ]; }; diff --git a/nix/profiles/culisg.nix b/users/culisg.nix similarity index 100% rename from nix/profiles/culisg.nix rename to users/culisg.nix -- 2.45.2 From 4faf40af77dfb7b74b8605f5ed2f4155d3ace5f2 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 13:16:34 +0000 Subject: [PATCH 32/59] users: Added "gaspard" user --- flake.nix | 24 ++++++++++++++++++------ hosts/Zephyrus/default.nix | 13 +++++++++++++ users/gaspard.nix | 15 +++++++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 users/gaspard.nix diff --git a/flake.nix b/flake.nix index 3c53c0f..0e0731e 100644 --- a/flake.nix +++ b/flake.nix @@ -39,17 +39,29 @@ modules = [ ./hosts/Zephyrus disko.nixosModules.disko + home-manager.nixosModules.home-manager ]; }; }; - homeConfigurations."culisg@im2ag" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + homeConfigurations = { + "gaspard" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; - extraSpecialArgs = {inherit hy3;}; - modules = [ - ./users/culisg.nix - ]; + extraSpecialArgs = {inherit hy3;}; + modules = [ + ./users/gaspard.nix + ]; + }; + + "culisg@im2ag" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + extraSpecialArgs = {inherit hy3;}; + modules = [ + ./users/culisg.nix + ]; + }; }; devShells.${system}.default = pkgs.mkShell { diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 4ef5dbb..fbde3bc 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -10,4 +10,17 @@ # Set your time zone. time.timeZone = "Europe/Paris"; + + # User config + users.groups.gaspard = { + name = "gaspard"; + }; + users.users.gaspard = { + isNormalUser = true; + extraGroups = [ + "wheel" + "video" + ]; + group = "gaspard"; + }; } diff --git a/users/gaspard.nix b/users/gaspard.nix new file mode 100644 index 0000000..dd42641 --- /dev/null +++ b/users/gaspard.nix @@ -0,0 +1,15 @@ +{...}: { + home.username = "gaspard"; + home.homeDirectory = "/home/gaspard"; + home.stateVersion = "24.05"; + + programs.home-manager.enable = true; + programs.direnv.enable = true; + + imports = [ + ../../shell + ../../term + ../../editor + ../../de + ]; +} -- 2.45.2 From 936aafb512d56e53cdb261f84b7722ef8ebf0082 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 13:43:05 +0000 Subject: [PATCH 33/59] Zephyrus -> disko: Fixed luks requiering keyfile --- hosts/Zephyrus/disko-config.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix index 5446387..0c779bc 100644 --- a/hosts/Zephyrus/disko-config.nix +++ b/hosts/Zephyrus/disko-config.nix @@ -21,14 +21,10 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = []; settings = { - # if you want to use the key for interactive login be sure there is no trailing newline - # for example use `echo -n "password" > /tmp/secret.key` - keyFile = "/tmp/secret.key"; allowDiscards = true; + askPassword = true; }; - additionalKeyFiles = []; content = { type = "lvm_pv"; vg = "zephyrus_vg"; -- 2.45.2 From 2d423aa52125d10ead073f59a1d3180213d63e50 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 13:54:50 +0000 Subject: [PATCH 34/59] Zephyrus: Enbble "commands" and "flake" nix experimental features --- hosts/Zephyrus/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index fbde3bc..dde0b9e 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -11,6 +11,9 @@ # Set your time zone. time.timeZone = "Europe/Paris"; + # Nix + nix.settings.experimental-features = ["nix-command" "flakes"]; + # User config users.groups.gaspard = { name = "gaspard"; -- 2.45.2 From 1525ee9499ebfcffa49329f3a66432928118f933 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:01:22 +0000 Subject: [PATCH 35/59] refactor(flake): Pass `inputs` as `extraSpecialArgs` --- de/hypr/default.nix | 8 ++++---- flake.nix | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/de/hypr/default.nix b/de/hypr/default.nix index cb3ad60..4eb28f7 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -1,8 +1,8 @@ { - hy3, + inputs, pkgs, ... -} : { +}: { home.file = { ".config/hypr/hyprland.conf.d".source = ./hyprland.conf.d; }; @@ -10,11 +10,11 @@ home.packages = [ pkgs.egl-wayland # For NVIDIA compatibility ]; - + wayland.windowManager.hyprland = { enable = true; extraConfig = builtins.readFile ./hyprland.conf; - plugins = [ hy3.packages.${pkgs.system}.hy3 ]; + plugins = [inputs.hy3.packages.${pkgs.system}.hy3]; }; # bar is required diff --git a/flake.nix b/flake.nix index 0e0731e..6c74a5c 100644 --- a/flake.nix +++ b/flake.nix @@ -28,9 +28,8 @@ nixpkgs, disko, home-manager, - hy3, ... - }: let + } @ inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; in { @@ -48,7 +47,7 @@ "gaspard" = home-manager.lib.homeManagerConfiguration { inherit pkgs; - extraSpecialArgs = {inherit hy3;}; + extraSpecialArgs = {inherit inputs;}; modules = [ ./users/gaspard.nix ]; @@ -57,7 +56,7 @@ "culisg@im2ag" = home-manager.lib.homeManagerConfiguration { inherit pkgs; - extraSpecialArgs = {inherit hy3;}; + extraSpecialArgs = {inherit inputs;}; modules = [ ./users/culisg.nix ]; -- 2.45.2 From abcb3d53c2b430bec49bebcac9c7276637c1bec9 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:02:12 +0000 Subject: [PATCH 36/59] fix(users): Fixed import paths --- users/culisg.nix | 8 ++++---- users/gaspard.nix | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/users/culisg.nix b/users/culisg.nix index 793739f..d5fa2df 100644 --- a/users/culisg.nix +++ b/users/culisg.nix @@ -7,9 +7,9 @@ programs.direnv.enable = true; imports = [ - ../../shell - ../../term - ../../editor - ../../de + ../shell + ../term + ../editor + ../de ]; } diff --git a/users/gaspard.nix b/users/gaspard.nix index dd42641..d32a6ea 100644 --- a/users/gaspard.nix +++ b/users/gaspard.nix @@ -7,9 +7,9 @@ programs.direnv.enable = true; imports = [ - ../../shell - ../../term - ../../editor - ../../de + ../shell + ../term + ../editor + ../de ]; } -- 2.45.2 From 3ca03b83ed59cf73cd5e9194f721b0f1e390cf92 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:16:28 +0000 Subject: [PATCH 37/59] fix(flake): Fixed disko input url --- flake.lock | 7 +++---- flake.nix | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index a77bbe3..77f964f 100644 --- a/flake.lock +++ b/flake.lock @@ -44,16 +44,15 @@ ] }, "locked": { - "lastModified": 1690751248, - "narHash": "sha256-al5+aqPKL2VtCnuMccafyl4hQqZn+xIaG7vLuhGWfvE=", + "lastModified": 1726838624, + "narHash": "sha256-SU40aZ/UyK4bhuanaWvqlhIw2/kiDrGYcKxCkTn5FP8=", "owner": "nix-community", "repo": "disko", - "rev": "67c4508ce9a778f429a5af3571f49733fd3e8a05", + "rev": "0fe779905ffe730eace0bf7ecf56938c625012a5", "type": "github" }, "original": { "owner": "nix-community", - "ref": "make-disk-image", "repo": "disko", "type": "github" } diff --git a/flake.nix b/flake.nix index 6c74a5c..51bc0fa 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ }; disko = { - url = "github:nix-community/disko/make-disk-image"; + url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; -- 2.45.2 From d3176fcc3de14d45321c38dcfee452a4e26bae6d Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 14:20:17 +0000 Subject: [PATCH 38/59] Zephyrus: Setup home manager for gaspard --- flake.nix | 1 + hosts/Zephyrus/default.nix | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/flake.nix b/flake.nix index 51bc0fa..d4a4140 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ in { nixosConfigurations = { Zephyrus = nixpkgs.lib.nixosSystem { + extraArgs = {inherit inputs;}; modules = [ ./hosts/Zephyrus disko.nixosModules.disko diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index dde0b9e..4003e8e 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -1,4 +1,5 @@ { + inputs, pkgs, lib, config, @@ -26,4 +27,11 @@ ]; group = "gaspard"; }; + + home-manager = { + extraSpecialArgs = {inherit inputs;}; + users = { + "gaspard" = import ../../users/gaspard.nix; + }; + }; } -- 2.45.2 From ebef97a0a94206eb84edd737cfd87337f16a7f54 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 16:51:14 +0200 Subject: [PATCH 39/59] chore(Zephyrus): Set console keymap to fr --- hosts/Zephyrus/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 4003e8e..7012b89 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -12,6 +12,8 @@ # Set your time zone. time.timeZone = "Europe/Paris"; + console.keyMap = "fr" + # Nix nix.settings.experimental-features = ["nix-command" "flakes"]; -- 2.45.2 From 159c1554288911fb6a2b59f65b9b46ec6d1c336d Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 16:54:41 +0200 Subject: [PATCH 40/59] fix(Zephyrus): Fixed typo --- hosts/Zephyrus/default.nix | 2 +- hosts/Zephyrus/disko-config.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 7012b89..6c5da4b 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -12,7 +12,7 @@ # Set your time zone. time.timeZone = "Europe/Paris"; - console.keyMap = "fr" + console.keyMap = "fr"; # Nix nix.settings.experimental-features = ["nix-command" "flakes"]; diff --git a/hosts/Zephyrus/disko-config.nix b/hosts/Zephyrus/disko-config.nix index 0c779bc..570efc9 100644 --- a/hosts/Zephyrus/disko-config.nix +++ b/hosts/Zephyrus/disko-config.nix @@ -23,7 +23,7 @@ name = "crypted"; settings = { allowDiscards = true; - askPassword = true; + # askPassword = true; }; content = { type = "lvm_pv"; -- 2.45.2 From 3c4da2d439c05e017f15c374f947866463355a27 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 17:12:30 +0200 Subject: [PATCH 41/59] feat(Zephyrus): Added nvidia relative config --- hosts/Zephyrus/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 6c5da4b..3c1b325 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -36,4 +36,22 @@ "gaspard" = import ../../users/gaspard.nix; }; }; + + # NVIDIA + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; + + hardware.opengl.enable = true; + + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + modesetting.enable = true; + + open = false; # Bruuh + + prime = { + amdgpuBusId = "PCI:7:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; } -- 2.45.2 From 6e3f665fea9b993e7703760d9f7f1aa149eaafb2 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 17:24:37 +0200 Subject: [PATCH 42/59] feat(Zephyrus): Added git system package --- hosts/Zephyrus/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 3c1b325..c30abab 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -37,10 +37,13 @@ }; }; + # Programs + environment.systemPackages = [pkgs.git]; + # NVIDIA nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; - hardware.opengl.enable = true; + hardware.graphics.enable = true; services.xserver.videoDrivers = ["nvidia"]; @@ -54,4 +57,6 @@ nvidiaBusId = "PCI:1:0:0"; }; }; + + system.stateVersion = "24.11"; } -- 2.45.2 From feb7cd1e343a0aef78a2471e8c31a16f3e5fa56e Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 17:54:07 +0200 Subject: [PATCH 43/59] fix(Zephyrus + hypr): Fixed seatd issues --- de/hypr/default.nix | 1 + hosts/Zephyrus/default.nix | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/de/hypr/default.nix b/de/hypr/default.nix index 4eb28f7..16db106 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -9,6 +9,7 @@ home.packages = [ pkgs.egl-wayland # For NVIDIA compatibility + pkgs.xdg-desktop-portal-hyprland ]; wayland.windowManager.hyprland = { diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index c30abab..080faf6 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -26,6 +26,7 @@ extraGroups = [ "wheel" "video" + "seat" ]; group = "gaspard"; }; @@ -40,6 +41,9 @@ # Programs environment.systemPackages = [pkgs.git]; + # Services + services.seatd.enable = true; + # NVIDIA nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; -- 2.45.2 From 2949b77dd0511ec492d1ed6a20d3997e445d53ed Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 17:56:03 +0200 Subject: [PATCH 44/59] fix(helix): Fixed "jaaj" theme not being linked by HM --- editor/helix/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/editor/helix/default.nix b/editor/helix/default.nix index 13c7afb..c85c522 100644 --- a/editor/helix/default.nix +++ b/editor/helix/default.nix @@ -1,14 +1,12 @@ -{ - pkgs, - ... -} : { - home.packages =[ +{pkgs, ...}: { + home.packages = [ pkgs.helix ]; home.file = { ".config/helix/config.toml".source = ./config.toml; ".config/helix/languages.toml".source = ./languages.toml; + ".config/helix/themes/jaaj.toml".source = ./themes/jaaj.toml; }; home.sessionVariables = { -- 2.45.2 From 9547d9812e04ecf90e7e535a8aab5b6a78f5d712 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:14:01 +0200 Subject: [PATCH 45/59] feat(Zephyrus): Added some utility system packages --- hosts/Zephyrus/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 080faf6..d5df186 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -39,13 +39,21 @@ }; # Programs - environment.systemPackages = [pkgs.git]; + environment.systemPackages = [ + pkgs.git + pkgs.dash + pkgs.ncdu + pkgs.neofetch + pkgs.bottom + pkgs.htop + pkgs.nvtop + ]; # Services services.seatd.enable = true; # NVIDIA - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings" "nvtop"]; hardware.graphics.enable = true; -- 2.45.2 From 027b971f8aff0b733705d23921032ec62e8e4844 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:15:00 +0200 Subject: [PATCH 46/59] feat(eww -> nix): Link `eww-bard` script to local bin with HM --- bar/eww/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index c895afe..28d6820 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -1,15 +1,14 @@ -{ - pkgs, - ... -} : { +{pkgs, ...}: { home.file = { ".config/eww".source = ../eww; + # Eww-barD script + ".local/bin/eww-bard" = { + source = ../../bin/eww-bard; + executable = true; + }; }; - + home.packages = [ pkgs.eww ]; } - - - -- 2.45.2 From 629dd4730ccc1dd835c1eab55cea84ad604f7015 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:17:21 +0200 Subject: [PATCH 47/59] fix(Zephyrus): Remove "nvtop" as is is unfree --- hosts/Zephyrus/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index d5df186..17fc868 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -46,14 +46,13 @@ pkgs.neofetch pkgs.bottom pkgs.htop - pkgs.nvtop ]; # Services services.seatd.enable = true; # NVIDIA - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings" "nvtop"]; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; hardware.graphics.enable = true; -- 2.45.2 From 1eb99380ea4c99c5f8ec6abadabefcf4efa5010b Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:22:45 +0200 Subject: [PATCH 48/59] fix(bin): Fixed shebang paths --- bin/eww-bard | 2 +- bin/jaaj | 2 +- bin/mc-key-fix | 2 +- bin/uwu-launcher | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/eww-bard b/bin/eww-bard index 40015b2..6ba3646 100755 --- a/bin/eww-bard +++ b/bin/eww-bard @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash # Monitor duplication daemon WIDGET_NAME=bar diff --git a/bin/jaaj b/bin/jaaj index 2f76621..46b1e3f 100755 --- a/bin/jaaj +++ b/bin/jaaj @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python jaajs = [ """ diff --git a/bin/mc-key-fix b/bin/mc-key-fix index 4ee62e8..bb1bc79 100755 --- a/bin/mc-key-fix +++ b/bin/mc-key-fix @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh xmodmap -e "keycode 10 = 1" xmodmap -e "keycode 11 = 2" diff --git a/bin/uwu-launcher b/bin/uwu-launcher index 1cb5f10..27ad8b9 100755 --- a/bin/uwu-launcher +++ b/bin/uwu-launcher @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh alacritty --class "uwu-uwu" -e /usr/bin/bash -c "uwu | dotacat && read" & alacritty --class "uwu-neofetch" -e /usr/bin/bash -c "echo '' && neofetch && read" & -- 2.45.2 From 955c5bb579790263d95448001951fd67f192d814 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:26:32 +0200 Subject: [PATCH 49/59] fix(eww -> nix): Added missing script program requirements --- bar/eww/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index 28d6820..72ed694 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -10,5 +10,8 @@ home.packages = [ pkgs.eww + # Script dependencies + pkgs.jq + pkgs.socat ]; } -- 2.45.2 From 0d945977770b2e6ede9fe08b2cf291c33d7a7dd4 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:28:58 +0200 Subject: [PATCH 50/59] feat(hypr -> nix): Link Hyprland launch script to local bin with HM --- bin/Hyprland | 2 +- de/hypr/default.nix | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/Hyprland b/bin/Hyprland index 133832b..df38ce4 100755 --- a/bin/Hyprland +++ b/bin/Hyprland @@ -9,6 +9,6 @@ export XDG_CONFIG_HOME="${HOME}/.config" # Execution exec ssh-agent \ dbus-launch --exit-with-session \ - /usr/bin/Hyprland \ + hyprland \ "$@" diff --git a/de/hypr/default.nix b/de/hypr/default.nix index 16db106..98a3fc5 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -5,6 +5,11 @@ }: { home.file = { ".config/hypr/hyprland.conf.d".source = ./hyprland.conf.d; + # Hyprland launch wrapper + ".local/bin/Hyprland" = { + source = ../../bin/Hyprland; + executable = true; + }; }; home.packages = [ -- 2.45.2 From 995aae5ff81e77f13ef950da768b6f5e922ff392 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:45:02 +0200 Subject: [PATCH 51/59] fix(eww -> scripts): Fixed shebangs --- bar/eww/scripts/get-bluetooth-info | 2 +- bar/eww/scripts/get-connectivity | 2 +- bar/eww/scripts/get-music-info | 2 +- bar/eww/scripts/get-volume | 2 +- bar/eww/scripts/hypr/change-active-workspace | 3 ++- bar/eww/scripts/hypr/hyprstatus | 2 +- bar/eww/scripts/power_profile | 2 +- bar/eww/scripts/refresh_rate | 3 ++- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bar/eww/scripts/get-bluetooth-info b/bar/eww/scripts/get-bluetooth-info index 1e128b2..77a5c4a 100755 --- a/bar/eww/scripts/get-bluetooth-info +++ b/bar/eww/scripts/get-bluetooth-info @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env dash info (){ power=$(bluetoothctl show | grep Powered | awk '{print $2}' | sed 's/yes/on/g; s/no/off/g') diff --git a/bar/eww/scripts/get-connectivity b/bar/eww/scripts/get-connectivity index 66ee186..8009206 100755 --- a/bar/eww/scripts/get-connectivity +++ b/bar/eww/scripts/get-connectivity @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash print_state() { case "$1" in diff --git a/bar/eww/scripts/get-music-info b/bar/eww/scripts/get-music-info index 8aa6501..b129031 100755 --- a/bar/eww/scripts/get-music-info +++ b/bar/eww/scripts/get-music-info @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env dash info (){ title=$(playerctl metadata xesam:title 2> /dev/null) diff --git a/bar/eww/scripts/get-volume b/bar/eww/scripts/get-volume index f5706eb..1e6d202 100755 --- a/bar/eww/scripts/get-volume +++ b/bar/eww/scripts/get-volume @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh volume (){ vol=$(pamixer --get-volume-human) diff --git a/bar/eww/scripts/hypr/change-active-workspace b/bar/eww/scripts/hypr/change-active-workspace index 88f2dcf..ea811f2 100755 --- a/bar/eww/scripts/hypr/change-active-workspace +++ b/bar/eww/scripts/hypr/change-active-workspace @@ -1,4 +1,5 @@ -#!/bin/dash +#!/usr/bin/env dash + function clamp { min=$1 max=$2 diff --git a/bar/eww/scripts/hypr/hyprstatus b/bar/eww/scripts/hypr/hyprstatus index 942500b..10dc401 100755 --- a/bar/eww/scripts/hypr/hyprstatus +++ b/bar/eww/scripts/hypr/hyprstatus @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash spaces (){ hyprctl workspaces -j | jq -c 'map({id: .id, windows: .windows, monitor: .monitorID}) | sort_by(.id)' diff --git a/bar/eww/scripts/power_profile b/bar/eww/scripts/power_profile index 955761b..5494bd7 100755 --- a/bar/eww/scripts/power_profile +++ b/bar/eww/scripts/power_profile @@ -1,4 +1,4 @@ -#!/bin/dash +#!/usr/bin/env dash profile="$(powerprofilesctl get)" diff --git a/bar/eww/scripts/refresh_rate b/bar/eww/scripts/refresh_rate index b523a28..cc02659 100755 --- a/bar/eww/scripts/refresh_rate +++ b/bar/eww/scripts/refresh_rate @@ -1,4 +1,5 @@ -#!/bin/dash +#!/usr/bin/env dash + refresh_rate=$(hyprctl -j monitors | jq '.[0].refreshRate | round') if [ "$1" = "toggle" ]; then -- 2.45.2 From 43d9066b01f6621d9bcd5ab56ff392541515032c Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 18:53:25 +0200 Subject: [PATCH 52/59] refactor(eww -> nix): Moved eww exclusive deps from host config to module config --- bar/eww/default.nix | 2 ++ hosts/Zephyrus/default.nix | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index 72ed694..25a0b16 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -12,6 +12,8 @@ pkgs.eww # Script dependencies pkgs.jq + pkgs.dash pkgs.socat + pkgs.power-profiles-ctl ]; } diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 17fc868..a374575 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -41,7 +41,6 @@ # Programs environment.systemPackages = [ pkgs.git - pkgs.dash pkgs.ncdu pkgs.neofetch pkgs.bottom -- 2.45.2 From 47bcfcd9261204ba787e9bf9c683a8db863b54e2 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 19:00:44 +0200 Subject: [PATCH 53/59] fix(eww -> nix): Fix typo in package name --- bar/eww/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index 25a0b16..6519a7d 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -14,6 +14,6 @@ pkgs.jq pkgs.dash pkgs.socat - pkgs.power-profiles-ctl + pkgs.power-profiles-daemon ]; } -- 2.45.2 From aad163473d0ea499a3199be1b2afdb0e99548df8 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 19:04:15 +0200 Subject: [PATCH 54/59] fix(eww): Fixed `power-profiles-daemon` not being loaded by systemd --- bar/eww/default.nix | 1 - hosts/Zephyrus/default.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index 6519a7d..f122f1b 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -14,6 +14,5 @@ pkgs.jq pkgs.dash pkgs.socat - pkgs.power-profiles-daemon ]; } diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index a374575..86685ce 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -49,6 +49,7 @@ # Services services.seatd.enable = true; + services.power-profiles-daemon.enable = true; # NVIDIA nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; -- 2.45.2 From 003741d233312b21364ea9c24aae3af0e67a09b9 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 19:32:51 +0200 Subject: [PATCH 55/59] feat(hypr + misc): Added most required packages from hyprland config --- de/hypr/default.nix | 23 +++++++++++++++++++++++ misc/anyrun/default.nix | 9 +++++++++ misc/swayosd/default.nix | 9 +++++++++ 3 files changed, 41 insertions(+) create mode 100644 misc/anyrun/default.nix create mode 100644 misc/swayosd/default.nix diff --git a/de/hypr/default.nix b/de/hypr/default.nix index 98a3fc5..de10738 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -10,11 +10,31 @@ source = ../../bin/Hyprland; executable = true; }; + # UWU launcher script + ".local/bin/uwu-launcher" = { + source = ../../bin/uwu-launcher; + executable = true; + }; + # Togglescreen script + ".local/bin/togglescreen" = { + source = ../../bin/togglescreen; + executable = true; + }; }; home.packages = [ pkgs.egl-wayland # For NVIDIA compatibility pkgs.xdg-desktop-portal-hyprland + # Common DE packages required in config + pkgs.wl-clipboard-rs + pkgs.grim + pkgs.slurp + pkgs.hyprpicker + pkgs.udiskie + # Apps launchable from bindings + pkgs.firefox + pkgs.kitty + pkgs.yazi ]; wayland.windowManager.hyprland = { @@ -26,5 +46,8 @@ # bar is required imports = [ ../../bar + ../../term/alacritty + ../../misc/swayosd + ../../misc/anyrun ]; } diff --git a/misc/anyrun/default.nix b/misc/anyrun/default.nix new file mode 100644 index 0000000..850ff9e --- /dev/null +++ b/misc/anyrun/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.file = { + ".config/anyrun".source = ../anyrun; + }; + + home.packages = [ + pkgs.anyrun + ]; +} diff --git a/misc/swayosd/default.nix b/misc/swayosd/default.nix new file mode 100644 index 0000000..e9a958c --- /dev/null +++ b/misc/swayosd/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.file = { + ".config/swayosd/style.css".source = ./style.css; + }; + + home.packages = [ + pkgs.swayosd + ]; +} -- 2.45.2 From 71847837d7ce062d88a8b220d10700d361c7c6be Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 19:44:48 +0200 Subject: [PATCH 56/59] feat(Zephyrus): Setup wifi and bluetooth --- hosts/Zephyrus/default.nix | 74 +++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 86685ce..ad99a3b 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -9,13 +9,52 @@ ./hardware-configuration.nix ]; + # Nix + nix.settings.experimental-features = ["nix-command" "flakes"]; + # Set your time zone. time.timeZone = "Europe/Paris"; console.keyMap = "fr"; - # Nix - nix.settings.experimental-features = ["nix-command" "flakes"]; + # Network & Bluetooth + networking.wireless.iwd.enable = true; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + + # Services + services.seatd.enable = true; + services.blueman.enable = true; + services.power-profiles-daemon.enable = true; + + # Programs + environment.systemPackages = [ + pkgs.git + pkgs.ncdu + pkgs.neofetch + pkgs.bottom + pkgs.htop + pkgs.iwgtk + ]; + + # NVIDIA + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; + + hardware.graphics.enable = true; + + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + modesetting.enable = true; + + open = false; # Bruuh + + prime = { + amdgpuBusId = "PCI:7:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; # User config users.groups.gaspard = { @@ -38,36 +77,5 @@ }; }; - # Programs - environment.systemPackages = [ - pkgs.git - pkgs.ncdu - pkgs.neofetch - pkgs.bottom - pkgs.htop - ]; - - # Services - services.seatd.enable = true; - services.power-profiles-daemon.enable = true; - - # NVIDIA - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["nvidia-x11" "nvidia-settings"]; - - hardware.graphics.enable = true; - - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - modesetting.enable = true; - - open = false; # Bruuh - - prime = { - amdgpuBusId = "PCI:7:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; - system.stateVersion = "24.11"; } -- 2.45.2 From e5bc81b8eb87d70051ce238c0f3a1fbd76ac91be Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 19:59:57 +0200 Subject: [PATCH 57/59] feat(Zephyrus): Setup audio --- bar/eww/default.nix | 2 ++ hosts/Zephyrus/default.nix | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/bar/eww/default.nix b/bar/eww/default.nix index f122f1b..4b0dcfc 100644 --- a/bar/eww/default.nix +++ b/bar/eww/default.nix @@ -14,5 +14,7 @@ pkgs.jq pkgs.dash pkgs.socat + pkgs.pamixer + pkgs.pavucontrol ]; } diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index ad99a3b..a0533f2 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -23,9 +23,13 @@ hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; + # Audio + hardware.pulseaudio.enable = true; + # Services services.seatd.enable = true; services.blueman.enable = true; + services.pipewire.pulse.enable = true; services.power-profiles-daemon.enable = true; # Programs @@ -66,6 +70,7 @@ "wheel" "video" "seat" + "audio" ]; group = "gaspard"; }; -- 2.45.2 From 2c044113f7c5d0f65da7745f586de0287daf67d1 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 21:22:16 +0200 Subject: [PATCH 58/59] feat(hypr): Setup theme packages and init --- de/hypr/default.nix | 4 ++++ de/hypr/hyprland.conf.d/startup.conf | 1 + 2 files changed, 5 insertions(+) diff --git a/de/hypr/default.nix b/de/hypr/default.nix index de10738..0ee92a2 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -35,6 +35,10 @@ pkgs.firefox pkgs.kitty pkgs.yazi + # Theme + pkgs.bibata-cursors + pkgs.qogir-theme + pkgs.qogir-icon-theme ]; wayland.windowManager.hyprland = { diff --git a/de/hypr/hyprland.conf.d/startup.conf b/de/hypr/hyprland.conf.d/startup.conf index ccd4551..7fd4d95 100644 --- a/de/hypr/hyprland.conf.d/startup.conf +++ b/de/hypr/hyprland.conf.d/startup.conf @@ -6,4 +6,5 @@ exec-once = wallpaperctl daemon exec-once = swayosd-server exec-once = udiskie exec-once = eww-bard +exec-once = hyprctl setcursor Bibata-Modern-Classic 24 exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -- 2.45.2 From 0e8367e06aaee48072f5666145daebc0e9420f18 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 20 Sep 2024 21:25:18 +0200 Subject: [PATCH 59/59] feat(hypr): Added `swww` package --- de/hypr/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/de/hypr/default.nix b/de/hypr/default.nix index 0ee92a2..57fa055 100644 --- a/de/hypr/default.nix +++ b/de/hypr/default.nix @@ -31,6 +31,7 @@ pkgs.slurp pkgs.hyprpicker pkgs.udiskie + pkgs.swww # Apps launchable from bindings pkgs.firefox pkgs.kitty -- 2.45.2