From 706f8ab58ebd5b8202646b264adf3088eafd886f Mon Sep 17 00:00:00 2001 From: John Locke Date: Sun, 17 Mar 2024 09:21:24 -0700 Subject: [PATCH] Move users out to individual files --- desktop/default.nix | 9 +-------- flake.lock | 6 +++--- hosts/desktop/valhalla/configuration.nix | 1 + users/jill.nix | 11 +++++++++++ users/john.nix | 11 +++++++++++ users/owners.nix | 9 +++++++++ 6 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 users/jill.nix create mode 100644 users/john.nix create mode 100644 users/owners.nix diff --git a/desktop/default.nix b/desktop/default.nix index df4c669..9ef81ce 100644 --- a/desktop/default.nix +++ b/desktop/default.nix @@ -31,6 +31,7 @@ services.desktopManager.plasma6.enable = true; services.xserver.desktopManager.gnome.enable = true; + zramSwap.enable; # Enable CUPS to print documents. services.printing.enable = true; @@ -61,14 +62,6 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.john = { - isNormalUser = true; - description = "John"; - extraGroups = [ "networkmanager" "wheel" "docker" ]; - shell = pkgs.fish; - }; - nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ]; diff --git a/flake.lock b/flake.lock index 8a5f154..5f2fdba 100644 --- a/flake.lock +++ b/flake.lock @@ -33,11 +33,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "lastModified": 1710631334, + "narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a", "type": "github" }, "original": { diff --git a/hosts/desktop/valhalla/configuration.nix b/hosts/desktop/valhalla/configuration.nix index d1de724..a205bcf 100644 --- a/hosts/desktop/valhalla/configuration.nix +++ b/hosts/desktop/valhalla/configuration.nix @@ -11,6 +11,7 @@ ../../../desktop ../../../desktop/dev.nix ../../../desktop/office.nix + ../../../users/owners.nix ]; networking.hostName = "valhalla"; # Define your hostname. diff --git a/users/jill.nix b/users/jill.nix new file mode 100644 index 0000000..759364c --- /dev/null +++ b/users/jill.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.jill = { + isNormalUser = true; + description = "Jill"; + extraGroups = [ "networkmanager" "wheel" "docker" ]; + shell = pkgs.fish; + }; + +} diff --git a/users/john.nix b/users/john.nix new file mode 100644 index 0000000..c6247dd --- /dev/null +++ b/users/john.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.john = { + isNormalUser = true; + description = "John"; + extraGroups = [ "networkmanager" "wheel" "docker" ]; + shell = pkgs.fish; + }; + +} diff --git a/users/owners.nix b/users/owners.nix new file mode 100644 index 0000000..789578d --- /dev/null +++ b/users/owners.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./john.nix + ./jill.nix + ]; +}