feat: big refactor
84
flake.lock
generated
|
|
@ -1,6 +1,72 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"agenix": {
|
||||||
|
"inputs": {
|
||||||
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1723293904,
|
||||||
|
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700795494,
|
||||||
|
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703113217,
|
||||||
|
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
|
@ -71,11 +137,27 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"agenix": "agenix",
|
||||||
|
"home-manager": "home-manager_2",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
84
flake.nix
|
|
@ -1,68 +1,40 @@
|
||||||
{
|
{
|
||||||
description = "Nix los hier";
|
description = "nix los hier";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
agenix = {
|
||||||
outputs = { self, nixpkgs, ... }@inputs: {
|
url = "github:ryantm/agenix";
|
||||||
nixosConfigurations = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
W530 = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [
|
|
||||||
|
|
||||||
./modules
|
|
||||||
./hosts/W530
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ./users/gandalf ];
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
T430 = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [
|
|
||||||
|
|
||||||
./modules
|
|
||||||
./hosts/T430
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./users/gandalf
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
IROH = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [
|
|
||||||
|
|
||||||
./modules
|
|
||||||
./hosts/IROH
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ./users/gandalf ];
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, agenix, ... }@inputs:
|
||||||
|
let
|
||||||
|
mkSystem = host: {
|
||||||
|
"${host}" = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = inputs;
|
||||||
|
modules = [
|
||||||
|
(./hosts + "/${host}")
|
||||||
|
agenix.nixosModules.default
|
||||||
|
{ environment.systemPackages = [ agenix.packages.${system}.default ]; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = nixpkgs.lib.mergeAttrsList (
|
||||||
|
nixpkgs.lib.forEach [
|
||||||
|
"APPA"
|
||||||
|
"T430"
|
||||||
|
"IROH"
|
||||||
|
] mkSystem
|
||||||
|
);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
hosts/APPA/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ ... }@inputs:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||||
|
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
|
||||||
|
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||||
|
./services
|
||||||
|
./hardware.nix
|
||||||
|
./network.nix
|
||||||
|
./system.nix
|
||||||
|
../../modules
|
||||||
|
];
|
||||||
|
|
||||||
|
bchmnn = {
|
||||||
|
git = {
|
||||||
|
signing = {
|
||||||
|
key = "0x7753026D577922A6";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
collections = {
|
||||||
|
cli-utils.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
78
hosts/APPA/hardware.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ehci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"sdhci_pci"
|
||||||
|
];
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/ROOT";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" = {
|
||||||
|
device = "/dev/disk/by-label/ROOT";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@nix"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/EFI";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" = {
|
||||||
|
device = "/dev/disk/by-label/HOME";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib" = {
|
||||||
|
device = "/dev/disk/by-label/HOME";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@varlib"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
29
hosts/APPA/network.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
firewall.enable = true;
|
||||||
|
hostName = "APPA";
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces.enp0s25 = {
|
||||||
|
useDHCP = false;
|
||||||
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.2.40";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ipv6.addresses = [
|
||||||
|
{
|
||||||
|
address = "fdd2:59e7:4ee1:1:2642:c13b:9bbc:7bd3";
|
||||||
|
prefixLength = 64;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
defaultGateway = {
|
||||||
|
address = "192.168.2.1";
|
||||||
|
};
|
||||||
|
defaultGateway6 = {
|
||||||
|
address = "fdd2:59e7:4ee1:0001::1";
|
||||||
|
interface = "enp0s25";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
73
hosts/APPA/services/adguard-home.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
services.adguardhome = {
|
||||||
|
enable = true;
|
||||||
|
mutableSettings = true;
|
||||||
|
allowDHCP = true;
|
||||||
|
host = "127.0.0.1";
|
||||||
|
port = 8001;
|
||||||
|
settings = {
|
||||||
|
users = [
|
||||||
|
{
|
||||||
|
name = "admin";
|
||||||
|
password = "$2a$10$7FLDb/cr3SCtKiojXbFGnOjk6rWC0z9GMafV.YWMvewUcgua1eF/m";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
dns = {
|
||||||
|
ratelimit = 0;
|
||||||
|
};
|
||||||
|
filtering = {
|
||||||
|
rewrites = [
|
||||||
|
{
|
||||||
|
domain = "dryb.org";
|
||||||
|
answer = "192.168.2.40";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = "speedport.dryb.org";
|
||||||
|
answer = "192.168.2.1";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = "tplink.dryb.org";
|
||||||
|
answer = "192.168.2.30";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = "adguard.dryb.org";
|
||||||
|
answer = "192.168.2.40";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = config.services.gitea.domain;
|
||||||
|
answer = "192.168.2.40";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
dhcp = {
|
||||||
|
enabled = true;
|
||||||
|
interface_name = "enp0s25";
|
||||||
|
local_domain_name = "dryb.org";
|
||||||
|
dhcpv4 = {
|
||||||
|
gateway_ip = "192.168.2.1";
|
||||||
|
subnet_mask = "255.255.255.0";
|
||||||
|
range_start = "192.168.2.100";
|
||||||
|
range_end = "192.168.2.255";
|
||||||
|
lease_duration = 86400;
|
||||||
|
icmp_timeout_msec = 1000;
|
||||||
|
};
|
||||||
|
dhcpv6 = {
|
||||||
|
range_start = "fdd2::1";
|
||||||
|
lease_duration = 86400;
|
||||||
|
ra_slaac_only = true;
|
||||||
|
ra_allow_slaac = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 53 ];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
53
|
||||||
|
67
|
||||||
|
547
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
9
hosts/APPA/services/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./adguard-home.nix
|
||||||
|
./gitea.nix
|
||||||
|
./homepage-dashboard.nix
|
||||||
|
./nginx.nix
|
||||||
|
./postgresql.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
26
hosts/APPA/services/gitea.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
age.secrets.passwords-gitea-db = {
|
||||||
|
file = ../../../secrets/passwords/gitea/db.age;
|
||||||
|
mode = "640";
|
||||||
|
owner = config.services.gitea.user;
|
||||||
|
group = config.services.gitea.group;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gitea = rec {
|
||||||
|
enable = true;
|
||||||
|
appName = "dryb.org: Gitea Service";
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
passwordFile = config.age.secrets.passwords-gitea-db.path;
|
||||||
|
};
|
||||||
|
domain = "git.dryb.org";
|
||||||
|
rootUrl = "http://${domain}/";
|
||||||
|
httpPort = 8003;
|
||||||
|
settings = {
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
74
hosts/APPA/services/homepage-dashboard.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
services.homepage-dashboard = {
|
||||||
|
enable = true;
|
||||||
|
listenPort = 8002;
|
||||||
|
settings = {
|
||||||
|
title = "dryb.org";
|
||||||
|
layout = {
|
||||||
|
"Network" = {
|
||||||
|
style = "row";
|
||||||
|
columns = 3;
|
||||||
|
};
|
||||||
|
"IOT" = {
|
||||||
|
style = "row";
|
||||||
|
columns = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = [
|
||||||
|
{
|
||||||
|
"Network" = [
|
||||||
|
{
|
||||||
|
"Adguard Home" = {
|
||||||
|
description = "http://adguard.dryb.org";
|
||||||
|
href = "http://adguard.dryb.org";
|
||||||
|
icon = "adguard-home";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"Speedport Smart 4" = {
|
||||||
|
description = "https://speedport.dryb.org (192.168.2.1)";
|
||||||
|
href = "https://speedport.dryb.org";
|
||||||
|
icon = "mdi-router-network-wireless";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"TP-Link TL-SG1016DE" = {
|
||||||
|
description = "http://tplink.dryb.org (192.168.2.30)";
|
||||||
|
href = "http://tplink.dryb.org";
|
||||||
|
icon = "mdi-switch";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"IOT" = [
|
||||||
|
{
|
||||||
|
"Shelly Infra" = {
|
||||||
|
description = "http://shelly-infra.dryb.org (192.168.2.50)";
|
||||||
|
href = "http://shelly-infra.dryb.org";
|
||||||
|
icon = "shelly";
|
||||||
|
ping = "shelly-infra.dryb.org";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"Shelly Workstation" = {
|
||||||
|
description = "http://shelly-workstation.dryb.org (192.168.2.51)";
|
||||||
|
href = "http://shelly-workstation.dryb.org";
|
||||||
|
icon = "shelly";
|
||||||
|
ping = "shelly-workstation.dryb.org";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"Shelly Test" = {
|
||||||
|
description = "http://shelly-test.dryb.org (192.168.2.52)";
|
||||||
|
href = "http://shelly-test.dryb.org";
|
||||||
|
icon = "shelly";
|
||||||
|
ping = "shelly-test.dryb.org";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
25
hosts/APPA/services/nginx.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."dryb.org" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8002";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
virtualHosts."adguard.dryb.org" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8001";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
virtualHosts."${config.services.gitea.domain}" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8003";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 80 ];
|
||||||
|
};
|
||||||
|
}
|
||||||
19
hosts/APPA/services/postgresql.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [ config.services.gitea.user ];
|
||||||
|
|
||||||
|
# type database DBuser auth-method mapping
|
||||||
|
authentication = ''
|
||||||
|
local gitea all ident map=gitea-users
|
||||||
|
'';
|
||||||
|
|
||||||
|
# name sysuser dbuser
|
||||||
|
identMap = ''
|
||||||
|
gitea-users gitea gitea
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,5 @@
|
||||||
{ ... }@inputs: {
|
{
|
||||||
|
|
||||||
imports = [
|
|
||||||
./hardware.nix
|
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
|
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.hostName = "W530";
|
|
||||||
|
|
||||||
bchmnn = {
|
bchmnn = {
|
||||||
|
|
||||||
power = {
|
power = {
|
||||||
tlp = {
|
tlp = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -30,32 +19,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
gui = {
|
|
||||||
enable = true;
|
|
||||||
greeter.enable = false;
|
|
||||||
flavour = [ "sway" ];
|
|
||||||
};
|
|
||||||
nvidia.enable = false;
|
|
||||||
audio = {
|
|
||||||
enable = true;
|
|
||||||
pipewire-wine-fix.enable = false;
|
|
||||||
};
|
|
||||||
bluetooth.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
vpn.enable = true;
|
|
||||||
sync.enable = false;
|
|
||||||
|
|
||||||
devenv.enable = true;
|
|
||||||
virtualisation.enable = true;
|
|
||||||
games.enable = false;
|
|
||||||
ratbag.enable = true;
|
|
||||||
|
|
||||||
ai.enable = false;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.logind.lidSwitch = "ignore";
|
services.logind.lidSwitch = "ignore";
|
||||||
|
|
||||||
}
|
}
|
||||||
28
hosts/IROH/default.nix
Executable file → Normal file
|
|
@ -1,17 +1,18 @@
|
||||||
{ ... }@inputs: {
|
{ ... }@inputs:
|
||||||
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||||
inputs.nixos-hardware.nixosModules.common-pc
|
inputs.nixos-hardware.nixosModules.common-pc
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
inputs.nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
|
inputs.nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
|
||||||
|
./hardware.nix
|
||||||
|
../../modules
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "IROH";
|
networking.hostName = "IROH";
|
||||||
|
|
||||||
bchmnn = {
|
bchmnn = {
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
greeter.enable = false;
|
greeter.enable = false;
|
||||||
|
|
@ -24,16 +25,21 @@
|
||||||
};
|
};
|
||||||
bluetooth.enable = false;
|
bluetooth.enable = false;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
vpn.enable = true;
|
|
||||||
sync.enable = true;
|
|
||||||
|
|
||||||
devenv.enable = true;
|
collections = {
|
||||||
virtualisation.enable = true;
|
cli-utils.enable = true;
|
||||||
games.enable = true;
|
profiling.enable = true;
|
||||||
ratbag.enable = true;
|
development.enable = true;
|
||||||
|
vpn.enable = true;
|
||||||
ai.enable = false;
|
virtualisation.enable = true;
|
||||||
|
games.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
flare-solvarr.enable = true;
|
||||||
|
jackett.enable = true;
|
||||||
|
syncthing.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,27 @@
|
||||||
{ config, lib, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.kernelModules = [ "kvm-intel" "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.kernelModules = [
|
||||||
|
"kvm-intel"
|
||||||
|
"nvidia"
|
||||||
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
"nvidia_drm"
|
||||||
|
];
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
|
@ -16,92 +33,42 @@
|
||||||
"resume_offset=533760"
|
"resume_offset=533760"
|
||||||
"nvidia_drm.modeset=1"
|
"nvidia_drm.modeset=1"
|
||||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||||
# "intel_pstate=disable"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
|
||||||
hardware.nvidia.package =
|
|
||||||
config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
|
||||||
version = "555.52.04";
|
|
||||||
sha256_64bit = "sha256-nVOubb7zKulXhux9AruUTVBQwccFFuYGWrU1ZiakRAI=";
|
|
||||||
sha256_aarch64 = "sha256-Kt60kTTO3mli66De2d1CAoE3wr0yUbBe7eqCIrYHcWk=";
|
|
||||||
openSha256 = "sha256-wDimW8/rJlmwr1zQz8+b1uvxxxbOf3Bpk060lfLKuy0=";
|
|
||||||
settingsSha256 = "sha256-PMh5efbSEq7iqEMBr2+VGQYkBG73TGUh6FuDHZhmwHk=";
|
|
||||||
persistencedSha256 = "sha256-KAYIvPjUVilQQcD04h163MHmKcQrn2a8oaXujL2Bxro=";
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
hardware.nvidia.package =
|
|
||||||
config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
|
||||||
version = "560.28.03";
|
|
||||||
sha256_64bit = "sha256-martv18vngYBJw1IFUCAaYr+uc65KtlHAMdLMdtQJ+Y=";
|
|
||||||
sha256_aarch64 = "sha256-+u0ZolZcZoej4nqPGmZn5qpyynLvu2QSm9Rd3wLdDmM=";
|
|
||||||
openSha256 = "sha256-asGpqOpU0tIO9QqceA8XRn5L27OiBFuI9RZ1NjSVwaM=";
|
|
||||||
settingsSha256 = "sha256-b4nhUMCzZc3VANnNb0rmcEH6H7SK2D5eZIplgPV59c8=";
|
|
||||||
persistencedSha256 = "sha256-MhITuC8tH/IPhCOUm60SrPOldOpitk78mH0rg+egkTE=";
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
hardware.nvidia.package =
|
|
||||||
let
|
|
||||||
rcu_patch = pkgs.fetchpatch {
|
|
||||||
url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
|
|
||||||
hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
|
||||||
version = "535.154.05";
|
|
||||||
sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg=";
|
|
||||||
sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k=";
|
|
||||||
openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo=";
|
|
||||||
settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10=";
|
|
||||||
persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE=";
|
|
||||||
patches = [ rcu_patch ];
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
boot.resumeDevice = "/dev/disk/by-label/ROOT";
|
boot.resumeDevice = "/dev/disk/by-label/ROOT";
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [ "subvol=@" ];
|
||||||
options = [ "subvol=@" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [ "subvol=@nix" ];
|
||||||
options = [ "subvol=@nix" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [ "subvol=@swap" ];
|
||||||
options = [ "subvol=@swap" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{
|
device = "/dev/disk/by-label/EFI";
|
||||||
device = "/dev/disk/by-label/EFI";
|
fsType = "vfat";
|
||||||
fsType = "vfat";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{
|
device = "/dev/disk/by-label/HOME";
|
||||||
device = "/dev/disk/by-label/HOME";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [ "subvol=@" ];
|
||||||
options = [ "subvol=@" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{ device = "/swap/swapfile"; }];
|
swapDevices = [ { device = "/swap/swapfile"; } ];
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
28
hosts/T430/default.nix
Executable file → Normal file
|
|
@ -1,17 +1,18 @@
|
||||||
{ ... }@inputs: {
|
{ ... }@inputs:
|
||||||
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
|
||||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t430
|
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t430
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
|
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||||
|
./hardware.nix
|
||||||
|
../../modules
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "T430";
|
networking.hostName = "T430";
|
||||||
|
|
||||||
bchmnn = {
|
bchmnn = {
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
greeter.enable = false;
|
greeter.enable = false;
|
||||||
|
|
@ -24,16 +25,21 @@
|
||||||
};
|
};
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
vpn.enable = true;
|
|
||||||
sync.enable = true;
|
|
||||||
|
|
||||||
devenv.enable = true;
|
collections = {
|
||||||
virtualisation.enable = true;
|
cli-utils.enable = true;
|
||||||
games.enable = true;
|
profiling.enable = true;
|
||||||
ratbag.enable = true;
|
development.enable = true;
|
||||||
|
vpn.enable = true;
|
||||||
ai.enable = false;
|
virtualisation.enable = true;
|
||||||
|
games.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
flare-solvarr.enable = true;
|
||||||
|
jackett.enable = true;
|
||||||
|
syncthing.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,21 @@
|
||||||
{ config, lib, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ehci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
"sdhci_pci"
|
||||||
|
];
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
|
@ -11,47 +23,53 @@
|
||||||
boot.resumeDevice = "/dev/disk/by-label/ROOT";
|
boot.resumeDevice = "/dev/disk/by-label/ROOT";
|
||||||
boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/b7a904b2-cceb-47fc-832a-701e386a95db";
|
boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/b7a904b2-cceb-47fc-832a-701e386a95db";
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [
|
||||||
options = [ "subvol=@" "compress=zstd" "noatime" ];
|
"subvol=@"
|
||||||
};
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [
|
||||||
options = [ "subvol=@home" "compress=zstd" "noatime" ];
|
"subvol=@home"
|
||||||
};
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [
|
||||||
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
|
"subvol=@nix"
|
||||||
};
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{
|
device = "/dev/disk/by-label/ROOT";
|
||||||
device = "/dev/disk/by-label/ROOT";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [
|
||||||
options = [ "subvol=@swap" "noatime" ];
|
"subvol=@swap"
|
||||||
};
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{
|
device = "/dev/disk/by-label/EFI";
|
||||||
device = "/dev/disk/by-label/EFI";
|
fsType = "vfat";
|
||||||
fsType = "vfat";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [ { device = "/swap/swapfile"; } ];
|
||||||
device = "/swap/swapfile";
|
|
||||||
}];
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
{ config, lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
boot.kernelParams = [ "resume_offset=9364344" ];
|
|
||||||
boot.resumeDevice = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/d04a2c58-4116-45d6-aa6e-2002556e6d22";
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@home" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/root" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@root" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/srv" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@srv" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var/log" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@log" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var/cache" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@cache" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/tmp" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@tmp" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/swap" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@swap" "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/A410-7E4F";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{
|
|
||||||
device = "/swap/swapfile";
|
|
||||||
}];
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
|
|
||||||
ls = "eza --group-directories-first --hyperlink --icons";
|
|
||||||
la = "eza --group-directories-first --hyperlink --icons -la";
|
|
||||||
lt = "eza --group-directories-first --hyperlink --icons -la --tree";
|
|
||||||
llt = "unbuffer eza --group-directories-first --hyperlink --icons -la --tree | less -r";
|
|
||||||
# ls = "lsd --color=auto --hyperlink=auto";
|
|
||||||
# la = "lsd -lAh --group-directories-first --hyperlink=auto";
|
|
||||||
# lt = "lsd -lAh --group-directories-first --tree --hyperlink=auto";
|
|
||||||
# llt = "unbuffer lsd -lAh --group-directories-first --tree --hyperlink=auto | less -r";
|
|
||||||
|
|
||||||
gg = "cd ~/code";
|
|
||||||
# gs = "git status";
|
|
||||||
gl = "git log --oneline";
|
|
||||||
glg = "git log --oneline --graph --decorate --all";
|
|
||||||
gaa = "git add --all";
|
|
||||||
gc = "git commit -m";
|
|
||||||
gp = "git push";
|
|
||||||
|
|
||||||
ta = "tmux attach";
|
|
||||||
|
|
||||||
nec = "nvim --cmd \"cd $(readlink -f /etc/nixos)\"";
|
|
||||||
ncc = "sudo nixos-rebuild switch --upgrade-all --flake \"$(readlink -f /etc/nixos)\"";
|
|
||||||
nup = "sudo nix-channel --update";
|
|
||||||
ngc = "sudo nix-collect-garbage -d";
|
|
||||||
|
|
||||||
dcup = "docker-compose up --detach --remove-orphans";
|
|
||||||
dka = "docker kill $(docker ps -q)";
|
|
||||||
drmc = "docker container rm $(docker container ls -aq)";
|
|
||||||
drmi = "docker image rm $(docker image ls -aq)";
|
|
||||||
drmv = "docker volume rm $(docker volume ls -q)";
|
|
||||||
|
|
||||||
lsip = "curl -s 'https://nordvpn.com/wp-admin/admin-ajax.php?action=get_user_info_data' | jq";
|
|
||||||
xo = "xdg-open";
|
|
||||||
y = "yazi";
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
services.jackett = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
oci-containers = {
|
|
||||||
containers = {
|
|
||||||
flare-solvarr = {
|
|
||||||
image = "ghcr.io/flaresolverr/flaresolverr:latest";
|
|
||||||
autoStart = true;
|
|
||||||
ports = [ "127.0.0.1:8191:8191" ];
|
|
||||||
environment = {
|
|
||||||
LOG_LEVEL = "info";
|
|
||||||
LOG_HTML = "false";
|
|
||||||
CAPTCHA_SOLVER = "hcaptcha-solver";
|
|
||||||
TZ = "Europe/Berlin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{ pkgs, config, lib, ... }: lib.mkIf config.bchmnn.audio.enable {
|
|
||||||
services.pipewire = lib.mkIf (!builtins.elem "gnome" config.bchmnn.gui.flavour) {
|
|
||||||
enable = true;
|
|
||||||
audio.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
jack.enable = true;
|
|
||||||
wireplumber.enable = true;
|
|
||||||
extraConfig.pipewire = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
|
|
||||||
"90-wine-config" = {
|
|
||||||
"context.properties" = {
|
|
||||||
# "default.clock.rate" = 48000;
|
|
||||||
"default.clock.allowed-rates" = [ 44100 48000 ];
|
|
||||||
# "default.clock.quantum" = 2048;
|
|
||||||
# "default.clock.min-quantum" = 1024;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraConfig.pipewire-pulse = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
|
|
||||||
"90-wine-config" = {
|
|
||||||
"pulse.properties" = {
|
|
||||||
"pulse.min.req" = "1024/48000";
|
|
||||||
# "pulse.min.frag" = "1024/48000";
|
|
||||||
# "pulse.min.quantum" = "1024/48000";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
alsa-utils
|
|
||||||
pulseaudio
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{ config, lib, ... }: lib.mkIf config.bchmnn.gui.enable {
|
|
||||||
programs.ausweisapp = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ config, lib, ... }: lib.mkIf config.bchmnn.bluetooth.enable {
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.blueman.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
programs.ccache = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
65
modules/core/applications.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
environment.systemPackages =
|
||||||
|
lib.optionals config.bchmnn.collections.cli-utils.enable [
|
||||||
|
pkgs.pciutils # a collection of programs for inspecting and manipulating configuration of pci devices
|
||||||
|
pkgs.usbutils # tools for working with usb devices, such as lsusb
|
||||||
|
pkgs.lshw # provide detailed information on the hardware configuration of the machine
|
||||||
|
pkgs.git # distributed version control system
|
||||||
|
pkgs.gnumake # a tool to control the generation of non-source files from sources
|
||||||
|
pkgs.parallel # shell tool for executing jobs in parallel
|
||||||
|
pkgs.mercurial # a fast, lightweight scm system for very large distributed projects
|
||||||
|
pkgs.wget # tool for retrieving files using http, https, and ftp
|
||||||
|
pkgs.unstable.neovim-unwrapped # vim text editor fork focused on extensibility and agility
|
||||||
|
pkgs.neofetch # a fast, highly customizable system info script
|
||||||
|
pkgs.eza # a modern, maintained replacement for ls
|
||||||
|
pkgs.ripgrep # a utility that combines the usability of the silver searcher with the raw speed of grep
|
||||||
|
pkgs.ripgrep-all # ripgrep, but also search in pdfs, e-books, office documents, zip, tar.gz, and more
|
||||||
|
pkgs.expect # a tool for automating interactive applications
|
||||||
|
pkgs.jq # a lightweight and flexible command-line json processor
|
||||||
|
pkgs.unzip # an extraction utility for archives compressed in .zip format
|
||||||
|
pkgs.unrar # utility for rar archives
|
||||||
|
pkgs.libsecret # a library for storing and retrieving passwords and other secrets
|
||||||
|
pkgs.xidel # command line tool to download and extract data from html/xml pages as well as json apis
|
||||||
|
pkgs.nvd # nix/nixos package version diff tool
|
||||||
|
pkgs.inotify-tools # a c library and a set of command-line programs providing a simple interface to inotify
|
||||||
|
pkgs.mkcert # a simple tool for making locally-trusted development certificates
|
||||||
|
pkgs.hexedit
|
||||||
|
]
|
||||||
|
++ lib.optionals (config.bchmnn.collections.cli-utils.enable && config.bchmnn.nvidia.enable) [
|
||||||
|
pkgs.nvtopPackages.full
|
||||||
|
]
|
||||||
|
++ lib.optionals config.bchmnn.collections.development.enable [
|
||||||
|
pkgs.gcc13
|
||||||
|
pkgs.clang
|
||||||
|
pkgs.universal-ctags # a maintained ctags implementation
|
||||||
|
pkgs.rustc
|
||||||
|
pkgs.cargo # downloads your rust project's dependencies and builds your project
|
||||||
|
pkgs.go # go programming language
|
||||||
|
(pkgs.python312.withPackages (
|
||||||
|
p: with p; [
|
||||||
|
ptpython # an advanced python repl
|
||||||
|
ipython # ipython: productive interactive computing
|
||||||
|
pycryptodome # self-contained cryptographic library
|
||||||
|
gmpy2 # interface to gmp, mpfr, and mpc for python 3.7+
|
||||||
|
]
|
||||||
|
))
|
||||||
|
pkgs.lua
|
||||||
|
pkgs.nixpkgs-fmt
|
||||||
|
pkgs.openjdk17
|
||||||
|
pkgs.javaPackages.openjfx17
|
||||||
|
pkgs.gradle_7
|
||||||
|
pkgs.maven
|
||||||
|
pkgs.ant
|
||||||
|
pkgs.nodejs_20
|
||||||
|
pkgs.nodenv
|
||||||
|
pkgs.nodePackages.yarn
|
||||||
|
pkgs.nodePackages.pnpm
|
||||||
|
];
|
||||||
|
}
|
||||||
57
modules/core/audio.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options.bchmnn = {
|
||||||
|
audio = {
|
||||||
|
enable = lib.mkEnableOption "audio";
|
||||||
|
pipewire-wine-fix = {
|
||||||
|
enable = lib.mkEnableOption "pipewire-wine-fix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.pipewire =
|
||||||
|
lib.mkIf (config.bchmnn.audio.enable && (!builtins.elem "gnome" config.bchmnn.gui.flavour))
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
audio.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
jack.enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
extraConfig.pipewire = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
|
||||||
|
"90-wine-config" = {
|
||||||
|
"context.properties" = {
|
||||||
|
# "default.clock.rate" = 48000;
|
||||||
|
"default.clock.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
];
|
||||||
|
# "default.clock.quantum" = 2048;
|
||||||
|
# "default.clock.min-quantum" = 1024;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig.pipewire-pulse = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
|
||||||
|
"90-wine-config" = {
|
||||||
|
"pulse.properties" = {
|
||||||
|
"pulse.min.req" = "1024/48000";
|
||||||
|
# "pulse.min.frag" = "1024/48000";
|
||||||
|
# "pulse.min.quantum" = "1024/48000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = lib.optionals config.bchmnn.audio.enable [
|
||||||
|
pkgs.alsa-utils
|
||||||
|
pkgs.pulseaudio
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/core/bluetooth.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
options.bchmnn = {
|
||||||
|
bluetooth = {
|
||||||
|
enable = lib.mkEnableOption "bluetooth";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.bchmnn.bluetooth.enable {
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.blueman.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
33
modules/core/common.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
aliases = {
|
||||||
|
ls = "eza --group-directories-first --hyperlink --icons";
|
||||||
|
la = "eza --group-directories-first --hyperlink --icons -la";
|
||||||
|
lt = "eza --group-directories-first --hyperlink --icons -la --tree";
|
||||||
|
llt = "unbuffer eza --group-directories-first --hyperlink --icons -la --tree | less -r";
|
||||||
|
|
||||||
|
gg = "cd ~/code";
|
||||||
|
# gs = "git status";
|
||||||
|
gl = "git log --oneline";
|
||||||
|
glg = "git log --oneline --graph --decorate --all";
|
||||||
|
gaa = "git add --all";
|
||||||
|
gc = "git commit -m";
|
||||||
|
gp = "git push";
|
||||||
|
|
||||||
|
ta = "tmux attach";
|
||||||
|
|
||||||
|
nec = "nvim --cmd \"cd $(readlink -f /etc/nixos)\"";
|
||||||
|
ncc = "sudo nixos-rebuild switch --upgrade-all --flake \"$(readlink -f /etc/nixos)\"";
|
||||||
|
nup = "sudo nix-channel --update";
|
||||||
|
ngc = "sudo nix-collect-garbage -d";
|
||||||
|
|
||||||
|
dcup = "docker-compose up --detach --remove-orphans";
|
||||||
|
dka = "docker kill $(docker ps -q)";
|
||||||
|
drmc = "docker container rm $(docker container ls -aq)";
|
||||||
|
drmi = "docker image rm $(docker image ls -aq)";
|
||||||
|
drmv = "docker volume rm $(docker volume ls -q)";
|
||||||
|
|
||||||
|
lsip = "curl -s 'https://nordvpn.com/wp-admin/admin-ajax.php?action=get_user_info_data' | jq";
|
||||||
|
xo = "xdg-open";
|
||||||
|
y = "yazi";
|
||||||
|
};
|
||||||
|
}
|
||||||
89
modules/core/default.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{ pkgs, ... }@inputs:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./applications.nix
|
||||||
|
./audio.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./keyd.nix
|
||||||
|
./network.nix
|
||||||
|
./nvidia.nix
|
||||||
|
./power.nix
|
||||||
|
./printing.nix
|
||||||
|
./profiling.nix
|
||||||
|
./security.nix
|
||||||
|
./shell.nix
|
||||||
|
./virtualisation.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = [
|
||||||
|
(self: super: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable { system = super.system; };
|
||||||
|
mfcl3750cdwlpr = (super.callPackage ../../overlays/mfcl3750cdw.nix { }).driver;
|
||||||
|
mfcl3750cdwcupswrapper = (super.callPackage ../../overlays/mfcl3750cdw.nix { }).cupswrapper;
|
||||||
|
pppdf = (super.python3Packages.callPackage ../../overlays/pppdf { });
|
||||||
|
iglesia-light = (super.callPackage ../../overlays/fonts/iglesia-light.nix { });
|
||||||
|
})
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = (_: true);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# provide libraries for non-nix binaries
|
||||||
|
# programs.nix-ld = {
|
||||||
|
# enable = true;
|
||||||
|
# libraries = [
|
||||||
|
# # glibc
|
||||||
|
# # libcxx
|
||||||
|
# # libllvm
|
||||||
|
# # ncurses
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
supportedLocales = [
|
||||||
|
"en_US.UTF-8/UTF-8"
|
||||||
|
"de_DE.UTF-8/UTF-8"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
services.dbus = {
|
||||||
|
enable = true;
|
||||||
|
packages = with pkgs; [
|
||||||
|
gcr # gnome crypto services (daemon and tools)
|
||||||
|
dconf
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ccache = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -27,9 +27,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ keyd ];
|
||||||
keyd
|
|
||||||
];
|
|
||||||
# Enable keyd and remap keys
|
# Enable keyd and remap keys
|
||||||
services.keyd = {
|
services.keyd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
19
modules/core/network.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
systemd.services = {
|
||||||
|
NetworkManager-wait-online.enable = false;
|
||||||
|
};
|
||||||
|
environment.systemPackages = lib.optionals (config.bchmnn.collections.vpn.enable) [
|
||||||
|
pkgs.openvpn3
|
||||||
|
pkgs.mullvad-vpn
|
||||||
|
pkgs.wireguard-tools # tools for the wireguard secure network tunnel
|
||||||
|
];
|
||||||
|
services.mullvad-vpn.enable = config.bchmnn.collections.vpn.enable;
|
||||||
|
services.tailscale.enable = config.bchmnn.collections.vpn.enable;
|
||||||
|
}
|
||||||
17
modules/core/nvidia.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
options.bchmnn = {
|
||||||
|
nvidia = {
|
||||||
|
enable = lib.mkEnableOption "nvidia";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.bchmnn.nvidia.enable {
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
55
modules/core/power.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
options.bchmnn = {
|
||||||
|
|
||||||
|
power = {
|
||||||
|
tlp = {
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type =
|
||||||
|
with lib.types;
|
||||||
|
attrsOf (oneOf [
|
||||||
|
bool
|
||||||
|
int
|
||||||
|
float
|
||||||
|
str
|
||||||
|
(listOf str)
|
||||||
|
]);
|
||||||
|
default = {
|
||||||
|
# performance | powersave
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
# performance | balance_performance | default | balance_power | power
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
|
# performance | balanced | low-power
|
||||||
|
PLATFORM_PROFILE_ON_AC = "performance";
|
||||||
|
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||||
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
|
CPU_MIN_PERF_ON_BAT = 0;
|
||||||
|
CPU_MAX_PERF_ON_BAT = 100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
powerManagement = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.tlp = {
|
||||||
|
enable = !builtins.elem "gnome" config.bchmnn.gui.flavour;
|
||||||
|
settings = config.bchmnn.power.tlp.settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ powertop ];
|
||||||
|
};
|
||||||
|
}
|
||||||
38
modules/core/printing.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options.bchmnn = {
|
||||||
|
printing = {
|
||||||
|
enable = lib.mkEnableOption "printing";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.bchmnn.printing.enable {
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = [ pkgs.mfcl3750cdwcupswrapper ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.printers = {
|
||||||
|
ensurePrinters = [
|
||||||
|
{
|
||||||
|
name = "Brother-MFC-L3750CDW-series";
|
||||||
|
location = "Home";
|
||||||
|
deviceUri = "dnssd://Brother%20MFC-L3750CDW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b4220094c09b";
|
||||||
|
model = "brother_mfcl3750cdw_printer_en.ppd";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ensureDefaultPrinter = "Brother-MFC-L3750CDW-series";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ config, ... }: {
|
{ config, lib, ... }:
|
||||||
|
lib.mkIf config.bchmnn.collections.profiling.enable {
|
||||||
boot.loader.systemd-boot.memtest86.enable = config.boot.loader.systemd-boot.enable;
|
boot.loader.systemd-boot.memtest86.enable = config.boot.loader.systemd-boot.enable;
|
||||||
boot.loader.grub.memtest86.enable = config.boot.loader.grub.enable;
|
boot.loader.grub.memtest86.enable = config.boot.loader.grub.enable;
|
||||||
}
|
}
|
||||||
13
modules/core/security.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = lib.optionals (config.bchmnn.collections.development.enable) [
|
||||||
|
3000
|
||||||
|
6969
|
||||||
|
8080
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
44
modules/core/shell.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
common = import ./common.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.gandalf = {
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
shellAliases = common.aliases;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
htop.enable = true;
|
||||||
|
iftop.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
documentation = {
|
||||||
|
enable = true;
|
||||||
|
doc.enable = true;
|
||||||
|
dev.enable = true;
|
||||||
|
man = {
|
||||||
|
enable = true;
|
||||||
|
generateCaches = true;
|
||||||
|
man-db.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
man-pages
|
||||||
|
man-pages-posix
|
||||||
|
ncurses
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/core/virtualisation.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf config.bchmnn.collections.virtualisation.enable {
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd.enable = true;
|
||||||
|
/*
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
# create a `docker` alias for podman, to use it as a drop-in replacement
|
||||||
|
dockerCompat = true;
|
||||||
|
# required for containers under podman-compose to be able to talk to each other.
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
oci-containers = {
|
||||||
|
backend = "docker";
|
||||||
|
# backend = "podman";
|
||||||
|
};
|
||||||
|
containers = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hardware.nvidia-container-toolkit.enable = config.bchmnn.nvidia.enable;
|
||||||
|
environment.systemPackages = with pkgs; [ virtiofsd ];
|
||||||
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
services.dbus = {
|
|
||||||
enable = true;
|
|
||||||
packages = with pkgs; [ gcr dconf ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,133 +1,54 @@
|
||||||
{ lib, ... }: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
# options affecting multiple modules
|
|
||||||
options.bchmnn = with lib; {
|
options.bchmnn = with lib; {
|
||||||
|
user = {
|
||||||
|
extraGroups = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
"libvirtd"
|
||||||
|
"docker"
|
||||||
|
"wireshark"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
power = {
|
git = {
|
||||||
tlp = {
|
signing = {
|
||||||
settings = mkOption {
|
key = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ bool int float str (listOf str) ]);
|
type = types.str;
|
||||||
default = {
|
default = "732A612DAD28067D";
|
||||||
# performance | powersave
|
|
||||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
|
||||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
||||||
# performance | balance_performance | default | balance_power | power
|
|
||||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
||||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
||||||
# performance | balanced | low-power
|
|
||||||
PLATFORM_PROFILE_ON_AC = "performance";
|
|
||||||
PLATFORM_PROFILE_ON_BAT = "low-power";
|
|
||||||
CPU_MIN_PERF_ON_AC = 0;
|
|
||||||
CPU_MAX_PERF_ON_AC = 100;
|
|
||||||
CPU_MIN_PERF_ON_BAT = 0;
|
|
||||||
CPU_MAX_PERF_ON_BAT = 100;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
collections = {
|
||||||
gui = {
|
cli-utils = {
|
||||||
enable = mkEnableOption "gui";
|
enable = mkEnableOption "cli-utils";
|
||||||
greeter = {
|
|
||||||
enable = mkEnableOption "greeter";
|
|
||||||
};
|
};
|
||||||
flavour = mkOption {
|
profiling = {
|
||||||
type = types.listOf types.str;
|
enable = mkEnableOption "profiling";
|
||||||
default = [ "sway" ];
|
};
|
||||||
example = [ "sway" "i3" ];
|
development = {
|
||||||
description = ''
|
enable = mkEnableOption "development";
|
||||||
The flavour (WM) for your system to use
|
};
|
||||||
'';
|
vpn = {
|
||||||
|
enable = mkEnableOption "vpn";
|
||||||
|
};
|
||||||
|
virtualisation = {
|
||||||
|
enable = mkEnableOption "virtualisation";
|
||||||
|
};
|
||||||
|
games = {
|
||||||
|
enable = mkEnableOption "games";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nvidia = {
|
|
||||||
enable = mkEnableOption "nvidia";
|
|
||||||
};
|
|
||||||
|
|
||||||
audio = {
|
|
||||||
enable = mkEnableOption "audio";
|
|
||||||
pipewire-wine-fix = {
|
|
||||||
enable = mkEnableOption "pipewire-wine-fix";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
bluetooth = {
|
|
||||||
enable = mkEnableOption "bluetooth";
|
|
||||||
};
|
|
||||||
|
|
||||||
printing = {
|
|
||||||
enable = mkEnableOption "printing";
|
|
||||||
};
|
|
||||||
|
|
||||||
vpn = {
|
|
||||||
enable = mkEnableOption "vpn";
|
|
||||||
};
|
|
||||||
|
|
||||||
sync = {
|
|
||||||
enable = mkEnableOption "sync";
|
|
||||||
};
|
|
||||||
|
|
||||||
devenv = {
|
|
||||||
enable = mkEnableOption "devenv";
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
enable = mkEnableOption "virtualisation";
|
|
||||||
};
|
|
||||||
|
|
||||||
games = {
|
|
||||||
enable = mkEnableOption "games";
|
|
||||||
};
|
|
||||||
|
|
||||||
ai = {
|
|
||||||
enable = mkEnableOption "ai";
|
|
||||||
};
|
|
||||||
|
|
||||||
ratbag = {
|
|
||||||
enable = mkEnableOption "ratbag";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./arr.nix
|
./core
|
||||||
./audio.nix
|
./desktop
|
||||||
./ausweisapp.nix
|
./home-manager
|
||||||
./bluetooth.nix
|
./services
|
||||||
./ccache.nix
|
|
||||||
./desktop.nix
|
|
||||||
./dbus.nix
|
|
||||||
./fonts.nix
|
|
||||||
./gstreamer.nix
|
|
||||||
./i18n.nix
|
|
||||||
./kdeconnect.nix
|
|
||||||
./keyd.nix
|
|
||||||
./man.nix
|
|
||||||
./memtest86.nix
|
|
||||||
./nautilus.nix
|
|
||||||
./network.nix
|
|
||||||
./nh.nix
|
|
||||||
./nix-ld.nix
|
|
||||||
./nix.nix
|
|
||||||
./nvidia.nix
|
|
||||||
./ollama.nix
|
|
||||||
./opengl.nix
|
|
||||||
./openssh.nix
|
|
||||||
./power.nix
|
|
||||||
./packages.nix
|
|
||||||
./printing.nix
|
|
||||||
./ratbag.nix
|
|
||||||
./security.nix
|
|
||||||
./shell.nix
|
|
||||||
./steam.nix
|
|
||||||
./syncthing.nix
|
|
||||||
./tts.nix
|
|
||||||
./udisks2.nix
|
|
||||||
./virtualisation.nix
|
|
||||||
./vpn.nix
|
|
||||||
./wine.nix
|
|
||||||
./xdg-portal.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
{ lib, pkgs, config, ... }: with config.bchmnn; lib.mkIf (gui.enable && gui.flavour != [ ]) {
|
|
||||||
|
|
||||||
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
|
|
||||||
|
|
||||||
programs.sway.enable = builtins.elem "sway" gui.flavour;
|
|
||||||
services.xserver.windowManager.i3.enable = builtins.elem "i3" gui.flavour;
|
|
||||||
|
|
||||||
services.libinput.enable = true;
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = (builtins.elem "i3" gui.flavour || builtins.elem "gnome" gui.flavour);
|
|
||||||
desktopManager.gnome.enable = builtins.elem "gnome" gui.flavour;
|
|
||||||
displayManager = {
|
|
||||||
gdm.enable = builtins.elem "gnome" gui.flavour;
|
|
||||||
startx.enable = builtins.elem "i3" gui.flavour;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(writeShellScriptBin "sway-run" ''
|
|
||||||
export WLR_NO_HARDWARE_CURSORS=1
|
|
||||||
exec ${sway}/bin/sway "$@"
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
etc = {
|
|
||||||
"greetd/environments".text = (lib.strings.concatLines gui.flavour);
|
|
||||||
"greetd/kanshi-config".text = ''
|
|
||||||
profile nomad {
|
|
||||||
output "LVDS-1" enable
|
|
||||||
}
|
|
||||||
profile iroh {
|
|
||||||
output "DP-3" enable mode 2560x1440 position 0,0
|
|
||||||
output "DP-2" enable mode 2560x1440 position 2560,0
|
|
||||||
output "DP-1" enable mode 2560x1440 position 5120,0
|
|
||||||
}
|
|
||||||
profile station {
|
|
||||||
output "LVDS-1" disable
|
|
||||||
output "Dell Inc. DELL U2515H 9X2VY5490XUL" enable mode 1920x1080 position 0,0
|
|
||||||
output "Dell Inc. DELL U2515H 9X2VY5C7138L" enable mode 1920x1080 position 1920,0
|
|
||||||
output "HJW VGA TO HDMI 0x00000100" enable mode 1920x1080 position 3840,0
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
"greetd/sway-config".text = ''
|
|
||||||
exec "${pkgs.kanshi}/bin/kanshi --config /etc/greetd/kanshi-config"
|
|
||||||
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
|
||||||
|
|
||||||
bindsym Mod4+shift+e exec swaynag \
|
|
||||||
-t warning \
|
|
||||||
-m 'What do you want to do?' \
|
|
||||||
-b 'Poweroff' 'systemctl poweroff' \
|
|
||||||
-b 'Reboot' 'systemctl reboot'
|
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = gui.greeter.enable;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "sway-run --config /etc/greetd/sway-config" + lib.optionalString nvidia.enable " --unsupported-gpu";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
39
modules/desktop/applications.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf config.bchmnn.gui.enable {
|
||||||
|
|
||||||
|
environment.systemPackages =
|
||||||
|
lib.optionals (config.bchmnn.collections.cli-utils.enable) [
|
||||||
|
pkgs.libnotify # a library that sends desktop notifications to a notification daemon
|
||||||
|
pkgs.xdg-utils # a set of command line tools that assist applications with a variety of desktop integration tasks
|
||||||
|
]
|
||||||
|
++ lib.optionals (config.bchmnn.collections.development.enable) [
|
||||||
|
pkgs.ghidra-bin
|
||||||
|
pkgs.mongodb-compass
|
||||||
|
]
|
||||||
|
++ lib.optionals (lib.elem "sway" config.bchmnn.gui.flavour) [
|
||||||
|
pkgs.qt5.qtwayland
|
||||||
|
pkgs.qt6.qtwayland
|
||||||
|
pkgs.wineWowPackages.waylandFull
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
kdeconnect.enable = true;
|
||||||
|
ausweisapp = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
wireshark.enable = config.bchmnn.collections.development.enable;
|
||||||
|
virt-manager.enable = config.bchmnn.collections.virtualisation.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.ratbagd.enable = true;
|
||||||
|
# needed for udiskie
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
# enable gvfs to mount android devices
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
}
|
||||||
132
modules/desktop/default.nix
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./applications.nix
|
||||||
|
./fonts.nix
|
||||||
|
./games.nix
|
||||||
|
./nautilus.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options.bchmnn = {
|
||||||
|
gui = {
|
||||||
|
enable = lib.mkEnableOption "gui";
|
||||||
|
greeter = {
|
||||||
|
enable = lib.mkEnableOption "greeter";
|
||||||
|
};
|
||||||
|
flavour = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ "sway" ];
|
||||||
|
example = [
|
||||||
|
"sway"
|
||||||
|
"i3"
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
The flavour (WM) for your system to use
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.bchmnn.gui.enable && config.bchmnn.gui.flavour != [ ]) {
|
||||||
|
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
|
||||||
|
programs.sway.enable = builtins.elem "sway" config.bchmnn.gui.flavour;
|
||||||
|
services.xserver.windowManager.i3.enable = builtins.elem "i3" config.bchmnn.gui.flavour;
|
||||||
|
services.libinput.enable = true;
|
||||||
|
services.xserver = {
|
||||||
|
enable = (
|
||||||
|
builtins.elem "i3" config.bchmnn.gui.flavour || builtins.elem "gnome" config.bchmnn.gui.flavour
|
||||||
|
);
|
||||||
|
desktopManager.gnome.enable = builtins.elem "gnome" config.bchmnn.gui.flavour;
|
||||||
|
displayManager = {
|
||||||
|
gdm.enable = builtins.elem "gnome" config.bchmnn.gui.flavour;
|
||||||
|
startx.enable = builtins.elem "i3" config.bchmnn.gui.flavour;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "sway-run" ''
|
||||||
|
export WLR_NO_HARDWARE_CURSORS=1
|
||||||
|
exec ${pkgs.sway}/bin/sway "$@"
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
etc = {
|
||||||
|
"greetd/environments".text = (lib.strings.concatLines config.bchmnn.gui.flavour);
|
||||||
|
"greetd/kanshi-config".text = ''
|
||||||
|
profile nomad {
|
||||||
|
output "LVDS-1" enable
|
||||||
|
}
|
||||||
|
profile iroh {
|
||||||
|
output "DP-3" enable mode 2560x1440 position 0,0
|
||||||
|
output "DP-2" enable mode 2560x1440 position 2560,0
|
||||||
|
output "DP-1" enable mode 2560x1440 position 5120,0
|
||||||
|
}
|
||||||
|
profile station {
|
||||||
|
output "LVDS-1" disable
|
||||||
|
output "Dell Inc. DELL U2515H 9X2VY5490XUL" enable mode 1920x1080 position 0,0
|
||||||
|
output "Dell Inc. DELL U2515H 9X2VY5C7138L" enable mode 1920x1080 position 1920,0
|
||||||
|
output "HJW VGA TO HDMI 0x00000100" enable mode 1920x1080 position 3840,0
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
"greetd/sway-config".text = ''
|
||||||
|
exec "${pkgs.kanshi}/bin/kanshi --config /etc/greetd/kanshi-config"
|
||||||
|
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
||||||
|
|
||||||
|
bindsym Mod4+shift+e exec swaynag \
|
||||||
|
-t warning \
|
||||||
|
-m 'What do you want to do?' \
|
||||||
|
-b 'Poweroff' 'systemctl poweroff' \
|
||||||
|
-b 'Reboot' 'systemctl reboot'
|
||||||
|
|
||||||
|
include /etc/sway/config.d/*
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.greetd = {
|
||||||
|
enable = config.bchmnn.gui.greeter.enable;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command =
|
||||||
|
"sway-run --config /etc/greetd/sway-config"
|
||||||
|
+ lib.optionalString config.bchmnn.nvidia.enable " --unsupported-gpu";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO workaround to get swaylock accepting pw
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/158025
|
||||||
|
security.pam.services = lib.mkIf (lib.elem "sway" config.bchmnn.gui.flavour) { swaylock = { }; };
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
config.common.default = "*";
|
||||||
|
extraPortals = lib.optionals (lib.elem "sway" config.bchmnn.gui.flavour) [
|
||||||
|
pkgs.xdg-desktop-portal-wlr
|
||||||
|
];
|
||||||
|
};
|
||||||
|
environment.sessionVariables.GST_PLUGIN_SYSTEM_PATH_1_0 =
|
||||||
|
lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0"
|
||||||
|
(
|
||||||
|
with pkgs.gst_all_1;
|
||||||
|
[
|
||||||
|
gst-plugins-base
|
||||||
|
gst-plugins-good
|
||||||
|
gst-plugins-bad
|
||||||
|
gst-plugins-ugly
|
||||||
|
]
|
||||||
|
);
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
environment.variables =
|
||||||
|
lib.mkIf (builtins.elem pkgs.intel-media-driver config.hardware.opengl.extraPackages)
|
||||||
|
{ LIBVA_DRIVER_NAME = "iHD"; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ pkgs, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf (config.bchmnn.gui.enable) {
|
||||||
# Add fonts
|
# Add fonts
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultPackages = true;
|
enableDefaultPackages = true;
|
||||||
16
modules/desktop/games.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf config.bchmnn.collections.games.enable {
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.mangohud
|
||||||
|
pkgs.gamemode
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ pkgs, lib, config, ... }: with config.bchmnn; lib.mkIf (gui.enable && gui.flavour != [ ]) {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf (config.bchmnn.gui.enable && config.bchmnn.gui.flavour != [ ]) {
|
||||||
programs.nautilus-open-any-terminal = {
|
programs.nautilus-open-any-terminal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
|
|
@ -6,9 +12,7 @@
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
sessionVariables.NAUTILUS_4_EXTENSION_DIR = "${pkgs.gnome.nautilus-python}/lib/nautilus/extensions-4";
|
sessionVariables.NAUTILUS_4_EXTENSION_DIR = "${pkgs.gnome.nautilus-python}/lib/nautilus/extensions-4";
|
||||||
pathsToLink = [
|
pathsToLink = [ "/share/nautilus-python/extensions" ];
|
||||||
"/share/nautilus-python/extensions"
|
|
||||||
];
|
|
||||||
|
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
gnome.nautilus
|
gnome.nautilus
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ lib, pkgs, ... }: {
|
|
||||||
environment.sessionVariables.GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with pkgs.gst_all_1; [
|
|
||||||
gst-plugins-base
|
|
||||||
gst-plugins-good
|
|
||||||
gst-plugins-bad
|
|
||||||
gst-plugins-ugly
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
22
modules/home-manager/applications.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.gopass # slightly more awesome standard unix password manager for teams. written in go
|
||||||
|
pkgs.gopass-jsonapi # enables communication with gopass via json messages
|
||||||
|
pkgs.yt-dlp # command-line tool to download videos from youtube.com and other sites (youtube-dl fork)
|
||||||
|
pkgs.gdu # fast disk usage analyzer with console interface written in go
|
||||||
|
pkgs.duf # disk usage/free utility - a better 'df' alternative
|
||||||
|
pkgs.stress # simple workload generator for posix systems. it imposes a configurable amount of cpu, memory, i/o, and disk stress on the system
|
||||||
|
pkgs.s-tui # stress-terminal ui monitoring tool
|
||||||
|
pkgs.fio # flexible io tester - an io benchmark tool
|
||||||
|
pkgs.ffmpeg # complete, cross-platform solution to record, convert and stream audio and video
|
||||||
|
pkgs.texliveFull # tex live environment
|
||||||
|
pkgs.imagemagick # software suite to create, edit, compose, or convert bitmap images
|
||||||
|
pkgs.ghostscript # postscript interpreter (mainline version)
|
||||||
|
pkgs.pdftk # command-line tool for working with pdfs
|
||||||
|
pkgs.ventoy-full # bootable usb solution
|
||||||
|
pkgs.unstable.isisdl # downloader for isis of tu-berlin
|
||||||
|
pkgs.sage # open source mathematics software, free alternative to magma, maple, mathematica, and matlab
|
||||||
|
pkgs.filebrowser # filebrowser is a web application for managing files and directories
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{ lib, nixosConfig, ... }:
|
||||||
|
lib.mkIf nixosConfig.bchmnn.audio.enable {
|
||||||
xdg.configFile."wireplumber/wireplumber.conf.d/51-scarlett-samplerate.conf" = {
|
xdg.configFile."wireplumber/wireplumber.conf.d/51-scarlett-samplerate.conf" = {
|
||||||
text = ''
|
text = ''
|
||||||
monitor.alsa.rules = [
|
monitor.alsa.rules = [
|
||||||
|
|
@ -21,19 +22,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# {
|
|
||||||
# matches = [
|
|
||||||
# {
|
|
||||||
# node.nick = "Scarlett 2i2 USB"
|
|
||||||
# }
|
|
||||||
# ]
|
|
||||||
# actions = {
|
|
||||||
# update-props = {
|
|
||||||
# audio.rate = 48000
|
|
||||||
# api.acp.probe-rate = 48000
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
16
modules/home-manager/dconf.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, nixosConfig, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/virt-manager/virt-manager/connections" =
|
||||||
|
lib.mkIf nixosConfig.bchmnn.collections.virtualisation.enable
|
||||||
|
{
|
||||||
|
autoconnect = [ "qemu:///system" ];
|
||||||
|
uris = [ "qemu:///system" ];
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
"color-scheme" = "prefer-light";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
57
modules/home-manager/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
{ config, ... }@inputs:
|
||||||
|
let
|
||||||
|
common = import ../core/common.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
|
||||||
|
users.users.gandalf = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = config.bchmnn.user.extraGroups;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.gandalf = rec {
|
||||||
|
imports = [
|
||||||
|
./gui
|
||||||
|
./scripts
|
||||||
|
./applications.nix
|
||||||
|
./audio.nix
|
||||||
|
./dconf.nix
|
||||||
|
./git.nix
|
||||||
|
./gnupg.nix
|
||||||
|
./keyd.nix
|
||||||
|
./neovim.nix
|
||||||
|
./shell.nix
|
||||||
|
./zsh.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home = {
|
||||||
|
username = "gandalf";
|
||||||
|
homeDirectory = "/home/gandalf";
|
||||||
|
shellAliases = common.aliases;
|
||||||
|
stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
desktop = "${config.home.homeDirectory}/tmp";
|
||||||
|
documents = "${config.home.homeDirectory}/docs";
|
||||||
|
download = "${config.home.homeDirectory}/dl";
|
||||||
|
music = "${config.home.homeDirectory}/music";
|
||||||
|
pictures = "${config.home.homeDirectory}/pics";
|
||||||
|
publicShare = "${config.home.homeDirectory}/public";
|
||||||
|
templates = "${config.home.homeDirectory}/templates";
|
||||||
|
videos = "${config.home.homeDirectory}/vids";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,15 +1,18 @@
|
||||||
{ ... }: {
|
{ nixosConfig, ... }:
|
||||||
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
signing = {
|
signing = {
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
key = "732A612DAD28067D";
|
key = nixosConfig.bchmnn.git.signing.key;
|
||||||
};
|
};
|
||||||
userEmail = "jacob.bachmann@posteo.de";
|
userEmail = "jacob.bachmann@posteo.de";
|
||||||
userName = "Jacob Bachmann";
|
userName = "Jacob Bachmann";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init = { defaultBranch = "main"; };
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
core.editor = "nvim";
|
core.editor = "nvim";
|
||||||
pull.rebase = false;
|
pull.rebase = false;
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
colorschemes = rec {
|
colorschemes = rec {
|
||||||
custom = {
|
custom = {
|
||||||
black = "#000000";
|
black = "#000000";
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "macOS-Monterey";
|
name = "macOS-Monterey";
|
||||||
package = pkgs.apple-cursor;
|
package = pkgs.apple-cursor;
|
||||||
13
modules/home-manager/gui/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, nixosConfig, ... }:
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
with lib;
|
||||||
|
with nixosConfig.bchmnn;
|
||||||
|
optionals gui.enable [
|
||||||
|
./cursor.nix
|
||||||
|
./gtk.nix
|
||||||
|
./programs
|
||||||
|
]
|
||||||
|
++ optionals (gui.enable && elem "sway" gui.flavour) [ ./sway ]
|
||||||
|
++ optionals (gui.enable && elem "i3" gui.flavour) [ ./i3 ];
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gtk3.extraConfig = {
|
gtk3.extraConfig = {
|
||||||
|
|
@ -9,5 +9,4 @@
|
||||||
gtk-application-prefer-dark-theme = 0;
|
gtk-application-prefer-dark-theme = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.autorandr = {
|
programs.autorandr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -52,5 +52,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,16 +1,22 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.xsession.windowManager.i3.config;
|
cfg = config.xsession.windowManager.i3.config;
|
||||||
# common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
# common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||||
common = (import ../common.nix) { inherit pkgs; inherit lib; };
|
common = (import ../common.nix) {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit lib;
|
||||||
|
};
|
||||||
|
|
||||||
start-polybar = pkgs.writeShellScript "start-polybar" ''
|
start-polybar = pkgs.writeShellScript "start-polybar" ''
|
||||||
${pkgs.polybarFull}/bin/polybar-msg cmd quit
|
${pkgs.polybarFull}/bin/polybar-msg cmd quit
|
||||||
echo "---" | tee -a /tmp/polybar.log
|
echo "---" | tee -a /tmp/polybar.log
|
||||||
${pkgs.polybarFull}/bin/polybar 2>&1 | tee -a /tmp/polybar.log & disown
|
${pkgs.polybarFull}/bin/polybar 2>&1 | tee -a /tmp/polybar.log & disown
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -49,7 +55,9 @@ in
|
||||||
menu = "${config.programs.rofi.package}/bin/rofi -show drun";
|
menu = "${config.programs.rofi.package}/bin/rofi -show drun";
|
||||||
startup = with pkgs; [
|
startup = with pkgs; [
|
||||||
{ command = "${start-polybar}"; }
|
{ command = "${start-polybar}"; }
|
||||||
{ command = "${gnome.gnome-keyring}/bin/gnome-keyring-daemon --start --components=ssh,secrets,pkcs11"; }
|
{
|
||||||
|
command = "${gnome.gnome-keyring}/bin/gnome-keyring-daemon --start --components=ssh,secrets,pkcs11";
|
||||||
|
}
|
||||||
{ command = "${autorandr}/bin/autorandr -c"; }
|
{ command = "${autorandr}/bin/autorandr -c"; }
|
||||||
{ command = "${feh}/bin/feh --bg-fill ${common.wallpaper.default}"; }
|
{ command = "${feh}/bin/feh --bg-fill ${common.wallpaper.default}"; }
|
||||||
{ command = "${networkmanagerapplet}/bin/nm-applet"; }
|
{ command = "${networkmanagerapplet}/bin/nm-applet"; }
|
||||||
|
|
@ -58,7 +66,10 @@ in
|
||||||
{ command = "${nextcloud-client}/bin/nextcloud"; }
|
{ command = "${nextcloud-client}/bin/nextcloud"; }
|
||||||
{ command = "${plasma5Packages.kdeconnect-kde}/bin/kdeconnect-indicator"; }
|
{ command = "${plasma5Packages.kdeconnect-kde}/bin/kdeconnect-indicator"; }
|
||||||
{ command = "${system-config-printer}/bin/system-config-printer-applet"; }
|
{ command = "${system-config-printer}/bin/system-config-printer-applet"; }
|
||||||
{ command = "${config.programs.kitty.package}/bin/kitty --class dropdown --title dropdown"; always = true; }
|
{
|
||||||
|
command = "${config.programs.kitty.package}/bin/kitty --class dropdown --title dropdown";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
fonts = {
|
fonts = {
|
||||||
names = [ common.font ];
|
names = [ common.font ];
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
common = (import ../common.nix) {
|
||||||
|
pkgs = pkgs;
|
||||||
|
lib = lib;
|
||||||
|
};
|
||||||
alabaster-theme-patch = builtins.toFile "alabaster.patch" ''
|
alabaster-theme-patch = builtins.toFile "alabaster.patch" ''
|
||||||
diff --git a/alabaster.toml b/alabaster.toml
|
diff --git a/alabaster.toml b/alabaster.toml
|
||||||
index df312d3..f5e5499 100644
|
index df312d3..f5e5499 100644
|
||||||
|
|
@ -21,11 +24,9 @@ let
|
||||||
|
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
'';
|
'';
|
||||||
alacritty-theme-patched = pkgs.alacritty-theme.overrideAttrs (final: previous: {
|
alacritty-theme-patched = pkgs.alacritty-theme.overrideAttrs (
|
||||||
patches = [
|
final: previous: { patches = [ alabaster-theme-patch ]; }
|
||||||
alabaster-theme-patch
|
);
|
||||||
];
|
|
||||||
});
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
icons = {
|
icons = {
|
||||||
chromium = ./icons/chromium.png;
|
chromium = ./icons/chromium.png;
|
||||||
spotify = ./icons/spotify.png;
|
spotify = ./icons/spotify.png;
|
||||||
|
|
@ -8,7 +7,6 @@ let
|
||||||
outlook = ./icons/outlook.png;
|
outlook = ./icons/outlook.png;
|
||||||
whatsapp = ./icons/whatsapp.png;
|
whatsapp = ./icons/whatsapp.png;
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -63,6 +61,4 @@ in
|
||||||
Icon=${icons.whatsapp}
|
Icon=${icons.whatsapp}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
62
modules/home-manager/gui/programs/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
nixosConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./alacritty.nix
|
||||||
|
./chromium
|
||||||
|
./discord.nix
|
||||||
|
./games.nix
|
||||||
|
./keyring.nix
|
||||||
|
./kitty.nix
|
||||||
|
./obs.nix
|
||||||
|
./vscode.nix
|
||||||
|
./zathura.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
|
||||||
|
firefox # a web browser built from firefox source tree
|
||||||
|
thunderbird # a full-featured e-mail client
|
||||||
|
speechd # common interface to speech synthesis - https://support.mozilla.org/en-us/kb/speechd-setup
|
||||||
|
tor-browser # privacy-focused browser routing traffic through the tor network
|
||||||
|
qbittorrent # featureful free software bittorrent client
|
||||||
|
element-desktop # a feature-rich client for matrix.org
|
||||||
|
|
||||||
|
telegram-desktop # telegram desktop messaging app
|
||||||
|
signal-desktop # private, simple, and secure messenger
|
||||||
|
zoom-us # zoom.us video conferencing application
|
||||||
|
|
||||||
|
gnome.simple-scan # simple scanning utility
|
||||||
|
gnome.gnome-font-viewer # program that can preview fonts and create thumbnails for fonts
|
||||||
|
pppdf
|
||||||
|
feh # a light-weight image viewer
|
||||||
|
mpv
|
||||||
|
vlc # cross-platform media player and streaming server
|
||||||
|
zathura # a highly customizable and functional pdf viewer
|
||||||
|
neovide # a simple graphical user interface for neovim
|
||||||
|
|
||||||
|
gimp # the gnu image manipulation program
|
||||||
|
(calibre.override { unrarSupport = true; })
|
||||||
|
libreoffice # comprehensive, professional-quality productivity suite, a variant of openoffice.org
|
||||||
|
xournalpp # a handwriting notetaking software with pdf annotation support
|
||||||
|
libsForQt5.okular # kde document viewer
|
||||||
|
carla # audio plugin host
|
||||||
|
picard # musicbrainz picard audio file tagger
|
||||||
|
anki # spaced repetition flashcard program
|
||||||
|
|
||||||
|
]
|
||||||
|
++ lib.optionals nixosConfig.bchmnn.printing.enable [
|
||||||
|
system-config-printer # graphical user interface for cups administration
|
||||||
|
|
||||||
|
]
|
||||||
|
++ lib.optionals nixosConfig.services.ratbagd.enable [
|
||||||
|
piper # gtk frontend for ratbagd mouse config daemon
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
vesktop # alternate client for discord with vencord built-in
|
vesktop # alternate client for discord with vencord built-in
|
||||||
];
|
];
|
||||||
15
modules/home-manager/gui/programs/games.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
nixosConfig,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf nixosConfig.bchmnn.collections.games.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
openjdk17 # the open-source java development kit
|
||||||
|
prismlauncher # a free, open source launcher for minecraft
|
||||||
|
# retroarchFull # multi-platform emulator frontend for libretro cores
|
||||||
|
celestia # real-time 3d simulation of space
|
||||||
|
extremetuxracer # high speed arctic racing game based on tux racer
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.gnome-keyring = {
|
services.gnome-keyring = {
|
||||||
enable = true;
|
enable = true;
|
||||||
components = [
|
components = [
|
||||||
|
|
@ -9,8 +9,5 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ gnome.seahorse ];
|
||||||
gnome.seahorse
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
common = (import ../common.nix) {
|
||||||
|
pkgs = pkgs;
|
||||||
|
lib = lib;
|
||||||
|
};
|
||||||
kitty-alabaster-theme-patch = builtins.toFile "kitty-theme-alabaster.patch" ''
|
kitty-alabaster-theme-patch = builtins.toFile "kitty-theme-alabaster.patch" ''
|
||||||
diff --git a/themes/Alabaster.conf b/themes/Alabaster.conf
|
diff --git a/themes/Alabaster.conf b/themes/Alabaster.conf
|
||||||
index 7989049..b0c180e 100644
|
index 7989049..b0c180e 100644
|
||||||
|
|
@ -41,11 +44,9 @@ let
|
||||||
|
|
||||||
#: kitty window border colors and terminal bell colors
|
#: kitty window border colors and terminal bell colors
|
||||||
'';
|
'';
|
||||||
kitty-theme-patched = pkgs.kitty-themes.overrideAttrs (final: previous: {
|
kitty-theme-patched = pkgs.kitty-themes.overrideAttrs (
|
||||||
patches = [
|
final: previous: { patches = [ kitty-alabaster-theme-patch ]; }
|
||||||
kitty-alabaster-theme-patch
|
);
|
||||||
];
|
|
||||||
});
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
common = (import ../common.nix) {
|
||||||
|
pkgs = pkgs;
|
||||||
|
lib = lib;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
|
|
@ -129,7 +132,6 @@ in
|
||||||
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
"git.autofetch" = true;
|
"git.autofetch" = true;
|
||||||
"json.schemaDownload.enable" = true;
|
"json.schemaDownload.enable" = true;
|
||||||
"javascript.updateImportsOnFileMove.enabled" = "always";
|
"javascript.updateImportsOnFileMove.enabled" = "always";
|
||||||
|
|
@ -170,4 +172,3 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
# a highly customizable and functional pdf viewer
|
# a highly customizable and functional pdf viewer
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -1,12 +1,18 @@
|
||||||
{ pkgs, lib, config, nixosConfig, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
nixosConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.wayland.windowManager.sway.config;
|
cfg = config.wayland.windowManager.sway.config;
|
||||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
common = (import ../common.nix) {
|
||||||
|
pkgs = pkgs;
|
||||||
|
lib = lib;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./kanshi.nix
|
./kanshi.nix
|
||||||
./swaync
|
./swaync
|
||||||
|
|
@ -45,40 +51,44 @@ in
|
||||||
gtk = true;
|
gtk = true;
|
||||||
};
|
};
|
||||||
xwayland = true;
|
xwayland = true;
|
||||||
extraSessionCommands = with lib; with nixosConfig.bchmnn; ''
|
extraSessionCommands =
|
||||||
export CLUTTER_BACKEND=wayland;
|
with lib;
|
||||||
export GDK_BACKEND=wayland;
|
with nixosConfig.bchmnn;
|
||||||
export GDK_DPI_SCALE=1;
|
''
|
||||||
export NIXOS_OZONE_WL=1;
|
export CLUTTER_BACKEND=wayland;
|
||||||
export MOZ_ENABLE_WAYLAND=1;
|
export GDK_BACKEND=wayland;
|
||||||
export MOZ_USE_XINPUT2=1;
|
export GDK_DPI_SCALE=1;
|
||||||
export XDG_SESSION_TYPE=wayland;
|
export NIXOS_OZONE_WL=1;
|
||||||
export XDG_CURRENT_DESKTOP=sway;
|
export MOZ_ENABLE_WAYLAND=1;
|
||||||
|
export MOZ_USE_XINPUT2=1;
|
||||||
|
export XDG_SESSION_TYPE=wayland;
|
||||||
|
export XDG_CURRENT_DESKTOP=sway;
|
||||||
|
|
||||||
# sdl
|
# sdl
|
||||||
export SDL_VIDEODRIVER=wayland
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
|
||||||
# qt
|
# qt
|
||||||
export QT_QPA_PLATFORM=wayland-egl
|
export QT_QPA_PLATFORM=wayland-egl
|
||||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||||
|
|
||||||
# java
|
# java
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on";
|
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on";
|
||||||
|
|
||||||
'' + optionalString nvidia.enable ''
|
''
|
||||||
# nvidia
|
+ optionalString nvidia.enable ''
|
||||||
export WLR_RENDERER=vulkan;
|
# nvidia
|
||||||
# export LIBVA_DRIVER_NAME,nvidia;
|
export WLR_RENDERER=vulkan;
|
||||||
# export GBM_BACKEND=nvidia-drm;
|
# export LIBVA_DRIVER_NAME,nvidia;
|
||||||
export __GL_GSYNC_ALLOWED=0;
|
# export GBM_BACKEND=nvidia-drm;
|
||||||
export __GL_VRR_ALLOWED=0;
|
export __GL_GSYNC_ALLOWED=0;
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia;
|
export __GL_VRR_ALLOWED=0;
|
||||||
export WLR_NO_HARDWARE_CURSORS=1;
|
export __GLX_VENDOR_LIBRARY_NAME=nvidia;
|
||||||
|
export WLR_NO_HARDWARE_CURSORS=1;
|
||||||
|
|
||||||
# xwayland compat
|
# xwayland compat
|
||||||
export XWAYLAND_NO_GLAMOR=1;
|
export XWAYLAND_NO_GLAMOR=1;
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
terminal = "${config.programs.kitty.package}/bin/kitty";
|
terminal = "${config.programs.kitty.package}/bin/kitty";
|
||||||
|
|
@ -92,7 +102,9 @@ in
|
||||||
# { command = "${nixosConfig.systemd.package}/bin/systemctl --user stop xdg-desktop-portal xdg-desktop-portal-wlr"; }
|
# { command = "${nixosConfig.systemd.package}/bin/systemctl --user stop xdg-desktop-portal xdg-desktop-portal-wlr"; }
|
||||||
# { command = "${nixosConfig.systemd.package}/bin/systemctl --user start xdg-desktop-portal xdg-desktop-portal-wlr"; }
|
# { command = "${nixosConfig.systemd.package}/bin/systemctl --user start xdg-desktop-portal xdg-desktop-portal-wlr"; }
|
||||||
# { command = "${dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
|
# { command = "${dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
|
||||||
{ command = "${config.programs.waybar.package}/bin/waybar -c ${config.xdg.configHome}/waybar/swaybar.json -s ${config.xdg.configHome}/waybar/swaybar.css"; }
|
{
|
||||||
|
command = "${config.programs.waybar.package}/bin/waybar -c ${config.xdg.configHome}/waybar/swaybar.json -s ${config.xdg.configHome}/waybar/swaybar.css";
|
||||||
|
}
|
||||||
{ command = "${dbus}/bin/dbus-update-activation-environment --all"; }
|
{ command = "${dbus}/bin/dbus-update-activation-environment --all"; }
|
||||||
{ command = "${kanshi}/bin/kanshi"; }
|
{ command = "${kanshi}/bin/kanshi"; }
|
||||||
{ command = "${networkmanagerapplet}/bin/nm-applet"; }
|
{ command = "${networkmanagerapplet}/bin/nm-applet"; }
|
||||||
|
|
@ -340,6 +352,4 @@ in
|
||||||
workspace 1
|
workspace 1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.kanshi = {
|
services.kanshi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
common = (import ../common.nix) {
|
||||||
|
pkgs = pkgs;
|
||||||
|
lib = lib;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.wofi = {
|
programs.wofi = {
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.file.".XCompose".source = "${pkgs.keyd}/share/keyd/keyd.compose";
|
home.file.".XCompose".source = "${pkgs.keyd}/share/keyd/keyd.compose";
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,8 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
/*
|
|
||||||
xdg.configFile."nvim" = {
|
|
||||||
source = ./config;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
gcc
|
||||||
|
nodejs_20
|
||||||
tree-sitter # parser generator tool and an incremental parsing library
|
tree-sitter # parser generator tool and an incremental parsing library
|
||||||
lua-language-server # language server that offers lua language support
|
lua-language-server # language server that offers lua language support
|
||||||
clang-tools # standalone command line tools for c++ development
|
clang-tools # standalone command line tools for c++ development
|
||||||
|
|
@ -15,6 +10,8 @@
|
||||||
rustfmt # tool for formatting rust code according to style guidelines
|
rustfmt # tool for formatting rust code according to style guidelines
|
||||||
gopls # official language server for the go language
|
gopls # official language server for the go language
|
||||||
nixd # nix language server
|
nixd # nix language server
|
||||||
|
nil # yet another language server for nix
|
||||||
|
nixfmt-rfc-style # official formatter for nix code
|
||||||
nodePackages.pyright # type checker for the python language
|
nodePackages.pyright # type checker for the python language
|
||||||
ruff # an extremely fast python linter
|
ruff # an extremely fast python linter
|
||||||
black # uncompromising python code formatter
|
black # uncompromising python code formatter
|
||||||
|
|
@ -38,5 +35,4 @@
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, nixosConfig, ... }: {
|
{ pkgs, nixosConfig, ... }:
|
||||||
imports = [
|
{
|
||||||
./pomodoro.nix
|
imports = [ ./pomodoro.nix ];
|
||||||
];
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(import ./git-clone-list.nix { inherit pkgs; })
|
(import ./git-clone-list.nix { inherit pkgs; })
|
||||||
(import ./nix-update.nix { inherit pkgs nixosConfig; })
|
(import ./nix-update.nix { inherit pkgs nixosConfig; })
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "git-clone-list" ''
|
pkgs.writeShellScriptBin "git-clone-list" ''
|
||||||
reset="\e[0m"
|
reset="\e[0m"
|
||||||
bold="\e[1m"
|
bold="\e[1m"
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, nixosConfig }:
|
{ pkgs, nixosConfig }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "nuf" ''
|
pkgs.writeShellScriptBin "nuf" ''
|
||||||
reset="\e[0m"
|
reset="\e[0m"
|
||||||
red="\e[31m"
|
red="\e[31m"
|
||||||
19
modules/home-manager/scripts/pomodoro.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
pootis = ./pootis.m4a;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.openpomodoro-cli
|
||||||
|
(pkgs.writeShellScriptBin "pomostart" ''
|
||||||
|
clear
|
||||||
|
${pkgs.openpomodoro-cli}/bin/openpomodoro-cli start --wait $@
|
||||||
|
while ${pkgs.mpv}/bin/mpv ${pootis} > /dev/null 2>&1; do :; done
|
||||||
|
'')
|
||||||
|
(pkgs.writeShellScriptBin "pomobreak" ''
|
||||||
|
clear
|
||||||
|
${pkgs.openpomodoro-cli}/bin/openpomodoro-cli break --wait $@
|
||||||
|
while ${pkgs.mpv}/bin/mpv ${pootis} > /dev/null 2>&1; do :; done
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
}
|
||||||
56
modules/home-manager/shell.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
nixosConfig,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
home.file.".XCompose".source = "${pkgs.keyd}/share/keyd/keyd.compose";
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
addKeysToAgent = "yes";
|
||||||
|
includes = [ "config.d/*" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".ssh/config.d/.keep".source = builtins.toFile "keep" "";
|
||||||
|
|
||||||
|
services.ssh-agent = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
newSession = true;
|
||||||
|
terminal = "screen-256color";
|
||||||
|
|
||||||
|
clock24 = true;
|
||||||
|
escapeTime = 0;
|
||||||
|
historyLimit = 10000;
|
||||||
|
|
||||||
|
mouse = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.yazi = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.exiftool
|
||||||
|
pkgs.mediainfo
|
||||||
|
] ++ lib.optionals nixosConfig.bchmnn.gui.enable [ pkgs.ueberzugpp ];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ config, ... }: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n = {
|
|
||||||
defaultLocale = "en_US.UTF-8";
|
|
||||||
supportedLocales = [ "en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8" ];
|
|
||||||
};
|
|
||||||
console = {
|
|
||||||
font = "Lat2-Terminus16";
|
|
||||||
keyMap = "us";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
programs.kdeconnect.enable = config.bchmnn.gui.enable;
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
documentation = {
|
|
||||||
enable = true;
|
|
||||||
doc.enable = true;
|
|
||||||
dev.enable = true;
|
|
||||||
man = {
|
|
||||||
enable = true;
|
|
||||||
generateCaches = true;
|
|
||||||
man-db.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
man-pages
|
|
||||||
man-pages-posix
|
|
||||||
ncurses
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
systemd.services = {
|
|
||||||
NetworkManager-wait-online.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.wireshark = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.wireshark;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
programs.nh = {
|
|
||||||
enable = true;
|
|
||||||
# clean.enable = true;
|
|
||||||
# clean.extraArgs = "--keep-since 4d --keep 3";
|
|
||||||
# flake = "/etc/nixos";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
# provide libraries for non-nix binaries
|
|
||||||
programs.nix-ld = {
|
|
||||||
enable = true;
|
|
||||||
libraries = with pkgs; [
|
|
||||||
glibc
|
|
||||||
libcxx
|
|
||||||
libllvm
|
|
||||||
ncurses
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{ ... }@inputs: {
|
|
||||||
nix = {
|
|
||||||
settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [
|
|
||||||
(self: super: {
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = super.system;
|
|
||||||
};
|
|
||||||
mfcl3750cdwlpr = (super.callPackage ../overlays/mfcl3750cdw.nix { }).driver;
|
|
||||||
mfcl3750cdwcupswrapper = (super.callPackage ../overlays/mfcl3750cdw.nix { }).cupswrapper;
|
|
||||||
pppdf = (super.python3Packages.callPackage ../overlays/pppdf { });
|
|
||||||
iglesia-light = (super.callPackage ../overlays/fonts/iglesia-light.nix { });
|
|
||||||
})
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
allowUnfreePredicate = (_: true);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
}
|
|
||||||