initial commit
This commit is contained in:
commit
2597fc7fb8
27 changed files with 1051 additions and 0 deletions
97
flake.lock
generated
Normal file
97
flake.lock
generated
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726592409,
|
||||||
|
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-flatpak": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721549352,
|
||||||
|
"narHash": "sha256-nlXJa8RSOX0kykrIYW33ukoHYq+FOSNztHLLgqKwOp8=",
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"rev": "dbce39ea8664820ba9037caaf1e2fad365ed6b4b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726489388,
|
||||||
|
"narHash": "sha256-JBHtN+n1HzKawpnOQAz6jdgvrtYV9c/kyzgoIdguQGo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "dc8b0296f68f72f3fe77469c549a6f098555c2e9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixos-hardware",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726447378,
|
||||||
|
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726463316,
|
||||||
|
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nix-flatpak": "nix-flatpak",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
106
flake.nix
Normal file
106
flake.nix
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
{
|
||||||
|
######
|
||||||
|
inputs = {
|
||||||
|
######
|
||||||
|
# NOTE: Replace "nixos-23.11" with that which is in system.stateVersion of
|
||||||
|
# configuration.nix. You can also use latter versions if you wish to
|
||||||
|
# upgrade.
|
||||||
|
# INFO: Use github:org/repo/?ref=<tag> to pin releases.
|
||||||
|
|
||||||
|
# Main nix package repository
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
|
|
||||||
|
# ready made hardware configurations. e.G.: Power saving
|
||||||
|
#nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
|
# NixOS unstable channel
|
||||||
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
# for managing flatpaks, like which ones are installed and which not
|
||||||
|
nix-flatpak = {
|
||||||
|
url = "github:gmodena/nix-flatpak";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#######
|
||||||
|
outputs =
|
||||||
|
#######
|
||||||
|
{ self, nixpkgs, nixos-hardware, nixpkgs-unstable, nix-flatpak, home-manager, ... }: let
|
||||||
|
overlays = {
|
||||||
|
unstable-packages = final: prev: {
|
||||||
|
unstable = import nixpkgs-unstable {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# NOTE: 'nixos' is the default hostname set by the installer
|
||||||
|
nixosConfigurations.crocoite = nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
( let
|
||||||
|
pkgs2 = nixpkgs.legacyPackages."x86_64-linux";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ overlays.unstable-packages ];
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
|
||||||
|
# focused on correctness, usability, and growth –
|
||||||
|
# and committed to doing right by its community.
|
||||||
|
nix.package = pkgs2.lix;
|
||||||
|
|
||||||
|
# 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. It‘s 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?
|
||||||
|
})
|
||||||
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
|
||||||
|
./hardware-configuration.nix
|
||||||
|
#nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||||
|
|
||||||
|
./modules/basic_system_config.nix
|
||||||
|
./modules/networking.nix
|
||||||
|
./modules/boot_theming.nix
|
||||||
|
|
||||||
|
./modules/specific_hardware/scan_and_print.nix
|
||||||
|
./modules/specific_hardware/fwupd.nix
|
||||||
|
./modules/specific_hardware/bluetooth.nix
|
||||||
|
|
||||||
|
./modules/sec_auth/firejail.nix
|
||||||
|
./modules/sec_auth/login-manager.nix
|
||||||
|
./modules/sec_auth/users_and_permissions.nix
|
||||||
|
./modules/sec_auth/ssh.nix
|
||||||
|
|
||||||
|
./modules/software/software.nix
|
||||||
|
./modules/software/game.nix
|
||||||
|
./modules/software/audio_video.nix
|
||||||
|
./modules/software/obs-studio.nix
|
||||||
|
|
||||||
|
./modules/wm_and_de/hyprland.nix
|
||||||
|
|
||||||
|
./modules/pkg_mgrmnt/flatpak.nix
|
||||||
|
./modules/pkg_mgrmnt/podman.nix
|
||||||
|
./modules/pkg_mgrmnt/store_pkg_file.nix
|
||||||
|
|
||||||
|
./modules/software/nix-helper/index.nix
|
||||||
|
./modules/software/nix-helper/doc.nix
|
||||||
|
./modules/software/nix-helper/nix-ld.nix
|
||||||
|
|
||||||
|
./modules/software/browser/firefox.nix
|
||||||
|
./modules/software/browser/brave.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
52
hardware-configuration.nix
Normal file
52
hardware-configuration.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
# 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" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/c772918e-3832-45ae-8c97-05b3d837ed8b";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-3b194756-e29b-425a-b088-0a0468840011".device = "/dev/disk/by-uuid/3b194756-e29b-425a-b088-0a0468840011";
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/5DF2-A721";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
#boot.blacklistedKernelModules = [ "acpi-cpufreq" ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"amd_pstate=active"
|
||||||
|
];
|
||||||
|
#services.auto-epp.enable = true;
|
||||||
|
|
||||||
|
powerManagement.enable = true;
|
||||||
|
powerManagement.powertop.enable = true;
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
TLP_DEFAULT_MODE = "BAT";
|
||||||
|
TLP_PERSISTENT_DEFAULT = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
64
hosts/crocoite.nix
Normal file
64
hosts/crocoite.nix
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
{ ... }: {
|
||||||
|
#MANPAGER='nvim +Man!'
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
#unstable.config.allowUnfree = true;
|
||||||
|
{ nixpkgs.config.allowUnfree = true; }
|
||||||
|
|
||||||
|
( let
|
||||||
|
pkgs2 = nixpkgs.legacyPackages."x86_64-linux";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ overlays.unstable-packages ];
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
|
||||||
|
# focused on correctness, usability, and growth –
|
||||||
|
# and committed to doing right by its community.
|
||||||
|
nix.package = pkgs2.lix;
|
||||||
|
|
||||||
|
# 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. It‘s 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?
|
||||||
|
})
|
||||||
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
|
||||||
|
./hardware-configuration.nix
|
||||||
|
#nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||||
|
|
||||||
|
./modules/basic_system_config.nix
|
||||||
|
./modules/networking.nix
|
||||||
|
./modules/boot_theming.nix
|
||||||
|
|
||||||
|
./modules/specific_hardware/scan_and_print.nix
|
||||||
|
./modules/specific_hardware/fwupd.nix
|
||||||
|
./modules/specific_hardware/bluetooth.nix
|
||||||
|
|
||||||
|
./modules/sec_auth/firejail.nix
|
||||||
|
./modules/sec_auth/login-manager.nix
|
||||||
|
./modules/sec_auth/users_and_permissions.nix
|
||||||
|
./modules/sec_auth/ssh.nix
|
||||||
|
|
||||||
|
./modules/software/software.nix
|
||||||
|
./modules/software/game.nix
|
||||||
|
./modules/software/audio_video.nix
|
||||||
|
./modules/software/obs-studio.nix
|
||||||
|
|
||||||
|
./modules/wm_and_de/hyprland.nix
|
||||||
|
|
||||||
|
./modules/pkg_mgrmnt/flatpak.nix
|
||||||
|
./modules/pkg_mgrmnt/podman.nix
|
||||||
|
./modules/pkg_mgrmnt/store_pkg_file.nix
|
||||||
|
|
||||||
|
./modules/software/nix-helper/index.nix
|
||||||
|
./modules/software/nix-helper/doc.nix
|
||||||
|
./modules/software/nix-helper/nix-ld.nix
|
||||||
|
|
||||||
|
./modules/software/browser/firefox.nix
|
||||||
|
./modules/software/browser/brave.nix
|
||||||
|
}
|
41
modules/basic_system_config.nix
Normal file
41
modules/basic_system_config.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.systemd-boot.configurationLimit = 20;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "crocoite"; # Define your hostname.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_GB.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 = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure console keymap
|
||||||
|
console.keyMap = "de";
|
||||||
|
}
|
37
modules/boot_theming.nix
Normal file
37
modules/boot_theming.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
boot = let
|
||||||
|
theme_name = "deus_ex";
|
||||||
|
in {
|
||||||
|
# could lead to problems: https://github.com/NixOS/nixpkgs/issues/26722
|
||||||
|
initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = theme_name;
|
||||||
|
themePackages = with pkgs; [
|
||||||
|
# By default we would install all themes
|
||||||
|
(adi1090x-plymouth-themes.override {
|
||||||
|
selected_themes = [ theme_name ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable "Silent Boot"
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
initrd.verbose = false;
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"loglevel=3"
|
||||||
|
"rd.systemd.show_status=false"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
];
|
||||||
|
# Hide the OS choice for bootloaders.
|
||||||
|
# It's still possible to open the bootloader list by pressing any key
|
||||||
|
# It will just not appear on screen unless a key is pressed
|
||||||
|
loader.timeout = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
41
modules/networking.nix
Normal file
41
modules/networking.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.networkmanager.wifi.backend = "iwd";
|
||||||
|
|
||||||
|
systemd.network.wait-online.enable = false;
|
||||||
|
boot.initrd.systemd.network.wait-online.enable = false;
|
||||||
|
|
||||||
|
networking.wireless.iwd.enable = true;
|
||||||
|
networking.wireless.iwd.settings = {
|
||||||
|
IPv6 = {
|
||||||
|
Enabled = true;
|
||||||
|
};
|
||||||
|
Settings = {
|
||||||
|
AutoConnect = 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
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
#networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
# Open ports in the firewall.
|
||||||
|
#networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||||
|
#networking.firewall.allowedUDPPorts = [ 8080 ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
networkmanagerapplet
|
||||||
|
];
|
||||||
|
}
|
31
modules/pkg_mgrmnt/flatpak.nix
Normal file
31
modules/pkg_mgrmnt/flatpak.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, ... }: {
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
services.flatpak.update.auto.enable = false;
|
||||||
|
services.flatpak.uninstallUnmanaged = true;
|
||||||
|
|
||||||
|
services.flatpak.remotes = lib.mkOptionDefault [
|
||||||
|
{ name = "flathub-beta";
|
||||||
|
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; }
|
||||||
|
{ name = "flathub";
|
||||||
|
location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
services.flatpak.packages = [
|
||||||
|
{ origin = "flathub"; appId = "com.github.tchx84.Flatseal"; } # flatpak permisssion gui
|
||||||
|
{ origin = "flathub"; appId = "com.mojang.Minecraft"; } # Lego for adults
|
||||||
|
{ origin = "flathub"; appId = "de.schmidhuberj.DieBahn"; } # Public transport connection viewer
|
||||||
|
{ origin = "flathub"; appId = "com.github.hugolabe.Wike"; } # Wikpedia, but in nice
|
||||||
|
#{ origin = "flathub"; appId = "com.jeffser.Alpaca"; } # Local chat AI
|
||||||
|
{ origin = "flathub"; appId = "io.gpt4all.gpt4all"; } # Local chat AI
|
||||||
|
{ origin = "flathub"; appId = "md.obsidian.Obsidian"; } # note taking and brain organising
|
||||||
|
|
||||||
|
# messenger
|
||||||
|
{ origin = "flathub"; appId = "org.signal.Signal"; }
|
||||||
|
{ origin = "flathub"; appId = "org.telegram.desktop"; }
|
||||||
|
{ origin = "flathub"; appId = "dev.vencord.Vesktop"; } # More usable discord for linux
|
||||||
|
|
||||||
|
#"com.obsproject.Studio" #this is another way to write it
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
26
modules/pkg_mgrmnt/podman.nix
Normal file
26
modules/pkg_mgrmnt/podman.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Enable common container config files in /etc/containers
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||||
|
dockerCompat = true;
|
||||||
|
|
||||||
|
dockerSocket.enable = true;
|
||||||
|
|
||||||
|
# Required for containers under podman-compose to be able to talk to each other.
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Useful other development tools
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dive # look into docker image layers
|
||||||
|
podman-tui # status of containers in the terminal
|
||||||
|
#docker-compose # start group of containers for dev
|
||||||
|
podman-compose # start group of containers for dev
|
||||||
|
];
|
||||||
|
}
|
10
modules/pkg_mgrmnt/store_pkg_file.nix
Normal file
10
modules/pkg_mgrmnt/store_pkg_file.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
# creates the file /etc/current-system-packages which then contains all installed packages and versions
|
||||||
|
environment.etc."current-system-packages".text =
|
||||||
|
let
|
||||||
|
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||||
|
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||||
|
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||||
|
in
|
||||||
|
formatted;
|
||||||
|
}
|
63
modules/sec_auth/firejail.nix
Normal file
63
modules/sec_auth/firejail.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# TODO refine firejail it seems that / is not shielded enough and app armor does not work
|
||||||
|
|
||||||
|
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.firejail = {
|
||||||
|
enable = true;
|
||||||
|
wrappedBinaries = {
|
||||||
|
firefox = {
|
||||||
|
executable = "${pkgs.firefox}/bin/firefox";
|
||||||
|
profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
|
||||||
|
extraArgs = [
|
||||||
|
# Required for U2F USB stick
|
||||||
|
"--ignore=private-dev"
|
||||||
|
# Enforce dark mode
|
||||||
|
"--env=GTK_THEME=Adwaita:dark"
|
||||||
|
# Enable system notifications
|
||||||
|
"--dbus-user.talk=org.freedesktop.Notifications"
|
||||||
|
# For screen sharing
|
||||||
|
"--dbus-user.talk=org.freedesktop.portal.*"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
element-desktop = {
|
||||||
|
executable = "${pkgs.element-desktop}/bin/element-desktop";
|
||||||
|
profile = "${pkgs.firejail}/etc/firejail/element-desktop.profile";
|
||||||
|
extraArgs = [
|
||||||
|
# Required for U2F USB stick
|
||||||
|
"--ignore=private-dev"
|
||||||
|
# Enforce dark mode
|
||||||
|
"--env=GTK_THEME=Adwaita:dark"
|
||||||
|
# Enable system notifications
|
||||||
|
"--dbus-user.talk=org.freedesktop.Notifications"
|
||||||
|
# For screen sharing
|
||||||
|
"--dbus-user.talk=org.freedesktop.portal.*"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
brave = {
|
||||||
|
executable = "${pkgs.brave}/bin/brave";
|
||||||
|
profile = "${pkgs.firejail}/etc/firejail/brave.profile";
|
||||||
|
extraArgs = [
|
||||||
|
# Required for U2F USB stick
|
||||||
|
"--ignore=private-dev"
|
||||||
|
# Enforce dark mode
|
||||||
|
"--env=GTK_THEME=Adwaita:dark"
|
||||||
|
# Enable system notifications
|
||||||
|
"--dbus-user.talk=org.freedesktop.Notifications"
|
||||||
|
# For screen sharing
|
||||||
|
"--dbus-user.talk=org.freedesktop.portal.*"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.etc = {
|
||||||
|
"firejail/brave.local".text = ''
|
||||||
|
whitelist ''${HOME}/.config/brave
|
||||||
|
whitelist ''${HOME}/.local
|
||||||
|
whitelist ''${HOME}/Downloads
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
22
modules/sec_auth/login-manager.nix
Normal file
22
modules/sec_auth/login-manager.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
vt = 7;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = ''${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||||
|
--time \
|
||||||
|
--time-format '%Y-%m-%dT%H:%M:%S %A' \
|
||||||
|
--remember \
|
||||||
|
--user-menu \
|
||||||
|
--theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \
|
||||||
|
--cmd hyprland'';
|
||||||
|
# removed elements from theme: container
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
29
modules/sec_auth/ssh.nix
Normal file
29
modules/sec_auth/ssh.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
startAgent = true;
|
||||||
|
enableAskPassword = true;
|
||||||
|
#askPassword = "${pkgs.ssh-askpass-fullscreen}/bin/ssh-askpass-fullscreen";
|
||||||
|
askPassword = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is using a rec (recursive) expression to set and access XDG_BIN_HOME within the expression
|
||||||
|
# For more on rec expressions see https://nix.dev/tutorials/first-steps/nix-language#recursive-attribute-set-rec
|
||||||
|
environment.sessionVariables = rec {
|
||||||
|
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/ssh-agent";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
#ssh-askpass-fullscreen
|
||||||
|
lxqt.lxqt-openssh-askpass
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
# };
|
||||||
|
}
|
59
modules/sec_auth/users_and_permissions.nix
Normal file
59
modules/sec_auth/users_and_permissions.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.ranomier = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Ranomier";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
#packages = with pkgs; [];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"xdg/user-dirs.defaults".text = ''
|
||||||
|
DESKTOP=Desktop
|
||||||
|
DOWNLOAD=Downloads
|
||||||
|
TEMPLATES=Documents/Templates
|
||||||
|
PUBLICSHARE=Public
|
||||||
|
DOCUMENTS=Documents
|
||||||
|
MUSIC=Media/Music
|
||||||
|
PICTURES=Media/Pictures
|
||||||
|
VIDEOS=Media/Videos
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# This is using a rec (recursive) expression to set and access XDG_BIN_HOME within the expression
|
||||||
|
# For more on rec expressions see https://nix.dev/tutorials/first-steps/nix-language#recursive-attribute-set-rec
|
||||||
|
environment.sessionVariables = rec {
|
||||||
|
XDG_CACHE_HOME = "$HOME/.cache";
|
||||||
|
XDG_CONFIG_HOME = "$HOME/.config";
|
||||||
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
|
XDG_STATE_HOME = "$HOME/.local/state";
|
||||||
|
|
||||||
|
# Not officially in the specification
|
||||||
|
XDG_BIN_HOME = "$HOME/.local/mybin";
|
||||||
|
PATH = [
|
||||||
|
"${XDG_BIN_HOME}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# XDG-USER-DIR package and config
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
xdg-user-dirs
|
||||||
|
|
||||||
|
apparmor-pam
|
||||||
|
apparmor-utils
|
||||||
|
apparmor-parser
|
||||||
|
apparmor-profiles
|
||||||
|
roddhjav-apparmor-rules
|
||||||
|
];
|
||||||
|
|
||||||
|
security.apparmor.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
# };
|
||||||
|
}
|
56
modules/software/audio_video.nix
Normal file
56
modules/software/audio_video.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit = true;
|
||||||
|
};
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
jack.enable = true;
|
||||||
|
extraConfig.pipewire."99-input-denoise" = {
|
||||||
|
"context.modules" = [
|
||||||
|
{
|
||||||
|
"name" = "libpipewire-module-filter-chain";
|
||||||
|
"args" = {
|
||||||
|
"node.description" = "Noise Canceling source";
|
||||||
|
"media.name" = "Noise Canceling source";
|
||||||
|
"filter.graph" = {
|
||||||
|
"nodes" = [
|
||||||
|
{
|
||||||
|
"type" = "ladspa";
|
||||||
|
"name" = "rnnoise";
|
||||||
|
"plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
|
||||||
|
"label" = "noise_suppressor_stereo";
|
||||||
|
"control" = {
|
||||||
|
"VAD Threshold (%)" = 50.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"audio.position" = [
|
||||||
|
"FL"
|
||||||
|
"FR"
|
||||||
|
];
|
||||||
|
"capture.props" = {
|
||||||
|
"node.name" = "effect_input.rnnoise";
|
||||||
|
"node.passive" = true;
|
||||||
|
};
|
||||||
|
"playback.props" = {
|
||||||
|
"node.name" = "effect_output.rnnoise";
|
||||||
|
"media.class" = "Audio/Source";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
helvum
|
||||||
|
easyeffects
|
||||||
|
];
|
||||||
|
}
|
5
modules/software/browser/brave.nix
Normal file
5
modules/software/browser/brave.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
brave
|
||||||
|
];
|
||||||
|
}
|
13
modules/software/browser/firefox.nix
Normal file
13
modules/software/browser/firefox.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
# The logical browser of choice
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
xdg.mime.defaultApplications = let
|
||||||
|
browser_desktop_file = "firefox.desktop";
|
||||||
|
in {
|
||||||
|
"text/html" = browser_desktop_file;
|
||||||
|
"x-scheme-handler/http" = browser_desktop_file;
|
||||||
|
"x-scheme-handler/https" = browser_desktop_file;
|
||||||
|
};
|
||||||
|
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||||
|
}
|
37
modules/software/game.nix
Normal file
37
modules/software/game.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
#environment.systemPackages = with pkgs; [ ];
|
||||||
|
# hardware.steam-hardware.enable = true; # Note that this is already enabled with programs.steam.enable = true;
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall =
|
||||||
|
true; # Open ports in the firewall for Steam Remote Play
|
||||||
|
dedicatedServer.openFirewall =
|
||||||
|
true; # Open ports in the firewall for Source Dedicated Server
|
||||||
|
localNetworkGameTransfers.openFirewall =
|
||||||
|
true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||||
|
};
|
||||||
|
programs.steam.gamescopeSession.enable = true;
|
||||||
|
#### FHS environment only
|
||||||
|
# This will only make partial installation - provide the script, which creates the typical environment expected by proprietary games and software on regular Linux, allowing to run such software without patching. Useful if you plan to run games downloaded from the internet.
|
||||||
|
# Note that this is not necessary for clients installed from Nixpkgs (like Minigalaxy or Itch), which already use the FHS environment.
|
||||||
|
# There are two options to install the FHS environment. The first is to install steam-run.
|
||||||
|
|
||||||
|
#Example snippet of configuration.nix:
|
||||||
|
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# steam-run
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# Another option, in case you need more flexibility, is to directly reference the part of steam metapackage.
|
||||||
|
|
||||||
|
# Example snippet of configuration.nix:
|
||||||
|
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# (steam.override { /* Your overrides here */ }).run
|
||||||
|
# ];
|
||||||
|
# Install the game by setting the executable attribute on the installer and then running it via steam-run ./your_installer.sh. After installation, edit the "~/.local/share/applications/your_game.desktop" and replace the exec line from Exec="/home/user/game/start.sh" "" with Exec="steam-run" "/home/user/game/start.sh".
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ steam-run ];
|
||||||
|
|
||||||
|
programs.steam.extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||||
|
}
|
10
modules/software/nix-helper/doc.nix
Normal file
10
modules/software/nix-helper/doc.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
nix.extraOptions = ''
|
||||||
|
plugin-files = ${pkgs.nix-doc}/lib/libnix_doc_plugin.so
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nix-doc
|
||||||
|
];
|
||||||
|
}
|
11
modules/software/nix-helper/index.nix
Normal file
11
modules/software/nix-helper/index.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nix-index
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.command-not-found.enable = false;
|
||||||
|
# for home-manager, use programs.bash.initExtra instead
|
||||||
|
programs.bash.interactiveShellInit = ''
|
||||||
|
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
||||||
|
'';
|
||||||
|
}
|
9
modules/software/nix-helper/nix-ld.nix
Normal file
9
modules/software/nix-helper/nix-ld.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# to run normal external binaries
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
# Add any missing dynamic libraries for unpackaged
|
||||||
|
# programs here, NOT in environment.systemPackages
|
||||||
|
];
|
||||||
|
}
|
20
modules/software/obs-studio.nix
Normal file
20
modules/software/obs-studio.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.wrapOBS {
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
wlrobs
|
||||||
|
obs-backgroundremoval
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
|
boot.kernelModules = [ "v4l2loopback" ];
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
||||||
|
'';
|
||||||
|
security.polkit.enable = true;
|
||||||
|
}
|
95
modules/software/software.nix
Normal file
95
modules/software/software.nix
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
# Allow unfree packages
|
||||||
|
#unstable.config.allowUnfree = true;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# also opens the TCP and UDP port from 1714 to 1764
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
# for running android apps
|
||||||
|
virtualisation.waydroid.enable =
|
||||||
|
true; # also starts the systemd service waydroid-container
|
||||||
|
|
||||||
|
# virt manager, for running VM's
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
|
||||||
|
environment.pathsToLink = [ "/share/foot" ];
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = let
|
||||||
|
amberol_wrapper = pkgs.writeShellScriptBin "amberol" ''
|
||||||
|
export GDK_BACKEND='x11'
|
||||||
|
exec "${pkgs.amberol}/bin/amberol" "$@"
|
||||||
|
'';
|
||||||
|
in with pkgs; [
|
||||||
|
# low level stuff
|
||||||
|
efibootmgr
|
||||||
|
#exfat
|
||||||
|
exfatprogs
|
||||||
|
greetd.greetd
|
||||||
|
greetd.tuigreet
|
||||||
|
killall
|
||||||
|
vulnix
|
||||||
|
|
||||||
|
# hardware
|
||||||
|
brightnessctl
|
||||||
|
usbutils
|
||||||
|
lm_sensors
|
||||||
|
|
||||||
|
# neovim
|
||||||
|
unstable.neovim
|
||||||
|
git
|
||||||
|
gnumake
|
||||||
|
gcc
|
||||||
|
nodePackages.npm
|
||||||
|
nodejs-slim
|
||||||
|
python3
|
||||||
|
fd
|
||||||
|
nodejs-slim
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
|
||||||
|
# tooling
|
||||||
|
htop
|
||||||
|
ncdu
|
||||||
|
wget
|
||||||
|
miniserve
|
||||||
|
file
|
||||||
|
unzip
|
||||||
|
tmux
|
||||||
|
qemu
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
# move to homemanager?
|
||||||
|
lxqt.pavucontrol-qt
|
||||||
|
mumble
|
||||||
|
amberol_wrapper
|
||||||
|
amberol
|
||||||
|
mpv
|
||||||
|
zathura
|
||||||
|
feh
|
||||||
|
#unstable.obsidian
|
||||||
|
keepassxc
|
||||||
|
#minecraft
|
||||||
|
element-desktop
|
||||||
|
];
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk
|
||||||
|
noto-fonts-emoji
|
||||||
|
liberation_ttf
|
||||||
|
dina-font
|
||||||
|
proggyfonts
|
||||||
|
font-awesome
|
||||||
|
|
||||||
|
jetbrains-mono
|
||||||
|
fira-code
|
||||||
|
fira-code-symbols
|
||||||
|
#droid-sans-mono
|
||||||
|
(nerdfonts.override {
|
||||||
|
fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
6
modules/specific_hardware/bluetooth.nix
Normal file
6
modules/specific_hardware/bluetooth.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }:{
|
||||||
|
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||||
|
hardware.bluetooth.powerOnBoot = false; # powers up the default Bluetooth controller on boot
|
||||||
|
|
||||||
|
services.blueman.enable = true; # provides blueman-applet and blueman-manager
|
||||||
|
}
|
4
modules/specific_hardware/fwupd.nix
Normal file
4
modules/specific_hardware/fwupd.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }:{
|
||||||
|
# A system daemon to allow session software to update firmware
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
}
|
26
modules/specific_hardware/scan_and_print.nix
Normal file
26
modules/specific_hardware/scan_and_print.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
hardware.sane.enable = true; # enables support for SANE scanners
|
||||||
|
services.ipp-usb.enable=true; # enable usb support
|
||||||
|
|
||||||
|
hardware.sane.backends-package = pkgs.sane-backends.overrideAttrs (old: {
|
||||||
|
configureFlags = (old.configureFlags or []) ++ [
|
||||||
|
# "--localstatedir=/var" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store
|
||||||
|
# "--with-lockdir=/var/lock/sane" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store
|
||||||
|
|
||||||
|
# Ugly workaround for https://github.com/NixOS/nixpkgs/issues/273280#issuecomment-1848873028
|
||||||
|
# Really we should make `sane-backends` be able to provide a real lock dir (e.g. `/var/lock/sane`).
|
||||||
|
"--disable-locking"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
users.users.ranomier.extraGroups = [ "scanner" "lp" ];
|
||||||
|
|
||||||
|
# only for the scan and maybe print clients
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
simple-scan
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
}
|
81
modules/wm_and_de/hyprland.nix
Normal file
81
modules/wm_and_de/hyprland.nix
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
# You can disable this if you're only using the Wayland session.
|
||||||
|
services.xserver.enable = false;
|
||||||
|
|
||||||
|
# force chromium and electron apps to use wayland
|
||||||
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
#xdg-desktop-portal-wlr
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the hyprland window manager with additions
|
||||||
|
programs = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
systemd.setPath.enable = true;
|
||||||
|
};
|
||||||
|
hyprlock.enable = true;
|
||||||
|
};
|
||||||
|
services.hypridle.enable = true;
|
||||||
|
|
||||||
|
# for mounting stuff, also needs a auth agent like lxqt.lxqt-policykit
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "qt5ct";
|
||||||
|
style = "kvantum";
|
||||||
|
};
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# for tiling window manager
|
||||||
|
foot
|
||||||
|
foot.themes
|
||||||
|
wofi
|
||||||
|
wl-clipboard # for waydroid and maybe more
|
||||||
|
wlogout
|
||||||
|
pamixer
|
||||||
|
waybar
|
||||||
|
hyprpaper
|
||||||
|
kanshi
|
||||||
|
dunst
|
||||||
|
|
||||||
|
# audio
|
||||||
|
mixxc
|
||||||
|
ncpamixer
|
||||||
|
|
||||||
|
# for screenshot + annotation
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
satty
|
||||||
|
flameshot
|
||||||
|
|
||||||
|
# theming
|
||||||
|
gruvbox-plus-icons
|
||||||
|
gruvbox-gtk-theme
|
||||||
|
kde-gruvbox
|
||||||
|
capitaine-cursors-themed
|
||||||
|
libsForQt5.qtstyleplugin-kvantum
|
||||||
|
kdePackages.qtstyleplugin-kvantum
|
||||||
|
|
||||||
|
# polkit auth agent
|
||||||
|
lxqt.lxqt-policykit
|
||||||
|
|
||||||
|
# file manager
|
||||||
|
gnome.nautilus
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue