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,27 +3,29 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
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";
|
||||||
# Welcome to roast club!
|
wireless.enable = true;
|
||||||
"How do I computer?" = {
|
wireless.networks = {
|
||||||
psk = "washyourface";
|
# Welcome to roast club!
|
||||||
};
|
"How do I computer?" = {
|
||||||
|
psk = "washyourface";
|
||||||
|
};
|
||||||
|
|
||||||
# Did someone say wifi credentials are secret?
|
# Did someone say wifi credentials are secret?
|
||||||
# http://bit.ly/2gI43QP
|
# http://bit.ly/2gI43QP
|
||||||
"Amesto-mobile" = {
|
"Amesto-mobile" = {
|
||||||
psk = "ostemAt1";
|
psk = "ostemAt1";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Public places in Oslo:
|
# Public places in Oslo:
|
||||||
"Abelone" = {
|
"Abelone" = {
|
||||||
psk = "speakeasy";
|
psk = "speakeasy";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
# Configure VirtualBox (needed for local NixOps testing):
|
virtualisation = {
|
||||||
virtualisation.virtualbox.host.enable = true;
|
# Configure VirtualBox (needed for local NixOps testing):
|
||||||
|
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
|
||||||
|
|
34
desktop.nix
34
desktop.nix
|
@ -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,26 +36,26 @@ 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'";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.timers.feh-wp = {
|
systemd.user.timers.feh-wp = {
|
||||||
description = "Set a random wallpaper every hour";
|
description = "Set a random wallpaper every hour";
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
|
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnActiveSec = "1second";
|
OnActiveSec = "1second";
|
||||||
OnUnitActiveSec = "1hour";
|
OnUnitActiveSec = "1hour";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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";
|
"alacritty.yml".source = "${dotfiles}/alacritty.yml";
|
||||||
"tmux.conf".source = "${dotfiles}/tmux.conf";
|
|
||||||
"fish/config.fish".source = "${dotfiles}/config.fish";
|
"fish/config.fish".source = "${dotfiles}/config.fish";
|
||||||
"rofi.conf".source = "${dotfiles}/rofi.conf";
|
"i3/config".source = "${dotfiles}/i3.conf";
|
||||||
"alacritty.yml".source = "${dotfiles}/alacritty.yml";
|
"rofi.conf".source = "${dotfiles}/rofi.conf";
|
||||||
|
"tmux.conf".source = "${dotfiles}/tmux.conf";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
"How do I computer?" = {
|
wireless.networks = {
|
||||||
# Welcome to roast club!
|
"How do I computer?" = {
|
||||||
psk = "washyourface";
|
# Welcome to roast club!
|
||||||
|
psk = "washyourface";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue