9
hosts/common/configs/bluetooth/default.nix
Normal file
9
hosts/common/configs/bluetooth/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General.Experimental = true;
|
||||
};
|
||||
};
|
||||
}
|
19
hosts/common/configs/boot/default.nix
Normal file
19
hosts/common/configs/boot/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
editor = false;
|
||||
};
|
||||
|
||||
timeout = 1;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
initrd.systemd.enable = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = [ "btrfs" "ntfs" ];
|
||||
};
|
||||
}
|
13
hosts/common/configs/nix/default.nix
Normal file
13
hosts/common/configs/nix/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
use-xdg-base-directories = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
@@ -7,5 +7,11 @@
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
extraConfig.pipewire-pulse = {
|
||||
pulse.cmd = [{
|
||||
cmd = "load-module";
|
||||
args = "module-switch-on-connect";
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
18
hosts/common/configs/system/default.nix
Normal file
18
hosts/common/configs/system/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
system = {
|
||||
autoUpgrade = {
|
||||
enable = true;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"-L"
|
||||
];
|
||||
dates = "02:00";
|
||||
};
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
}
|
12
hosts/common/configs/users/default.nix
Normal file
12
hosts/common/configs/users/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
};
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults lecture = never
|
||||
'';
|
||||
}
|
@@ -1,12 +1,15 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./configs/boot
|
||||
./configs/system
|
||||
./configs/nix
|
||||
./configs/persist
|
||||
./configs/sops
|
||||
./configs/users
|
||||
./configs/getty
|
||||
./configs/plymouth
|
||||
./configs/networkmanager
|
||||
./configs/networking
|
||||
./configs/bluetooth
|
||||
./configs/brightnessctl
|
||||
./configs/pipewire
|
||||
./configs/zsh
|
||||
@@ -23,58 +26,5 @@
|
||||
./scripts/cleanup
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
editor = false;
|
||||
};
|
||||
|
||||
timeout = 1;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
initrd.systemd.enable = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = [ "btrfs" "ntfs" ];
|
||||
};
|
||||
|
||||
hardware.graphics.enable32Bit = true;
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
};
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults lecture = never
|
||||
'';
|
||||
|
||||
system = {
|
||||
autoUpgrade = {
|
||||
enable = true;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"-L"
|
||||
];
|
||||
dates = "02:00";
|
||||
};
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
use-xdg-base-directories = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
|
@@ -29,12 +29,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
graphics.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
rocmPackages.clr
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
graphics = {
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
rocmPackages.clr
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
|
||||
enableAllFirmware = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
@@ -8,7 +8,5 @@
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
@@ -1,11 +1,8 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common
|
||||
../../users/nick
|
||||
(import ../../users/nick { autologin = true; })
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Athens";
|
||||
services.getty.autologinUser = config.users.users.nick.name;
|
||||
}
|
||||
|
@@ -8,6 +8,5 @@
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
20
users/configs/blueman/default.nix
Normal file
20
users/configs/blueman/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
services.blueman-applet.enable = true;
|
||||
|
||||
systemd.user.services.mpris-proxy = {
|
||||
Unit = {
|
||||
Description = "MPRIS proxy";
|
||||
Requires = [ "sound.target" ];
|
||||
After = [ "network.target" "sound.target" ];
|
||||
};
|
||||
|
||||
Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||
Intall.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
5
users/configs/networkmanager/default.nix
Normal file
5
users/configs/networkmanager/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ user ? throw "user argument is required" }: { ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name}.services.network-manager-applet.enable = true;
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
{ config, ... }:
|
||||
{ autologin ? false}: { config, lib, ... }:
|
||||
|
||||
let
|
||||
user = config.users.users.nick;
|
||||
@@ -14,6 +14,8 @@ in
|
||||
(import ../configs/cliphist { inherit user; })
|
||||
(import ../configs/ags { inherit user; })
|
||||
(import ../configs/wev { inherit user; })
|
||||
(import ../configs/networkmanager { inherit user; })
|
||||
(import ../configs/blueman { inherit user; })
|
||||
(import ../configs/brightnessctl { inherit user; })
|
||||
(import ../configs/pavucontrol { inherit user; })
|
||||
(import ../configs/pipewire { inherit user; })
|
||||
@@ -28,6 +30,8 @@ in
|
||||
];
|
||||
|
||||
home-manager.users.nick = {
|
||||
theme.wallpaper = ./wallpapers/cats.jpg;
|
||||
theme.wallpaper = ./wallpapers/clouds.png;
|
||||
};
|
||||
|
||||
services.getty.autologinUser = lib.mkIf autologin user.name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user