diff --git a/configuration.nix b/configuration.nix index 46c489a..6fa6d97 100644 --- a/configuration.nix +++ b/configuration.nix @@ -70,6 +70,7 @@ }; }; }; + services.autorandr.enable = true; #TODO sollte nur bestimmte packages sein nicht alle nixpkgs.config.allowUnfree = true; @@ -167,7 +168,7 @@ # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. - system.copySystemConfiguration = true; + # system.copySystemConfiguration = true; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..dade9ea --- /dev/null +++ b/flake.lock @@ -0,0 +1,64 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1674556204, + "narHash": "sha256-HCRmkZsq01h2Evch08zpgE9jeHdMtGdT1okWotyvuhY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c59f0eac51da91c6989fd13a68e156f63c0e60b6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1674459583, + "narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + }, + "utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9e5659b --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.home-manager = { + url = "github:nix-community/home-manager"; + # should use system nixpkgs instead of their own + inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, nixpkgs, home-manager, ... }: let + system = "x86_64-linux"; + in {nixosConfigurations.patricknix = + nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + }; + pkgs = import nixpkgs { + inherit system; + }; + }; +} diff --git a/users/common/autorandr.nix b/users/common/autorandr.nix index d594924..5b494ef 100644 --- a/users/common/autorandr.nix +++ b/users/common/autorandr.nix @@ -73,7 +73,7 @@ }; DP-1 = { enable = true; - mode = "1920x1080"; + mode = "2560x1440"; position = "0x0"; rate = "144"; gamma = "1"; diff --git a/users/default.nix b/users/default.nix index 22f4dd0..1ac5e0c 100644 --- a/users/default.nix +++ b/users/default.nix @@ -1,13 +1,9 @@ { config, - pkgs, + home-manager, ... -}: let - home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; -in { - imports = [ - (import "${home-manager}/nixos") - ]; +}: +{ home-manager.users.patrick.imports = [./patrick.nix]; home-manager.users.root = { imports = [./common];