refactor: modularize system files; move xdg portal, IT WORKS :DDD

This commit is contained in:
EinEtwas 2024-10-26 19:39:36 +02:00
parent 101c9d55c7
commit a75200b94e
Signed by: etwas
SSH key fingerprint: SHA256:bHhIeAdn/2k9jmOs6+u6ox98VYmoHUN3HfnpV2w8Ws0
23 changed files with 132 additions and 161 deletions

View file

@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ imports = [
./hyprland.nix
./waybar
./dunst.nix
./swaylock.nix
./wofi.nix
./alacritty.nix ./alacritty.nix
./dunst.nix
./hyprland.nix
./swaylock.nix
./waybar
./wofi.nix
]; ];
} }

View file

@ -193,4 +193,13 @@
]; ];
}; };
}; };
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
];
config.common.default = "*";
};
} }

View file

@ -1,92 +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
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, ... }:
{
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "rhea-laptop"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "de";
variant = "neo_qwertz";
};
# Configure console keymap
console.keyMap = "de";
# Enable Fingerprint Support
services.fprintd.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
fprintd
polkit_gnome
];
programs.zsh.enable = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
# Enable Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -1,17 +1,17 @@
{ {
imports = [ imports = [
./agenix.nix ./essentials
./configuration.nix ./misc_hardware
./hardware-configuration.nix ./utils
./fingerprint.nix
./fonts.nix
./wayland.nix
./greetd.nix
./power-profiles.nix
./environment.nix
./polkit.nix
./networking.nix
./diskservices.nix
./bluetooth.nix
]; ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
programs.hyprland.enable = true;
} }

View file

@ -1,3 +0,0 @@
{
environment.pathsToLink = [ "/share/zsh" ];
}

View file

@ -0,0 +1,5 @@
{ pkgs, ... }: {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,9 @@
{ pkgs, ... }: {
imports = [
./bootloader.nix
./environment.nix
./hardware_config.nix
./locale.nix
./nix.nix
];
}

View file

@ -0,0 +1,19 @@
{ pkgs, ... }: {
programs.zsh.enable = true;
environment.pathsToLink = [ "/share/zsh" ];
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
fonts.packages = with pkgs; [
nerdfonts
jetbrains-mono
];
environment.systemPackages = with pkgs; [
fprintd
polkit_gnome
];
}

View file

@ -0,0 +1,28 @@
{
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "de";
variant = "neo_qwertz";
};
# Configure console keymap
console.keyMap = "de";
}

View file

@ -0,0 +1,5 @@
{
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

View file

@ -1,9 +0,0 @@
{ pkgs, ... }:
{
services.fprintd = {
enable = true;
};
security.pam.services.login.fprintAuth = true;
security.pam.services.sudo.fprintAuth = true;
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
fonts.packages = with pkgs; [
nerdfonts
jetbrains-mono
];
}

View file

@ -1,14 +0,0 @@
{ pkgs, ... }:
{
security.pam.services.greetd.enableGnomeKeyring = true;
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -g \"Hello there (^^)/\" --cmd Hyprland";
user = "rhea";
};
};
};
}

View file

@ -0,0 +1,8 @@
{ config, ... }: {
imports = [
./bluetooth.nix
./diskservices.nix
./networking.nix
./power_profiles.nix
];
}

View file

@ -1,5 +1,7 @@
{ config, ... }: { config, ... }:
{ {
networking.hostName = "rhea-laptop";
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = true; networking.networkmanager.wifi.powersave = true;

View file

@ -3,34 +3,34 @@
# TODO: Get a token2 and set up https://github.com/oddlama/agenix-rekey # TODO: Get a token2 and set up https://github.com/oddlama/agenix-rekey
age.identityPaths = [ "/var/lib/persistent/host_id_ed25519" ]; age.identityPaths = [ "/var/lib/persistent/host_id_ed25519" ];
age.secrets.access-tokens-github.file = ../secrets/gh_argstr.age; age.secrets.access-tokens-github.file = ../../secrets/gh_argstr.age;
age.secrets.fbda-wg-privkey.file = ../secrets/fbda_wg_priv_key.age; age.secrets.fbda-wg-privkey.file = ../../secrets/fbda_wg_priv_key.age;
age.secrets.fbda-wg-psk.file = ../secrets/fbda_wg_psk.age; age.secrets.fbda-wg-psk.file = ../../secrets/fbda_wg_psk.age;
age.secrets.obvps-id = { age.secrets.obvps-id = {
file = ../secrets/1bvps.age; file = ../../secrets/1bvps.age;
path = "/home/rhea/.ssh/id_1bvps"; path = "/home/rhea/.ssh/id_1bvps";
owner = "rhea"; owner = "rhea";
symlink = false; symlink = false;
}; };
age.secrets.gh_etwas = { age.secrets.gh_etwas = {
file = ../secrets/gh_token.age; file = ../../secrets/gh_token.age;
path = "/home/rhea/.ssh/id_gh_etwas"; path = "/home/rhea/.ssh/id_gh_etwas";
owner = "rhea"; owner = "rhea";
symlink = false; symlink = false;
}; };
age.secrets.gcd_etwas = { age.secrets.gcd_etwas = {
file = ../secrets/gcd_etwas.age; file = ../../secrets/gcd_etwas.age;
path = "/home/rhea/.ssh/id_gcd_etwas"; path = "/home/rhea/.ssh/id_gcd_etwas";
owner = "rhea"; owner = "rhea";
symlink = false; symlink = false;
}; };
age.secrets.etwas_sign_key = { age.secrets.etwas_sign_key = {
file = ../secrets/sign_etwas.age; file = ../../secrets/sign_etwas.age;
path = "/home/rhea/.ssh/etwas_sign_key"; path = "/home/rhea/.ssh/etwas_sign_key";
owner = "rhea"; owner = "rhea";
symlink = false; symlink = false;

View file

@ -1,5 +1,21 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
services.fprintd.enable = true;
security.pam.services.login.fprintAuth = true;
security.pam.services.sudo.fprintAuth = true;
security.pam.services.greetd.enableGnomeKeyring = true;
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -g \"Hello there (^^)/\" --cmd Hyprland";
user = "rhea";
};
};
};
security.polkit.enable = true; security.polkit.enable = true;
systemd = { systemd = {

View file

@ -0,0 +1,6 @@
{ config, pkgs, ... }: {
imports = [
./agenix.nix
./auth.nix
];
}

View file

@ -1,11 +0,0 @@
{ inputs, pkgs, ... }: {
programs.hyprland.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
];
};
}