hmm
This commit is contained in:
parent
bc92c337d7
commit
3e7b1bab94
8 changed files with 104 additions and 93 deletions
|
|
@ -1,10 +1,14 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./locales.nix
|
||||
./nix.nix
|
||||
./nix-ld.nix
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
|
@ -12,4 +16,10 @@
|
|||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cowsay
|
||||
lolcat
|
||||
];
|
||||
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
}
|
||||
19
hosts/common/global/locales.nix
Normal file
19
hosts/common/global/locales.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
}
|
||||
6
hosts/common/global/nix-ld.nix
Normal file
6
hosts/common/global/nix-ld.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
# dynamic linking
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
];
|
||||
}
|
||||
11
hosts/common/global/nix.nix
Normal file
11
hosts/common/global/nix.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# flakes
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
}
|
||||
15
hosts/common/optional/gnome.nix
Normal file
15
hosts/common/optional/gnome.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
desktopManager.gnome = {
|
||||
enable = true;
|
||||
};
|
||||
displayManager.gdm = {
|
||||
enable = true;
|
||||
autoSuspend = false;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
17
hosts/common/optional/pipewire.nix
Normal file
17
hosts/common/optional/pipewire.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
# Enable sound with pipewire.
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
@ -9,7 +9,14 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
../common
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
../common/global
|
||||
|
||||
# optional stuff
|
||||
../common/optional/gnome.nix
|
||||
../common/optional/pipewire.nix
|
||||
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
@ -22,43 +29,10 @@
|
|||
systemd.units."dev-tpmrm0.device".enable = false;
|
||||
|
||||
networking.hostName = "hummingbird"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# flakes
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
|
|
@ -71,21 +45,7 @@
|
|||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
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;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
|
@ -103,10 +63,10 @@
|
|||
rustup
|
||||
vscode.fhs
|
||||
nix-inspect
|
||||
protonvpn-gui
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# flatpak
|
||||
services.flatpak.enable = true;
|
||||
|
||||
|
|
@ -123,43 +83,11 @@
|
|||
inputs.nixos-conf-editor.packages.${system}.nixos-conf-editor
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# ssh agent
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
hardware.ckb-next.enable = true;
|
||||
|
||||
# dynamic linking
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
];
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
{inputs, nixpkgs, home-manager, systems }: let
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
systems,
|
||||
}: let
|
||||
myLib = (import ./default.nix) {inherit inputs;};
|
||||
outputs = inputs.self.outputs;
|
||||
in rec {
|
||||
# copied from https://github.com/Misterio77/nix-config/blob/main/flake.nix
|
||||
lib = nixpkgs.lib // home-manager.lib;
|
||||
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
|
||||
pkgsFor = lib.genAttrs (import systems) (
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
}
|
||||
);
|
||||
# copied from https://github.com/Misterio77/nix-config/blob/main/flake.nix
|
||||
lib = nixpkgs.lib // home-manager.lib;
|
||||
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
|
||||
pkgsFor = lib.genAttrs (import systems) (
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
}
|
||||
);
|
||||
|
||||
mkSystem = config:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue