style(all): Consistently use block/attr format & clean up

This commit is contained in:
Vincent Ambo 2017-10-21 00:33:39 +02:00
parent bc1f098bac
commit 9b7810ae42
5 changed files with 69 additions and 52 deletions

View file

@ -3,13 +3,14 @@
{ {
boot.initrd.luks.devices.adho.device = "/dev/disk/by-uuid/722006b0-9654-4ea1-8703-e0cf9ac1905e"; boot.initrd.luks.devices.adho.device = "/dev/disk/by-uuid/722006b0-9654-4ea1-8703-e0cf9ac1905e";
networking.hostName = "adho";
services.xserver.libinput.enable = true; services.xserver.libinput.enable = true;
services.xserver.videoDrivers = [ "intel" ]; services.xserver.videoDrivers = [ "intel" ];
programs.light.enable = true; programs.light.enable = true;
networking.wireless.enable = true; networking = {
networking.wireless.networks = { hostName = "adho";
wireless.enable = true;
wireless.networks = {
# Welcome to roast club! # Welcome to roast club!
"How do I computer?" = { "How do I computer?" = {
psk = "washyourface"; psk = "washyourface";
@ -26,6 +27,7 @@
psk = "speakeasy"; psk = "speakeasy";
}; };
}; };
};
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;

View file

@ -20,22 +20,27 @@
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
time.timeZone = "Europe/Oslo"; time.timeZone = "Europe/Oslo";
# Configure shell environment: # Configure emacs:
programs.fish.enable = true; # (actually, that's a lie, this only installs emacs!)
programs.ssh.startAgent = true;
services.emacs.enable = true; services.emacs.enable = true;
services.emacs.defaultEditor = true; services.emacs.defaultEditor = true;
virtualisation = {
# Configure VirtualBox (needed for local NixOps testing): # Configure VirtualBox (needed for local NixOps testing):
virtualisation.virtualbox.host.enable = true; virtualbox.host.enable = true;
# Configure Docker (with socket activation): # Configure Docker (with socket activation):
# Side note: ... virtualisation? ... # Side note: ... why is this in virtualisation? ...
virtualisation.docker.enable = true; docker.enable = true;
virtualisation.docker.autoPrune.enable = true; docker.autoPrune.enable = true;
};
# Configure other random applications: # Configure various other applications:
programs.java.enable = true; programs = {
java.enable = true;
fish.enable = true;
ssh.startAgent = true;
};
# Configure user account # Configure user account
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
@ -46,8 +51,10 @@
shell = pkgs.fish; shell = pkgs.fish;
}; };
security.sudo.enable = true; security.sudo = {
security.sudo.extraConfig = "wheel ALL=(ALL:ALL) SETENV: ALL"; enable = true;
extraConfig = "wheel ALL=(ALL:ALL) SETENV: ALL";
};
# This value determines the NixOS release with which your system is to be # This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database # compatible, in order to avoid breaking some software such as database

View file

@ -5,9 +5,11 @@
let wallpapers = import ./pkgs/wallpapers.nix; let wallpapers = import ./pkgs/wallpapers.nix;
in { in {
# Configure basic X-server stuff: # Configure basic X-server stuff:
services.xserver.enable = true; services.xserver = {
services.xserver.layout = "us,no"; enable = true;
services.xserver.xkbOptions = "caps:super, grp:shifts_toggle"; layout = "us,no";
xkbOptions = "caps:super, grp:shifts_toggle";
};
# configure desktop environment: # configure desktop environment:
services.xserver.windowManager.i3 = { services.xserver.windowManager.i3 = {
@ -16,12 +18,16 @@ in {
}; };
services.compton.enable = true; services.compton.enable = true;
services.compton.backend = "xrender"; # this should be the default! # this should be the default! in fact, it will soon be:
# https://github.com/NixOS/nixpkgs/pull/30486
services.compton.backend = "xrender";
# Configure Redshift for Oslo # Configure Redshift for Oslo
services.redshift.enable = true; services.redshift = {
services.redshift.latitude = "59.911491"; enable = true;
services.redshift.longitude = "10.757933"; latitude = "59.911491";
longitude = "10.757933";
};
# Configure fonts # Configure fonts
fonts = { fonts = {
@ -30,15 +36,15 @@ in {
]; ];
}; };
# Ensure wallpapers are "installed"
environment.systemPackages = [ wallpapers ];
# Configure random setting of wallpapers # Configure random setting of wallpapers
systemd.user.services.feh-wp = { systemd.user.services.feh-wp = {
description = "Randomly set wallpaper via feh"; description = "Randomly set wallpaper via feh";
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
WorkingDirectory = "${wallpapers}/share/wallpapers"; WorkingDirectory = "${wallpapers}/share/wallpapers";
# Manually shuffle because feh's --randomize option can't be restricted to
# just certain file types.
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.fd}/bin/fd -atf | shuf | head -n1 | ${pkgs.findutils}/bin/xargs ${pkgs.feh}/bin/feh --bg-fill'"; ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.fd}/bin/fd -atf | shuf | head -n1 | ${pkgs.findutils}/bin/xargs ${pkgs.feh}/bin/feh --bg-fill'";
}; };
}; };

View file

@ -20,10 +20,10 @@ in {
# /etc/ is a special place in NixOS! # /etc/ is a special place in NixOS!
# Symlinks that need to be created there must be specified explicitly. # Symlinks that need to be created there must be specified explicitly.
environment.etc = { environment.etc = {
"i3/config".source = "${dotfiles}/i3.conf";
"tmux.conf".source = "${dotfiles}/tmux.conf";
"fish/config.fish".source = "${dotfiles}/config.fish";
"rofi.conf".source = "${dotfiles}/rofi.conf";
"alacritty.yml".source = "${dotfiles}/alacritty.yml"; "alacritty.yml".source = "${dotfiles}/alacritty.yml";
"fish/config.fish".source = "${dotfiles}/config.fish";
"i3/config".source = "${dotfiles}/i3.conf";
"rofi.conf".source = "${dotfiles}/rofi.conf";
"tmux.conf".source = "${dotfiles}/tmux.conf";
}; };
} }

View file

@ -7,12 +7,14 @@
# Use proprietary nvidia driver # Use proprietary nvidia driver
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
networking.hostName = "stallo"; networking = {
networking.wireless.enable = true; hostName = "stallo";
networking.wireless.networks = { wireless.enable = true;
wireless.networks = {
"How do I computer?" = { "How do I computer?" = {
# Welcome to roast club! # Welcome to roast club!
psk = "washyourface"; psk = "washyourface";
}; };
}; };
};
} }