foamat code

This commit is contained in:
Jonas Röger 2024-04-17 16:47:06 +02:00
parent 1c7a93963a
commit ebedd90923
Signed by: jonas
GPG Key ID: 4000EB35E1AE0F07
23 changed files with 231 additions and 194 deletions

View File

@ -20,8 +20,14 @@
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, plasma-manager, ... }@inputs :
let
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
plasma-manager,
...
} @ inputs: let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
@ -34,9 +40,14 @@
inherit inputs;
};
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({
config,
pkgs,
...
}: {nixpkgs.overlays = [overlay-unstable];})
./hosts/comfy-station/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@ -52,7 +63,8 @@
};
modules = [
./hosts/vm/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

View File

@ -1,6 +1,8 @@
{ config, inputs, ... }:
{
config,
inputs,
...
}: {
programs.firefox = {
enable = true;
@ -17,13 +19,21 @@
force = true;
engines = {
"Nix Packages" = {
urls = [{
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
}];
};
};
};

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
./firefox.nix
./plasma.nix

View File

@ -1,5 +1,8 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
home.file.".local/share/wallpaper" = {
source = ./static/wallpaper;
recursive = true;
@ -78,7 +81,6 @@
}
];
#
# Some mid-level settings:
#
@ -87,7 +89,8 @@
"Lock Session" = ["Screensaver" "Meta+Ctrl+Alt+L"];
};
kwin = {
kwin =
{
"Expose" = "Meta+,";
"Switch Window Down" = "Meta+J";
"Switch Window Left" = "Meta+H";
@ -99,9 +102,9 @@
"Window Quick Tile Top" = "Meta+Shift+K";
"Kill Window" = "Meta+Alt+Q";
"Window Close" = "Meta+Shift+Q";
} // (
with lib;
let
}
// (
with lib; let
desktops = map toString (lists.range 1 8);
in
listToAttrs
@ -111,8 +114,7 @@
value = "Meta+${i}";
})
desktops)
//
listToAttrs (map
// listToAttrs (map
(i: {
name = "Window to Desktop ${i}";
value = "Meta+Shift+${i}";
@ -121,7 +123,6 @@
);
};
#
# Some low-level settings:
#

View File

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
programs.gpg = {
enable = true;
mutableKeys = false;

View File

@ -1,12 +1,14 @@
# 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).
{ config, pkgs, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
config,
pkgs,
inputs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager
../../modules/hardware/bluetooth.nix
@ -24,7 +26,6 @@
desktop.dm.autologin = "jonas";
desktop.de.plasma.enable = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
# Enable touchpad support (enabled default in most desktopManager).
@ -46,6 +47,7 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
alejandra
docker
git
ranger
@ -119,7 +121,4 @@
# touchpad
services.xserver.libinput.touchpad.naturalScrolling = true;
# steam
programs.steam.enable = true;
}

View File

@ -1,11 +1,15 @@
# 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")
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"];
@ -15,18 +19,18 @@
boot.initrd.luks.devices."lvm-root".device = "/dev/disk/by-uuid/0b55681d-5c7b-4045-b895-d1eb7e306ffb";
fileSystems."/" =
{ device = "/dev/disk/by-uuid/88f53721-1c3f-43fd-8875-59e597aacb10";
fileSystems."/" = {
device = "/dev/disk/by-uuid/88f53721-1c3f-43fd-8875-59e597aacb10";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/583D-114B";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/583D-114B";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/f81521e7-4c09-4e91-8914-3dcd9febdfff"; }
swapDevices = [
{device = "/dev/disk/by-uuid/f81521e7-4c09-4e91-8914-3dcd9febdfff";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -1,12 +1,13 @@
# 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, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
pkgs,
inputs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager
../../modules/hardware/bluetooth.nix
@ -21,7 +22,6 @@
desktop.dm.autologin = "jonas";
desktop.de.plasma.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;

View File

@ -1,9 +1,13 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [];
boot.initrd.availableKernelModules = ["ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod"];
@ -11,13 +15,13 @@
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a28cd2c0-67f3-4492-9cd9-996fdbe2b8ef";
fileSystems."/" = {
device = "/dev/disk/by-uuid/a28cd2c0-67f3-4492-9cd9-996fdbe2b8ef";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0134-2DF5";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0134-2DF5";
fsType = "vfat";
};

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
users.users."jonas".packages = with pkgs; [
discord
zoom

View File

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./hyprland.nix
./plasma.nix

View File

@ -1,9 +1,10 @@
{ lib, config, ... }:
let
cfg = config.desktop.de.hyprland;
in
{
lib,
config,
...
}: let
cfg = config.desktop.de.hyprland;
in {
options.desktop.de.hyprland = {
enable = lib.mkEnableOption "enable hyprland desktop environment";
};

View File

@ -1,9 +1,11 @@
{ config, lib, pkgs, ... }:
let
cfg = config.desktop.de.plasma;
in
{
config,
lib,
pkgs,
...
}: let
cfg = config.desktop.de.plasma;
in {
options.desktop.de.plasma = {
enable = lib.mkEnableOption "Enable Plasma desktop environment with sddm";
};

View File

@ -1,9 +1,10 @@
{ config, lib, ... }:
let
cfg = config.desktop.dm;
in
{
config,
lib,
...
}: let
cfg = config.desktop.dm;
in {
options.desktop.dm = with lib; {
name = mkOption {
type = types.nullOr (types.enum ["sddm" "gdm"]);
@ -34,7 +35,7 @@ in
xkbVariant = "";
xkbOptions = "caps:ctrl_modifier";
};
services.xserver.displayManager.autoLogin.enable = (cfg.autologin != null);
services.xserver.displayManager.autoLogin.enable = cfg.autologin != null;
services.xserver.displayManager.autoLogin.user = cfg.autologin;
};
}

View File

@ -1,8 +1,10 @@
{ lib, config, ... }:
let
cfg = config.desktop.dm;
in
{
lib,
config,
...
}: let
cfg = config.desktop.dm;
in {
config = lib.mkIf (cfg.name == "gdm") {
services.xserver.displayManager.gdm = {
enable = true;

View File

@ -1,9 +1,10 @@
{ lib, config, ... }:
let
cfg = config.desktop.dm;
in
{
lib,
config,
...
}: let
cfg = config.desktop.dm;
in {
config = lib.mkIf (cfg.name == "sddm") {
services.xserver.displayManager.sddm = {
enable = true;

View File

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [
fira-code
];

View File

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
# Enable Bluetooth
hardware.bluetooth.enable = true;
}

View File

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
# Enable CUPS to print documents.
services.printing.enable = true;
}

View File

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;

View File

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Include udev rules for yubikey.
services.udev.packages = with pkgs; [
yubikey-personalization

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
programs.steam.enable = true;
users.users."jonas".packages = with pkgs; [
lutris

View File

@ -1,5 +1,3 @@
{ config, ... }:
{
{config, ...}: {
virtualisation.docker.enable = true;
}