Initial commit
This commit is contained in:
46
system/profiles/common.nix
Normal file
46
system/profiles/common.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# - Nix ----------------------------------------
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
|
||||
extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes)
|
||||
"experimental-features = nix-command flakes";
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# - Locale -------------------------------------
|
||||
|
||||
time.timeZone = "Europe/Madrid";
|
||||
i18n.defaultLocale = "ca_ES.utf8";
|
||||
console.keyMap = "es";
|
||||
services.xserver = {
|
||||
layout = "es";
|
||||
xkbVariant = "cat";
|
||||
};
|
||||
|
||||
# - Packages -----------------------------------
|
||||
|
||||
environment.pathsToLink = [ "/libexec" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
git
|
||||
pciutils
|
||||
vim
|
||||
];
|
||||
|
||||
# - Other --------------------------------------
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
}
|
||||
8
system/profiles/default.nix
Normal file
8
system/profiles/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
./desktop.nix
|
||||
];
|
||||
}
|
||||
74
system/profiles/desktop.nix
Normal file
74
system/profiles/desktop.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.profiles.desktop;
|
||||
in
|
||||
{
|
||||
options.samfelag.profiles.desktop = {
|
||||
|
||||
enable = mkEnableOption "desktop profile";
|
||||
|
||||
laptop = mkOption {
|
||||
description = "Enable features for a laptop (trackpad, battery, etc...)";
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
# - Packages ---------------------------------
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pamixer
|
||||
];
|
||||
|
||||
# - Audio ------------------------------------
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
hardware = {
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
};
|
||||
|
||||
# - Window + Display Manager -----------------
|
||||
|
||||
environment.pathsToLink = [ "/libexec" ];
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
libinput = mkIf cfg.laptop {
|
||||
enable = true;
|
||||
touchpad.tapping = true;
|
||||
};
|
||||
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
lightdm = {
|
||||
enable = true;
|
||||
greeters.mini = {
|
||||
enable = true;
|
||||
user = "marc";
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
show-sys-info = true
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
windowManager.i3.enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user