style(all): Consistently use block/attr format & clean up
This commit is contained in:
parent
bc1f098bac
commit
9b7810ae42
5 changed files with 69 additions and 52 deletions
|
@ -3,13 +3,14 @@
|
|||
|
||||
{
|
||||
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.videoDrivers = [ "intel" ];
|
||||
programs.light.enable = true;
|
||||
|
||||
networking.wireless.enable = true;
|
||||
networking.wireless.networks = {
|
||||
networking = {
|
||||
hostName = "adho";
|
||||
wireless.enable = true;
|
||||
wireless.networks = {
|
||||
# Welcome to roast club!
|
||||
"How do I computer?" = {
|
||||
psk = "washyourface";
|
||||
|
@ -26,6 +27,7 @@
|
|||
psk = "speakeasy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
|
|
|
@ -20,22 +20,27 @@
|
|||
hardware.pulseaudio.enable = true;
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
# Configure shell environment:
|
||||
programs.fish.enable = true;
|
||||
programs.ssh.startAgent = true;
|
||||
# Configure emacs:
|
||||
# (actually, that's a lie, this only installs emacs!)
|
||||
services.emacs.enable = true;
|
||||
services.emacs.defaultEditor = true;
|
||||
|
||||
virtualisation = {
|
||||
# Configure VirtualBox (needed for local NixOps testing):
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
virtualbox.host.enable = true;
|
||||
|
||||
# Configure Docker (with socket activation):
|
||||
# Side note: ... virtualisation? ...
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.autoPrune.enable = true;
|
||||
# Side note: ... why is this in virtualisation? ...
|
||||
docker.enable = true;
|
||||
docker.autoPrune.enable = true;
|
||||
};
|
||||
|
||||
# Configure other random applications:
|
||||
programs.java.enable = true;
|
||||
# Configure various other applications:
|
||||
programs = {
|
||||
java.enable = true;
|
||||
fish.enable = true;
|
||||
ssh.startAgent = true;
|
||||
};
|
||||
|
||||
# Configure user account
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
@ -46,8 +51,10 @@
|
|||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
security.sudo.enable = true;
|
||||
security.sudo.extraConfig = "wheel ALL=(ALL:ALL) SETENV: ALL";
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraConfig = "wheel ALL=(ALL:ALL) SETENV: ALL";
|
||||
};
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
|
|
26
desktop.nix
26
desktop.nix
|
@ -5,9 +5,11 @@
|
|||
let wallpapers = import ./pkgs/wallpapers.nix;
|
||||
in {
|
||||
# Configure basic X-server stuff:
|
||||
services.xserver.enable = true;
|
||||
services.xserver.layout = "us,no";
|
||||
services.xserver.xkbOptions = "caps:super, grp:shifts_toggle";
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "us,no";
|
||||
xkbOptions = "caps:super, grp:shifts_toggle";
|
||||
};
|
||||
|
||||
# configure desktop environment:
|
||||
services.xserver.windowManager.i3 = {
|
||||
|
@ -16,12 +18,16 @@ in {
|
|||
};
|
||||
|
||||
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
|
||||
services.redshift.enable = true;
|
||||
services.redshift.latitude = "59.911491";
|
||||
services.redshift.longitude = "10.757933";
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
latitude = "59.911491";
|
||||
longitude = "10.757933";
|
||||
};
|
||||
|
||||
# Configure fonts
|
||||
fonts = {
|
||||
|
@ -30,15 +36,15 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
# Ensure wallpapers are "installed"
|
||||
environment.systemPackages = [ wallpapers ];
|
||||
|
||||
# Configure random setting of wallpapers
|
||||
systemd.user.services.feh-wp = {
|
||||
description = "Randomly set wallpaper via feh";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
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'";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -20,10 +20,10 @@ in {
|
|||
# /etc/ is a special place in NixOS!
|
||||
# Symlinks that need to be created there must be specified explicitly.
|
||||
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";
|
||||
"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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
# Use proprietary nvidia driver
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
networking.hostName = "stallo";
|
||||
networking.wireless.enable = true;
|
||||
networking.wireless.networks = {
|
||||
networking = {
|
||||
hostName = "stallo";
|
||||
wireless.enable = true;
|
||||
wireless.networks = {
|
||||
"How do I computer?" = {
|
||||
# Welcome to roast club!
|
||||
psk = "washyourface";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue