move newer settings from yoga to common
This commit is contained in:
parent
93b10f9a82
commit
cc62207eb4
5 changed files with 231 additions and 275 deletions
68
flake.nix
68
flake.nix
|
@ -1,21 +1,9 @@
|
|||
{
|
||||
description = "NixOS configuration with flakes";
|
||||
outputs = {
|
||||
self,
|
||||
flake-utils,
|
||||
flake-compat,
|
||||
home-manager,
|
||||
nixpkgs-nixos-unstable,
|
||||
nixpkgs-master,
|
||||
nixpkgs-stable,
|
||||
darwin,
|
||||
nixos-hardware,
|
||||
nur,
|
||||
sops,
|
||||
nil,
|
||||
helix,
|
||||
alejandra,
|
||||
} @ inputs: let
|
||||
outputs = { self, flake-utils, flake-compat, home-manager
|
||||
, nixpkgs-nixos-unstable, nixpkgs-master, nixpkgs-stable, darwin
|
||||
, nixos-hardware, nur, sops, nil, helix, alejandra, }@inputs:
|
||||
let
|
||||
mkServer = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
@ -24,20 +12,20 @@
|
|||
(import ./nixos/server-common.nix)
|
||||
sops.nixosModules.sops
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
mkRaspi = pkgs: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [(./. + "/nixos/boxes/${hostname}")];
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [ (./. + "/nixos/boxes/${hostname}") ];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
mkKiosk = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
|
||||
(import ./nixos/common.nix)
|
||||
sops.nixosModules.sops
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
|
@ -45,13 +33,24 @@
|
|||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
|
||||
imports =
|
||||
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {inherit inputs system;};
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
mkWorkstation = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
|
@ -67,7 +66,8 @@
|
|||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
|
||||
imports =
|
||||
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
|
@ -77,18 +77,17 @@
|
|||
inherit inputs system;
|
||||
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
mkShell = packageSet: system: let
|
||||
pkgs = packageSet.legacyPackages.${system};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
mkShell = packageSet: system:
|
||||
let pkgs = packageSet.legacyPackages.${system};
|
||||
in pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
cacert
|
||||
git
|
||||
|
@ -115,7 +114,7 @@
|
|||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [./nixos/home-manager];
|
||||
imports = [ ./nixos/home-manager ];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
|
@ -135,12 +134,12 @@
|
|||
|
||||
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [(./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops];
|
||||
modules = [ (./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops ];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -153,7 +152,8 @@
|
|||
(import
|
||||
"${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
|
||||
{
|
||||
environment.systemPackages = with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
|
||||
environment.systemPackages =
|
||||
with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
|
||||
neovim
|
||||
htop
|
||||
btop
|
||||
|
@ -185,7 +185,7 @@
|
|||
console.earlySetup = true;
|
||||
}
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,26 +1,16 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
nixpkgs-nixos-unstable-and-unfree,
|
||||
...
|
||||
}: {
|
||||
{ config, pkgs, inputs, lib, system, nixpkgs-nixos-unstable-and-unfree, ... }: {
|
||||
networking.hostName = "yoga";
|
||||
|
||||
imports = [./hardware-configuration.nix ../../boot.nix ../../git];
|
||||
imports = [ ./hardware-configuration.nix ../../boot.nix ../../git ../../gui ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
hardware.trackpoint.enable = true;
|
||||
services.hardware.bolt.enable = true;
|
||||
|
||||
services.fprintd = {enable = true;};
|
||||
services.fprintd = { enable = true; };
|
||||
|
||||
home-manager.users.cyryl = {lib, ...}: {
|
||||
home.packages = with pkgs; [firefox vim gnome3.gedit git];
|
||||
};
|
||||
home-manager.users.cyryl = { lib, ... }: { home.packages = with pkgs; [ ]; };
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
|
@ -45,13 +35,6 @@
|
|||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
layout = "pl";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
console.keyMap = "pl2";
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
|
@ -77,9 +60,7 @@
|
|||
isNormalUser = true;
|
||||
description = "cyryl";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
packages = with pkgs; [ ];
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
@ -91,15 +72,5 @@
|
|||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
nix = {
|
||||
settings.auto-optimise-store = true;
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
system = {stateVersion = "22.11";};
|
||||
system = { stateVersion = "22.11"; };
|
||||
}
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixpkgs-nixos-unstable-and-unfree,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
boot.kernelModules = ["fuse"];
|
||||
{ config, pkgs, nixpkgs-nixos-unstable-and-unfree, lib, ... }: {
|
||||
boot.kernelModules = [ "fuse" ];
|
||||
services.smartd.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
dispatcherScripts = [
|
||||
{
|
||||
dispatcherScripts = [{
|
||||
source = pkgs.writeText "upHook" ''
|
||||
enable_disable_wifi ()
|
||||
{
|
||||
|
@ -34,32 +27,35 @@
|
|||
fi
|
||||
'';
|
||||
type = "basic";
|
||||
}
|
||||
];
|
||||
}];
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
support32Bit = true;
|
||||
extraModules = [];
|
||||
daemon.config = {
|
||||
nice-level = -15;
|
||||
realtime-scheduling = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluezFull;
|
||||
settings = {General = {Enable = "Source,Sink,Media,Socket";};};
|
||||
settings = { General = { Enable = "Source,Sink,Media,Socket"; }; };
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ghostscript poppler];
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ ghostscript poppler ];
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
|
@ -77,7 +73,8 @@
|
|||
description = "Epson XP-540 via bolty";
|
||||
name = "epson_xp540_via_bolty";
|
||||
deviceUri = "ipp://bolty:631/printers/epson_xp540";
|
||||
model = "epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
|
||||
model =
|
||||
"epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
Duplex = "DuplexNoTumble";
|
||||
|
@ -86,7 +83,8 @@
|
|||
{
|
||||
description = "Samsung SCX-4623 Series";
|
||||
name = "samsung-SCX-4623";
|
||||
deviceUri = "usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
|
||||
deviceUri =
|
||||
"usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
|
||||
model = "samsung/SCX-4623FW.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
|
@ -95,7 +93,7 @@
|
|||
}
|
||||
];
|
||||
|
||||
services.udev.packages = [pkgs.utsushi];
|
||||
services.udev.packages = [ pkgs.utsushi ];
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
snapshot = true;
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
console.keyMap = "pl";
|
||||
imports = [./tailscale];
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
console.keyMap = "pl2";
|
||||
imports = [ ./tailscale ];
|
||||
services = {
|
||||
udev.packages = [pkgs.android-udev-rules];
|
||||
udev.packages = [ pkgs.android-udev-rules ];
|
||||
ratbagd.enable = true;
|
||||
|
||||
fwupd = {
|
||||
|
@ -14,11 +11,7 @@
|
|||
package = pkgs.fwupd;
|
||||
};
|
||||
|
||||
tlp = {
|
||||
enable = true;
|
||||
settings = {"DISK_IOSCHED" = "mq-deadline";};
|
||||
};
|
||||
|
||||
power-profiles-daemon.enable = true;
|
||||
upower.enable = true;
|
||||
fstrim.enable = true;
|
||||
clipmenu.enable = true;
|
||||
|
@ -33,6 +26,7 @@
|
|||
enable = true;
|
||||
layout = "pl";
|
||||
xkbOptions = "caps:ctrl_modifier";
|
||||
xkbVariant = "";
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
|
||||
let
|
||||
stateVersion = "22.05";
|
||||
stateVersion = "22.11";
|
||||
username = "cyryl";
|
||||
in {
|
||||
imports = [
|
||||
|
@ -73,14 +73,7 @@ in {
|
|||
defaultFonts.monospace = [ "Berkeley Mono" ];
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs;
|
||||
[
|
||||
(fetchzip {
|
||||
url = "file://" + ./fonts.zip;
|
||||
sha256 = "sha256-EfWED+hF/A0og3+oTYUuDUSq3OhdY2+fHmGKkBMQOnc=";
|
||||
stripRoot = false;
|
||||
})
|
||||
];
|
||||
fonts.fonts = with pkgs; [ ];
|
||||
|
||||
nix = {
|
||||
settings.auto-optimise-store = true;
|
||||
|
|
Loading…
Reference in a new issue