Sun Jun 2 02:02:14 PM CEST 2024

This commit is contained in:
Thomas Avé 2024-06-02 14:02:14 +02:00
parent d11e7cf1d4
commit e3f896fc68
7 changed files with 512 additions and 517 deletions

View File

@ -1,97 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, inputs, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Brussels";
networking.hostName = "nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
# System Packages
programs.zsh.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
# Pipewire
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.user = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
wget
git
curl
];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; #hint electron apps to use wayland:
# Fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
];
}

View File

@ -31,26 +31,116 @@
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in commonModules = name: [
{ {
nixosConfigurations = { imports = [
nixos = nixpkgs.lib.nixosSystem { ./hardware-configuration.nix
specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules ];
modules = [ networking.hostName = name;
./configuration.nix
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Brussels";
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
experimental-features = [ "nix-command" "flakes" ];
};
programs.zsh.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.${name} = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
wget
curl
git
];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; #hint electron apps to use wayland:
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
];
}
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager = { home-manager = {
extraSpecialArgs = { inherit inputs; }; # allows access to flake inputs in hm modules extraSpecialArgs = { inherit inputs; }; # allows access to flake inputs in hm modules
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.user = { users.${name}= {
imports = [ ./home.nix ]; imports = [ ./home.nix ];
}; };
}; };
} }
./hosts/${name}
]; ];
mkSystem = name: cfg: nixpkgs.lib.nixosSystem {
system = cfg.system or "x86_64-linux";
modules = (commonModules name) ++ (cfg.modules or [ ]);
specialArgs = attrs;
}; };
systems = {
nixos = {
# No specific overrides yet
}
}; };
in
{
nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems;
}; };
} }

View File

@ -14,9 +14,11 @@
kb-cancel = "Super_L+XF86Launch5,Escape"; kb-cancel = "Super_L+XF86Launch5,Escape";
combi-hide-mode-prefix = true; combi-hide-mode-prefix = true;
}; };
theme = let theme =
let
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
in { in
{
"*" = { "*" = {
background = mkLiteral "#0f111a"; background = mkLiteral "#0f111a";
foreground = mkLiteral "#f1f1f1"; foreground = mkLiteral "#f1f1f1";

View File

@ -13,9 +13,9 @@
height = 35; height = 35;
spacing = 4; spacing = 4;
output = "DP-2"; output = "DP-2";
modules-left = ["wlr/taskbar"]; modules-left = [ "wlr/taskbar" ];
modules-center = ["hyprland/workspaces"]; modules-center = [ "hyprland/workspaces" ];
modules-right = ["tray" "wireplumber" "cpu#cpu2" "cpu" "memory" "custom/updates" "temperature" "battery" "clock" "clock#clock2"]; modules-right = [ "tray" "wireplumber" "cpu#cpu2" "cpu" "memory" "custom/updates" "temperature" "battery" "clock" "clock#clock2" ];
"wlr/taskbar" = { "wlr/taskbar" = {
on-click = "activate"; on-click = "activate";
on-click-right = "close"; on-click-right = "close";
@ -26,7 +26,7 @@
format = "{icon} {volume}%"; format = "{icon} {volume}%";
format-muted = ""; format-muted = "";
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
format-icons = ["" "" ""]; format-icons = [ "" "" "" ];
}; };
"hyprland/workspaces" = { "hyprland/workspaces" = {
disable-scroll = true; disable-scroll = true;
@ -85,7 +85,7 @@
tooltip-format = "{capacity}% ({time})"; tooltip-format = "{capacity}% ({time})";
format-plugged = "{capacity}% "; format-plugged = "{capacity}% ";
format-alt = "{capacity}% {time} {icon}"; format-alt = "{capacity}% {time} {icon}";
format-icons = [" " " " " " " " " "]; format-icons = [ " " " " " " " " " " ];
}; };
}; };
}; };