Skip to content

Commit cb17446

Browse files
committed
Cleanup and formatting.
1 parent 2c65c9f commit cb17446

File tree

2 files changed

+25
-67
lines changed

2 files changed

+25
-67
lines changed

nix/package.nix

-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ buildNpmPackage rec {
1111
src = ../.;
1212

1313
npmDepsHash = "sha256-BALaPYoDA/cxXJ0WbmqkpbYCvu0FOX/MsoiAsE6SIAI=";
14-
1514
}

nix/system.nix

+25-66
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ config, pkgs, self, ... }:
1+
{
2+
config,
3+
pkgs,
4+
self,
5+
...
6+
}:
27

38
{
49
imports = [
@@ -10,6 +15,8 @@
1015
settings.experimental-features = "nix-command flakes";
1116
};
1217

18+
nixpkgs.config.allowUnfree = true;
19+
1320
age.secrets.acmclock = {
1421
file = ../enc.env;
1522
};
@@ -19,27 +26,20 @@
1926
boot.loader.efi.canTouchEfiVariables = true;
2027

2128
networking.hostName = "acmclock"; # Define your hostname.
22-
# Pick only one of the below networking options.
23-
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
2429
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
2530

2631
# Set your time zone.
2732
time.timeZone = "America/Chicago";
2833

29-
30-
# Enable sound.
31-
# sound.enable = true;
3234
hardware.pulseaudio.enable = true;
3335

34-
# Enable touchpad support (enabled default in most desktopManager).
35-
# services.xserver.libinput.enable = true;
36-
3736
# Define a user account. Don't forget to set a password with ‘passwd’.
3837
users.users.acmrunner = {
3938
isNormalUser = true;
4039
extraGroups = [ "docker" ]; # Enable ‘sudo’ for the user.
4140
packages = with pkgs; [ ];
4241
};
42+
4343
users.users.acmadmin = {
4444
isNormalUser = true;
4545
extraGroups = [
@@ -57,39 +57,23 @@
5757
};
5858
};
5959

60-
services.cage = let
61-
run = pkgs.writeScriptBin "rotator" ''
62-
#!/usr/bin/env bash
63-
ret=1;
64-
while test $ret -ne 0; do
65-
${pkgs.wlr-randr}/bin/wlr-randr --output DP-3 --transform=90
66-
ret=$?
67-
done
68-
${pkgs.google-chrome}/bin/google-chrome-stable --disable-http-cache --simulate-outdated-no-au="01 Jan 2099" --kiosk "http://localhost:8080";
60+
services.cage =
61+
let
62+
run = pkgs.writeScriptBin "rotator" ''
63+
#!/usr/bin/env bash
64+
ret=1;
65+
while test $ret -ne 0; do
66+
${pkgs.wlr-randr}/bin/wlr-randr --output DP-3 --transform=90
67+
ret=$?
68+
done
69+
${pkgs.google-chrome}/bin/google-chrome-stable --disable-http-cache --simulate-outdated-no-au="01 Jan 2099" --kiosk "http://localhost:8080";
6970
'';
70-
in {
71-
enable = true;
72-
program = "${run}/bin/rotator";
73-
user = "acmrunner";
74-
# extraArguments = [ "-r" ];
75-
};
76-
77-
# wait for network and DNS
78-
# systemd.services."cage-tty1" = {
79-
# wants = [
80-
# "graphical.target"
81-
# ];
82-
# wantedBy = [];
83-
# before = [];
84-
85-
# # Restart cage if it closes
86-
# serviceConfig = {
87-
# Restart = "always";
88-
# };
89-
# unitConfig = {
90-
# StartLimitBurst = 10;
91-
# };
92-
# };
71+
in
72+
{
73+
enable = true;
74+
program = "${run}/bin/rotator";
75+
user = "acmrunner";
76+
};
9377

9478
systemd.services."acmclock" = {
9579
name = "acmclock.service";
@@ -101,7 +85,6 @@ in {
10185
};
10286
enable = true;
10387
};
104-
10588

10689
# List packages installed in system profile. To search, run:
10790
# $ nix search wget
@@ -115,13 +98,6 @@ in {
11598
self.inputs.agenix.packages."${system}".default
11699
];
117100

118-
# Some programs need SUID wrappers, can be configured further or are
119-
# started in user sessions.
120-
# programs.mtr.enable = true;
121-
programs.gnupg.agent = {
122-
enable = true;
123-
enableSSHSupport = true;
124-
};
125101

126102
# Install additional fonts for emojis and other utilized fonts
127103
fonts.packages = with pkgs; [
@@ -130,11 +106,6 @@ in {
130106
noto-fonts-emoji
131107
];
132108

133-
# Installing Docker
134-
virtualisation.docker.enable = true;
135-
136-
# List services that you want to enable:
137-
138109
# Enable the OpenSSH daemon.
139110
services.openssh.enable = true;
140111

@@ -144,17 +115,5 @@ in {
144115
# Or disable the firewall altogether.
145116
# networking.firewall.enable = false;
146117

147-
# Copy the NixOS configuration file and link it from the resulting system
148-
# (/run/current-system/configuration.nix). This is useful in case you
149-
# accidentally delete configuration.nix.
150-
# system.copySystemConfiguration = true;
151-
152-
# This value determines the NixOS release from which the default
153-
# settings for stateful data, like file locations and database versions
154-
# on your system were taken. It‘s perfectly fine and recommended to leave
155-
# this value at the release version of the first install of this system.
156-
# Before changing this value read the documentation for this option
157-
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
158118
system.stateVersion = "22.11"; # Did you read the comment?
159-
nixpkgs.config.allowUnfree = true;
160119
}

0 commit comments

Comments
 (0)